/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:      #0d2137;
    --navy-mid:  #1a3a5c;
    --navy-light:#2a5080;
    --red:       #dc1430;
    --gold:      #f5a623;
    --green-q:   #27ae60;
    --green-p:   #a8d5b5;
    --white:     #ffffff;
    --gray-1:    #f8f9fa;
    --gray-2:    #e9ecef;
    --gray-3:    #6c757d;
    --text:      #212529;
    --radius:    8px;
    --shadow:    0 2px 12px rgba(0,0,0,.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-1);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

a { color: var(--navy-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
    background: var(--navy);
    color: var(--white);
    padding: 16px 0;
    border-bottom: 3px solid var(--red);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-brand .brand-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wc-title {
    flex: 1;
    text-align: center;
}

.wc-title h1 {
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
}

.wc-badge { font-size: 22px; margin-right: 6px; }

.wc-sub {
    font-size: 12px;
    color: var(--gray-3);
    display: block;
    margin-top: 2px;
}

.last-update {
    font-size: 11px;
    color: var(--gray-3);
    white-space: nowrap;
}

/* ─── Sections ──────────────────────────────────────────────── */
.section {
    padding: 28px 0;
}

.section-live {
    background: var(--navy);
    padding: 24px 0;
}

.section--today    { background: var(--white); }
.section--standings { background: var(--gray-1); }
.section--scorers  { background: var(--white); }
.section--tomorrow { background: var(--gray-2); }

.section-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-2);
}

.section-live .section-title {
    color: var(--white);
    border-bottom-color: rgba(255,255,255,.2);
}

/* Live pulse animation */
.live-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

/* ─── Match Cards ────────────────────────────────────────────── */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.match-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.match-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    border-left: 4px solid var(--gray-2);
    transition: transform .15s;
}

.match-card:hover { transform: translateY(-2px); }

.match-card--live {
    border-left-color: var(--red);
    background: #fff8f8;
}

.match-card--finished {
    border-left-color: var(--navy-mid);
    opacity: .9;
}

.match-card--upcoming {
    border-left-color: var(--gold);
}

/* Section live — card gelap */
.section-live .match-card {
    background: var(--navy-mid);
    color: var(--white);
    border-left-color: var(--red);
}

.match-round {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray-3);
    margin-bottom: 8px;
}

.section-live .match-round { color: rgba(255,255,255,.6); }

.match-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.team img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.team span {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.score-final, .score-live {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.score-live { color: var(--red); }
.section-live .score-live { color: var(--gold); }

.score-label {
    font-size: 11px;
    color: var(--gray-3);
    margin-top: 2px;
}

.kickoff {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
}

.elapsed {
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    margin-top: 2px;
}

.match-events {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.15);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.event-item {
    font-size: 11px;
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.match-venue {
    font-size: 11px;
    color: var(--gray-3);
    margin-top: 8px;
    text-align: center;
}

/* ─── Standings ─────────────────────────────────────────────── */
.standings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.standings-group {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.group-title {
    background: var(--navy);
    color: var(--white);
    font-size: 13px;
    padding: 8px 14px;
    font-weight: 700;
    letter-spacing: .5px;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.standings-table th {
    background: var(--gray-2);
    padding: 6px 8px;
    text-align: center;
    font-weight: 600;
    color: var(--gray-3);
    font-size: 11px;
}

.standings-table .team-col { text-align: left; width: 45%; }

.standings-table td {
    padding: 7px 8px;
    text-align: center;
    border-bottom: 1px solid var(--gray-2);
}

.standings-table td.team-col {
    display: flex;
    align-items: center;
    gap: 6px;
}

.standings-table td.team-col img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-table td.pts { font-weight: 700; }

.row-qualify { background: rgba(39,174,96,.08); }
.row-possible { background: rgba(168,213,181,.15); }

.standings-legend {
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-3);
}

.legend-qualify { color: var(--green-q); }
.legend-possible { color: #5a9e72; }

/* ─── Top Scorers ───────────────────────────────────────────── */
.scorers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
}

.scorer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-1);
    border-radius: var(--radius);
    padding: 10px 14px;
}

.scorer-rank {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    min-width: 24px;
}

.scorer-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-2);
}

.scorer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scorer-info strong { font-size: 14px; }
.scorer-info span { font-size: 12px; color: var(--gray-3); }

.scorer-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.goals-count {
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.goals-label {
    font-size: 11px;
    color: var(--gray-3);
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.6);
    padding: 20px 0;
    font-size: 13px;
    text-align: center;
    margin-top: 8px;
}

.site-footer a { color: var(--gold); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .match-grid { grid-template-columns: 1fr; }
    .standings-grid { grid-template-columns: 1fr; }
    .site-header .container { justify-content: center; }
    .last-update { width: 100%; text-align: center; }
    .team img { width: 36px; height: 36px; }
    .score-final, .score-live, .kickoff { font-size: 22px; }
}
