/* =====================================================
   MUNDIAL 2026 — Main Stylesheet
   Colors via CSS vars (set in header.php from DB)
   FIFA-style, mobile-first
   ===================================================== */

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

:root {
    --c-primary:    #4db2ec;
    --c-dark:       #000000;
    --c-white:      #ffffff;
    --c-header:     #000000;
    --c-bg:         #f0f2f5;
    --c-card:       #ffffff;
    --c-border:     #e8eaed;
    --c-text:       #1a1a1a;
    --c-text-2:     #666666;
    --c-text-3:     #999999;
    --c-success:    #22c55e;
    --c-danger:     #ef4444;
    --c-warning:    #f59e0b;
    --c-live:       #ef4444;
    --font:         system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);
    --nav-h:        64px;
    --header-h:     52px;
    --transition:   0.22s ease;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    padding-top: var(--header-h);
    padding-bottom: calc(var(--nav-h) + 16px);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
}

html { overflow-x: hidden; }
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 2px; }

/* =====================================================
   HEADER
   ===================================================== */
.app-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--header-h);
    background: var(--c-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 200;
    gap: 10px;
}
.hamburger-btn { display: flex; flex-direction: column; gap: 5px; padding: 6px; flex-shrink: 0; }
.hamburger-btn span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }
.app-logo { flex: 1; text-align: center; display: flex; align-items: center; justify-content: center; }
.logo-text { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.logo-text em { color: var(--c-primary); font-style: normal; }
.logo-img { height: 32px; width: auto; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); border-radius: 50%; transition: background var(--transition); }
.icon-btn:hover { background: rgba(255,255,255,0.1); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.avatar-btn { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--c-primary); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.btn-header-login { font-size: 12px; font-weight: 600; color: #fff; background: var(--c-primary); padding: 5px 12px; border-radius: 20px; }

/* =====================================================
   HAMBURGER DRAWER
   ===================================================== */
.hamburger-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.hamburger-overlay.open { opacity: 1; pointer-events: all; }
.hamburger-drawer { position: fixed; top: 0; left: 0; width: 82%; max-width: 320px; height: 100vh; background: #0d0d0d; color: rgba(255,255,255,0.85); z-index: 1001; transform: translateX(-100%); transition: transform 0.24s cubic-bezier(0.4,0,0.2,1); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding-bottom: 20px; }
.hamburger-drawer.open { transform: translateX(0); }
.drawer-header { background: var(--c-header); padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.drawer-logo { font-size: 15px; font-weight: 700; color: #fff; }
.drawer-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); border-radius: 50%; }
.drawer-close:hover { background: rgba(255,255,255,0.08); }
.drawer-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.drawer-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--c-primary); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: #fff; overflow: hidden; flex-shrink: 0; }
.drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.drawer-user-name { font-size: 13px; font-weight: 600; color: #fff; }
.drawer-user-role { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 1px; }
.drawer-nav { list-style: none; padding: 8px 0; }
.drawer-nav li a { display: flex; align-items: center; gap: 14px; padding: 13px 20px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85) !important; transition: background var(--transition), color var(--transition); border-left: 3px solid transparent; text-decoration: none; background: transparent; }
.drawer-nav li a:hover { background: rgba(255,255,255,0.07); color: #fff !important; }
.drawer-nav li a.active { background: rgba(77,178,236,0.15); color: #4db2ec !important; border-left-color: #4db2ec; font-weight: 700; }
.drawer-nav li a svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.drawer-nav li a.active svg { opacity: 1; }
.drawer-nav li a:hover svg { opacity: 1; }
.drawer-divider { border-top: 1px solid rgba(255,255,255,0.07); margin: 6px 0; }
.drawer-auth-btns { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; }
.drawer-footer { padding: 16px 18px; margin-top: auto; }
.drawer-footer p { font-size: 11px; color: rgba(255,255,255,0.25); }

/* =====================================================
   BOTTOM NAVIGATION
   ===================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    height: var(--nav-h);
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    z-index: 200;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 10px; border-radius: 14px; flex: 1; transition: all 0.2s ease; position: relative; }
.nav-item span { font-size: 10px; font-weight: 500; color: var(--c-text-3); transition: color 0.2s; white-space: nowrap; }
.nav-item.active span { color: var(--c-primary); font-weight: 700; }
.nav-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, color 0.2s; color: var(--c-text-3); }
.nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active .nav-icon { color: var(--c-primary); transform: translateY(-1px); }
.nav-center { position: relative; top: -10px; }
.nav-icon-center { width: 48px; height: 48px; background: var(--c-dark); border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,0.25); color: #fff !important; }
.nav-item.nav-center.active .nav-icon-center { background: var(--c-primary); transform: translateY(-2px); }
.nav-item.nav-center span { color: var(--c-text-3) !important; }
.nav-item.nav-center.active span { color: var(--c-primary) !important; }
.bottom-spacer { height: calc(var(--nav-h) + 20px); }

/* =====================================================
   PAGE CONTENT
   ===================================================== */
.page-content { width: 100%; }

/* =====================================================
   CARDS & CONTAINERS
   ===================================================== */
.card { background: var(--c-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px; }
.card-header { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--c-border); }
.card-title { font-size: 14px; font-weight: 700; color: var(--c-text); }
.card-body { padding: 14px 16px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--c-text); text-transform: uppercase; letter-spacing: 0.5px; padding: 16px 16px 8px; }

/* =====================================================
   FLASH MESSAGES
   ===================================================== */
.flash { position: fixed; top: calc(var(--header-h) + 8px); left: 50%; right: auto; transform: translateX(-50%); width: calc(100% - 32px); max-width: 560px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 500; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity:0; transform: translateX(-50%) translateY(-10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
.flash button { background: none; border: none; font-size: 18px; cursor: pointer; opacity: 0.7; line-height: 1; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-danger, .flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* =====================================================
   BADGES
   ===================================================== */
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-live { background: #fee2e2; color: #991b1b; }
.badge-live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; margin-right: 5px; animation: pulseLive 1.2s ease-in-out infinite; }
@keyframes pulseLive { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
.badge-upcoming { background: #dbeafe; color: #1e40af; }
.badge-finished { background: #e5e7eb; color: #374151; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-primary { background: rgba(77,178,236,0.15); color: #0369a1; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.18s ease; text-decoration: none; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--c-primary); color: #000; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-dark { background: var(--c-dark); color: #fff; }
.btn-dark:hover { background: #222; }
.btn-outline { background: transparent; border: 1.5px solid var(--c-border); color: var(--c-text); }
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-success { background: var(--c-success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--c-text-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.form-control { width: 100%; padding: 11px 14px; border: 1.5px solid var(--c-border); border-radius: 10px; font-size: 14px; color: var(--c-text); background: #fff; transition: border-color 0.18s; font-family: var(--font); }
.form-control:focus { outline: none; border-color: var(--c-primary); }
.form-control::placeholder { color: var(--c-text-3); }
.form-control.is-invalid { border-color: var(--c-danger); }
.form-hint { font-size: 11px; color: var(--c-text-3); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--c-danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 400px) { .form-row { grid-template-columns: 1fr; } }

/* =====================================================
   MATCH CARDS
   ===================================================== */
.match-card { background: var(--c-card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.match-team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.match-team-flag { font-size: 28px; line-height: 1; }
.match-team-name { font-size: 12px; font-weight: 600; color: var(--c-text); text-align: center; line-height: 1.2; }
.match-center { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; min-width: 90px; }
.match-score { font-size: 24px; font-weight: 700; background: var(--c-dark); color: #fff; padding: 5px 14px; border-radius: 8px; line-height: 1; }
.match-score.live { background: var(--c-live); }
.match-time { font-size: 12px; font-weight: 600; color: var(--c-text-2); }
.match-meta { font-size: 11px; color: var(--c-text-3); text-align: center; }

/* =====================================================
   CALENDAR / SCHEDULE
   ===================================================== */
.calendar-bar { background: var(--c-dark); display: flex; align-items: center; padding: 10px 16px; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.calendar-bar::-webkit-scrollbar { display: none; }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 10px; cursor: pointer; flex-shrink: 0; transition: background 0.15s; }
.cal-day:hover { background: rgba(255,255,255,0.08); }
.cal-day.active { background: var(--c-primary); }
.cal-day-name { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }
.cal-day.active .cal-day-name { color: rgba(0,0,0,0.6); }
.cal-day-num { font-size: 16px; font-weight: 700; color: #fff; }
.cal-day.active .cal-day-num { color: #000; }
.cal-live-badge { font-size: 9px; background: var(--c-live); color: #fff; padding: 1px 5px; border-radius: 8px; font-weight: 700; }
.schedule-group-label { padding: 12px 16px 6px; font-size: 12px; font-weight: 700; color: var(--c-text-2); text-transform: uppercase; letter-spacing: 0.5px; }

/* =====================================================
   MATCH TIMELINE
   ===================================================== */
.timeline-wrap { padding: 0 16px; }
.timeline-event { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.timeline-event:last-child { border-bottom: none; }
.timeline-min { font-size: 13px; font-weight: 700; color: var(--c-primary); min-width: 36px; text-align: right; flex-shrink: 0; padding-top: 2px; }
.timeline-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.timeline-icon.goal { background: rgba(77,178,236,0.12); }
.timeline-icon.yellow { background: #fef3c7; }
.timeline-icon.red { background: #fee2e2; }
.timeline-icon.sub { background: #f0fdf4; }
.timeline-icon.info { background: var(--c-bg); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-event-name { font-size: 13px; font-weight: 600; color: var(--c-text); }
.timeline-event-detail { font-size: 12px; color: var(--c-text-2); margin-top: 2px; }
.timeline-separator { text-align: center; padding: 12px; font-size: 12px; font-weight: 700; color: var(--c-text-3); letter-spacing: 0.5px; background: var(--c-bg); margin: 4px 0; border-radius: 6px; }
.timeline-event.right { flex-direction: row-reverse; text-align: right; }
.timeline-event.right .timeline-min { text-align: left; }

/* =====================================================
   LINEUP / FORMATION
   ===================================================== */
.pitch-container { background: #1e7b34; border-radius: 10px; position: relative; padding-bottom: 62%; overflow: hidden; }
.pitch-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lineup-player-name { font-size: 8px; fill: rgba(255,255,255,0.9); text-anchor: middle; }

/* =====================================================
   STANDINGS TABLE
   ===================================================== */
.standings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings-table th { background: var(--c-dark); color: rgba(255,255,255,0.7); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 10px; text-align: center; }
.standings-table th:first-child { text-align: left; padding-left: 14px; }
.standings-table td { padding: 10px; border-bottom: 1px solid var(--c-border); text-align: center; color: var(--c-text); }
.standings-table td:first-child { text-align: left; padding-left: 14px; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table .qualify { border-left: 3px solid var(--c-success); }
.standings-table .qualify-cl { border-left: 3px solid var(--c-primary); }
.standings-table .out { border-left: 3px solid var(--c-danger); }
.standings-team { display: flex; align-items: center; gap: 8px; }
.standings-flag { font-size: 18px; flex-shrink: 0; }
.standings-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pts-col { font-weight: 700; color: var(--c-primary); }

/* =====================================================
   QUINIELA
   ===================================================== */
.quiniela-match { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.quiniela-match-header { background: var(--c-dark); padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; }
.quiniela-match-header span { font-size: 11px; color: rgba(255,255,255,0.6); }
.quiniela-match-body { padding: 14px; display: flex; align-items: center; gap: 12px; }
.q-team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.q-team-flag { font-size: 32px; }
.q-team-name { font-size: 12px; font-weight: 600; text-align: center; }
.q-score-inputs { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.q-score-input { width: 44px; height: 44px; text-align: center; font-size: 18px; font-weight: 700; border: 2px solid var(--c-border); border-radius: 8px; background: var(--c-bg); color: var(--c-text); }
.q-score-input:focus { border-color: var(--c-primary); outline: none; }
.q-dash { font-size: 20px; font-weight: 700; color: var(--c-text-3); }
.q-result { text-align: center; padding: 8px 14px; border-top: 1px solid var(--c-border); font-size: 12px; }
.q-result.exact { background: #d1fae5; color: #065f46; }
.q-result.winner { background: #dbeafe; color: #1e40af; }
.q-result.wrong { background: #fee2e2; color: #991b1b; }

/* =====================================================
   RANKING / LEADERBOARD
   ===================================================== */
.ranking-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--c-border); transition: background 0.15s; }
.ranking-item:last-child { border-bottom: none; }
.ranking-item:hover { background: var(--c-bg); }
.rank-pos { font-size: 14px; font-weight: 700; min-width: 28px; text-align: center; color: var(--c-text-3); }
.rank-pos.top1 { color: #f59e0b; font-size: 16px; }
.rank-pos.top2 { color: #94a3b8; }
.rank-pos.top3 { color: #b45309; }
.rank-avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--c-primary); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
.rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 13px; font-weight: 600; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 11px; color: var(--c-text-3); margin-top: 1px; }
.rank-points { font-size: 16px; font-weight: 700; color: var(--c-primary); flex-shrink: 0; }

/* =====================================================
   PROFILE
   ===================================================== */
.profile-hero { background: var(--c-dark); padding: 24px 16px 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.profile-avatar-wrap { position: relative; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--c-primary); object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--c-primary); font-size: 28px; font-weight: 700; color: #fff; overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit { position: absolute; bottom: 0; right: 0; width: 26px; height: 26px; background: var(--c-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.profile-avatar-edit svg { width: 12px; height: 12px; stroke: #000; fill: none; stroke-width: 2; stroke-linecap: round; }
.profile-name { font-size: 18px; font-weight: 700; color: #fff; }
.profile-email { font-size: 13px; color: rgba(255,255,255,0.5); }
.profile-stats { display: flex; gap: 0; background: var(--c-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: -20px; margin-left: 16px; margin-right: 16px; }
.profile-stat { flex: 1; padding: 16px; text-align: center; border-right: 1px solid var(--c-border); }
.profile-stat:last-child { border-right: none; }
.profile-stat-value { font-size: 20px; font-weight: 700; color: var(--c-primary); }
.profile-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--c-text-3); margin-top: 2px; }

/* =====================================================
   BANNER SLOTS
   ===================================================== */
.banner-slot { margin: 10px 16px; border-radius: var(--radius-sm); overflow: hidden; background: var(--c-bg); }
.banner-slot img { width: 100%; height: auto; display: block; }
.banner-slot.banner-top { margin-top: 0; }
.banner-slot.banner-bottom-stream { margin: 0; border-radius: 0; }
.banner-placeholder { width: 100%; height: 70px; background: linear-gradient(135deg, #e0e7ef 0%, #c8d6e5 100%); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #8a9bad; letter-spacing: 0.5px; text-transform: uppercase; border: 1.5px dashed #c0cdd8; border-radius: var(--radius-sm); }

/* =====================================================
   YOUTUBE STREAM
   ===================================================== */
.youtube-stream-wrap { background: #000; position: sticky; bottom: var(--nav-h); z-index: 100; }
.youtube-stream-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12px; color: rgba(255,255,255,0.8); background: #111; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-live); animation: pulseLive 1.2s ease-in-out infinite; flex-shrink: 0; }
.yt-close { color: rgba(255,255,255,0.6); font-size: 18px; margin-left: auto; line-height: 1; }
.youtube-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.youtube-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* =====================================================
   HOME PAGE
   ===================================================== */
.hero-countdown { background: var(--c-dark); padding: 20px 16px 24px; text-align: center; }
.hero-logo-area { margin-bottom: 12px; }
.hero-logo-text { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.hero-logo-text em { color: var(--c-primary); font-style: normal; }
.hero-subtitle { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 6px; letter-spacing: 0.3px; }
.countdown-boxes { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.cd-box { background: #111; border-radius: 10px; padding: 10px 14px; text-align: center; min-width: 58px; }
.cd-num { font-size: 26px; font-weight: 800; color: var(--c-primary); line-height: 1; }
.cd-label { font-size: 10px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }
.host-nations { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 8px; }

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-page { min-height: 100vh; padding: 0; background: var(--c-dark); display: flex; flex-direction: column; }
.auth-hero { background: var(--c-dark); padding: 30px 20px 20px; text-align: center; }
.auth-hero-logo { font-size: 28px; font-weight: 800; color: #fff; }
.auth-hero-logo em { color: var(--c-primary); font-style: normal; }
.auth-hero-sub { font-size: 13px; color: rgba(255,255,255,0.45); margin-top: 6px; }
.auth-card { background: var(--c-bg); border-radius: 24px 24px 0 0; flex: 1; padding: 24px 20px; margin-top: 20px; }
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: var(--c-text-2); margin-bottom: 24px; }
.payment-methods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.payment-method-btn { border: 2px solid var(--c-border); background: #fff; border-radius: 10px; padding: 12px; text-align: center; cursor: pointer; transition: all 0.15s; }
.payment-method-btn.selected { border-color: var(--c-primary); background: rgba(77,178,236,0.06); }
.payment-method-btn .pm-icon { font-size: 22px; margin-bottom: 4px; }
.payment-method-btn .pm-name { font-size: 12px; font-weight: 600; }
.payment-amount-box { background: var(--c-dark); color: #fff; border-radius: 12px; padding: 20px; text-align: center; margin-bottom: 20px; }
.payment-amount { font-size: 32px; font-weight: 800; color: var(--c-primary); }
.payment-currency { font-size: 14px; color: rgba(255,255,255,0.5); }
.proof-upload { border: 2px dashed var(--c-border); border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; transition: border-color 0.15s; background: #fff; }
.proof-upload:hover { border-color: var(--c-primary); }
.proof-upload input { display: none; }
.proof-upload-icon { font-size: 32px; margin-bottom: 8px; }
.proof-upload-text { font-size: 13px; color: var(--c-text-2); }
.proof-preview { margin-top: 10px; max-height: 150px; border-radius: 8px; object-fit: cover; }

/* =====================================================
   ADMIN LAYOUT
   ===================================================== */
.admin-wrap { max-width: 100%; background: #f5f7fa; min-height: 100vh; }
.admin-header { background: var(--c-dark); color: #fff; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.admin-header-title { font-size: 14px; font-weight: 700; }
.admin-sidebar-toggle { color: rgba(255,255,255,0.7); }
.admin-content { padding: 16px; max-width: 100%; }
.admin-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); margin-bottom: 16px; overflow: hidden; }
.admin-card-header { padding: 14px 16px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; }
.admin-card-title { font-size: 14px; font-weight: 700; }
.admin-card-body { padding: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: #f9fafb; color: #666; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table td { padding: 11px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 600px) { .admin-stats-grid { grid-template-columns: repeat(4,1fr); } }
.admin-stat-card { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.admin-stat-value { font-size: 22px; font-weight: 700; color: var(--c-primary); }
.admin-stat-label { font-size: 11px; text-transform: uppercase; color: #666; margin-top: 2px; letter-spacing: 0.4px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-nav a { font-size: 12px; padding: 6px 12px; border-radius: 8px; background: #fff; color: #555; border: 1px solid #e5e7eb; font-weight: 500; }
.admin-nav a.active, .admin-nav a:hover { background: var(--c-dark); color: #fff; border-color: var(--c-dark); }

/* =====================================================
   TABS
   ===================================================== */
.tabs-bar { display: flex; background: var(--c-dark); overflow-x: auto; scrollbar-width: none; }
.tabs-bar::-webkit-scrollbar { display: none; }
.tab-btn { flex: 1; padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.45); border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.15s; white-space: nowrap; min-width: 72px; }
.tab-btn.active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 700; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* =====================================================
   MISC
   ===================================================== */
.text-center { text-align: center; } .text-right { text-align: right; }
.text-primary { color: var(--c-primary); } .text-danger { color: var(--c-danger); }
.text-success { color: var(--c-success); } .text-muted { color: var(--c-text-3); }
.font-bold { font-weight: 700; }
.mt-4{margin-top:4px} .mt-8{margin-top:8px} .mt-12{margin-top:12px} .mt-16{margin-top:16px}
.mb-4{margin-bottom:4px} .mb-8{margin-bottom:8px} .mb-12{margin-bottom:12px} .mb-16{margin-bottom:16px}
.p-16{padding:16px}
.flex{display:flex} .flex-center{display:flex;align-items:center;justify-content:center}
.flex-between{display:flex;align-items:center;justify-content:space-between}
.gap-8{gap:8px} .gap-12{gap:12px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.empty-state{text-align:center;padding:40px 20px;color:var(--c-text-3)}
.empty-state-icon{font-size:40px;margin-bottom:10px}
.empty-state-title{font-size:14px;font-weight:600;color:var(--c-text-2)}
.empty-state-sub{font-size:13px;margin-top:4px}
.divider{border:none;border-top:1px solid var(--c-border);margin:12px 0}
.spinner{width:24px;height:24px;border:2.5px solid var(--c-border);border-top-color:var(--c-primary);border-radius:50%;animation:spin 0.7s linear infinite;margin:30px auto}
@keyframes spin{to{transform:rotate(360deg)}}
.pagination{display:flex;justify-content:center;gap:6px;padding:16px}
.page-btn{width:36px;height:36px;border-radius:8px;border:1.5px solid var(--c-border);background:#fff;font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--c-text);transition:all 0.15s}
.page-btn.active{background:var(--c-dark);color:#fff;border-color:var(--c-dark)}
.page-btn:hover:not(.active){border-color:var(--c-primary);color:var(--c-primary)}
.color-preview{width:28px;height:28px;border-radius:50%;border:2px solid #eee;cursor:pointer}

/* =====================================================
   COUNTDOWN BLOCK
   ===================================================== */
.cd-block{background:#000;padding:16px 14px 20px;text-align:center}
.cd-hosts{font-size:12px;color:rgba(255,255,255,.4);margin-bottom:4px}
.cd-dates{font-size:11px;color:rgba(255,255,255,.28);margin-bottom:10px}
.cd-pre{font-size:9px;text-transform:uppercase;letter-spacing:1.2px;color:rgba(255,255,255,.25);margin-bottom:10px}
.cd-row{display:flex;justify-content:center;gap:8px;margin-bottom:14px}
.cd-box{background:#0d0d0d;border-radius:10px;padding:10px 14px;min-width:64px;text-align:center;border:.5px solid rgba(255,255,255,.06)}
.cd-num{display:block;font-size:26px;font-weight:800;color:var(--c-primary,#4db2ec);line-height:1}
.cd-lbl{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:rgba(255,255,255,.22);margin-top:4px}

/* Calendar strip */
.cal-strip{display:flex;gap:4px;overflow-x:scroll;scrollbar-width:none;padding:6px 8px;justify-content:flex-start;-webkit-overflow-scrolling:touch;scroll-behavior:auto}
.cal-strip::-webkit-scrollbar{display:none}
.cal-day{flex-shrink:0;width:38px;padding:6px 2px;border-radius:10px;text-align:center;cursor:pointer;transition:background .15s;display:flex;flex-direction:column;align-items:center;gap:3px}
.cal-day:hover{background:rgba(255,255,255,.08)}
.cal-day--active,.cal-day.active{background:var(--c-primary,#4db2ec)}
.cal-dn{font-size:8px;color:rgba(255,255,255,.35);font-weight:600;text-transform:uppercase}
.cal-dd{font-size:16px;font-weight:800;color:#fff;line-height:1}
.cal-day--active .cal-dn,.cal-day.active .cal-dn{color:rgba(0,0,0,.5)}
.cal-day--active .cal-dd,.cal-day.active .cal-dd{color:#000}
.cal-dot{width:4px;height:4px;border-radius:50%;background:transparent}
.cal-dot--has{background:rgba(255,255,255,.4)}
.cal-dot--live{background:#ef4444}

/* Matches tabs */
.matches-tabs{display:flex;background:#f0f2f4;padding:5px;border-radius:12px;margin:10px 14px 8px;gap:4px}
.matches-tab{flex:1;padding:10px;text-align:center;font-size:12px;font-weight:600;color:#9ca3af;background:none;border:none;border-radius:8px;cursor:pointer;transition:all .2s}
.matches-tab.active{background:var(--c-accent,#ef4444);color:#fff;box-shadow:0 2px 8px rgba(239,68,68,.3)}

/* Comp header */
.comp-header{display:flex;align-items:center;gap:8px;padding:10px 14px 6px}
.comp-star{font-size:16px;color:#d1d5db}
.comp-name{flex:1;font-size:13px;font-weight:700;color:#111}
.comp-live-wave{font-size:11px;color:#ef4444;font-weight:700}

/* Match row v2 */
.match-row-v2{display:flex;align-items:center;padding:10px 14px;background:#fff;gap:10px;border-bottom:.5px solid #f3f4f6;cursor:pointer;text-decoration:none}
.mrv2-time{min-width:40px;text-align:center;flex-shrink:0}
.mrv2-min{font-size:13px;font-weight:800;color:#ef4444;line-height:1}
.mrv2-live-lbl{font-size:10px;color:#ef4444;font-weight:600}
.mrv2-upcoming-time{font-size:13px;font-weight:700;color:#374151}
.mrv2-upcoming-day{font-size:10px;color:#9ca3af}
.mrv2-teams{flex:1;display:flex;flex-direction:column;gap:8px}
.mrv2-team{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:#111}
.mrv2-team.dim{color:#6b7280}
.mrv2-score{min-width:38px;text-align:center;flex-shrink:0}
.mrv2-goals{font-size:18px;font-weight:800;color:#ef4444;display:block;line-height:1}
.mrv2-goals.fin{color:#111}

/* Flag images */
.flag-img{width:48px;height:32px;object-fit:cover;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.15);vertical-align:middle;flex-shrink:0}
.flag-img.flag-square{width:34px;height:34px;object-fit:contain;border-radius:8px;box-shadow:0 1px 6px rgba(0,0,0,.12);background:transparent}
.flag-emoji{font-size:22px;line-height:1;vertical-align:middle;flex-shrink:0}
