/* ═══════════════════════════════════════════════════════════
   ValueBet Detector — Premium CSS
   Sistema de diseño moderno con glassmorphism y gradientes
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Variables (Design Tokens) ──────────────────── */
:root {
    /* Colores principales */
    --bg-primary: #0a0b0f;
    --bg-secondary: #12131a;
    --bg-tertiary: #1a1b25;
    --bg-card: rgba(26, 27, 37, 0.7);
    --bg-card-hover: rgba(36, 37, 50, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    /* Bordes */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    /* Texto */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;
    
    /* Acentos */
    --accent-primary: #6366f1;
    --accent-primary-glow: rgba(99, 102, 241, 0.15);
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    
    /* Colores semánticos */
    --color-success: #22c55e;
    --color-success-bg: rgba(34, 197, 94, 0.1);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.1);
    --color-info: #3b82f6;
    --color-info-bg: rgba(59, 130, 246, 0.1);
    
    /* Espaciado */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Bordes redondeados */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.1);
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Tipografía */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Reset & Base ────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ─── NAVBAR ──────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 11, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    color: white;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.brand-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-tracking-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.25);
    transition: all 0.2s;
}
.nav-tracking-link:hover {
    background: rgba(34,197,94,0.2);
    color: #22c55e;
    border-color: rgba(34,197,94,0.4);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-warning);
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--color-success);
}

.status-dot.error {
    background: var(--color-danger);
}

.status-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── HERO ────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 800px 600px at 50% 0%, rgba(99, 102, 241, 0.12), transparent),
        radial-gradient(ellipse 600px 400px at 80% 20%, rgba(139, 92, 246, 0.08), transparent),
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(59, 130, 246, 0.06), transparent);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── LEAGUE SELECTOR ─────────────────────────────────── */
.league-selector {
    margin-top: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.league-selector-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.league-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
}

.league-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
    user-select: none;
}

.league-checkbox:hover {
    background: rgba(255, 255, 255, 0.06);
}

.league-checkbox input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.league-flag {
    font-size: 1rem;
}

.league-selector-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.league-toggle-btn {
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.league-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.league-count {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Days selector */
.days-selector {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.days-selector label {
    white-space: nowrap;
}
.days-selector input[type="range"] {
    flex: 1;
    max-width: 180px;
    accent-color: var(--primary);
    cursor: pointer;
}
.days-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

/* ─── STATS SECTION ───────────────────────────────────── */
.stats-section {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    padding-bottom: var(--space-2xl);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-icon-blue {
    background: var(--color-info-bg);
    color: var(--color-info);
}

.stat-icon-green {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.stat-icon-purple {
    background: var(--accent-primary-glow);
    color: var(--accent-primary);
}

.stat-icon-amber {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-family: var(--font-mono);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── SECTIONS ────────────────────────────────────────── */
.section {
    padding: var(--space-3xl) 0;
}

.section-dark {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-title svg {
    color: var(--accent-primary);
}

.section-subtitle {
    color: var(--text-tertiary);
    margin-top: 4px;
    font-size: 0.9rem;
}

.section-filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.filter-select:hover {
    border-color: var(--border-color-hover);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

/* ─── PICKS GRID ──────────────────────────────────────── */
.picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-md);
}

.pick-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.pick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.pick-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.pick-card.confidence-alta {
    border-left: 3px solid var(--color-success);
}

.pick-card.confidence-media {
    border-left: 3px solid var(--color-warning);
}

.pick-card.confidence-baja {
    border-left: 3px solid var(--color-danger);
}

.pick-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.pick-match {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    flex: 1;
}

.pick-league {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.pick-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.pick-badge.alta {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.pick-badge.media {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.pick-badge.baja {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.pick-selection {
    display: inline-block;
    padding: 6px 12px;
    background: var(--accent-primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.pick-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.pick-metric {
    text-align: center;
    padding: var(--space-sm);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.pick-metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.pick-metric-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.pick-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.pick-stake {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.pick-stake-amount {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-mono);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pick-stake-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.pick-recommendation {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.pick-recommendation.yes {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.pick-recommendation.no {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

/* ─── PICK CARD: Header Badges ────────────────────────── */
.pick-header-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.analysis-source-badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.analysis-source-badge.poisson {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.analysis-source-badge.heuristic {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.value-color {
    color: var(--color-success) !important;
}

/* ─── PICK CARD: Expand Button ────────────────────────── */
.pick-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    margin-bottom: var(--space-sm);
    background: rgba(99, 102, 241, 0.06);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pick-expand-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}

.pick-expand-btn .expand-chevron {
    transition: transform var(--transition-base);
}

.pick-expand-btn.active .expand-chevron {
    transform: rotate(180deg);
}

/* ─── ANALYSIS DETAIL (collapsible) ───────────────────── */
.analysis-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-bottom: 0;
}

.analysis-detail.open {
    max-height: 1200px;
    opacity: 1;
    margin-bottom: var(--space-md);
}

/* ── Reasoning ── */
.analysis-reasoning {
    padding: 10px 12px;
    margin-bottom: var(--space-sm);
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Probability Comparison ── */
.analysis-prob-compare {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.prob-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.prob-label {
    width: 90px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.prob-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.prob-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.prob-bar-fill.cuota {
    background: var(--text-tertiary);
}

.prob-bar-fill.modelo {
    background: var(--accent-gradient);
}

.prob-pct {
    width: 40px;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.prob-value-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.value-highlight {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-success);
}

/* ── Expected Goals (xG) ── */
.analysis-xg {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.xg-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.xg-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xg-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.xg-name {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.xg-value {
    font-size: 1rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.xg-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xg-bar {
    height: 10px;
    border-radius: 5px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.xg-bar.home {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.xg-bar.away {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.xg-prediction {
    text-align: center;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.xg-prediction strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* ── Team Stats Comparison ── */
.analysis-stats-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.stats-team-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stats-team-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.stats-position {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-form {
    display: flex;
    gap: 3px;
    margin: 4px 0;
}

.form-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 800;
}

.form-W { background: rgba(34, 197, 94, 0.2); color: var(--color-success); }
.form-D { background: rgba(245, 158, 11, 0.2); color: var(--color-warning); }
.form-L { background: rgba(239, 68, 68, 0.2); color: var(--color-danger); }
.form-empty { color: var(--text-tertiary); font-size: 0.75rem; }

.stats-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-tertiary);
    padding: 0 4px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 2px 8px;
    font-size: 0.7rem;
}

.stats-label {
    color: var(--text-tertiary);
}

.stats-val {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.rating-excellent { color: var(--color-success) !important; }
.rating-good { color: #22d3ee !important; }
.rating-average { color: var(--text-secondary) !important; }
.rating-poor { color: var(--color-danger) !important; }

/* ── Analysis Factors ── */
.analysis-factors {
    padding: var(--space-sm);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.factors-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.factor-item.impact-positive {
    background: rgba(34, 197, 94, 0.06);
    border-left: 2px solid rgba(34, 197, 94, 0.4);
}

.factor-item.impact-negative {
    background: rgba(239, 68, 68, 0.06);
    border-left: 2px solid rgba(239, 68, 68, 0.4);
}

.factor-item.impact-neutral {
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(148, 163, 184, 0.3);
}

.factor-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.factor-text {
    flex: 1;
}

.factor-impact {
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.impact-positive .factor-impact { color: var(--color-success); }
.impact-negative .factor-impact { color: var(--color-danger); }
.impact-neutral .factor-impact { color: var(--text-tertiary); }

/* ─── DATA TABLE ──────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: rgba(255, 255, 255, 0.02);
}

.data-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center !important;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-home {
    font-weight: 600;
    color: var(--text-primary);
}

.team-away {
    color: var(--text-secondary);
}

.odds-cell {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.league-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    white-space: nowrap;
}

.match-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
}

.empty-cell {
    text-align: center;
    padding: var(--space-2xl) !important;
}

.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    grid-column: 1 / -1;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.empty-state-mini {
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

/* ─── LOADING OVERLAY ─────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 11, 15, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.loading-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-lg);
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--accent-primary);
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right-color: var(--accent-secondary);
    animation-delay: 0.15s;
    inset: 6px;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #a855f7;
    animation-delay: 0.3s;
    inset: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.5s ease;
    animation: progress-indeterminate 2s ease-in-out infinite;
}

@keyframes progress-indeterminate {
    0% { width: 0%; margin-left: 0; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}

/* ─── TOAST NOTIFICATIONS ─────────────────────────────── */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: slideIn 0.3s ease;
    font-size: 0.9rem;
}

.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-danger); }
.toast.warning { border-left: 3px solid var(--color-warning); }
.toast.info { border-left: 3px solid var(--color-info); }

.toast-icon { font-size: 1.1rem; }
.toast-message { flex: 1; color: var(--text-primary); }
.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: color var(--transition-fast);
}
.toast-close:hover { color: var(--text-primary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ─── FOOTER ──────────────────────────────────────────── */
.footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .picks-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .hero {
        padding: 110px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    
    .stat-card {
        padding: var(--space-md);
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .section-header {
        flex-direction: column;
    }
    
    .nav-status {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .pick-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .analysis-stats-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .stats-vs {
        padding: 4px 0;
    }
    
    .xg-bar-container {
        flex-direction: column;
        gap: 6px;
    }
    
    .xg-team {
        flex-direction: row;
        gap: 8px;
    }
    
    .pick-header-badges {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .picks-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
}

/* ─── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ─── SELECTION ───────────────────────────────────────── */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* ═══════════════════════════════════════════════════════ */
/* v3 ELITE — Edge Tiers, H2H, Motivation, Agreement     */
/* ═══════════════════════════════════════════════════════ */

/* ─── Edge Tier Badge ─────────────────────────────────── */
.edge-tier-badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.edge-tier-badge.tier-3 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 179, 8, 0.15));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.edge-tier-badge.tier-2 {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.edge-tier-badge.tier-1 {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ─── Pick Card Tier Glow ─────────────────────────────── */
.pick-card.tier-3 {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.08), var(--shadow-card);
}

.pick-card.tier-2 {
    border-color: rgba(99, 102, 241, 0.3);
}

/* ─── H2H Section ─────────────────────────────────────── */
.analysis-h2h {
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-sm) 0;
    background: rgba(99, 102, 241, 0.04);
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.h2h-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.h2h-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.h2h-stat {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-weight: 500;
}

.h2h-stat.h2h-win {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
}

.h2h-stat.h2h-draw {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.h2h-stat.h2h-loss {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.h2h-results {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.h2h-result {
    font-size: 0.65rem;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ─── Motivation Badges ───────────────────────────────── */
.analysis-motivation {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: var(--space-sm) 0;
}

.motivation-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
}

.motivation-badge.motivation-high {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.motivation-badge.motivation-low {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

/* ─── Agreement Meter ─────────────────────────────────── */
.analysis-agreement {
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-sm) 0;
    background: rgba(52, 211, 153, 0.04);
    border-radius: var(--radius-md);
    border: 1px solid rgba(52, 211, 153, 0.1);
}

.agreement-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.agreement-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.agreement-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.agreement-fill.agree-high {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.agreement-fill.agree-mid {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.agreement-fill.agree-low {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.agree-high { color: #34d399; }
.agree-mid  { color: #fbbf24; }
.agree-low  { color: #f87171; }

/* ─── Pinnacle Edge ───────────────────────────────────── */
.analysis-pinnacle {
    padding: 4px 10px;
    margin: 4px 0;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.analysis-pinnacle.pinnacle-positive {
    background: rgba(52, 211, 153, 0.08);
    color: #34d399;
}

.analysis-pinnacle.pinnacle-negative {
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
}
