@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
    font-family: "poppins", sans-serif;
    background: linear-gradient(to right, #E6B9A6, #F3D7CA);
    margin: 0;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #594545;
}

/* Date Navigation Styles */
.date-list-container {
    position: fixed;
    left: -200px;
    top: 0;
    bottom: 0;
    width: 200px;
    overflow-y: auto;
    z-index: 1000;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.date-list-container:hover,
.date-list-container.active {
    left: 0;
}

.date-list-trigger {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background-color: transparent;
    z-index: 999;
}

.date-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.date-item {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-out;
}

.date-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: #ee8e8e;
    font-weight: 700;
}

.date-icon {
    margin-right: 10px;
}

.date-text {
    flex-grow: 1;
}

.current-date {
    font-weight: bold;
    background-color: #e6f2ff;
    border-left: 4px solid #4a90e2;
}

.selected {
    background-color: #F8EDED;
}

/* Matches Container */
#matches {
    margin-left: 20px;
    transition: margin-left 0.3s ease-in-out;
}

#matches.menu-open {
    margin-left: 220px;
}

/* Match Section Styles */
.match-section {
    margin-bottom: 30px;
    border-radius: 8px;
    padding: 15px;
    background-color: #FFF4EA;
}

.match-section h2 {
    color: #333;
    border-bottom: 2px solid #A76F6F;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.match {
    margin-bottom: 15px;
    background: #FFE9D0;
    border-radius: 37px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.match:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.league-name {
    font-weight: bold;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    background-color: #3D195B;
    color: white;
}

/* Scoreboard Styles */
.scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 40%;
}

.team.left,
.team.right {
    align-items: center;
}

.team-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

.team-name {
    font-weight: bold;
    font-size: 1em;
    margin: 5px 0;
}

.goal-scorers {
    font-size: 0.85em;
    color: #555;
    margin-top: 5px;
    list-style-type: none;
    padding: 0;
    width: 100%;
}

.goal-scorers li {
    padding: 2px 0;
}

.score {
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    min-width: 80px;
}

.finished {
    font-size: 0.6em;
    color: green;
    margin-top: 5px;
}

.match-info {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #777;
}

.motm {
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background-color: #FFD700;
    border-radius: 20px;
    font-weight: bold;
}

/* Match Details Styles */
.match-details {
    margin-top: 20px;
    padding: 20px;
    background-color: #FFF;
    border-radius: 15px;
}

.match-details h3 {
    text-align: center;
    font-size: 1.5em;
    color: #CE5A67;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
    color: #666;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Match Events Styles */
.match-events {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    background-color: #f9f9f9;
}

.event {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.event-time {
    font-weight: bold;
    min-width: 40px;
    margin-right: 10px;
}

.event-icon {
    font-size: 1.3em;
    margin: 0 15px;
}

.event-team {
    font-weight: 600;
    margin-right: 10px;
    min-width: 150px;
}

.event-details {
    flex-grow: 1;
    color: #555;
}

.goal {
    background-color: #e8f5e9;
    border-left: 3px solid #4CAF50;
}

.subst {
    background-color: #e3f2fd;
    border-left: 3px solid #2196F3;
}

.card {
    background-color: #fff3e0;
    border-left: 3px solid #FF9800;
}

/* Stats Styles */
.stats-box {
    background-color: #FFF4EA;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-name {
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.stat-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.team-value {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 1em;
    z-index: 2;
    position: relative;
}

.team-value.left {
    text-align: left;
}

.team-value.right {
    text-align: right;
}

.bar-container {
    flex: 1;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 15px;
    margin: 0 10px;
    overflow: hidden;
    position: relative;
}

.bar {
    height: 100%;
    position: absolute;
    transition: width 0.3s ease;
}

.bar.left {
    background: linear-gradient(to right, #E6B9A6, #ECCDB4);
    left: 0;
}

.bar.right {
    background: linear-gradient(to left, #F3D7CA, #F0DBAF);
    right: 0;
}

/* Lineups Styles */
.lineups-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.team-lineup {
    flex: 1;
    background-color: #FFF4EA;
    border-radius: 15px;
    padding: 20px;
}

.team-lineup h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
    text-align: center;
}

.team-lineup p {
    text-align: center;
    font-weight: 600;
    margin: 10px 0;
}

.football-field {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(to bottom, #4a9d4a 0%, #5db85d 50%, #4a9d4a 100%);
    margin: 20px 0;
    border-radius: 10px;
    border: 3px solid #fff;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.player-container {
    position: absolute;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.player {
    width: 35px;
    height: 35px;
    background-color: #ffffff;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.player.goalkeeper {
    background-color: #FFD700;
}

.player-name {
    font-size: 9px;
    margin-top: 3px;
    max-width: 70px;
    word-wrap: break-word;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

.substitutes-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.substitutes-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.substitutes-list li:last-child {
    border-bottom: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide mobile menu button by default (desktop) */
.mobile-menu-btn {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .date-item {
        display: flex;
        align-items: center;
        padding: 15px;
        cursor: pointer;
        background-color: #f8f8f8;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        animation: fadeIn 0.3s ease-out;
    }

    .date-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        background-color: #ee8e8e;
        font-weight: 700;
    }

    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
        margin-top: 50px;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1002;
        background: linear-gradient(135deg, #8B4513, #A0522D);
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 25px;
        font-size: 0.95em;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:active {
        transform: scale(0.95);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .mobile-menu-btn::before {
        content: '📅';
        font-size: 1.2em;
    }

    .mobile-menu-btn.active::before {
        content: '✕';
        font-size: 1.3em;
    }

    /* Move date navigation to top on mobile */
    .date-list-container {
        position: fixed;
        left: 0;
        right: 0;
        top: -100%;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: 60vh;
        padding: 10px;
        padding-top: 50px;
        transition: top 0.3s ease-in-out;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 1001;
        background: linear-gradient(to right, #E6B9A6, #F3D7CA);
    }

    .date-list-container.active {
        top: 0;
    }

    .date-list-trigger {
        display: none;
    }

    .date-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        gap: 8px;
        padding-bottom: 10px;
    }

    .date-item {
        min-width: 140px;
        padding: 10px;
        flex-shrink: 0;
    }   

    #matches {
        margin-left: 0;
        margin-top: 10px;
    }

    #matches.menu-open {
        margin-left: 0;
    }

    .match-section {
        padding: 10px;
    }

    .match {
        padding: 15px;
        border-radius: 25px;
        margin-bottom: 20px;
    }

    .league-name {
        font-size: 0.85em;
        padding: 6px 12px;
        margin-bottom: 15px;
        display: block;
    }

    .scoreboard {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .team {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        gap: 8px;
    }

    .team.left,
    .team.right {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Team header row with logo and name */
    .team::before {
        content: '';
        display: flex;
        width: 100%;
    }

    .team-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
        flex-shrink: 0;
        float: left;
        margin-right: 12px;
    }

    .team-name {
        flex: 1;
        text-align: left;
        font-size: 1em;
        margin: 0;
        font-weight: 700;
        padding-top: 8px;
        display: block;
    }

    .goal-scorers {
        width: 100%;
        text-align: left;
        font-size: 0.8em;
        margin-top: 0;
        padding-left: 0;
        clear: both;
    }

    .goal-scorers li {
        padding: 3px 0;
    }

    .score {
        font-size: 2.2em;
        padding: 15px 0;
        min-width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        font-weight: 900;
    }

    .finished {
        font-size: 0.5em;
        display: inline-block;
        margin-left: 10px;
    }

    .match-info {
        font-size: 0.85em;
        margin-top: 10px;
    }

    .motm {
        margin-top: 15px;
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .lineups-container {
        flex-direction: column;
        gap: 20px;
    }

    .team-lineup {
        width: 87%;
        padding: 15px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    .team-lineup h4 {
        font-size: 1.4em;
        margin-bottom: 8px;
    }

    .team-lineup p {
        font-size: 1em;
        margin: 8px 0 15px;
    }

    .football-field {
        height: 500px;
        border-radius: 15px;
        border: 4px solid #fff;
    }

    .player {
        width: 36px;
        height: 36px;
        font-size: 11px;
        border-width: 2.5px;
    }

    .player-name {
        font-size: 9px;
        max-width: 70px;
        margin-top: 4px;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 1);
    }

    .substitutes-list li {
        padding: 10px 12px;
        font-size: 0.95em;
        margin-bottom: 6px;
    }

    .stats-container {
        gap: 12px;
    }

    .stat-name {
        font-size: 0.85em;
    }

    .bar-container {
        height: 25px;
    }

    .team-value {
        font-size: 0.9em;
        min-width: 35px;
    }

    .match-details {
        padding: 15px;
    }

    .event {
        flex-wrap: wrap;
        padding: 8px;
    }

    .event-team {
        min-width: 100px;
        font-size: 0.9em;
    }

    .event-details {
        font-size: 0.85em;
    }

}
