/* ============================================================
   CricketKaScore — Lovable UI Design System (Dark Obsidian & Emerald)
   ============================================================ */
/* Google Fonts loaded via non-blocking <link> in HTML <head> */

:root {
    /* Dark Theme (Blue & Black) */
    --bg-main: #000000;
    --bg-card: #0d1117;
    --bg-card-hover: #161b22;
    --bg-card-secondary: #0d1117;
    --bg-glass: rgba(13, 17, 23, 0.75);

    --border-color: #30363d;
    --border-highlight: #8b949e;

    --primary: #2563eb;
    /* Blue */
    --primary-glow: rgba(37, 99, 235, 0.25);
    --primary-hover: #1d4ed8;
    --primary-text: #60a5fa;

    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.3);
    --accent-green: #22c55e;
    --accent-blue: #38bdf8;
    --accent-purple: #a855f7;
    --accent-yellow: #facc15;
    --accent-orange: #f97316;

    --text-main: #ffffff;
    --text-muted: #8b949e;
    --text-dim: #6e7681;
    --text-dark: #0f172a;

    --font-heading: 'Outfit', 'Space Grotesk', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px var(--primary-glow);
}

/* ============================================================
   Light Theme System
   ============================================================ */
body.light-theme,
html.light-theme {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-card-secondary: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.92);

    --border-color: #e2e8f0;
    --border-highlight: #cbd5e1;

    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.12);
    --primary-hover: #1d4ed8;
    --primary-text: #2563eb;

    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.2);
    --accent-green: #16a34a;
    --accent-blue: #0284c7;
    --accent-purple: #9333ea;
    --accent-yellow: #d97706;
    --accent-orange: #ea580c;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --text-dark: #0f172a;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.1);
}

body.light-theme {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
}

body.light-theme .main-navbar {
    background: var(--bg-glass) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

body.light-theme .brand-text {
    color: var(--text-main) !important;
}

body.light-theme .nav-link {
    color: var(--text-muted) !important;
}

body.light-theme .nav-link:hover {
    color: var(--text-main) !important;
    background: rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .nav-link.active {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #2563eb !important;
}

body.light-theme .search-trigger {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

body.light-theme .search-trigger:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Base Card & Container Defaults (Dark Mode Fallbacks) */
.bg-\[\#0d1117\] {
    background-color: #0d1117;
}
.bg-\[\#161b22\],
.bg-\[\#161b22\]\/40,
.bg-\[\#161b22\]\/50,
.bg-\[\#161b22\]\/60 {
    background-color: rgba(22, 27, 34, 0.6);
}
.border-\[\#30363d\] {
    border-color: #30363d;
}
.match-header-team-card {
    background-color: rgba(22, 27, 34, 0.6);
    border: 1px solid #30363d;
    border-radius: 12px;
}

/* Light Theme Card & Container Overrides */
body.light-theme .bg-\[\#0d1117\],
body.light-theme .bg-\[\#000000\],
body.light-theme .bg-black,
body.light-theme .match-card,
body.light-theme .stat-card,
body.light-theme .ranking-card,
body.light-theme .article-card,
body.light-theme .news-card,
body.light-theme .side-panel {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .bg-\[\#161b22\],
body.light-theme .bg-\[\#161b22\]\/40,
body.light-theme .bg-\[\#161b22\]\/50,
body.light-theme .bg-\[\#161b22\]\/60,
body.light-theme .bg-\[\#21262d\] {
    background-color: var(--bg-card-secondary) !important;
    border-color: var(--border-color) !important;
}

body.light-theme .team-avatar,
html.light-theme .team-avatar {
    background-color: #f1f5f9 !important;
    color: #0284c7 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.light-theme .team-avatar img,
html.light-theme .team-avatar img {
    background-color: #ffffff !important;
}

body.light-theme .team-fallback-text,
html.light-theme .team-fallback-text {
    color: #0284c7 !important;
}

body.light-theme .match-header-team-card {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .match-info-table thead tr {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .match-info-table tbody tr {
    border-color: #e2e8f0 !important;
}

body.light-theme .match-info-table tbody tr:hover {
    background-color: #f8fafc !important;
}

body.light-theme .match-info-table td.match-info-label {
    color: #475569 !important;
}

body.light-theme .match-info-table td.match-info-value {
    color: #0f172a !important;
}

body.light-theme .border-\[\#30363d\],
body.light-theme .border-\[\#30363d\]\/50,
body.light-theme .border-\[\#30363d\]\/60,
body.light-theme .border-white\/5,
body.light-theme .border-white\/10,
body.light-theme .border-white\/15 {
    border-color: var(--border-color) !important;
}

/* Dynamic Text Contrast for Light Mode */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
    color: var(--text-main) !important;
}

body.light-theme .text-white:not(.bg-blue-600 *):not(.bg-emerald-600 *):not(.bg-red-600 *):not(.btn-signin *):not(.badge-live *):not(.series-tab.active *):not(.bg-blue-600):not(.bg-emerald-600):not(.bg-red-600):not(.btn-signin):not(.badge-live):not(.series-tab.active):not(.tag-badge.primary) {
    color: var(--text-main) !important;
}

body.light-theme .text-gray-100,
body.light-theme .text-gray-200 {
    color: var(--text-main) !important;
}

body.light-theme .text-gray-300,
body.light-theme .text-gray-400 {
    color: var(--text-muted) !important;
}

body.light-theme .text-gray-500 {
    color: var(--text-dim) !important;
}

/* Form controls in light theme */
body.light-theme input,
body.light-theme select,
body.light-theme textarea {
    background-color: #ffffff !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: var(--text-dim) !important;
}

/* Cricket Tables in Light Theme */
body.light-theme .cricket-table th {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .cricket-table td {
    color: #0f172a !important;
    border-color: #f1f5f9 !important;
}

body.light-theme .cricket-table tr:hover td {
    background-color: #f8fafc !important;
}

/* Series Tabs in Light Theme */
body.light-theme .series-tab {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

body.light-theme .series-tab:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

body.light-theme .series-tab.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* Side Menu Drawer in Light Theme */
body.light-theme #sideMenuDrawer {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .side-menu-link {
    color: #334155 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .side-menu-link:hover {
    color: #2563eb !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

/* Search Modal in Light Theme */
body.light-theme #searchModal {
    background: rgba(15, 23, 42, 0.45) !important;
}

body.light-theme #searchModal>div {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    max-width: 100vw;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: clip;
    max-width: 100vw;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.container,
.navbar-container {
    max-width: 1320px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

@media (max-width: 1024px) {

    .container,
    .navbar-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 640px) {

    .container,
    .navbar-container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* Typography & Badges */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.section-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-main);
}

@media (max-width: 640px) {
    .section-title {
        font-size: 1.05rem;
        gap: 6px;
    }
}

.section-title-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.view-all-link {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-text);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.view-all-link:hover {
    color: #38bdf8;
    transform: translateX(2px);
}

body.light-theme .view-all-link:hover {
    color: #1d4ed8;
}

.badge-live {
    background: var(--accent-red);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: pulseGlow 1.8s infinite;
}

.badge-live::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.tag-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
}

.tag-badge.primary {
    background: rgba(34, 197, 94, 0.15);
    color: var(--primary-text);
}

.tag-badge.orange {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

.tag-badge.blue {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

/* Navbar */
.main-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    width: 100%;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 640px) {
    .navbar-container {
        gap: 6px;
    }
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .brand-logo {
        font-size: 1.05rem;
        gap: 6px;
    }
}

.brand-icon-box {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 0 12px var(--primary-glow);
}

.brand-text {
    color: var(--text-main);
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-text span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .nav-menu {
        display: none !important;
    }
}

.nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-block;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background: rgba(37, 99, 235, 0.2);
    color: #38bdf8;
    font-weight: 700;
}

/* Mobile Scrollable Sub-Navbar Strip */
.mobile-nav-strip {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 0 6px;
    margin-top: 4px;
}

body.light-theme .mobile-nav-strip {
    border-top: 1px solid #e2e8f0;
    background: rgba(248, 250, 252, 0.95);
}

.mobile-nav-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.mobile-nav-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body.light-theme .mobile-nav-pill {
    color: #64748b;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.mobile-nav-pill:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-pill.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

body.light-theme .mobile-nav-pill.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: var(--border-highlight);
}

.nav-more-btn:hover {
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
}

.more-menu-link:hover {
    background: rgba(56, 189, 248, 0.08) !important;
    color: #38bdf8 !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn-signin {
    background: var(--primary);
    color: #0b0f17;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 7px 18px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-signin:hover {
    background: #1d4ed8;
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3px 10px 3px 4px;
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    max-width: 170px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-card-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

@media (max-width: 640px) {
    .user-avatar-btn {
        padding: 3px 4px;
    }

    .user-avatar-btn span {
        display: none !important;
    }
}

.user-avatar-btn:hover {
    border-color: var(--text-dim);
}

.user-avatar-btn span {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    color: var(--text-main);
    font-size: 0.8rem;
}

.user-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
}

.navbar-logout-btn {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.navbar-logout-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

/* 1. Live & Upcoming Carousel */
.matches-carousel-section {
    padding: 20px 0 28px;
    position: relative;
}

.matches-carousel-wrapper {
    position: relative;
    width: 100%;
}

.matches-carousel-viewport {
    overflow: hidden;
    width: 100%;
    border-radius: var(--radius-lg);
}

.matches-carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.matches-carousel-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

.carousel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-nav-btn:hover:not(:disabled) {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.carousel-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav-prev {
    left: -20px;
}

.carousel-nav-next {
    right: -20px;
}

@media (max-width: 1200px) {
    .carousel-nav-prev {
        left: -10px;
    }

    .carousel-nav-next {
        right: -10px;
    }
}

@media (max-width: 1024px) {
    .carousel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .carousel-nav-prev {
        left: 4px;
    }

    .carousel-nav-next {
        right: 4px;
    }
}

@media (max-width: 768px) {
    .carousel-nav-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px !important;
        padding-bottom: 10px;
        padding-top: 2px;
        scrollbar-width: none;
        margin: 0 -14px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .carousel-grid::-webkit-scrollbar {
        display: none;
    }

    .carousel-grid .match-card {
        min-width: 275px !important;
        max-width: 285px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: start;
    }
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.match-card:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.match-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

.team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 800;
    color: #38bdf8;
    overflow: hidden;
    flex-shrink: 0;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.team-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.team-score {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.match-card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* 2. Series */
.series-section {
    padding: 20px 0 28px;
}

.series-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 4px 2px 8px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-padding: 0 12px;
}

.series-tabs::-webkit-scrollbar {
    display: none;
}

.series-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    scroll-margin: 0 8px;
}

.series-tab:hover {
    color: var(--text-main);
    border-color: var(--border-highlight);
}

.series-tab.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .series-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.series-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.series-card:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.series-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    margin-right: 16px;
}

.series-format-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.series-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.series-location {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.series-arrow {
    color: var(--text-dim);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.series-card:hover .series-arrow {
    color: var(--primary-text);
    transform: translateX(4px);
}

/* 3. Predictions & Fantasy Tips */
.split-content-section {
    padding: 24px 0 32px;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.prediction-card,
.fantasy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.prediction-card {
    border-left: 3px solid var(--accent-orange);
}

.fantasy-card {
    border-left: 3px solid var(--accent-green);
}

.card-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}

.card-tag.prediction {
    color: var(--accent-orange);
}

.card-tag.fantasy {
    color: var(--accent-green);
}

.prediction-card:hover,
.fantasy-card:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.article-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.article-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* 4. Latest Articles */
.articles-section {
    padding: 24px 0 32px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.article-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.article-item:hover {
    border-color: var(--border-highlight);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.article-img-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #0b1120;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-img-box img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.article-item:hover .article-img-box img {
    transform: scale(1.04);
}

.article-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* 5. Latest News */
.news-section {
    padding: 24px 0 32px;
}

.news-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.news-card-horizontal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.2s ease;
}

.news-card-horizontal:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
}

.news-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

/* 6. Popular Teams */
.popular-teams-section {
    padding: 24px 0 32px;
}

.popular-teams-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.popular-team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.popular-team-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.popular-team-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--primary-text);
    flex-shrink: 0;
}

.popular-team-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.popular-team-city {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* 7. Team Rankings */
.rankings-section {
    padding: 24px 0 32px;
}

.table-responsive {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cricket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.cricket-table th {
    background: #0d131f;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
}

.cricket-table td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

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

.rank-col {
    color: var(--text-dim);
    font-weight: 700;
    width: 60px;
}

.team-col {
    font-weight: 600;
}

.pts-col {
    font-weight: 800;
    color: var(--primary-text);
}

/* 8. Player Rankings, Points Table & Birthdays */
.player-rankings-section {
    padding: 24px 0 32px;
}

.player-rankings-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.rankings-dual-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ranking-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.ranking-box-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
}

.ranking-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-num {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 700;
    width: 18px;
}

.player-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1e293b;
    color: var(--primary-text);
    font-size: 0.62rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-name {
    font-weight: 600;
    color: var(--text-main);
}

.stat-val {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-main);
}

.side-panel-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 18px;
}

.birthday-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.birthday-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.birthday-days-badge {
    background: #1e293b;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* 9. Popular Players */
.popular-players-section {
    padding: 24px 0 32px;
}

.popular-players-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.popular-player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.popular-player-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.popular-player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--primary-text);
    margin-bottom: 4px;
}

.popular-player-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.popular-player-role {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* 10. Web Stories */
.web-stories-section {
    padding: 24px 0 32px;
}

.web-stories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.story-card {
    height: 220px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.story-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.story-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(11, 15, 23, 0.95) 100%);
    z-index: 2;
}

.story-title {
    position: relative;
    z-index: 3;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}

/* 11. Glossary */
.glossary-section {
    padding: 24px 0 32px;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.glossary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    transition: all 0.2s ease;
}

.glossary-card:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
}

.glossary-letter {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(34, 197, 94, 0.15);
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.glossary-term-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.glossary-definition {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* 12. Grassroots */
.grassroots-banner-section {
    padding: 24px 0 48px;
}

.grassroots-banner {
    background: linear-gradient(135deg, #0d1424 0%, #111d33 100%);
    border: 1px solid #1e3a5f;
    border-radius: var(--radius-xl);
    padding: 32px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.grassroots-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 650px;
}

.grassroots-tag {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-text);
}

.grassroots-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.grassroots-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.grassroots-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-grassroots-primary {
    background: var(--primary);
    color: #0b0f17;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.btn-grassroots-primary:hover {
    background: #4ade80;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-grassroots-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.btn-grassroots-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-highlight);
}

/* CrickArena Light Dashboard */
.crickarena-body {
    background-color: #f8f9fa;
    color: #1a202c;
    min-height: 100vh;
}

.crickarena-nav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
}

.crickarena-header {
    padding: 32px 0 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.crickarena-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
}

.crickarena-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 4px;
}

.btn-create-tournament {
    background: #064e3b;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-create-tournament:hover {
    background: #047857;
    transform: translateY(-1px);
}

.stats-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card-white {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-card-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-reward-rookie {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.tournament-card-white {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 20px;
    max-width: 380px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Footer */
/* Footer */
.site-footer {
    background: #070a10;
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
}

.footer-brand p {
    margin-top: 12px;
    max-width: 320px;
    line-height: 1.6;
    color: var(--text-muted);
}

.footer-heading {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-main);
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--primary-text);
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Responsive Breakpoints (Mobile First & Modern Grid) */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .two-col-grid {
        grid-template-columns: 1fr !important;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .popular-teams-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .player-rankings-layout {
        grid-template-columns: 1fr !important;
    }

    .popular-players-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .web-stories-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .glossary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grassroots-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px !important;
    }

    .stats-card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .site-footer {
        padding: 32px 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }

    .footer-bottom-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .articles-grid {
        grid-template-columns: 1fr !important;
    }

    .news-grid-2col {
        grid-template-columns: 1fr !important;
    }

    .popular-teams-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .rankings-dual-col {
        grid-template-columns: 1fr !important;
    }

    .popular-players-grid {
        grid-template-columns: 1fr !important;
    }

    .web-stories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .glossary-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-card-grid {
        grid-template-columns: 1fr !important;
    }

    .grassroots-title {
        font-size: 1.25rem !important;
    }

    .grassroots-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-grassroots-primary,
    .btn-grassroots-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Light Theme Overrides (Blue & White) */
body.light-theme {
    --bg-main: #ffffff;
    --bg-card: #f8fafc;
    --bg-card-hover: #f1f5f9;
    --bg-card-secondary: #e2e8f0;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --border-color: #e2e8f0;
    --border-highlight: #94a3b8;

    --primary: #2563eb;
    /* Blue */
    --primary-glow: rgba(37, 99, 235, 0.2);
    --primary-hover: #1d4ed8;
    --primary-text: #2563eb;

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    --text-dark: #000000;
}

/* Light Theme overrides for Footer & Grassroots Banner */
body.light-theme .site-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    color: #475569;
}

body.light-theme .footer-heading {
    color: #0f172a;
}

body.light-theme .footer-brand p {
    color: #64748b;
}

body.light-theme .footer-bottom-bar {
    border-top: 1px solid #e2e8f0;
}

body.light-theme .grassroots-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

body.light-theme .grassroots-title {
    color: #0f172a;
}

body.light-theme .grassroots-desc {
    color: #475569;
}

body.light-theme .btn-grassroots-secondary {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

body.light-theme .btn-grassroots-secondary:hover {
    background: rgba(15, 23, 42, 0.1);
}

/* ============================================================
   Password Field & Toggle Eye Button (Loop Engineering)
   ============================================================ */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 42px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    z-index: 2;
}

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

body.light-theme .password-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.password-toggle-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.password-toggle-btn svg {
    pointer-events: none;
    display: block;
}

/* Offcanvas Side Drawer Menu Styles (Screenshot 1 Match) */
.side-menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.side-menu-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

body.light-theme .side-menu-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

.side-arrow {
    color: var(--text-dim);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.side-menu-link:hover .side-arrow {
    color: #38bdf8;
    transform: translateX(2px);
}

.side-social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

.side-social-icon:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* ============================================================
   Mobile UI Optimizations (App-like Experience)
   ============================================================ */

/* Offcanvas Drawer Mobile Sizing */
@media (max-width: 480px) {
    #sideMenuDrawer {
        width: 320px !important;
        max-width: 88vw !important;
    }
}

/* Responsive Table Wrapper */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin-bottom: 1rem;
}

/* Mobile Quick Bottom Navigation Bar */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

body.light-theme .mobile-bottom-bar {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex;
    }

    body {
        padding-bottom: 64px;
        /* Space for bottom nav bar on mobile */
    }
}

.mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 72px;
}

.mobile-bottom-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
}

.mobile-bottom-item.active,
.mobile-bottom-item:hover {
    color: #38bdf8;
}

.mobile-bottom-item.active svg {
    color: #38bdf8;
    transform: scale(1.1);
}

body.light-theme .mobile-bottom-item {
    color: #64748b;
}

body.light-theme .mobile-bottom-item.active,
body.light-theme .mobile-bottom-item:hover {
    color: #2563eb;
}

/* ============================================================
   SCREENSHOT 2: UNIFIED RANKINGS & DASHBOARD GRID
   ============================================================ */
.dashboard-rankings-section {
    padding: 32px 0 24px;
}

.dashboard-rankings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1.15fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-rankings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.dashboard-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-panel-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

body.light-theme .dashboard-panel-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .dashboard-panel-card:hover {
    border-color: #93c5fd !important;
}

/* 2-Subcolumn Rankings Grid (Batting & Bowling) */
.rankings-subcolumns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 640px) {
    .rankings-subcolumns-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.rankings-subcol-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

body.light-theme .rankings-subcol-title {
    color: #64748b !important;
    border-bottom-color: #e2e8f0 !important;
}

.rankings-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s ease;
}

body.light-theme .rankings-list-item {
    border-bottom: 1px solid #f8fafc;
}

.rankings-list-item:last-child {
    border-bottom: none;
}

.rankings-rank-num {
    width: 18px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
}

body.light-theme .rankings-rank-num {
    color: #94a3b8 !important;
}

.rankings-avatar-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #161b22;
    color: #38bdf8;
    border: 1px solid #30363d;
}

body.light-theme .rankings-avatar-badge {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-color: #bfdbfe !important;
}

.rankings-player-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rankings-stat-val {
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--text-main);
    text-align: right;
    flex-shrink: 0;
}

/* Points Table Widget */
.points-widget-header {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.points-widget-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.points-widget-table th {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 8px 6px;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

.points-widget-table th:first-child {
    text-align: left;
}

.points-widget-table td {
    padding: 9px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 700;
    text-align: right;
}

.points-widget-table td:first-child {
    text-align: left;
    font-weight: 800;
}

.points-widget-table tr:last-child td {
    border-bottom: none;
}

body.light-theme .points-widget-table th {
    color: #64748b !important;
    border-bottom-color: #e2e8f0 !important;
}

body.light-theme .points-widget-table td {
    border-bottom-color: #f1f5f9 !important;
}

/* Birthday List Items */
.birthday-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.birthday-list-item:last-child {
    border-bottom: none;
}

body.light-theme .birthday-list-item {
    border-bottom-color: #f1f5f9 !important;
}

.birthday-tag-today {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
}

.birthday-tag-days {
    background: var(--bg-card-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
}

body.light-theme .birthday-tag-days {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

/* Most Popular Players Cards */
.popular-players-bar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

@media (max-width: 640px) {
    .popular-players-bar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.popular-players-bar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 12px;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.popular-players-bar-card:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

body.light-theme .popular-players-bar-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .popular-players-bar-card:hover {
    border-color: #2563eb !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08) !important;
}

/* ============================================================
   CricketKaScore — Modern Dedicated Auth UI System (Desktop & Mobile)
   ============================================================ */
.auth-page-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 20px 60px;
    width: 100%;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.light-theme .auth-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
}

@media (max-width: 480px) {
    .auth-page-wrapper {
        padding: 24px 14px 44px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 26px 18px;
        border-radius: 16px;
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    margin: 0 auto 14px;
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 14px;
    background: #ffffff;
    padding: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    display: block;
}

.auth-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

body.light-theme .auth-label {
    color: #475569 !important;
}

.auth-link-forgot {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-link-forgot:hover {
    color: #38bdf8;
    text-decoration: underline;
}

body.light-theme .auth-link-forgot:hover {
    color: #1d4ed8;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-card-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 500;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: var(--bg-card);
}

body.light-theme .auth-input {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .auth-input:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.auth-btn-primary {
    width: 100%;
    padding: 12px 16px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

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

.auth-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 11px 16px;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid #cbd5e1;
    width: 100%;
    box-sizing: border-box;
}

.auth-btn-google:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    border-color: #94a3b8;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-dim);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-footer-text a {
    color: var(--primary-text);
    font-weight: 700;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

.auth-alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.84rem;
    line-height: 1.45;
}

body.light-theme .auth-alert-danger {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.84rem;
    line-height: 1.45;
}

body.light-theme .auth-alert-success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #16a34a !important;
}

.auth-info-box {
    background: var(--bg-card-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 14px;
}

body.light-theme .auth-info-box {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

/* ============================================================
   Article & News Callout / Alert / Blockquote Theme Adapters
   ============================================================ */
.rich-article-body div[style*="background"],
.rich-article-body div[style*="border-left"],
.rich-article-body blockquote {
    background: rgba(30, 41, 59, 0.75) !important;
    border-left: 4px solid #38bdf8 !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 8px !important;
    font-style: normal !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
    padding: 16px 20px !important;
    margin: 20px 0 !important;
}

.rich-article-body div[style*="background"] *,
.rich-article-body div[style*="border-left"] *,
.rich-article-body blockquote * {
    color: #f8fafc !important;
}

.rich-article-body div[style*="background"] strong,
.rich-article-body div[style*="background"] b,
.rich-article-body div[style*="border-left"] strong,
.rich-article-body div[style*="border-left"] b,
.rich-article-body blockquote strong,
.rich-article-body blockquote b {
    color: #38bdf8 !important;
    font-weight: 800 !important;
}

body.light-theme .rich-article-body div[style*="background"],
body.light-theme .rich-article-body div[style*="border-left"],
body.light-theme .rich-article-body blockquote {
    background: #f0f7ff !important;
    border-left: 4px solid #0284c7 !important;
    color: #1e293b !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .rich-article-body div[style*="background"] *,
body.light-theme .rich-article-body div[style*="border-left"] *,
body.light-theme .rich-article-body blockquote * {
    color: #1e293b !important;
}

body.light-theme .rich-article-body div[style*="background"] strong,
body.light-theme .rich-article-body div[style*="background"] b,
body.light-theme .rich-article-body div[style*="border-left"] strong,
body.light-theme .rich-article-body div[style*="border-left"] b,
body.light-theme .rich-article-body blockquote strong,
body.light-theme .rich-article-body blockquote b {
    color: #0369a1 !important;
    font-weight: 800 !important;
}

/* ========================================================
   On-Page Searchable SEO Keyword Pills
   ======================================================== */
.seo-keyword-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    background: var(--bg-card-secondary, #161b22);
    border: 1px solid var(--border-color, #30363d);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    line-height: 1.2;
}

.seo-keyword-pill:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.15);
    border-color: #2563eb;
    transform: translateY(-1px);
}

body.light-theme .seo-keyword-pill,
html.light-theme .seo-keyword-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

body.light-theme .seo-keyword-pill:hover,
html.light-theme .seo-keyword-pill:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
}

/* ========================================================
   Live & Upcoming Matches Carousel Navigation & Styles
   ======================================================== */
.matches-carousel-section {
    position: relative;
    margin-bottom: 28px;
}

.matches-carousel-wrapper {
    position: relative;
    width: 100%;
}

.matches-carousel-viewport {
    overflow: hidden;
    width: 100%;
    border-radius: var(--radius-lg, 14px);
    position: relative;
}

.matches-carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    will-change: transform;
}

.matches-carousel-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 35;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0d1117 !important;
    border: 2px solid #38bdf8 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(56, 189, 248, 0.4) !important;
    transition: all 0.2s ease;
    user-select: none;
    outline: none;
}

.carousel-nav-btn:hover:not(:disabled) {
    background: #2563eb !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.8), 0 0 18px rgba(56, 189, 248, 0.7) !important;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    border-color: #30363d !important;
    box-shadow: none !important;
}

.carousel-nav-prev {
    left: -18px;
}

.carousel-nav-next {
    right: -18px;
}

@media (max-width: 768px) {
    .carousel-nav-prev {
        left: -8px;
        width: 36px;
        height: 36px;
    }

    .carousel-nav-next {
        right: -8px;
        width: 36px;
        height: 36px;
    }
}

body.light-theme .carousel-nav-btn {
    background: #ffffff !important;
    border-color: #0284c7 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================================
   Self-Contained Fast Utilities (Zero-JS, Zero-Blocking)
   ============================================================ */
.hidden { display: none !important; }
.inline-block { display: inline-block !important; }
.object-contain { object-fit: contain !important; }
.object-cover { object-fit: cover !important; }
.rounded-lg { border-radius: 8px !important; }
.rounded-xl { border-radius: 12px !important; }
.rounded-full { border-radius: 9999px !important; }
.bg-white { background-color: #ffffff !important; }
.bg-red-500 { background-color: #ef4444 !important; }
.p-0\.5, .p-0-5 { padding: 2px !important; }
.p-3\.5 { padding: 14px !important; }
.mr-1\.5, .mr-1-5 { margin-right: 6px !important; }
.w-1\.5, .w-1-5 { width: 6px !important; }
.h-1\.5, .h-1-5 { height: 6px !important; }
.w-8 { width: 32px !important; }
.h-8 { height: 32px !important; }
.font-black { font-weight: 900 !important; }
.text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.tracking-tight { letter-spacing: -0.025em !important; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}

.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.gap-2\.5 { gap: 10px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }
.gap-5 { gap: 20px !important; }
.gap-6 { gap: 24px !important; }
.gap-7 { gap: 28px !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.text-center { text-align: center !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }

@media (min-width: 640px) {
    .sm\:w-9 { width: 36px !important; }
    .sm\:h-9 { height: 36px !important; }
    .sm\:text-lg { font-size: 1.125rem !important; }
    .sm\:text-sm { font-size: 0.875rem !important; }
    .sm\:inline { display: inline !important; }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .sm\:gap-3 { gap: 12px !important; }
    .sm\:gap-4 { gap: 16px !important; }
    .sm\:gap-6 { gap: 24px !important; }
}

@media (min-width: 768px) {
    .md\:flex { display: flex !important; }
    .md\:hidden { display: none !important; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (min-width: 1024px) {
    .lg\:flex { display: flex !important; }
    .lg\:hidden { display: none !important; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* ========================================================
   ICC Multi-Format Rankings High-Performance Components
   ======================================================== */
.icc-rankings-section { padding: 28px 0 24px; background: var(--bg-main, #0b1118); border-top: none; }
.icc-rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.icc-rank-card { background: var(--bg-card, #111827); border: 1px solid var(--border-color, rgba(255,255,255,0.08)); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.icc-rank-accent { height: 2px; background: #38bdf8; }
.icc-rank-header { padding: 9px 14px; border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08)); font-weight: 800; font-size: 0.74rem; color: var(--text-muted, #94a3b8); letter-spacing: 0.06em; text-transform: uppercase; background: var(--bg-card-secondary, #0f172a); }
.icc-rank-list { flex: 1; display: flex; flex-direction: column; }
.icc-rank-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06)); transition: background 0.15s; }
.icc-rank-row:hover { background: var(--bg-card-hover, rgba(56,189,248,0.06)); }
.icc-rank-row.rank-1 { padding: 9px 14px; background: rgba(56, 189, 248, 0.04); }
.icc-rank-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.icc-rank-badge { display: flex; align-items: center; gap: 5px; width: 30px; flex-shrink: 0; }
.icc-rank-num { font-weight: 900; font-size: 0.85rem; color: var(--text-main, #ffffff); }
.icc-rank-row.rank-1 .icc-rank-num { color: #38bdf8; }
.icc-rank-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim, #64748b); }
.icc-rank-row.rank-1 .icc-rank-dot { background: #38bdf8; }
.icc-rank-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.icc-rank-name { font-weight: 800; font-size: 0.84rem; color: var(--text-main, #ffffff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icc-rank-right { display: flex; align-items: center; gap: 8px; }
.icc-rank-val { font-weight: 900; font-size: 0.88rem; color: var(--text-main, #ffffff); }
.icc-rank-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #0b1120; border: 1.5px solid #38bdf8; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.icc-rank-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icc-rank-footer { padding: 9px 14px; text-align: center; background: var(--bg-card-secondary, #0f172a); border-top: 1px solid var(--border-color, rgba(255,255,255,0.08)); }
.icc-rank-footer a { font-size: 0.74rem; font-weight: 800; color: #38bdf8; text-decoration: none; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 4px; }

/* ========================================================
   Modern Match Search Bar Component (Desktop & Mobile)
   ======================================================== */
.match-search-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.match-search-container:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.15);
}
.match-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.match-search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}
.match-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim, #64748b);
    pointer-events: none;
    transition: color 0.2s ease;
}
.match-search-container:focus-within .match-search-icon {
    color: #38bdf8;
}
.match-search-input {
    width: 100%;
    background: var(--bg-card-secondary, #0d1117);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px 10px 42px;
    font-size: 0.88rem;
    color: var(--text-main, #ffffff);
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}
.match-search-input:focus {
    border-color: #2563eb;
    background: var(--bg-card);
}
.match-search-input::placeholder {
    color: var(--text-dim, #64748b);
    font-size: 0.85rem;
}
.match-search-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.match-search-submit-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}
.match-search-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}
.match-search-clear-btn {
    background: var(--bg-card-secondary, #0d1117);
    color: var(--text-muted, #94a3b8) !important;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.match-search-clear-btn:hover {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

/* Light theme overrides */
body.light-theme .match-search-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}
body.light-theme .match-search-input {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
body.light-theme .match-search-input:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
}
body.light-theme .match-search-clear-btn {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

@media (max-width: 640px) {
    .match-search-container {
        padding: 10px 10px;
        margin-bottom: 18px;
    }
    .match-search-form {
        flex-direction: row;
        gap: 6px;
    }
    .match-search-input {
        padding: 8px 10px 8px 34px;
        font-size: 0.82rem;
    }
    .match-search-icon {
        left: 10px;
        width: 15px;
        height: 15px;
    }
    .match-search-submit-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    .match-search-clear-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}