:root {
    --bg-dark:    #0d1117;
    --bg-panel:   #161b22;
    --bg-card:    #21262d;
    --border-main:#30363d;
    --text-main:  #f0f6fc;
    --text-muted: #8b949e;
    --accent-green:#10b981;
    --accent-blue: #58a6ff;
    --accent-gold: #d29922;
    --accent-red:  #f85149;
}

/* ── Light mode overrides ─────────────────────────────────── */
body.light-mode {
    --bg-dark:    #f6f8fa;
    --bg-panel:   #ffffff;
    --bg-card:    #f0f4f8;
    --border-main:#d0d7de;
    --text-main:  #1f2328;
    --text-muted: #57606a;
    --accent-green:#0e8a5f;
    --accent-blue: #0969da;
    --accent-gold: #9a6700;
    --accent-red:  #cf222e;
}

/* Smooth theme transition */
*, *::before, *::after { transition: background-color 0.2s, border-color 0.2s, color 0.15s; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* CUSTOM SCROLLBARS (MINIMALIST & INVISIBLE) */
.scroll-area {
    scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar {
    display: none;
}

/* DASHBOARD GRID (CLEAN TACTICAL) */
.dashboard-wrapper {
    display: grid;
    grid-template-rows: 50px 44px auto 1fr;
    height: 100vh;
    padding: 10px;
    gap: 10px;
    overflow: hidden;
}
/* Pro tier: collapse ad row */
body.tier-pro .dashboard-wrapper {
    grid-template-rows: 50px 44px 0px 1fr;
}

.top-nav {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-main);
}

.tab-bar {
    display: flex; gap: 15px; align-items: center;
}

.tab-btn {
    background: transparent; border: none;
    color: var(--text-muted); padding: 5px 10px;
    cursor: pointer; font-size: 13px; font-weight: 700;
}
.tab-btn.active { color: var(--accent-green); border-bottom: 2px solid var(--accent-green); }

.tab-content { display: none; height: 100%; overflow: hidden; }
.tab-content.active { display: block; }
#view-ticketgen, #view-hunter, #view-performance { overflow-y: auto; }

.main-grid {
    display: grid; grid-template-columns: 280px 1fr 280px;
    gap: 10px; height: 100%; overflow: hidden;
}

.column {
    background: var(--bg-panel); border: 1px solid var(--border-main);
    border-radius: 4px; display: flex; flex-direction: column; overflow: hidden;
}

.col-header { 
    background: #1a1f26; padding: 10px; font-size: 11px; 
    font-weight: 800; border-bottom: 1px solid var(--border-main);
}
.scroll-area { flex: 1; overflow-y: auto; padding: 5px; }

.league-select {
    background: var(--bg-panel); color: var(--text-main);
    border: 1px solid var(--border-main); border-radius: 4px;
    padding: 4px 8px; font-size: 11px; font-weight: 700;
}

/* COMPACT MATCH CARDS (TACTICAL) */
.compact-match {
    background: var(--bg-card); border: 1px solid var(--border-main);
    border-radius: 4px; padding: 12px; cursor: pointer;
    margin-bottom: 6px; transition: 0.15s;
}
.compact-match:hover { border-color: var(--accent-green); }
.compact-match.active { border-color: var(--accent-green); background: rgba(35, 134, 54, 0.05); }
.cm-header { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-bottom: 5px; }
.cm-teams { font-size: 13px; font-weight: 800; color: #fff; }

/* FOCUS VIEW (SCREENSHOT 1:1) */
.focus-container { padding: 5px; }
.focus-hero {
    display: flex; justify-content: space-around; align-items: center;
    padding: 20px; background: var(--bg-card); border-radius: 8px; margin-bottom: 15px;
}
.hero-team-box { text-align: center; width: 120px; }
.hero-logo { width: 64px; height: 64px; border-radius: 50%; background: var(--bg-panel); margin-bottom: 8px; padding: 5px; }
.hero-team-name { font-size: 14px; font-weight: 800; color: #fff; }
.hero-score-box { text-align: center; }
.hero-score { font-size: 48px; font-weight: 900; color: #fff; line-height: 1; }
.hero-meta { color: var(--accent-green); font-size: 12px; font-weight: 800; margin-top: 10px; }

.specialist-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px;
}
.spec-item {
    background: var(--bg-card); border: 1px solid var(--border-main);
    padding: 12px; border-radius: 6px; text-align: center;
}
.spec-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; font-weight: 800; }
.spec-val { font-size: 16px; font-weight: 900; color: var(--accent-blue); }

.attack-flow-box {
    grid-column: span 3; background: var(--bg-card); border: 1px solid var(--border-main);
    padding: 12px; border-radius: 6px;
}
.af-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 9px; font-weight: 800; color: var(--text-muted); }
.af-bar-bg { height: 6px; background: var(--border-main); border-radius: 3px; overflow: hidden; position: relative; }
.af-bar-fill { height: 100%; position: absolute; left: 0; transition: 0.5s; width: 0; }

.team-stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px;
}
.ts-box {
    background: var(--bg-card); border: 1px solid var(--border-main);
    padding: 15px; border-radius: 8px;
}
.ts-header { font-size: 10px; color: var(--text-muted); margin-bottom: 10px; font-weight: 800; text-transform: uppercase; }
.ts-main { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.ts-gf { font-size: 28px; font-weight: 900; color: #fff; }
.ts-label { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.ts-form { display: flex; gap: 5px; }

/* MARKET CARDS */
.markets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.market-card {
    background: var(--bg-card); border: 1px solid var(--border-main);
    border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; align-items: center;
}
.market-name { font-size: 11px; font-weight: 800; color: var(--text-muted); }
.market-prob { font-size: 16px; font-weight: 900; }

/* VALUE ANALYSIS */
.value-analysis { display: flex; flex-direction: column; gap: 8px; margin-bottom: 15px; }
.va-item {
    background: var(--bg-card); border: 1px solid var(--border-main);
    border-left: 4px solid var(--accent-blue);
    border-radius: 6px; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center;
}
.va-strong { border-left-color: var(--accent-blue); }
.va-market { font-size: 13px; font-weight: 900; color: #fff; }
.va-odds { font-size: 16px; font-weight: 900; color: var(--accent-blue); }
.va-ev { font-size: 12px; font-weight: 800; color: var(--text-muted); }

/* ANALYSIS BOX */
.analysis-box {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-left: 5px solid var(--accent-green);
    padding: 16px 18px; border-radius: 8px;
    font-size: 13px; line-height: 1.7; color: #e6f7f1;
    margin-bottom: 15px;
}

/* VERDICT RECOMMENDATION BADGES */
.verdict-rec-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(16,185,129,0.2);
}
.verdict-rec-label {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--accent-green);
    margin-bottom: 8px;
    opacity: 0.7;
}
.verdict-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.verdict-badge {
    display: inline-block;
    background: #0e8a5f;
    border: 2px solid var(--accent-green);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    box-shadow: 0 0 14px rgba(16,185,129,0.35);
}

/* SCORE GRID */
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.score-cell {
    background: var(--bg-card); border-radius: 6px; padding: 10px; text-align: center;
    border: 1px solid var(--border-main);
}
.score-cell-val { font-size: 14px; font-weight: 900; }
.score-cell-pct { font-size: 10px; opacity: 0.5; }

/* BADGES & DOTS */
.badge { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.1); }
.badge-live { color: #f85149; background: rgba(248, 81, 73, 0.1); border: 1px solid rgba(248, 81, 73, 0.2); }
.badge-online { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); }
.cm-live { color: var(--accent-red); font-weight: 800; }
.form-dot { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; border-radius: 4px; font-weight: 800; margin-right: 3px; }
.form-W { background: var(--accent-green); color: #fff; }
.form-D { background: var(--accent-gold); color: #fff; }
.form-L { background: var(--accent-red); color: #fff; }
.form-placeholder { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.2); }
.cm-badges { display: flex; gap: 5px; margin-top: 8px; }
.badge-trap { font-size: 9px; font-weight: 800; color: #f85149; background: rgba(248, 81, 73, 0.1); padding: 2px 4px; border-radius: 3px; }
.badge-value { font-size: 9px; font-weight: 800; color: var(--accent-blue); background: rgba(88, 166, 255, 0.12); padding: 2px 4px; border-radius: 3px; }

/* ── Risk Score Badges ──────────────────────────────────────── */
.badge-risk { font-size: 9px; font-weight: 900; padding: 2px 5px; border-radius: 3px; letter-spacing: 0.3px; }
.risk-low  { color: #10b981; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); }
.risk-med  { color: #d29922; background: rgba(210, 153, 34, 0.12); border: 1px solid rgba(210, 153, 34, 0.3); }
.risk-high { color: #f97316; background: rgba(249, 115, 22, 0.12); border: 1px solid rgba(249, 115, 22, 0.3); }
.risk-crit { color: #f85149; background: rgba(248, 81, 73, 0.12); border: 1px solid rgba(248, 81, 73, 0.4); animation: pulse-risk 1.5s infinite; }
.badge-sterile { font-size: 9px; font-weight: 800; color: #f97316; background: rgba(249,115,22,0.1); padding: 2px 4px; border-radius: 3px; }

@keyframes pulse-risk {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ── Risk Meter ─────────────────────────────────────────────── */
.risk-meter-box {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
}
.risk-bar-bg { height: 7px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.risk-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.risk-reasons { margin: 0; padding-left: 16px; font-size: 10px; color: var(--text-muted); line-height: 1.8; }
.risk-reasons li { margin-bottom: 2px; }

/* ── Bookie's Perspective ───────────────────────────────────── */
.bookie-box {
    background: rgba(248, 81, 73, 0.04);
    border: 1px solid rgba(248, 81, 73, 0.2);
    border-left: 4px solid #f85149;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bookie-line { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.bookie-line:first-child { color: #f4f4f4; font-weight: 700; }

/* ── Sterile attack warning on shots value ──────────────────── */
.sterile-warn { color: #f97316 !important; }

/* MODALS */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); }
.modal-content {
    margin: 5vh auto; padding: 30px; width: 90%; max-width: 800px; background: var(--bg-panel);
    border: 1px solid var(--border-main); border-radius: 12px; color: #fff;
    max-height: 90vh; overflow-y: auto;
}
.close { float: right; font-size: 28px; font-weight: 900; cursor: pointer; color: var(--accent-red); }
.manual-body h3 { margin: 20px 0 10px 0; color: var(--accent-green); }
.manual-body p { margin-bottom: 12px; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

/* ── Glass / Frosted stat cards ────────────────────────────── */
.glass-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.glass {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
}
.stat-label { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
.stat-value { font-size: 22px; font-weight: 900; color: var(--text-main); }

/* ── Performance tab grids ─────────────────────────────────── */
.tracker-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.accuracy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* ── Ticket generator scrollable area ──────────────────────── */
.scroll-area-ticket {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.scroll-area-ticket::-webkit-scrollbar { display: none; }

/* ── Small help button ─────────────────────────────────────── */
.help-btn-small {
    background: transparent;
    border: 1px solid var(--border-main);
    color: var(--text-muted);
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    transition: 0.15s;
}
.help-btn-small:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* ── Value analysis level classes ──────────────────────────── */
/* Blue for value (calm, analytical) — green reserved for Verdict */
.va-strong { border-left-color: var(--accent-blue) !important; }
.va-good   { border-left-color: var(--accent-blue)  !important; opacity: 0.8; }
.va-neutral{ border-left-color: rgba(88,166,255,0.4)  !important; }
.va-trap   { border-left-color: var(--accent-red)   !important; background: rgba(248,81,73,0.04); }
.va-model  { border-left-color: #a78bfa !important; background: rgba(167,139,250,0.05); }

/* ── Bet history table ─────────────────────────────────────── */
.tracker-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.6fr 0.5fr 0.5fr;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 6px;
}
.tracker-won  { color: var(--accent-green); font-weight: 900; }
.tracker-lost { color: var(--accent-red);   font-weight: 900; }

/* ── Focus empty-state placeholder ────────────────────────── */
.placeholder-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
    font-size: 13px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   AD SLOTS — Free Tier Advertisements
   ═══════════════════════════════════════════════════════════ */

/* Pro tier hides all ads */
body.tier-pro .ad-slot { display: none !important; }

/* Generic ad slot */
.ad-slot {
    overflow: hidden;
    border-radius: 6px;
}

/* AD label badge */
.ad-label {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ── Top Banner Ad (728x90) ────────────────────────────────── */
.ad-banner-top {
    margin: 0 0 2px 0;
}
.ad-placeholder-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(88,166,255,0.06));
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.ad-placeholder-text {
    flex: 1;
    font-size: 12px;
}
.ad-placeholder-text b {
    color: var(--accent-green);
}
.ad-placeholder-cta {
    padding: 4px 14px;
    background: var(--accent-green);
    color: #000;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.ad-placeholder-cta:hover { opacity: 0.85; }

/* ── Sidebar Ad (300x250 rectangle) ────────────────────────── */
.ad-sidebar-box {
    border-top: 1px solid var(--border-main);
    flex-shrink: 0;
}
.ad-placeholder-rect {
    background: linear-gradient(180deg, rgba(16,185,129,0.04), rgba(0,0,0,0.15));
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 6px;
}
.ad-placeholder-rect .ad-label {
    margin: 0 0 0 4px;
}

/* ── Native In-Feed Ad Card ────────────────────────────────── */
.ad-native-card {
    margin-bottom: 6px;
}
.ad-native-placeholder {
    background: var(--bg-card);
    border: 1px dashed rgba(16,185,129,0.25);
    border-radius: 4px;
    padding: 10px 12px;
}
.ad-native-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 6px;
}
.ad-native-body {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ad-native-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.ad-native-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ad-native-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-green);
}
.ad-native-desc {
    font-size: 10px;
    color: var(--text-muted);
}
.ad-native-cta {
    padding: 4px 12px;
    background: var(--accent-green);
    color: #000;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.ad-native-cta:hover { opacity: 0.85; }

/* ── Ticket Mid Banner ─────────────────────────────────────── */
.ad-ticket-mid .ad-placeholder-banner {
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Full mobile layout
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    /* ── Body & wrapper ─────────────────────────────────────── */
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    .dashboard-wrapper {
        grid-template-rows: auto auto auto 1fr;
        height: auto;
        min-height: 100vh;
        padding: 6px;
        gap: 6px;
        overflow: visible;
    }

    /* ── Top nav ─────────────────────────────────────────────── */
    .top-nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 6px 4px;
    }
    .logo-container {
        font-size: 14px;
    }

    /* ── Tab bar — horizontal scroll ─────────────────────────── */
    .tab-bar {
        overflow-x: auto;
        white-space: nowrap;
        gap: 6px;
        padding-bottom: 4px;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }
    .tab-bar::-webkit-scrollbar { display: none; }
    .tab-btn {
        font-size: 11px;
        padding: 4px 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .tab-bar > div[style*="margin-left:auto"] {
        margin-left: 0 !important;
        width: 100%;
        justify-content: space-between;
    }
    .league-select {
        max-width: 140px;
        font-size: 10px;
    }

    /* ── Main grid → single column ───────────────────────────── */
    .main-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    /* ── Columns stack vertically ─────────────────────────────── */
    .column {
        max-height: none;
        overflow: visible;
    }
    .scroll-area {
        overflow-y: visible;
        max-height: none;
    }

    /* ── Tab content overflow ─────────────────────────────────── */
    .tab-content.active {
        overflow: visible;
        height: auto;
    }

    /* ── Focus view hero — compact ────────────────────────────── */
    .focus-hero {
        padding: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .hero-team-box { width: 90px; }
    .hero-logo { width: 48px; height: 48px; }
    .hero-team-name { font-size: 12px; }
    .hero-score { font-size: 32px; }

    /* ── Specialist grid — 2 cols on mobile ───────────────────── */
    .specialist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .attack-flow-box {
        grid-column: span 2;
    }

    /* ── Markets grid — single column ─────────────────────────── */
    .markets-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    /* ── Team stats — single column ───────────────────────────── */
    .team-stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* ── Score grid — 3 cols still, smaller ────────────────────── */
    .score-grid {
        gap: 4px;
    }
    .score-cell {
        padding: 6px;
    }
    .score-cell-val { font-size: 12px; }

    /* ── Performance tracker — 2 cols ─────────────────────────── */
    .tracker-header {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .accuracy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    /* ── Tracker rows — compact ────────────────────────────────── */
    .tracker-row {
        grid-template-columns: 2fr 1fr 0.6fr;
        font-size: 10px;
        padding: 8px;
    }
    .tracker-row > *:nth-child(4),
    .tracker-row > *:nth-child(5) {
        display: none;
    }

    /* ── Glass stat cards ──────────────────────────────────────── */
    .glass-stat {
        padding: 10px 12px;
    }
    .stat-value { font-size: 18px; }

    /* ── Ads on mobile ─────────────────────────────────────────── */
    .ad-sidebar-box { display: none; }
    .ad-banner-top { margin: 0 0 5px 0; }
    .ad-placeholder-banner { font-size: 11px; padding: 6px 10px; }

    /* ── Modal on mobile ───────────────────────────────────────── */
    .modal-content {
        margin: 2vh auto;
        padding: 16px;
        width: 95%;
    }

    /* ── Value analysis ────────────────────────────────────────── */
    .va-item {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 4px;
    }
    .va-market { font-size: 11px; }
    .va-odds { font-size: 14px; }

    /* ── Risk meter ────────────────────────────────────────────── */
    .risk-meter-box { padding: 8px 10px; }

    /* ── Bookie box ────────────────────────────────────────────── */
    .bookie-box { padding: 8px 10px; }
    .bookie-line { font-size: 10px; }

    /* ── Compact match cards ───────────────────────────────────── */
    .compact-match { padding: 8px; }
    .cm-teams { font-size: 12px; }
    .cm-header { font-size: 9px; }
}

/* ── Extra small screens (under 480px) ─────────────────────── */
@media (max-width: 480px) {
    .dashboard-wrapper { padding: 4px; gap: 4px; }
    .top-nav { padding: 4px; }
    .logo-container { font-size: 12px; }
    .tab-btn { font-size: 10px; padding: 3px 6px; }
    .specialist-grid { grid-template-columns: 1fr; }
    .attack-flow-box { grid-column: span 1; }
    .focus-hero { padding: 8px; }
    .hero-score { font-size: 26px; }
    .hero-team-box { width: 70px; }
    .hero-logo { width: 40px; height: 40px; }
    .hero-team-name { font-size: 11px; }
    .verdict-badge { font-size: 11px; padding: 6px 10px; }
    .tracker-header { grid-template-columns: 1fr; }
    .accuracy-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   AUTH SYSTEM — Login/Signup Modal & Tier UI
   ═══════════════════════════════════════════════════════════ */

/* ── Auth button in top nav ───────────────────────────────── */
.auth-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}
.auth-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-green);
}

/* ── Tier badges ──────────────────────────────────────────── */
.auth-tier-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-right: 4px;
}
.auth-tier-badge.pro {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}
.auth-tier-badge.free {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ── Auth Modal ───────────────────────────────────────────── */
.auth-modal-content {
    max-width: 420px;
    padding: 30px !important;
}
.auth-header {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
}
.auth-subtitle {
    color: var(--text-muted);
    font-size: 13px;
}
.auth-trial-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 700;
}

/* ── Auth Tabs ────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-main);
}
.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.auth-tab.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

/* ── Auth Inputs ──────────────────────────────────────────── */
.auth-input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.auth-input:focus {
    outline: none;
    border-color: var(--accent-green);
}
.auth-input::placeholder {
    color: var(--text-muted);
}

/* ── Auth Error ───────────────────────────────────────────── */
.auth-error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: var(--accent-red);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 12px;
}

/* ── Auth Submit Button ───────────────────────────────────── */
.auth-submit-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent-green);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
}
.auth-submit-btn:hover { opacity: 0.9; }
.auth-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Divider ──────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 11px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-main);
}
.auth-divider span { padding: 0 12px; }

/* ── Google Button ────────────────────────────────────────── */
.auth-google-btn {
    width: 100%;
    padding: 11px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    transition: 0.2s;
}
.auth-google-btn:hover { background: #f5f5f5; }

/* ── Auth Footer ──────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
}
.auth-footer a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 700;
}

/* ── User Menu Dropdown ───────────────────────────────────── */
.user-menu-dropdown {
    position: fixed;
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 10001;
    overflow: hidden;
}
.user-menu-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-main);
    font-size: 13px;
}
.user-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: 0.15s;
    font-family: 'Inter', sans-serif;
}
.user-menu-item:hover {
    background: rgba(255,255,255,0.05);
}
.user-menu-item.upgrade {
    color: var(--accent-green);
    border-bottom: 1px solid var(--border-main);
}

/* ── Trial Banner ─────────────────────────────────────────── */
.trial-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(88, 166, 255, 0.1));
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 12px;
    color: #fff;
    z-index: 100;
}
.trial-upgrade-btn {
    padding: 4px 12px;
    background: var(--accent-green);
    color: #000;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

/* ── Upgrade Modal Features ───────────────────────────────── */
.upgrade-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 8px;
}
.upgrade-feature {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
}
.upgrade-price {
    text-align: center;
    margin-bottom: 16px;
}
.upgrade-amount {
    font-size: 36px;
    font-weight: 900;
    color: var(--accent-green);
}
.upgrade-period {
    font-size: 14px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   FEATURE LOCK OVERLAYS — Free Tier Locks
   ═══════════════════════════════════════════════════════════ */

.feature-lock-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 4px;
}
.lock-content {
    text-align: center;
    padding: 30px;
    max-width: 300px;
}
.lock-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.lock-title {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
}
.lock-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Lock buttons */
.lock-btn-ad {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid rgba(88, 166, 255, 0.4);
    color: var(--accent-blue);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
}
.lock-btn-ad:hover { background: rgba(88, 166, 255, 0.25); }

.lock-btn-signup {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--accent-green);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
}
.lock-btn-signup:hover { background: rgba(16, 185, 129, 0.25); }

.lock-btn-pro {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #000;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
}
.lock-btn-pro:hover { opacity: 0.9; }

/* ── Toast Notifications ──────────────────────────────────── */
.auth-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-family: 'Inter', sans-serif;
}
.auth-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.auth-toast-success {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}
.auth-toast-error {
    background: rgba(248, 81, 73, 0.9);
    color: #fff;
}
.auth-toast-info {
    background: rgba(88, 166, 255, 0.9);
    color: #fff;
}

/* ── Hide signup btn in lock when user is logged in ────────── */
body.user-logged-in .lock-btn-signup { display: none; }

/* ── Mobile Column Navigation (Live / Prematch / Focus) ─────── */
.mobile-col-nav { display: none; }

@media (max-width: 900px) {
    .mobile-col-nav {
        display: flex;
        gap: 0;
        background: var(--bg-panel);
        border: 1px solid var(--border-main);
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 8px;
        flex-shrink: 0;
    }
    .mobile-col-btn {
        flex: 1;
        padding: 10px 4px;
        background: transparent;
        border: none;
        border-right: 1px solid var(--border-main);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        transition: 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    .mobile-col-btn:last-child { border-right: none; }
    .mobile-col-btn.active {
        background: rgba(16, 185, 129, 0.12);
        color: var(--accent-green);
    }
}

/* ── Mobile: lock overlays become fixed full-screen ────────── */
@media (max-width: 900px) {
    .feature-lock-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 500;
        border-radius: 0;
    }
    .lock-content {
        padding: 20px;
    }
    /* Focus view min-height so it's visible on mobile */
    #view-predictions .column:nth-child(2) {
        min-height: 300px;
    }
}
