/* TipsYe - Premium Design System v3.0 */
/* Anthracite dark mode, strategic color math, minimalist data hierarchy */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Surface colors - Light mode */
    --bg-primary: #fafafa;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f5;
    --border-subtle: rgba(0,0,0,0.06);
    --border-hover: rgba(0,0,0,0.12);
    --text-high: rgba(0,0,0,0.87);
    --text-mid: rgba(0,0,0,0.60);
    --text-low: rgba(0,0,0,0.38);

    /* Accent colors */
    --gold: #F5A623;
    --gold-glow: rgba(245,166,35,0.15);
    --accent-green: #00E676;
    --accent-blue: #448AFF;
    --accent-red: #FF5252;
    --accent-amber: #FFD740;

    /* Spacing system (8px base) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Card system */
    --card-radius: 16px;
    --card-padding: 24px;
    --card-border: 1px solid var(--border-subtle);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.04);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
    --bg-primary: #0a0a0a;
    --bg-card: #121212;
    --bg-card-hover: #1a1a2e;
    --border-subtle: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text-high: rgba(255,255,255,0.87);
    --text-mid: rgba(255,255,255,0.60);
    --text-low: rgba(255,255,255,0.38);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
    --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.2);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'tnum', 'cv01', 'cv02';
}

/* Smooth scroll only when no reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 99px; }
.dark ::-webkit-scrollbar-thumb { background: #2a2a3d; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }
.dark ::-webkit-scrollbar-thumb:hover { background: #3a3a50; }
.lang-dropdown-scroll::-webkit-scrollbar { width: 4px; }

/* ============================================
   ANIMATIONS (respect reduced motion)
   ============================================ */
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
@keyframes liveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scoreFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); color: var(--accent-green); }
    100% { transform: scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes progressFill {
    from { width: 0; }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px -4px var(--gold-glow); }
    50% { box-shadow: 0 0 30px -2px var(--gold-glow); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PREMIUM CARD SYSTEM
   ============================================ */
.premium-card {
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}
.premium-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--card-radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}
.dark .premium-card::before { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
    .premium-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--card-shadow-hover);
        border-color: var(--border-hover);
    }
}

/* Card with gold accent (for premium/featured items) */
.premium-card-gold {
    border-color: rgba(245,166,35,0.2);
}
.premium-card-gold::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), #FFD740);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* ============================================
   LIVE ELEMENTS
   ============================================ */
.live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-red);
    animation: livePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(255,82,82,0.5);
    flex-shrink: 0;
}
.live-gradient-bar {
    background-size: 200% 200%;
    animation: liveGradient 2s ease infinite;
}
.live-match-card {
    transition: all var(--transition-normal);
}

/* ---- Favorite Star Button ---- */
.fav-star-btn {
    position: relative;
    z-index: 10;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.55;
    transform: scale(1);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.fav-star-btn svg {
    width: 12px;
    height: 12px;
    stroke: var(--gold);
    fill: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.live-match-card:hover .fav-star-btn {
    opacity: 0.85;
    transform: scale(1.1);
}
.fav-star-btn.active {
    opacity: 1;
    transform: scale(1);
}
.fav-star-btn:hover {
    background: var(--gold-glow);
    opacity: 1;
}
.fav-star-btn.active svg {
    fill: var(--gold);
    stroke: var(--gold);
    filter: drop-shadow(0 0 4px rgba(245,166,35,0.5));
}
.fav-star-btn.active {
    background: var(--gold-glow);
}

/* Favorited card glow */
.live-match-card.is-favorited {
    border-color: rgba(245,166,35,0.4) !important;
    box-shadow: 0 0 20px -4px rgba(245,166,35,0.12), 0 4px 16px -2px rgba(245,166,35,0.08) !important;
}

/* Mobile: always show star */
@media (max-width: 640px) {
    .fav-star-btn {
        opacity: 0.6;
        transform: scale(1);
    }
}

/* Star pop animation */
@keyframes starPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.35); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.fav-star-btn.pop {
    animation: starPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SLIDE UP ANIMATION
   ============================================ */
.slide-up { animation: slideUp 0.4s ease-out forwards; }
.slide-up-delay-1 { animation-delay: 0.05s; opacity: 0; }
.slide-up-delay-2 { animation-delay: 0.1s; opacity: 0; }
.slide-up-delay-3 { animation-delay: 0.15s; opacity: 0; }
.fade-in { animation: fadeIn 0.5s ease-out forwards; }
.score-flash { animation: scoreFlash 0.5s ease-in-out; }

/* ============================================
   MATCH CARDS
   ============================================ */
.match-card {
    transition: all var(--transition-normal);
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: var(--card-radius);
}

/* ============================================
   STAT CARD
   ============================================ */
.stat-card {
    transition: all var(--transition-normal);
    position: relative;
    overflow: visible;
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: var(--card-radius);
}
.stat-card > .stat-top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    z-index: 1;
}
.stat-card:hover > .stat-top-bar { opacity: 1; }

/* ============================================
   FORM BADGES
   ============================================ */
.form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: default;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}
.form-badge:hover {
    transform: scale(1.15);
}
.form-w { background: #00C853; color: white; }
.form-d { background: #FFD740; color: #1a1a2e; }
.form-l { background: #FF5252; color: white; }

/* ============================================
   TOOLTIP SYSTEM
   ============================================ */
.stat-th {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed currentColor;
    padding-bottom: 2px;
}
.floating-tooltip {
    position: fixed;
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-high);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: var(--card-border);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.floating-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}
.floating-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-card);
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gold gradient text for premium elements */
.gradient-text-gold {
    background: linear-gradient(135deg, var(--gold), #FFD740);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   GLASS EFFECT
   ============================================ */
.glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.section-icon {
    width: 2rem; height: 2rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================
   TABLE STYLES
   ============================================ */
.stats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-feature-settings: 'tnum';
}
.stats-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.375rem;
    white-space: nowrap;
    color: var(--text-mid);
}
.stats-table tbody td {
    padding: 0.5rem 0.375rem;
    font-size: 0.8125rem;
    border-top: 1px solid transparent;
    font-feature-settings: 'tnum';
}
.stats-table tbody tr {
    transition: background-color var(--transition-fast);
}
.stats-table tbody tr:hover {
    background-color: rgba(68, 138, 255, 0.04);
}
.dark .stats-table tbody tr:hover {
    background-color: rgba(68, 138, 255, 0.08);
}

/* ============================================
   TEAM LOGO
   ============================================ */
.team-logo-sm {
    width: 26px; height: 26px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    background: white;
}
.dark .team-logo-sm {
    background: #1a1a2e;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    height: 6px;
    border-radius: 99px;
    background: #e8e8e8;
    overflow: hidden;
}
.dark .progress-bar { background: #2a2a3d; }
.progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   AI COMMENTARY BOX
   ============================================ */
.ai-box {
    position: relative;
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    background: var(--bg-card);
    border: var(--card-border);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-high);
}
.ai-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-green));
    border-radius: var(--card-radius) 0 0 var(--card-radius);
}

/* ============================================
   SCROLLBAR HIDE
   ============================================ */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}
.dark .skeleton {
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3d 50%, #1a1a2e 75%);
    background-size: 200% 100%;
}

/* ============================================
   NUMBER BADGE
   ============================================ */
.num-badge {
    width: 22px; height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    font-feature-settings: 'tnum';
}

/* ============================================
   TABLE HORIZONTAL SCROLL
   ============================================ */
.table-scroll {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overflow-x: auto;
}

/* Smooth page transitions */
main { animation: fadeIn 0.3s ease-out; }

/* Team logo in cards - contain mode */
img[onerror] { object-fit: contain; }

/* ============================================
   STAT LEGEND BAR
   ============================================ */
.stat-legend-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   DESKTOP HOVER EFFECTS (only on non-touch)
   ============================================ */
@media (hover: hover) and (pointer: fine) {
    .match-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
    .stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
    .team-grid-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--card-shadow-hover);
    }
    .live-match-card:hover {
        border-color: rgba(255, 82, 82, 0.4);
        box-shadow: 0 8px 30px -5px rgba(255, 82, 82, 0.15);
        transform: translateY(-2px);
    }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 640px) {
    :root {
        --card-padding: 16px;
        --card-radius: 12px;
    }
    /* Touch targets */
    .touch-target { min-height: 44px; min-width: 44px; }

    /* Compact cards */
    .match-card { padding: 0.625rem !important; }
    .live-match-card { padding: 0.625rem !important; }

    /* Section header */
    .section-header { gap: 0.5rem; margin-bottom: 0.875rem; }
    .section-icon { width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; }
    .section-icon svg { width: 14px; height: 14px; }

    /* Table compact */
    .stats-table thead th {
        font-size: 0.625rem;
        padding: 0.375rem 0.25rem;
    }
    .stats-table tbody td {
        font-size: 0.75rem;
        padding: 0.375rem 0.25rem;
    }
    .team-logo-sm {
        width: 22px; height: 22px;
    }
    .form-badge {
        width: 18px; height: 18px;
        font-size: 8px;
        border-radius: 4px;
    }
    .num-badge {
        width: 18px; height: 18px;
        font-size: 9px;
    }

    /* Stat legend compact */
    .stat-legend-bar {
        padding: 0.375rem 0.75rem !important;
        gap: 0.375rem;
    }

    /* Filter chips compact */
    .filter-chip {
        padding: 0.35rem 0.625rem;
        font-size: 0.6875rem;
    }

    /* Team grid compact */
    .team-grid-card {
        padding: 0.625rem !important;
    }
    .team-grid-card img {
        width: 40px !important;
        height: 40px !important;
    }

    /* AI box compact */
    .ai-box {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .stats-table thead th {
        font-size: 0.5625rem;
        padding: 0.25rem 0.125rem;
    }
    .stats-table tbody td {
        font-size: 0.6875rem;
        padding: 0.25rem 0.125rem;
    }
    .form-badge {
        width: 16px; height: 16px;
        font-size: 7px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    nav, footer, .live-dot, button { display: none !important; }
    body { color: #000 !important; background: #fff !important; }
    .dark { color: #000 !important; background: #fff !important; }
    a { color: #000 !important; text-decoration: underline; }
}

/* ============================================
   DATE NAVIGATOR — Premium
   ============================================ */
.match-explorer-section {
    position: relative;
}

.match-explorer-header {
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.match-explorer-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--card-radius);
    border: var(--card-border);
    background: var(--bg-card);
    box-shadow: var(--card-shadow);
}

.match-explorer-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(68,138,255,0.03), transparent 50%);
}

.match-explorer-shell::after {
    display: none;
}

.match-explorer-shell-head {
    position: relative;
    z-index: 1;
    padding: 0 0 0.6rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-subtle);
}

.match-explorer-month {
    font-size: 0.82rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-weight: 600;
}

.match-explorer-caption {
    max-width: 32rem;
    line-height: 1.4;
    font-size: 0.68rem;
}

.match-explorer-meta {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.match-explorer-status {
    border: 1px solid rgba(68, 138, 255, 0.10);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    box-shadow: none;
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
}

.match-explorer-strip-row {
    position: relative;
    z-index: 1;
    align-items: center;
    gap: 0.4rem;
}

.date-strip-control {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    box-shadow: none;
    transition: all var(--transition-fast);
}

.date-strip-control i {
    width: 14px;
    height: 14px;
}

.date-strip-control:hover {
    transform: none;
    border-color: rgba(68, 138, 255, 0.3);
    background: rgba(68, 138, 255, 0.06);
    color: var(--accent-blue);
}

.date-strip-control:active {
    transform: scale(0.95);
}

.date-strip-scroll {
    position: relative;
    padding: 0.2rem;
    border-radius: 0.65rem;
    border: none;
    background: transparent;
    box-shadow: none;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.date-strip-scroll::-webkit-scrollbar {
    display: none;
}

.date-chip {
    position: relative;
    min-width: 56px;
    padding: 0.4rem 0.35rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-mid);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    flex-shrink: 0;
    scroll-snap-align: center;
    box-shadow: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.date-chip::before {
    display: none;
}

.date-chip::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    transition: all var(--transition-fast);
}

.date-chip:hover {
    transform: none;
    background: rgba(68, 138, 255, 0.05);
    border-color: rgba(68, 138, 255, 0.12);
    color: var(--text-high);
    box-shadow: none;
}

.date-chip:hover::after {
    opacity: 0;
}

.date-chip.is-today::after {
    background: var(--accent-blue);
    opacity: 1;
}

.date-chip.is-active {
    color: #ffffff;
    border-color: transparent;
    background: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(68, 138, 255, 0.25);
}

.date-chip.is-active::after {
    background: rgba(255,255,255,0.8);
    opacity: 1;
}

.date-chip-weekday {
    position: relative;
    z-index: 1;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.6;
}

.date-chip-day {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum';
}

.date-chip-month {
    position: relative;
    z-index: 1;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.5;
}

.date-chip.is-active .date-chip-weekday,
.date-chip.is-active .date-chip-month {
    opacity: 0.85;
}

.date-chip:focus-visible,
.date-strip-control:focus-visible {
    outline: 2px solid rgba(68,138,255,0.45);
    outline-offset: 2px;
}

.date-chip::-moz-focus-inner {
    border: 0;
}

.date-empty-state {
    background-image: radial-gradient(circle at top, rgba(68, 138, 255, 0.05), transparent 44%);
}

.match-explorer-empty {
    border-style: solid;
    box-shadow: var(--card-shadow);
}

/* Dark mode overrides for date navigator */
.dark .match-explorer-shell {
    border-color: var(--border-subtle);
    background: var(--bg-card);
    box-shadow: var(--card-shadow);
}

.dark .match-explorer-shell::before {
    background: linear-gradient(135deg, rgba(68,138,255,0.04), transparent 50%);
}

.dark .match-explorer-shell-head {
    border-bottom-color: var(--border-subtle);
}

.dark .match-explorer-status {
    border-color: rgba(68, 138, 255, 0.12);
    background: rgba(18, 18, 18, 0.5);
    box-shadow: none;
}

.dark .date-strip-control {
    background: rgba(26, 26, 46, 0.6);
    border-color: var(--border-subtle);
    box-shadow: none;
}

.dark .date-strip-control:hover {
    border-color: rgba(68, 138, 255, 0.4);
    background: rgba(68, 138, 255, 0.1);
    color: var(--accent-blue);
}

.dark .date-chip {
    background: transparent;
    color: var(--text-mid);
    border-color: transparent;
    box-shadow: none;
}

.dark .date-chip:hover {
    background: rgba(68, 138, 255, 0.06);
    border-color: rgba(68, 138, 255, 0.12);
    color: var(--text-high);
}

.dark .date-chip.is-today::after {
    background: var(--accent-blue);
}

.dark .date-chip.is-active {
    border-color: transparent;
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(68, 138, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .date-strip-control,
    .date-chip,
    .date-chip:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .match-explorer-header {
        align-items: stretch;
        gap: 0.6rem;
    }

    .match-explorer-shell {
        border-radius: 0.85rem;
        padding: 0.7rem;
    }

    .match-explorer-shell-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .match-explorer-meta {
        width: 100%;
        justify-content: flex-start;
    }

    .match-explorer-strip-row {
        gap: 0.3rem;
    }

    .date-strip-control {
        width: 1.85rem;
        height: 1.85rem;
        border-radius: 0.45rem;
    }
}

@media (max-width: 640px) {
    .match-explorer-month {
        font-size: 0.78rem;
    }

    .match-explorer-caption {
        max-width: none;
    }

    .date-strip-scroll {
        padding: 0.15rem;
    }

    .date-chip {
        min-width: 48px;
        padding: 0.35rem 0.25rem;
        border-radius: 0.5rem;
    }

    .date-chip-day {
        font-size: 0.88rem;
    }

    .date-chip-weekday {
        font-size: 0.55rem;
    }

    .date-chip-month {
        font-size: 0.5rem;
    }
}

@media (max-width: 480px) {
    .match-explorer-section {
        margin-left: -0.1rem;
        margin-right: -0.1rem;
    }

    .match-explorer-shell {
        padding: 0.6rem;
        border-radius: 0.75rem;
    }

    .match-explorer-shell-head {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .date-strip-control {
        width: 1.7rem;
        height: 1.7rem;
        border-radius: 0.4rem;
    }

    .date-chip {
        min-width: 44px;
        padding: 0.3rem 0.2rem;
    }
}

/* ============================================
   PREMIUM METRIC DISPLAY
   ============================================ */
.metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum';
    color: var(--text-high);
}
.metric-value-md {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    font-feature-settings: 'tnum';
    color: var(--text-high);
}
.metric-value-sm {
    font-size: 0.875rem;
    font-weight: 500;
    font-feature-settings: 'tnum';
    color: var(--text-high);
}
.metric-label {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-mid);
}

/* ============================================
   FOCUS STYLES (Accessibility)
   ============================================ */
:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   NAVBAR PREMIUM
   ============================================ */
.navbar-premium {
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Nav link hover underline animation */
.nav-link-premium::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9080f0, #80f0d0);
    border-radius: 99px;
    transition: width var(--transition-normal);
}
.nav-link-premium:hover::after {
    width: 60%;
}

/* Logo fallback styling */
.logo-fallback {
    background: var(--bg-card);
    border-radius: 50%;
}

/* ============================================
   FILTER CHIPS - Premium
   ============================================ */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 0.625rem;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-mid);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.filter-chip:hover {
    border-color: rgba(68,138,255,0.2);
    color: var(--text-high);
    background: rgba(68,138,255,0.06);
}
.filter-chip.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 10px rgba(68,138,255,0.3);
}

/* ============================================
   VIEW MODE BUTTONS - Premium
   ============================================ */
.view-mode-btn {
    color: var(--text-low);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.view-mode-btn:hover {
    color: var(--text-mid);
    background: rgba(68,138,255,0.06);
}
.view-mode-btn.is-active {
    color: var(--accent-blue);
    background: rgba(68,138,255,0.10);
    border-color: rgba(68,138,255,0.25);
    box-shadow: 0 0 12px rgba(68,138,255,0.08);
}

/* ============================================
   PREMIUM SURFACE GLASS (dark mode cards)
   ============================================ */
.dark .match-card,
.dark .stat-card,
.dark .premium-card {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
}

/* ============================================
   STAT CARD TOP BAR - Premium gradient
   ============================================ */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}
.stat-card:hover::before { opacity: 1; }

/* ============================================
   MATCH CARD HOVER GLOW (subtle)
   ============================================ */
@media (hover: hover) and (pointer: fine) {
    .match-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px -8px rgba(68,138,255,0.08), 0 4px 16px -4px rgba(0,0,0,0.06);
    }
    .dark .match-card:hover {
        box-shadow: 0 8px 30px -8px rgba(68,138,255,0.12), 0 4px 16px -4px rgba(0,0,0,0.3);
    }
    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px -8px rgba(68,138,255,0.08), 0 4px 16px -4px rgba(0,0,0,0.06);
    }
    .dark .stat-card:hover {
        box-shadow: 0 8px 30px -8px rgba(68,138,255,0.12), 0 4px 16px -4px rgba(0,0,0,0.3);
    }
}
