* {
    box-sizing: border-box;
}

:root {
    --navy: #081426;
    --blue: #123c73;
    --cyan: #19c3e6;
    --green: #21c77a;
    --red: #ff4d67;
    --gold: #ffc857;
    --white: #ffffff;
    --muted: #9eb0c8;
    --card: #10243e;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: var(--white);
    background:
        radial-gradient(circle at top right, #174d83, transparent 35%),
        linear-gradient(145deg, var(--navy), #07101d);
}

header {
    padding: 28px 20px 55px;
    text-align: center;
    background: linear-gradient(135deg, #123c73, #081426);
}

.logo {
    margin: 0;
    font-size: clamp(2rem, 7vw, 3.5rem);
}

.tagline {
    margin: 10px 0 0;
    color: #c7d6e8;
}

.container {
    width: min(100% - 28px, 850px);
    margin: -30px auto 40px;
}

.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 7px;
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(16, 36, 62, 0.95);
}

.filter-button {
    flex: 1;
    min-width: 90px;
    padding: 11px 15px;
    border: 0;
    border-radius: 11px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-weight: bold;
}

.filter-button.active {
    color: var(--navy);
    background: var(--cyan);
}

.section-title {
    margin: 28px 4px 14px;
    font-size: 1.2rem;
}

.fixture {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(16, 36, 62, 0.96);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.fixture-button {
    width: 100%;
    padding: 18px;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.fixture-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
}

.match-status {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.status-live {
    color: white;
    background: var(--red);
    animation: pulse 1.5s infinite;
}

.status-finished {
    color: var(--navy);
    background: var(--green);
}

.status-upcoming {
    color: var(--navy);
    background: var(--gold);
}

.match-date {
    color: var(--muted);
    font-size: 0.82rem;
}

.teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.team {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: bold;
}

.team:last-child {
    justify-content: flex-end;
    text-align: right;
}

.flag {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    object-fit: contain;
}

.placeholder-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--muted);
    border-radius: 50%;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    font-weight: bold;
}

.score {
    min-width: 66px;
    font-size: 1.45rem;
    font-weight: bold;
    text-align: center;
}

.versus {
    color: var(--muted);
    font-size: 0.85rem;
}

.fixture-details {
    display: none;
    padding: 0 18px 18px;
}

.fixture.open .fixture-details {
    display: block;
}

.details-box {
    padding: 15px;
    border-radius: 13px;
    color: #d9e4f2;
    background: rgba(5, 15, 28, 0.7);
    line-height: 1.7;
}

.detail-line {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 7px 0;
}

.detail-line:last-child {
    border-bottom: 0;
}

.detail-label {
    color: var(--muted);
}

.hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.75rem;
    text-align: center;
}

@keyframes pulse {
    50% {
        opacity: 0.65;
    }
}

@media (max-width: 540px) {
    header {
        padding-top: 22px;
    }

    .container {
        width: min(100% - 18px, 850px);
    }

    .fixture-button {
        padding: 15px;
    }

    .teams {
        gap: 6px;
    }

    .team {
        flex-direction: column;
        gap: 4px;
        font-size: 0.85rem;
        text-align: center;
    }

    .team:last-child {
        flex-direction: column-reverse;
        text-align: center;
    }

    .score {
        min-width: 55px;
        font-size: 1.2rem;
    }

    .flag {
    width: 32px;
    height: 32px;
}
}
/* ---------------- Standings ---------------- */

.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.standings-table th {
    background: #1e355c;
    color: white;
    padding: 12px;
    text-align: left;
}

.standings-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.standings-table tr:hover {
    background: rgba(255,255,255,0.05);
}

.standings-table img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

.standings-table tbody tr:first-child {
    background: rgba(46, 204, 113, 0.15);
}

.standings-table tbody tr:nth-child(2) {
    background: rgba(52, 152, 219, 0.12);
}
