/* ============================================================
   Mon Prono 2026 — Design Glassmorphism Night Football
   ============================================================ */

:root {
    --bg: #0a0a1a;
    --bg2: #111128;
    --bg3: #1a1a3e;
    --card: rgba(255,255,255,0.06);
    --card-hover: rgba(255,255,255,0.10);
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.15);
    --text: #ffffff;
    --text2: rgba(255,255,255,0.7);
    --text3: rgba(255,255,255,0.35);
    --green: #00d4aa;
    --green-dim: rgba(0,212,170,0.15);
    --red: #e94560;
    --red-dim: rgba(233,69,96,0.15);
    --gold: #ffd700;
    --gold-dim: rgba(255,215,0,0.12);
    --purple: #a855f7;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --nav-h: 64px;
    --header-h: 54px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: #050510;
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; border: none; outline: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   APP CONTAINER — iPhone-like frame
   ============================================================ */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a1a 0%, #0f0f2a 50%, #0a0a1a 100%);
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom,0px));
    border-left: 1px solid rgba(255,255,255,0.03);
    border-right: 1px solid rgba(255,255,255,0.03);
    position: relative;
}

/* ============================================================
   HEADER — Glassmorphism Apple style
   ============================================================ */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
}
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 3px 12px 3px 3px;
    border-radius: 24px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.03);
}
.top-bar-left:active { background: rgba(255,255,255,0.08); }
.top-avatar-wrap {
    width: 34px; height: 34px;
    border-radius: 50%;
    padding: 2px;
    background: var(--avatar-color, var(--green));
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 12px var(--avatar-color, rgba(0,212,170,0.2));
}
.top-avatar-img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.top-avatar-letter {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
}
.top-name { font-size: 15px; font-weight: 600; color: var(--text); }
.top-score {
    font-size: 13px; font-weight: 700;
    color: var(--green);
    background: var(--green-dim);
    padding: 5px 14px;
    border-radius: 16px;
    letter-spacing: 0.3px;
}
.top-score span { font-weight: 400; color: var(--text3); font-size: 11px; }

/* ============================================================
   BOTTOM NAV — Glassmorphism
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom,0px));
    background: rgba(10, 10, 26, 0.88);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 200;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 1px; color: var(--text3); font-size: 10px;
    padding: 4px 10px; min-width: 48px;
    transition: all 0.2s; position: relative;
}
.nav-item i { font-size: 20px; transition: all 0.2s; }
.nav-item span { font-weight: 500; transition: all 0.2s; }
.nav-item.active, .nav-item.active i, .nav-item.active span { color: var(--green) !important; }
.nav-item.active::before {
    content: ''; position: absolute; top: 0;
    width: 20px; height: 2px;
    background: var(--green);
    border-radius: 1px;
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass {
    background: var(--card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.glass-strong {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
}

/* ============================================================
   TOASTS
   ============================================================ */
#toast-container {
    position: fixed; top: 60px; left: 50%;
    transform: translateX(-50%); z-index: 999;
    width: calc(100% - 32px); max-width: 448px;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
    animation: toastIn 0.3s ease; pointer-events: auto;
    backdrop-filter: blur(16px); text-align: center;
}
.toast-success { background: rgba(0,212,170,0.9); color: #fff; }
.toast-error { background: rgba(233,69,96,0.9); color: #fff; }
.toast-hiding { opacity: 0; transform: translateY(-10px); transition: all 0.3s; }
@keyframes toastIn { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header { padding: 14px 16px 4px; }
.page-header h1 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.page-content { padding: 0 16px 16px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 20px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; transition: all 0.15s;
    cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(135deg, var(--green) 0%, #00b894 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,212,170,0.3);
}
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
    padding-bottom: 0 !important;
    display: flex; flex-direction: column;
}
.login-hero { text-align: center; padding: 48px 24px 20px; }
.logo-icon { font-size: 56px; margin-bottom: 8px; filter: drop-shadow(0 0 20px rgba(0,212,170,0.2)); }
.login-logo h1 {
    font-size: 30px; font-weight: 800;
    background: linear-gradient(135deg, var(--green), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-subtitle { font-size: 14px; color: var(--text3); margin-top: 4px; }

/* Rules banner on login */
.rules-banner {
    margin: 0 16px 16px; padding: 14px 16px;
    border-radius: var(--radius);
    background: rgba(255,215,0,0.04);
    border: 1px solid rgba(255,215,0,0.08);
}
.rules-banner-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--gold); margin-bottom: 6px;
}
.rules-banner-content p { font-size: 12px; color: var(--text3); margin-bottom: 2px; }

/* Profile selection */
.profile-selection { padding: 8px 16px 16px; flex: 1; }
.section-title {
    font-size: 15px; font-weight: 700; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
    color: var(--text2);
}
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; padding: 24px 16px;
    border-radius: var(--radius);
    background: var(--card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    transition: all 0.2s;
    position: relative;
}
.profile-card:active { transform: scale(0.95); background: var(--card-hover); }

.profile-avatar-ring {
    width: 76px; height: 76px; padding: 3px; border-radius: 50%;
    background: var(--profile-color, var(--green));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px color-mix(in srgb, var(--profile-color, var(--green)) 30%, transparent);
}
.profile-avatar-ring img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }
.profile-avatar-ring .avatar-letter {
    width: 70px; height: 70px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: #fff;
}
.profile-name { font-size: 16px; font-weight: 600; }
.admin-badge {
    position: absolute; top: 8px; right: 8px;
    background: var(--gold); color: #1a1a2e;
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; border: 2px solid var(--bg);
    box-shadow: 0 0 12px rgba(255,215,0,0.3);
}
.login-footer { text-align: center; padding: 10px 16px 32px; }
.login-footer-text { font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.btn-admin-login {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text3); padding: 8px 20px;
    border-radius: 10px; font-size: 13px; cursor: pointer; transition: all 0.2s;
}

/* Rules strip (matches page) */
.rules-strip {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; font-size: 12px; color: var(--text3);
    background: rgba(255,215,0,0.03);
    border-bottom: 1px solid rgba(255,215,0,0.06);
    overflow-x: auto; white-space: nowrap;
}
.rules-strip .sep { color: rgba(255,255,255,0.08); }
.rules-strip strong { color: var(--text); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-grid { display: flex; flex-direction: column; gap: 12px; padding: 8px 16px 16px; }
.dash-card { padding: 16px; border-radius: var(--radius); background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--border); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-header h3 { font-size: 14px; font-weight: 600; color: var(--text3); }
.card-link { font-size: 12px; color: var(--green); font-weight: 600; }

.user-intro { display: flex; align-items: center; gap: 16px; padding: 4px 0; }
.user-avatar-wrap {
    width: 58px; height: 58px; padding: 3px; border-radius: 50%;
    background: var(--avatar-color, var(--green)); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px color-mix(in srgb, var(--avatar-color, var(--green)) 25%, transparent);
}
.user-avatar-wrap img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.user-avatar-wrap .avatar-letter { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: #fff; }
.user-info { flex: 1; }
.user-name { font-size: 18px; font-weight: 700; }
.user-score-block { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.user-score { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--green), var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.user-rank-block { display: flex; align-items: center; gap: 6px; background: var(--gold-dim); padding: 3px 10px; border-radius: 10px; }
.user-rank { font-size: 13px; color: var(--gold); font-weight: 600; }

.next-match-body { text-align: center; padding: 8px; }
.match-teaser { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 6px; }
.team-block { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 80px; }
.team-flag { font-size: 28px; filter: drop-shadow(0 0 4px rgba(255,255,255,0.1)); }
.team-name { font-size: 14px; font-weight: 500; }
.vs-badge { font-size: 16px; color: var(--text3); font-weight: 700; }
.match-date { font-size: 12px; color: var(--text3); }
.match-countdown { font-size: 14px; color: var(--gold); font-weight: 700; margin: 8px 0; }

.mini-leaderboard { display: flex; flex-direction: column; gap: 6px; }
.mini-rank-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
}
.mini-rank-row.highlight { background: var(--green-dim); border: 1px solid rgba(0,212,170,0.1); }
.rank-number { font-size: 13px; font-weight: 700; color: var(--text3); width: 24px; }
.rank-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.rank-name { flex: 1; font-size: 14px; font-weight: 500; }
.rank-score { font-size: 15px; font-weight: 700; color: var(--green); }

.recent-predictions-list { display: flex; flex-direction: column; gap: 6px; }
.prediction-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 10px; border-radius: var(--radius-xs);
    background: rgba(255,255,255,0.02); font-size: 13px;
}
.pred-scores { display: flex; align-items: center; gap: 8px; }
.pred-mine { color: var(--text3); }
.pred-real { font-weight: 600; }
.pred-vs { color: var(--text3); }

.progress-stats { display: flex; align-items: center; gap: 12px; }
.progress-body { flex: 1; }
.progress-phase { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text2); }
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.05); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 6px; transition: width 0.5s; }

.activity-list { display: flex; flex-direction: column; gap: 4px; }
.activity-row { display: flex; gap: 10px; padding: 6px 8px; font-size: 13px; align-items: center; }
.activity-icon { width: 24px; text-align: center; font-size: 14px; flex-shrink: 0; }
.activity-content { flex: 1; }
.activity-desc { color: var(--text2); }
.activity-time { font-size: 11px; color: var(--text3); white-space: nowrap; }

.recent-badges-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-mini { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: var(--radius-xs); background: rgba(255,255,255,0.02); min-width: 60px; }
.badge-mini .badge-emoji { font-size: 22px; }
.badge-mini-title { font-size: 9px; color: var(--text3); }

/* ============================================================
   MATCHES TIMELINE — Horizontal swipe
   ============================================================ */
.matches-timeline { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
.matches-timeline::-webkit-scrollbar { display: none; }
.timeline-day { min-width: 88vw; max-width: 88vw; padding: 0 4px 0 16px; scroll-snap-align: start; flex-shrink: 0; }
.timeline-day:first-child { padding-left: 16px; }
.timeline-day:last-child { padding-right: 16px; }

.timeline-day-header { display: flex; align-items: center; gap: 8px; padding: 12px 0 8px; }
.timeline-day-date { font-size: 16px; font-weight: 700; }
.timeline-day-label { font-size: 11px; color: var(--text3); background: rgba(255,255,255,0.04); padding: 2px 8px; border-radius: 6px; }
.live-dot { font-size: 12px; margin-left: auto; }

.match-card-timeline {
    background: var(--card); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px; margin-bottom: 10px; transition: all 0.15s;
}
.match-card-timeline:active { transform: scale(0.98); background: var(--card-hover); }
.match-card-timeline.live { border-color: rgba(233,69,96,0.3); box-shadow: 0 0 16px rgba(233,69,96,0.08); }

.match-tl-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.match-tl-phase { font-size: 11px; color: var(--text3); }
.match-tl-status { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 8px; }
.match-tl-status.scheduled { background: rgba(255,255,255,0.04); color: var(--text3); }
.match-tl-status.live { background: var(--red-dim); color: var(--red); }
.match-tl-status.finished { background: var(--green-dim); color: var(--green); }

.match-tl-body { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0; }
.match-tl-team { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.match-tl-flag { font-size: 28px; filter: drop-shadow(0 0 4px rgba(255,255,255,0.05)); }
.match-tl-name { font-size: 13px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.match-tl-score { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.match-tl-score .vs { font-size: 14px; color: var(--text3); font-weight: 400; }

.match-tl-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--border); font-size: 12px; }
.match-tl-my-pred { color: var(--text3); }
.match-tl-my-pred strong { color: var(--text); }
.match-tl-points { font-weight: 700; }
.match-tl-points.pos { color: var(--green); }
.match-tl-points.neg { color: var(--red); }

.timeline-dots { display: flex; justify-content: center; gap: 6px; padding: 4px 16px 16px; }
.timeline-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.1); transition: all 0.3s; cursor: pointer; }
.timeline-dot.active { background: var(--green); width: 24px; border-radius: 4px; }

/* ============================================================
   MODAL PREDICTION
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 300; display: none;
    align-items: center; justify-content: center;
    padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: rgba(20, 22, 42, 0.96);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-light);
    border-radius: 24px; padding: 24px;
    width: 100%; max-width: 380px;
    animation: modalIn 0.25s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
@keyframes modalIn { from { opacity:0; transform:scale(0.9) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text3); font-size: 24px; cursor: pointer; padding: 4px; }

.prediction-form { display: flex; flex-direction: column; gap: 16px; }
.pred-teams { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 15px; font-weight: 600; padding: 8px 0; }
.pred-team-name { flex: 1; text-align: center; }
.pred-vs { color: var(--text3); font-weight: 400; }
.score-inputs { display: flex; align-items: center; justify-content: center; gap: 14px; }
.score-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.score-box label { font-size: 12px; color: var(--text3); }
.score-box input {
    width: 64px; height: 64px; text-align: center; font-size: 26px; font-weight: 700;
    background: rgba(255,255,255,0.04); border: 2px solid var(--border); border-radius: 14px;
    color: var(--text); -moz-appearance: textfield;
}
.score-box input:focus { border-color: var(--green); }
.score-sep { font-size: 22px; font-weight: 700; color: var(--text3); }
.penalty-toggle { margin: 4px 0; }
.toggle-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text2); cursor: pointer; }
.toggle-label input { width: 18px; height: 18px; accent-color: var(--green); }
.pred-rules-hint { text-align: center; font-size: 12px; color: var(--text3); padding: 8px; background: rgba(255,215,0,0.03); border-radius: var(--radius-xs); }

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 6px; -webkit-overflow-scrolling: touch; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
    padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
    background: var(--card); color: var(--text3);
    border: 1px solid var(--border); white-space: nowrap;
    transition: all 0.2s; text-decoration: none;
}
.filter-tab.active { background: var(--green-dim); color: var(--green); border-color: rgba(0,212,170,0.15); }
.filter-tab i { margin-right: 4px; }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.lb-row-highlight { background: var(--green-dim) !important; border-left: 3px solid var(--green); border-radius: var(--radius-sm); }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); margin: 0 16px 4px; }
.lb-rank { width: 28px; font-size: 14px; font-weight: 700; color: var(--text3); }
.lb-mini-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.lb-name { flex: 1; font-size: 15px; font-weight: 500; }
.lb-score { font-size: 15px; font-weight: 700; color: var(--green); }
.lb-accuracy { font-size: 12px; color: var(--text3); }
.lb-score-perfect { font-size: 11px; color: var(--gold); }
.leaderboard-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; }
.lb-tab { padding: 6px 14px; border-radius: 18px; font-size: 13px; background: var(--card); color: var(--text3); white-space: nowrap; cursor: pointer; }
.lb-tab.active { background: var(--green-dim); color: var(--green); }
.podium-card { padding: 20px 16px; border-radius: var(--radius); text-align: center; min-width: 100px; }
.podium-medal { font-size: 32px; }
.podium-name { font-size: 14px; font-weight: 600; margin-top: 4px; }
.podium-score { font-size: 18px; font-weight: 800; color: var(--green); }
.lb-chart-container { padding: 16px; margin: 0 16px; border-radius: var(--radius); background: var(--card); }

/* ============================================================
   BADGES PAGE
   ============================================================ */
.page-badges { padding: 0 16px 16px; }
.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: var(--radius-sm); text-align: center; }
.badge-card.earned { background: var(--card); border: 1px solid var(--border); cursor: pointer; }
.badge-card.locked { opacity: 0.25; }
.badge-emoji-large { font-size: 32px; }
.badge-title { font-size: 12px; font-weight: 600; }
.badge-desc { font-size: 10px; color: var(--text3); }
.badge-category { padding: 14px; margin-bottom: 10px; background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: var(--radius); }
.category-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.badge-progress { padding: 14px; margin-bottom: 10px; background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: var(--radius); }
.badge-count { font-size: 24px; font-weight: 800; color: var(--gold); }
.badge-count-label { font-size: 12px; color: var(--text3); }
.badge-modal-emoji { font-size: 60px; margin: 12px 0; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.page-profile { padding: 0 16px 16px; }
.profile-preview { padding: 16px; text-align: center; margin-bottom: 10px; background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: var(--radius); }
.preview-card { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.preview-avatar { position: relative; width: 84px; height: 84px; }
.preview-ring { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid; }
.preview-avatar img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.preview-name { font-size: 20px; font-weight: 700; }
.preview-bio { font-size: 14px; color: var(--text3); }

.profile-form { padding: 16px; border-radius: var(--radius); margin-bottom: 10px; background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--border); }
.avatar-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.current-avatar { position: relative; width: 100px; height: 100px; cursor: pointer; border-radius: 50%; }
.current-avatar img, .current-avatar .avatar-letter { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; }
.avatar-overlay { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; font-size: 12px; opacity: 0; transition: opacity 0.2s; }
.current-avatar:hover .avatar-overlay, .current-avatar:active .avatar-overlay { opacity: 1; }
.color-picker-container { display: flex; align-items: center; gap: 12px; }
.color-input { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.color-hex { font-size: 16px; font-weight: 600; font-family: monospace; color: var(--text2); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-item { padding: 14px; background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); text-align: center; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--green); display: block; }
.stat-label { font-size: 11px; color: var(--text3); display: block; margin-top: 2px; }

/* ============================================================
   ALERTS & FORMS
   ============================================================ */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.alert-success { background: var(--green-dim); color: var(--green); }
.alert-error { background: var(--red-dim); color: var(--red); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-input { width: 100%; padding: 12px 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 15px; }
.form-input:focus { border-color: var(--green); }
.form-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }
.glass-select { width: 100%; padding: 12px 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 15px; }
.glass-select option { background: #1a1a3e; color: #fff; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; background: var(--gold-dim); color: var(--gold); padding: 2px 8px; border-radius: 6px; }
.badge-success { background: var(--green-dim); color: var(--green); padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.badge-danger { background: var(--red-dim); color: var(--red); padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.admin-login-form { display: flex; flex-direction: column; gap: 14px; }
.input-icon { position: absolute; left: 12px; color: var(--text3); font-size: 14px; z-index: 1; }
.input-wrapper { position: relative; }
.input-wrapper input { width: 100%; padding: 11px 12px 11px 38px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 15px; }
.input-wrapper input:focus { border-color: var(--green); }

/* ============================================================
   MISSING — Legacy compat from subagents
   ============================================================ */
.dark-theme { background: var(--bg); color: var(--text); }
.card-empty { text-align: center; padding: 30px; color: var(--text3); }
.btn-logout { background: var(--red-dim); color: var(--red); padding: 6px 14px; border-radius: var(--radius-xs); font-size: 12px; }
.match-meta { font-size: 12px; color: var(--text3); }
.match-phase { font-size: 11px; color: var(--text3); text-transform: uppercase; }
.countdown-text { color: var(--gold); }
.mini-avatar-placeholder { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.progress-bar-container { width: 100%; height: 6px; background: rgba(255,255,255,0.04); border-radius: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 6px; }
.rank-bar { height: 4px; background: rgba(0,212,170,0.1); border-radius: 4px; overflow: hidden; }
.rank-bar-wrapper { width: 100%; margin-top: 4px; }
.user-avatar-wrapper { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 3px solid var(--avatar-color, var(--green)); }
.user-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #fff; border-radius: 50%; }
.user-score-label { font-size: 11px; color: var(--text3); }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.page-matches { padding-bottom: 8px; }
.avatar-initials { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; border-radius: 50%; }
.large { width: 80px; height: 80px; font-size: 28px; }
.podium-1 .podium-card { background: rgba(255,215,0,0.06); border-color: rgba(255,215,0,0.12); }
.podium-2 .podium-card { background: rgba(200,200,200,0.04); }
.podium-3 .podium-card { background: rgba(205,127,50,0.04); }
.podium-avatar-placeholder { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #fff; margin: 6px auto; }
.podium-rank-label { font-size: 11px; color: var(--text3); }
.top-1 { color: var(--gold); }
.low { opacity: 0.5; }
.text-tertiary { color: var(--text3); }
.home { color: var(--green); }
.away { color: var(--red); }

/* ============================================================
   UTILITIES & ANIMATIONS
   ============================================================ */
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.glass, .dash-card, .badge-card { animation: fadeIn 0.3s ease; }
.text-center { text-align: center; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 3px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; }
.nav-admin { color: var(--red); }
.badges-mini-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 20px; color: var(--text3); font-size: 14px; }
.form-section { margin-bottom: 20px; }
.form-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.profile-badges, .profile-notifs, .profile-stats { padding: 16px; border-radius: var(--radius); margin-bottom: 10px; background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--border); }
.push-status { margin-top: 8px; font-size: 13px; }
.lb-avatar-cell { display: flex; align-items: center; gap: 8px; }
.lb-badge-emoji { font-size: 14px; }
.lb-badge-icon { font-size: 12px; }
.lb-chart-wrap { }
.lb-panel { }
.leaderboard-podium, .leaderboard-table, .leaderboard-table-wrap { width: 100%; }
/* Dashboard custom components */
.podium-section { padding: 0 16px; }
.podium-container { display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 16px 0 8px; }
.podium-spot { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; text-align: center; }
.podium-gold { order: 2; } .podium-silver { order: 1; } .podium-bronze { order: 3; }
.podium-avatar-row { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.podium-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: #fff; box-shadow: 0 0 12px rgba(0,0,0,0.3); }
.podium-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.podium-gold .podium-avatar { width: 54px; height: 54px; font-size: 20px; }
.podium-gold .podium-avatar img { width: 54px; height: 54px; }
.podium-medal { font-size: 20px; }
.podium-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score-val { font-size: 14px; font-weight: 700; color: var(--green); }
.podium-bar-track { width: 100%; height: 50px; background: rgba(255,255,255,0.02); border-radius: 6px 6px 0 0; position: relative; display: flex; align-items: flex-end; overflow: hidden; margin-top: 4px; }
.podium-bar { width: 100%; border-radius: 6px 6px 0 0; transition: height 0.8s cubic-bezier(0.34,1.56,0.64,1); min-height: 4px; }
.podium-gold .podium-bar { background: linear-gradient(180deg, #ffd700, #ffaa00); }
.podium-silver .podium-bar { background: linear-gradient(180deg, #e0e0e0, #b0b0b0); }
.podium-bronze .podium-bar { background: linear-gradient(180deg, #cd7f32, #a06020); }

.full-rank { padding: 4px 0 8px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; transition: background 0.15s; }
.rank-row.is-me { background: var(--green-dim); }
.rank-pos { font-size: 14px; min-width: 30px; text-align: center; }
.rank-avatar-sm { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.rank-avatar-sm img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.rank-name-sm { flex: 1; font-size: 14px; font-weight: 500; }
.rank-stats { text-align: right; }
.rank-pts { font-size: 15px; font-weight: 700; color: var(--green); display: block; }
.rank-acc { font-size: 11px; color: var(--text3); }
.user-header-card { padding: 12px 16px; }

.recent-list { display: flex; flex-direction: column; gap: 4px; }
.recent-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--radius-xs); background: rgba(255,255,255,0.02); font-size: 13px; }
.recent-teams { display: flex; align-items: center; gap: 6px; }
.recent-vs { font-size: 10px; color: var(--text3); }
.recent-scores { display: flex; align-items: center; gap: 8px; }
.recent-pred { color: var(--text3); }
.recent-real { font-weight: 600; }
.recent-points { font-weight: 700; font-size: 12px; }
.recent-points.pos { color: var(--green); }
.recent-points.neg { color: var(--red); }

.progress-info { display: flex; justify-content: space-between; margin-bottom: 6px; }
.progress-label { font-size: 13px; color: var(--text2); }
.progress-pct { font-size: 13px; font-weight: 700; color: var(--green); }
.progress-track { width: 100%; height: 6px; background: rgba(255,255,255,0.04); border-radius: 6px; overflow: hidden; }
.progress-phase-tag { font-size: 12px; color: var(--text3); margin-top: 6px; }

.activity-feed { display: flex; flex-direction: column; gap: 4px; }
.act-row { display: flex; gap: 10px; padding: 6px 0; font-size: 13px; align-items: flex-start; }
.act-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.act-content { flex: 1; }
.act-desc { color: var(--text2); }
.act-time { font-size: 11px; color: var(--text3); display: block; margin-top: 2px; }

.high { opacity: 1; } .medium { opacity: 0.7; }
.top-2 { font-size: 14px; } .top-3 { font-size: 13px; }

/* Leaderboard classes (styled inline) */
.lb-bronze { }
.lb-gold { }
.lb-medal-icon { }
.lb-mini-av { }
.lb-player-name { }
.lb-podium { }
.lb-podium-avatar { }
.lb-podium-bar-bg { }
.lb-podium-bar-fill { }
.lb-podium-item { }
.lb-podium-medal { }
.lb-podium-name { }
.lb-podium-score { }
.lb-progress-mini { }
.lb-row-bar { }
.lb-silver { }
.lb-stat-card { }
.lb-stat-lbl { }
.lb-stat-val { }
.lb-stats-row { }
.lb-table { }
.lb-table-header { }
.lb-td { }
.lb-td-badges { }
.lb-td-name { }
.lb-td-pct { }
.lb-td-pts { }
.lb-td-rank { }
.lb-th { }
.lb-th-badges { }
.lb-th-name { }
.lb-th-pct { }
.lb-th-pts { }
.lb-th-rank { }
.lb-rank-num { }
/* Badges page (styled inline) */
.bg-card { } .bg-category { } .bg-category-title { } .bg-desc { } .bg-emoji { }
.bg-grid { } .bg-lock-icon { } .bg-progress-card { } .bg-progress-count { }
.bg-progress-fill { } .bg-progress-header { } .bg-progress-label { } .bg-progress-track { }
.bg-select { } .bg-select-card { } .bg-select-label { } .bg-title { }
.bg-date { } .bg-select option { }
/* Badges v2 inline styles */
.bd-card { } .bd-card-content { } .bd-card-desc { } .bd-card-emoji { } .bd-card-glow { } .bd-card-title { }
.bd-circle-bg { } .bd-circle-fill { } .bd-circle-small { } .bd-circle-text { } .bd-circular-chart { }
.bd-header { } .bd-lock-icon { } .bd-locked-overlay { } .bd-profile-picker { } .bd-progress { }
.bd-progress-circle { } .bd-progress-info { } .bd-progress-sub { } .bd-progress-title { } .bd-scroll { }
.bd-section { } .bd-section-title { } .bd-card-date { }
.bd-badge { }
.bd-badge-body { }
.bd-badge-desc { }
.bd-badge-emoji { }
.bd-badge-glow { }
.bd-badge-name { }
.bd-card-top { }
.bd-cat { }
.bd-cat-count { }
.bd-cat-head { }
.bd-cat-name { }
.bd-picker { }
.bd-ring { }
.bd-ring-bg { }
.bd-ring-fill { }
.bd-ring-sm { }
.bd-ring-txt { }
.bd-ring-wrap { }
.bd-scrollx { }
.bd-top-info { }
.bd-top-row { }
.bd-top-sub { }
.bd-top-title { }
.off { }
.bchip { }
.bchip-desc { }
.bchip-emoji { }
.bchip-title { }
.card-progress { }
.card-progress-left { }
.card-ring { }
.cat { }
.cat-head { }
.cat-nb { }
.picker { }
.scroller { }
.bchip-date { }
.off { }
.on { }
.pf-av { }
.pf-color { }
.pf-colors { }
.pf-field { }
.pf-form { }
.pf-hex { }
.pf-input { }
.pf-label { }
.pf-overlay { }
.pf-section { }
.pf-upload { }
.pv-avatar { }
.pv-bio { }
.pv-card { }
.pv-initial { }
.pv-name { }
.pv-num { }
.pv-stat { }
.pv-stats { }
.bx-card {}
.bx-desc {}
.bx-emoji {}
.bx-grid {}
.bx-pick {}
.bx-progress {}
.bx-ring {}
.bx-top {}
.bx-title {}
.bx-date {}
.bx-card.on {}
.box {} .sub {}
