* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #060d1f;
    --surface: #0f1a2e;
    --card: #1a2744;
    --border: #2a3a54;
    --gold: #d4af37;
    --text: #e0e7ef;
    --muted: #8899b0;
    --green: #22c55e;
    --red: #ef4444;
    --blue: #3b82f6;
    --orange: #f97316;
}
html, body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(6,13,31,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
}
.header-content { display: flex; flex-direction: column; }
.header-title { display: flex; align-items: center; gap: 0.5rem; }
.header-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(212,175,55,0.5);
}
.header-title h1 { font-size: 1rem; font-weight: 700; color: var(--gold); }
.header-sub { font-size: 0.65rem; color: var(--muted); margin-left: 13px; }

.app-main {
    padding: 4.5rem 0.75rem 5.5rem;
    min-height: 100vh;
}

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    display: flex; background: rgba(6,13,31,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 0.35rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.35rem);
}
.nav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 0.15rem; background: none; border: none;
    color: var(--muted); font-size: 0.6rem; font-weight: 500;
    padding: 0.35rem 0; cursor: pointer; transition: color 0.2s;
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn.active { color: var(--gold); }

/* Loading */
.loading-spinner {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 3rem; gap: 0.75rem;
    color: var(--muted); font-size: 0.85rem;
}
.spinner {
    width: 28px; height: 28px; border: 3px solid var(--border);
    border-top-color: var(--gold); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Section */
.section-title {
    font-size: 0.75rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 0.65rem; padding-left: 0.25rem;
}

/* Live match */
.live-banner {
    background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.04));
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 10px; padding: 0.75rem; margin-bottom: 0.75rem;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { border-color: rgba(239,68,68,0.3); }
    50% { border-color: rgba(239,68,68,0.6); }
}
.live-label {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.65rem; font-weight: 700; color: var(--red);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem;
}
.live-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--red);
    animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

/* Match card */
.match-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 0.75rem; margin-bottom: 0.5rem;
}
.match-teams {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.team-info { display: flex; align-items: center; gap: 0.4rem; flex: 1; min-width: 0; }
.team-info.right { justify-content: flex-end; text-align: right; }
.team-badge {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
.team-name {
    font-size: 0.8rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match-score {
    display: flex; align-items: center; gap: 0.2rem;
    font-size: 1.1rem; font-weight: 800; color: var(--gold);
    flex-shrink: 0; min-width: 50px; justify-content: center;
}
.match-score.dash { color: var(--muted); font-size: 0.9rem; }
.match-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid rgba(42,58,84,0.4);
    font-size: 0.65rem; color: var(--muted);
}
.match-scorers {
    margin-top: 0.4rem; padding-top: 0.35rem;
    border-top: 1px solid rgba(42,58,84,0.3);
}
.scorer-line {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.7rem; color: var(--muted); margin-bottom: 0.15rem;
}
.scorer-minute {
    background: rgba(42,58,84,0.5); color: var(--muted);
    padding: 0 4px; border-radius: 3px; font-size: 0.6rem; font-weight: 600;
    min-width: 22px; text-align: center;
}
.autogolo-badge {
    background: rgba(239,68,68,0.15); color: var(--red);
    padding: 0 4px; border-radius: 3px; font-size: 0.55rem; font-weight: 600;
}

/* Tabs */
.tabs {
    display: flex; gap: 0.35rem; margin-bottom: 0.75rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 0.45rem 0.85rem; background: var(--card);
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--muted); font-size: 0.75rem; font-weight: 600;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: all 0.2s;
}
.tab.active { background: rgba(212,175,55,0.12); color: var(--gold); border-color: rgba(212,175,55,0.4); }

/* Standings table */
.table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--card);
}
.standings {
    width: 100%; min-width: 380px; border-collapse: collapse;
    font-size: 0.78rem;
}
.standings th {
    padding: 0.55rem 0.5rem; text-align: center; font-size: 0.65rem;
    font-weight: 700; color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.05em; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--card); z-index: 1;
}
.standings td {
    padding: 0.55rem 0.5rem; text-align: center;
    border-bottom: 1px solid rgba(42,58,84,0.3); color: var(--text);
}
.standings td:first-child { width: 28px; }
.standings th:nth-child(n+6), .standings td:nth-child(n+6) { display: none; }
.standings td.team-col { text-align: left; font-weight: 600; }
.standings .pts { font-weight: 800; color: var(--gold); }
.team-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    margin-right: 0.35rem; vertical-align: middle; flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
.qualified { background: rgba(34,197,94,0.04); }

/* Scorers */
.podium {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; margin-bottom: 1rem;
}
.podium-item {
    display: flex; align-items: center; gap: 0.75rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 0.75rem 1rem; width: 100%;
}
.podium-first { border-color: rgba(212,175,55,0.4); }
.podium-rank {
    font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.5rem;
    border-radius: 5px; flex-shrink: 0;
}
.podium-gold .podium-rank { background: rgba(212,175,55,0.15); color: var(--gold); }
.podium-silver .podium-rank { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.podium-bronze .podium-rank { background: rgba(205,127,50,0.15); color: #cd7f32; }
.podium-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(42,58,84,0.6); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: var(--text); flex-shrink: 0;
}
.podium-info { flex: 1; min-width: 0; }
.podium-name {
    font-size: 0.85rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.podium-team { font-size: 0.7rem; }
.podium-goals {
    font-size: 1.1rem; font-weight: 800; color: var(--gold); flex-shrink: 0;
}

/* Scorers table */
.scorers-table {
    width: 100%; border-collapse: collapse; font-size: 0.78rem;
}
.scorers-table th {
    padding: 0.5rem; text-align: left; font-size: 0.65rem;
    font-weight: 700; color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.05em; border-bottom: 1px solid var(--border);
}
.scorers-table td {
    padding: 0.5rem; border-bottom: 1px solid rgba(42,58,84,0.3);
    color: var(--text);
}
.scorers-table .col-rank { text-align: center; width: 28px; color: var(--muted); font-weight: 600; }
.scorers-table .col-player { font-weight: 600; }
.scorers-table .col-team { display: none; }
.scorers-table .col-goals { text-align: center; font-weight: 700; color: var(--gold); }

/* Filter pills */
.filter-pills {
    display: flex; gap: 0.3rem; margin-bottom: 0.75rem;
    overflow-x: auto; scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }
.pill {
    padding: 0.35rem 0.7rem; background: var(--card);
    border: 1px solid var(--border); border-radius: 20px;
    color: var(--muted); font-size: 0.7rem; font-weight: 500;
    cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.pill.active { background: rgba(212,175,55,0.12); color: var(--gold); border-color: rgba(212,175,55,0.4); }

.empty-state {
    text-align: center; padding: 2rem; color: var(--muted); font-size: 0.85rem;
}
