/* ============================================================
   MUNDIAL 2026 — CSS
   Motyw: Dark Navy + Gold Glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── ZMIENNE ─────────────────────────────────────────────── */
:root {
    --navy:          #071326;
    --navy-dark:     #030816;
    --navy-mid:      #0a1a2e;
    --gold:          #d4af37;
    --gold-light:    #f0d87a;
    --gold-dim:      rgba(212,175,55,.18);
    --glass:         rgba(8,18,36,.75);
    --glass-light:   rgba(255,255,255,.04);
    --border:        rgba(255,255,255,.08);
    --border-gold:   rgba(212,175,55,.30);
    --text-primary:  #ffffff;
    --text-secondary:#b8c5d8;
    --text-muted:    #6b7f96;
    --red-live:      #e84040;
    --blue-upcoming: #2563eb;
    --radius-card:   18px;
    --radius-sm:     10px;
    --shadow-card:   0 20px 50px rgba(0,0,0,.35);
    --shadow-gold:   0 0 30px rgba(212,175,55,.15);
}

/* ── RESET / BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    min-height: 100vh;
background-color: var(--navy-dark);

background-image:

    linear-gradient(
        rgba(3,8,22,.78),
        rgba(3,8,22,.92)
    ),

    url('../assets/stadium-bg2.png'),

    radial-gradient(
        ellipse 60% 40% at 80% 0%,
        rgba(212,175,55,.12) 0%,
        transparent 60%
    ),

    radial-gradient(
        ellipse 50% 35% at 10% 5%,
        rgba(0,80,220,.16) 0%,
        transparent 55%
    );

background-size:
    cover,
    cover,
    auto,
    auto;

background-position:
    center,
    center,
    center,
    center;

background-attachment:
    fixed,
    fixed,
    fixed,
    fixed;
}
/* ── TYPOGRAFIA ──────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.1; }

a { text-decoration: none; transition: color .2s; }

/* ── LAYOUT WRAPPER ──────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
}
/* ── LAYOUT GRID ─────────────────────────────────── */
.layout {
    display: grid;
    grid-template-columns: 1.9fr 0.9fr;
    gap: 24px;
    align-items: start;
}


/* ============================================================
   TOPBAR / HERO HEADER
   ============================================================ */
.topbar {
    position: relative;
    overflow: hidden;
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px 32px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.06);
    display: flex;
    align-items: stretch;
    gap: 28px;
}

/* ── PUCHAR ───────────────────────────────────────── */
.trophy-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-right: 24px;
    border-right: 1px solid rgba(255,255,255,.07);
}

.trophy-svg {
    width: 40px;
    height: auto;
    filter: drop-shadow(0 0 18px rgba(212,175,55,.45));
}

/* ── TOPBAR CONTENT (tytuł + dolny pasek) ─────────── */
.topbar-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.topbar-top { /* górna część: badge + h1 + p */ }

/* ── DOLNY PASEK: flagi + user-box ────────────────── */
.topbar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

/* user-box przeniesiony tu — reset margin-top ze starego CSS */
.topbar-bottom .user-box {
    margin-top: 0 !important;
}

/* Blask w prawym górnym rogu topbara */
.topbar::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle,
        rgba(212,175,55,.18) 0%,
        transparent 70%);
    pointer-events: none;
}

/* ── TYTUŁ ────────────────────────────────────────── */
.title h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    letter-spacing: 2px;
    line-height: 1;
    background: linear-gradient(130deg,
        #ffffff 30%,
        #f0d87a 60%,
        #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.title h1 .highlight {
    background: linear-gradient(130deg, #f0d87a, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 300;
    letter-spacing: .3px;
}

/* ── BADGE "FIFA WORLD CUP 2026™" ────────────────── */
.wc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg,
        rgba(212,175,55,.22),
        rgba(240,216,122,.10));
    border: 1px solid var(--border-gold);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 10px;
}

/* ── FLAGI GOSPODARZY ────────────────────────────── */
.hosts {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 14px;
}

.host-flag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: .5px;
}

.host-flag .flag-emoji { font-size: 22px; }
.host-sep { color: rgba(255,255,255,.15); font-size: 18px; }

/* ── USER BOX ────────────────────────────────────── */
.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: #c4d1e2 !important;
    font-size: 14px;
    margin-top: 16px;
}

.user-box .user-name {
    font-weight: 600;
    color: var(--text-primary) !important;
}

.user-box a {
    color: var(--gold) !important;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color .2s;
}

.user-box a:hover { color: var(--gold-light) !important; }

/* ============================================================
   SEKCJE — MECZE
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

/* Kropki LIVE / UPCOMING */
.dot-live {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--red-live);
    box-shadow: 0 0 0 3px rgba(232,64,64,.25);
    animation: pulse-live 1.6s ease-in-out infinite;
}

.dot-upcoming {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--blue-upcoming);
    box-shadow: 0 0 0 3px rgba(37,99,235,.25);
}

@keyframes pulse-live {
    0%, 100% { box-shadow: 0 0 0 3px rgba(232,64,64,.25); }
    50%       { box-shadow: 0 0 0 6px rgba(232,64,64,.10); }
}

/* ── SEKCJA LIVE — dekoracyjny blask ─────────────── */
.matches-section {
    position: relative;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 22px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* Czerwony blask dla sekcji LIVE */
.matches-section.live::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle,
        rgba(180,30,30,.20) 0%,
        transparent 70%);
    pointer-events: none;
}

/* Niebieski blask dla sekcji UPCOMING */
.matches-section.upcoming::before {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle,
        rgba(20,60,180,.18) 0%,
        transparent 70%);
    pointer-events: none;
}

/* ── KARTA MECZU ─────────────────────────────────── */
.match-card {
    background: rgba(255,255,255,.04) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.07) !important;
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.20);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}

.match-card:last-child { margin-bottom: 0; }

.match-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212,175,55,.28) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.30), var(--shadow-gold);
}

/* Linia po lewej — akcent kolorystyczny */
.match-card::before {
    content: '';
    position: absolute;
    left: 0; top: 15%; bottom: 15%;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, var(--gold), transparent);
    opacity: 0;
    transition: opacity .25s;
}

.match-card:hover::before { opacity: 1; }

/* ── DRUŻYNY ─────────────────────────────────────── */
.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.team-flag { font-size: 28px; }

.team-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    letter-spacing: .2px;
}

.vs {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    color: #8ea0bc;
    letter-spacing: 2px;
}

/* ── DATA / STATUS ───────────────────────────────── */
.match-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.match-meta .icon { opacity: .6; }

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(232,64,64,.15);
    border: 1px solid rgba(232,64,64,.30);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .8px;
    color: #ff6b6b;
    text-transform: uppercase;
}

/* ── INPUT SCORE ─────────────────────────────────── */
/* ── FLAGA PRZY DRUŻYNIE ─────────────────────────────────── */
.flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.10);
    display: block;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-input {
    width: 60px;
    height: 44px;
    background: rgba(255,255,255,.05) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
    font-family: 'Outfit', sans-serif;
}

.score-input::placeholder { color: rgba(255,255,255,.25); }

.score-input:focus {
    border-color: rgba(212,175,55,.45) !important;
    background: rgba(212,175,55,.05) !important;
    box-shadow: 0 0 0 3px rgba(212,175,55,.10);
}

.score-sep {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-muted);
}

/* ── PRZYCISKI ───────────────────────────────────── */
.save-btn {
    background: linear-gradient(135deg,
        #d4af37 0%,
        #f0d87a 100%) !important;
    color: #111 !important;
    border: none !important;
    border-radius: 8px;
    padding: 11px 22px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(212,175,55,.30);
}

.save-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(212,175,55,.40);
}

.save-btn:active { transform: translateY(0); filter: brightness(.98); }

/* Zakończony */
.finished-btn {
    background: rgba(232,64,64,.15) !important;
    color: #ff8080 !important;
    border: 1px solid rgba(232,64,64,.30) !important;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: default;
}

/* Przycisk "ZOBACZ WSZYSTKIE MECZE" */
.all-matches-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 13px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.all-matches-btn:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.14);
    color: var(--text-primary);
}

/* ============================================================
   SIDEBAR — RANKING
   ============================================================ */
.sidebar {
    background: var(--glass) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card);
    padding: 22px 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}

/* Złoty blask w tle */
.sidebar::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle,
        rgba(212,175,55,.12) 0%,
        transparent 70%);
    pointer-events: none;
}

.sidebar h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 2.5px;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── POZYCJA W RANKINGU ───────────────────────────── */
.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.06) !important;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 8px;
    transition: transform .2s, border-color .2s;
}

.ranking-item:hover {
    transform: translateX(3px);
    border-color: rgba(255,255,255,.10) !important;
}

/* TOP 1 */
.ranking-item:nth-child(1) {
    background: linear-gradient(135deg,
        rgba(212,175,55,.12),
        rgba(240,216,122,.06)) !important;
    border: 1px solid rgba(212,175,55,.35) !important;
    box-shadow: 0 0 25px rgba(212,175,55,.12);
}

/* TOP 2 */
.ranking-item:nth-child(2) {
    border: 1px solid rgba(180,180,200,.20) !important;
}

/* TOP 3 */
.ranking-item:nth-child(3) {
    border: 1px solid rgba(180,100,30,.25) !important;
}

/* Kółko z numerem miejsca */
.place {
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: rgba(212,175,55,.15);
    color: var(--gold-light);
    flex-shrink: 0;
}

/* Srebrny dla 2 */
.ranking-item:nth-child(2) .place {
    background: rgba(192,192,220,.12);
    color: #c8d0e0;
}

/* Brązowy dla 3 */
.ranking-item:nth-child(3) .place {
    background: rgba(160,82,45,.18);
    color: #d4956a;
}

/* Szary dla 4+ */
.ranking-item:nth-child(n+4) .place {
    background: rgba(255,255,255,.06);
    color: var(--text-muted);
    font-size: 13px;
}

.rank-name {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
}

.points {
    font-weight: 700;
    font-size: 14px;
    color: var(--gold-light);
    white-space: nowrap;
}

.ranking-item:nth-child(n+4) .points {
    color: var(--text-secondary);
}

/* Ikona trofeum przy top 3 */
.trophy-icon { font-size: 16px; }

/* ── STADIUM IMAGE placeholder ───────────────────── */
.sidebar-stadium {
    margin-top: 16px;
    border-radius: 10px;
    overflow: hidden;
    height: 120px;
    background: linear-gradient(160deg,
        rgba(20,40,80,.6),
        rgba(5,15,35,.9));
    display: flex;
    align-items: flex-end;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.06);
}

/* ============================================================
   SEKCJA INFO — DOLNA (3 kolumny)
   ============================================================ */
.info-bar {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 28px 32px;
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.info-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(212,175,55,.04) 0%,
        transparent 50%);
    pointer-events: none;
}

.info-col {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.info-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(212,175,55,.12);
    border: 1px solid rgba(212,175,55,.20);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: var(--gold);
}

.info-text h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 5px;
    letter-spacing: .3px;
}

.info-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 300;
}

/* ── SEPARATOR pionowy ────────────────────────────── */
.info-col + .info-col {
    border-left: 1px solid rgba(255,255,255,.06);
    padding-left: 32px;
}

/* ============================================================
   SAVED CONFIRMATION
   ============================================================ */
.saved {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.saved span {
    color: var(--text-primary);
    font-weight: 600;
}

.saved .check {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(40,200,100,.15);
    border: 1px solid rgba(40,200,100,.30);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #5de09a;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: .3px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-dark); }
::-webkit-scrollbar-thumb {
    background: rgba(212,175,55,.30);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,.50); }

/* ============================================================
   ANIMACJE WEJŚCIA
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.topbar         { animation: fadeUp .5s ease both; }
.matches-section{ animation: fadeUp .5s ease .1s both; }
.sidebar        { animation: fadeUp .5s ease .15s both; }
.info-bar       { animation: fadeUp .5s ease .2s both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ── RANKING TAB: domyślnie ukryty (pokazuje się przez JS jak inne taby) ── */
/* Na desktop sidebar jest widoczny, tab rankingu ukryty */
@media (min-width: 769px) {
    .tab-btn--ranking  { display: none !important; }
    .tab-panel--ranking { display: none !important; }
}

/* Na mobile sidebar ukryty, tab rankingu widoczny */
@media (max-width: 768px) {
    .sidebar { display: none !important; }
}

/* ── 950px: layout jedna kolumna ───────────────────── */
@media (max-width: 950px) {

    .layout {
        grid-template-columns: 1fr !important;
    }

    .sidebar {
        position: static !important;
        margin-top: 24px;
    }

    .topbar {
        padding: 20px 18px;
        border-radius: 18px;
    }

    .title h1 {
        font-size: 44px;
    }

    .info-bar {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-col + .info-col {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255,255,255,.06);
        padding-top: 20px;
    }
}

/* ── 480px: mobile phones ──────────────────────────── */
@media (max-width: 420px) {

    body { padding: 12px 10px; }

    .container { padding: 16px 12px; }

    /* TOPBAR — kolumnowo */
    .topbar {
        flex-direction: column;
        align-items: center;
        padding: 16px 14px;
        gap: 12px;
        text-align: center;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    .trophy-wrap {
        padding-right: 0;
        padding-bottom: 12px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.07);
        width: 100%;
        justify-content: center;
    }

    .trophy-svg { width: 48px; }

    .topbar-content { width: 100%; }

    .wc-badge {
        justify-content: center;
        font-size: 10px;
    }

    .title h1 {
        font-size: 28px;
        text-align: center;
        letter-spacing: 1px;
    }

    .title p {
        text-align: center;
        font-size: 12px;
    }

    .topbar-bottom {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .hosts {
        justify-content: center;
        gap: 10px;
        font-size: 12px;
    }

    .host-flag { font-size: 12px; }
    .host-flag .flag-emoji { font-size: 16px; }

    .user-box {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
        font-size: 12px;
        padding: 8px 12px;
        gap: 8px;
    }

    /* MATCH CARDS */
    .match-card {
        padding: 10px;
        border-radius: 12px;
    }

    .match-meta {
        flex-wrap: wrap;
        gap: 5px;
        font-size: 11px;
    }

    /* Środkowy rząd — 3 kolumny, ścisłe */
    .middle-row {
        grid-template-columns: 1fr auto 1fr;
        gap: 6px;
        margin: 8px 0;
    }

    .team-name {
        font-size: 11px;
        word-break: break-word;
        line-height: 1.2;
    }

    .flag {
        width: 20px !important;
        height: 20px !important;
        flex-shrink: 0;
    }

    .score {
        font-size: 22px;
        white-space: nowrap;
    }

    /* Inputy predykcji — maksymalnie skompresowane */
    .score-row { gap: 3px; }

    .score-input {
        width: 34px !important;
        height: 34px !important;
        font-size: 15px !important;
        border-radius: 6px;
        padding: 0 2px;
    }

    .score-sep { font-size: 14px; }

    .save-btn {
        padding: 9px 10px;
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    /* TABS */
    .tabs {
        gap: 6px;
        margin-bottom: 12px;
    }

    .tab-btn {
        padding: 7px 10px;
        font-size: 12px;
        letter-spacing: 1px;
        border-radius: 999px;
    }

    .tab-count {
        font-size: 10px;
        padding: 1px 5px;
    }

    /* Pills */
    .prediction-pill,
    .points-pill {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* Ranking w tabie */
    .ranking-item {
        padding: 10px 12px;
    }

    .rank-name { font-size: 13px; }
    .points { font-size: 13px; }
    .place { min-width: 28px; height: 28px; font-size: 12px; }
}

/* ── 360px: najwęższe telefony ─────────────────────── */
@media (max-width: 380px) {

    body { padding: 8px 6px; }
    .container { padding: 12px 8px; }

    .title h1 { font-size: 24px; }

    /* TABY — dwa wiersze zamiast przewijania poziomego */
    .tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 11px;
        letter-spacing: 0.5px;
        flex: 1 1 auto;
        justify-content: center;
    }

    /* KARTY — inputy bardziej kompaktowe */
    .score-input {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }

    .score { font-size: 18px; }

    /* Drużyny — tylko flaga + skrócona nazwa, bez łamania */
    .team-name {
        font-size: 10px;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .flag {
        width: 18px !important;
        height: 18px !important;
    }

    /* Middle row ciaśniej */
    .middle-row { gap: 4px; }
    .score-row { gap: 2px; }
}

.middle-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 12px 0;
}

/* Drużyna lewa — wyrównana do prawej (logo przy centrum) */
.team--home {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
    min-width: 0;
}

/* Drużyna prawa — wyrównana do lewej (logo przy centrum) */
.team--away {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
    min-width: 0;
}

.team-name,
.team span {
    font-size: 10px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score{
    font-size:34px;
}

.score-input{
    width:40px;
    height:38px;
}
/* ============================================================
   TABS — LIVE / UPCOMING / FINISHED
   ============================================================ */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    color: var(--text-secondary);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: 1.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, border-color .2s, color .2s;
}

.tab-btn:hover {
    background: rgba(255,255,255,.08);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(212,175,55,.20), rgba(212,175,55,.08));
    border-color: rgba(212,175,55,.45);
    color: var(--gold-light);
    box-shadow: 0 0 16px rgba(212,175,55,.15);
}

.tab-count {
    background: rgba(255,255,255,.10);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text-secondary);
}

.tab-btn.active .tab-count {
    background: rgba(212,175,55,.25);
    color: var(--gold-light);
}

.tab-panel {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.tab-panel.active {
    display: flex;
}

@media (max-width: 600px) {
    .tab-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}


a.ranking-item {
    display: flex;
    text-decoration: none;
    cursor: pointer;
}

a.ranking-item:hover {
    border-color: rgba(212,175,55,.35) !important;
    background: rgba(212,175,55,.07) !important;
    transform: translateX(4px);
}

a.ranking-item .rank-name {
    transition: color .2s;
}

a.ranking-item:hover .rank-name {
    color: var(--gold-light);
}

/* ============================================================
   STATYSTYKI TYPOWAŃ — blok na karcie meczu
   ============================================================ */
.pred-stats {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.pred-stats__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pred-stats__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pred-stats__total {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 1px 9px;
}

/* ── Pojedynczy wiersz / słupek ─────────────────────────── */
.pred-stats__bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pred-bar {
    display: grid;
    grid-template-columns: 42px 1fr 34px 36px;
    align-items: center;
    gap: 8px;
}

.pred-bar__score {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
    font-family: 'Outfit', monospace;
    white-space: nowrap;
}

/* Wynik który padł w meczu — zielony */
.pred-bar__score--real {
    color: #5de09a;
}

.pred-bar__track {
    height: 8px;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    overflow: hidden;
}

.pred-bar__fill {
    height: 100%;
    border-radius: 999px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
}

/* Kolory słupków */
.pred-bar--top     { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.pred-bar--real    { background: linear-gradient(90deg, #22c55e, #5de09a); }
.pred-bar--default { background: rgba(255,255,255,.18); }

.pred-bar__pct {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
}

.pred-bar__count {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 420px) {
    .pred-bar {
        grid-template-columns: 38px 1fr 30px 28px;
        gap: 5px;
    }
    .pred-bar__score { font-size: 11px; }
    .pred-bar__pct   { font-size: 11px; }
    .pred-bar__count { display: none; }
}
