:root {
    --bg-color: #f5efe4; /* Vintage cream background */
    --text-color: #2f3730; /* Dark charcoal green text for readability */
    --text-muted: #555e56; /* Medium olive-gray text */
    --accent-red: #bd1c1c; /* Rich classic red */
    --accent-red-bright: #e22d2d; /* Bright red */
    --accent-gold: #b58900; /* Gold accent */
    --accent-gold-bright: #d4af37; /* Bright gold accent */
    --accent-dark: #e5dcc9; /* Darker vintage cream for panels/alternates */
    --accent-gray: #d4caa8; /* Warm sand-gray borders */
    --glass-bg: rgba(245, 239, 228, 0.95); /* Warm cream glass */
    --glass-border: rgba(198, 50, 23, 0.25); /* Rust-red accent borders */
    --glass-border-soft: rgba(47, 55, 48, 0.08); /* Soft dark borders */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-color); /* Premium dark charcoal for headings */
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border-soft);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--glass-border);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Button */
.btn-gold {
    background: linear-gradient(135deg, var(--accent-red), #800000);
    color: #fff;
    font-weight: 700;
    border: 1px solid var(--accent-gold);
    padding: 12px 28px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--accent-red-bright), var(--accent-red));
    box-shadow: 0 0 20px rgba(204, 0, 0, 0.4);
    transform: translateY(-2px);
}

.btn-outline-gold {
    background: transparent;
    color: var(--accent-gold);
    font-weight: 700;
    border: 2px solid var(--accent-red);
    padding: 12px 28px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-outline-gold:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(204, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* ── Red Navbar ── */
nav.nav-red {
    background: var(--accent-red) !important;
    border-bottom: 3px solid var(--accent-gold) !important;
    box-shadow: 0 4px 20px rgba(140, 0, 0, 0.35);
}

nav.nav-red a {
    color: rgba(255, 255, 255, 0.75) !important;
}

nav.nav-red a:hover {
    color: #ffffff !important;
}

nav.nav-red a::after {
    background-color: #ffffff !important;
}

/* White logo (for red nav background) */
.logo-white {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    letter-spacing: 3px;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Login button on red nav — themed with vintage charcoal-green, sand border, cream text, hover to cream with noise */
.btn-nav-login {
    position: relative !important;
    background: #2f3730 !important;
    color: #f5efe4 !important;
    border: 1.5px solid #e5dcc9 !important;
    padding: 7px 22px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    font-size: 0.82rem !important;
    transition: all 0.25s ease !important;
    overflow: hidden !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
}

.btn-nav-login::after {
    display: none !important;
}

nav.nav-red a.btn-nav-login:hover,
.btn-nav-login:hover {
    background-color: #f5efe4 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E") !important;
    color: #2f3730 !important;
    border-color: #f5efe4 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

/* ── Red Background Sections ── */
.section-red {
    background-color: var(--accent-red) !important;
    background-image: none !important;
}

.section-red-dark {
    background-color: #2f3730 !important;
    background-image: none !important;
}

footer {
    background-color: #2f3730 !important;
    background-image: none !important;
}

/* ── National Standings Sections (Warm Gradient) ── */
#mini-standings,
#standings {
    background: linear-gradient(180deg, #f5efe4 0%, #e5dcc9 100%) !important;
}

/* ── Section Shadows & Progressive Stacking ── */
nav {
    position: sticky;
    top: 0;
    z-index: 1000 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.hero-slider {
    position: relative;
    z-index: 900 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.section-red {
    position: relative;
    z-index: 800 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

#mini-standings,
#standings {
    position: relative;
    z-index: 700 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.section-red-dark {
    position: relative;
    z-index: 600 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.bg-alt,
.content-section {
    position: relative;
    z-index: 500 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

footer {
    position: relative;
    z-index: 400 !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* ── Buttons for Red Sections ── */
.btn-white-outline {
    position: relative;
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 28px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
    text-decoration: none;
    text-align: center;
    overflow: visible;
}

.btn-white-outline::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
}

.btn-white-outline:hover {
    background: #ffffff;
    color: var(--accent-red);
    border-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-white-outline:hover::after {
    transform: scaleX(1);
}

.btn-white-solid {
    position: relative;
    background: #ffffff;
    color: var(--accent-red);
    border: 2px solid #ffffff;
    padding: 13px 36px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.88rem;
    font-weight: 800;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
    text-decoration: none;
    text-align: center;
    overflow: visible;
}

.btn-white-solid::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
}

.btn-white-solid:hover {
    background: #ffffff;
    color: var(--accent-red);
    border-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-white-solid:hover::after {
    transform: scaleX(1);
}

/* ── Match cards on red background ── */
.section-red-dark .glass-card,
.section-red .glass-card {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.section-red-dark .glass-card:hover,
.section-red .glass-card:hover {
    background: rgba(0, 0, 0, 0.35) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25) !important;
}

.table-pagination {
    display: flex;
    align-items: center;
}

.table-pagination button {
    background: rgba(255, 255, 255, 0.03);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.table-pagination button:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.table-pagination button:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-left: none;
}

.table-pagination button:hover:not(:disabled) {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

.table-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.01);
    color: #555;
    border-color: rgba(255, 255, 255, 0.05);
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--accent-gray);
    transition: var(--transition-smooth);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-red) 0%, #800000 50%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a.btn-gold::after {
    display: none;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}

/* --- Responsive Navbar for Medium Viewports --- */
@media (max-width: 1200px) {
    nav {
        padding: 20px 3%;
    }
    .logo {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
    nav ul {
        gap: 18px;
    }
    nav a {
        font-size: 0.82rem;
    }
    nav a.btn-gold {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    nav {
        padding: 15px 2%;
    }
    .logo {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    nav ul {
        gap: 12px;
    }
    nav a {
        font-size: 0.76rem;
    }
    nav a.btn-gold {
        padding: 8px 16px;
        font-size: 0.72rem;
        margin-left: 10px !important;
    }
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: var(--transition-smooth);
}

nav a:hover {
    color: var(--accent-gold);
}

nav a:hover::after {
    width: 100%;
}

/* Remove hover underline for the brand logo */
nav > a::after {
    display: none !important;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 92vh;
    width: 100%;
    overflow: hidden;
    background: #ffffff;
}

.slides-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent; /* Overlay is handled dynamically via inline style on .slide */
}

.slide-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 20px;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-content h1 {
    font-size: 5rem;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.slide-content p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto 40px auto;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s;
    font-weight: 300;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.slide.active .slide-content h1,
.slide.active .slide-content p {
    transform: translateY(0);
    opacity: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.prev-btn {
    left: 40px;
}

.next-btn {
    right: 40px;
}

.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dot.active {
    background: var(--accent-gold);
    width: 30px;
    border-radius: 4px;
}

/* Base Layout Classes */
.content-section {
    padding: 100px 5%;
}

.bg-alt {
    background-color: var(--accent-dark);
    border-top: 1px solid var(--accent-gray);
    border-bottom: 1px solid var(--accent-gray);
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

/* Leaderboard Table */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border-soft);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--glass-bg);
}

.leaderboard-table th {
    padding: 20px 24px;
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    color: var(--accent-gold);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--glass-border-soft);
}

.leaderboard-table td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border-soft);
    font-size: 0.95rem;
    color: var(--text-color);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr {
    transition: var(--transition-smooth);
}

.leaderboard-table tr:hover {
    background: rgba(212, 175, 55, 0.03);
}

/* Searchable Select Component */
.searchable-select-container {
    position: relative;
    width: 100%;
}

.searchable-select-header {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--accent-gray);
    color: var(--text-color);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.searchable-select-header:hover {
    border-color: var(--accent-gold);
    background: #f8f9fa;
}

.searchable-select-header input {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--text-color);
    width: 100%;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.searchable-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--accent-gray);
    z-index: 2100;
    max-height: 195px; /* Fits exactly ~3 items */
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    animation: slideDown 0.2s ease;
}

/* Sleek Scrollbar for the Searchable Select */
.searchable-select-dropdown::-webkit-scrollbar {
    width: 6px;
}
.searchable-select-dropdown::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}
.searchable-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--accent-gray);
    border-radius: 4px;
}
.searchable-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

.searchable-select-dropdown.active {
    display: block;
}

.searchable-select-item {
    padding: 8px 15px; /* Balanced padding */
    cursor: pointer;
    color: #ccc;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.searchable-select-item:last-child {
    border-bottom: none;
}

.searchable-select-item:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
    padding-left: 20px;
}

.searchable-select-item.selected {
    background: var(--accent-gold);
    color: #000;
}

.searchable-select-item.no-results {
    color: #666;
    font-style: italic;
    cursor: default;
    padding: 15px;
    text-align: center;
}

.searchable-select-chevron {
    color: var(--accent-gold);
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.searchable-select-container.open .searchable-select-chevron {
    transform: rotate(180deg);
}

/* Rank (placeholder or dynamic if available) */
.rank-gold {
    color: #ffd700;
    font-weight: 800;
    font-size: 1.1rem;
}

.rank-silver {
    color: #e0e0e0;
    font-weight: 800;
    font-size: 1.1rem;
}

.rank-bronze {
    color: #cd7f32;
    font-weight: 800;
    font-size: 1.1rem;
}

/* Navbar Mobile Toggle Button */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--accent-gold);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: var(--transition-smooth);
    outline: none;
    z-index: 1001;
}
.nav-toggle:hover {
    color: var(--accent-gold-bright);
}

@media (max-width: 992px) {
    .nav-toggle {
        display: block; /* Show toggle button */
    }

    nav ul {
        display: none; /* Hide default desktop nav */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 2px solid var(--accent-red);
        padding: 15px 0;
        gap: 0;
        align-items: stretch;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 999;
        margin: 0;
    }

    nav ul.open {
        display: flex; /* Show menu when toggle clicked */
        animation: slideDownNav 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    nav a {
        font-size: 0.95rem !important;
        padding: 12px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
        display: block;
        box-sizing: border-box;
    }

    nav a::after {
        display: none; /* Hide underlines on mobile */
    }

    .nav-login-item {
        padding: 15px 24px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    nav a.btn-nav-login,
    .btn-nav-login {
        display: inline-block !important;
        width: auto !important;
        max-width: 180px !important;
        text-align: center !important;
        margin-left: 0 !important; /* overrides inline style margin-left: 20px */
        margin-top: 5px !important;
        padding: 10px 30px !important;
        box-sizing: border-box !important;
    }

    nav a.btn-gold {
        border: none;
        background: linear-gradient(135deg, var(--accent-gold), #8c7324);
        color: black;
        text-align: center;
        border-radius: 4px;
        margin-left: 0 !important;
        margin-top: 10px;
        padding: 12px !important;
    }
}

@keyframes slideDownNav {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .slide-content h1 {
        font-size: 2.8rem;
    }

    .slide-content p {
        font-size: 1.1rem;
    }

    nav {
        padding: 15px 5%;
    }

    /* nav ul handled by 992px media query */

    .content-section {
        padding: 40px 15px !important;
    }

    /* Responsive Headings to override inline styles on mobile */
    h1, 
    [style*="font-size: 3rem"], 
    [style*="font-size: 2.8rem"] {
        font-size: clamp(1.8rem, 6vw, 2.2rem) !important;
    }
    
    h2, 
    [style*="font-size: 2.5rem"], 
    [style*="font-size: 2.2rem"],
    [style*="font-size:2.5rem"], 
    [style*="font-size:2.2rem"] {
        font-size: clamp(1.4rem, 5vw, 1.8rem) !important;
    }
    
    h3, 
    [style*="font-size: 1.5rem"],
    [style*="font-size:1.5rem"] {
        font-size: clamp(1.2rem, 4vw, 1.4rem) !important;
    }

    .slider-btn {
        display: none;
    }
}

/* --- Sleek Gold Scrollbar for Frontend Tables & Scrollables --- */
.table-responsive::-webkit-scrollbar,
div[style*="overflow-x: auto"]::-webkit-scrollbar,
.searchable-select-dropdown::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track,
div[style*="overflow-x: auto"]::-webkit-scrollbar-track,
.searchable-select-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb,
.searchable-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.25);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb:hover,
.searchable-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* --- Balanced Responsive Layout Grids --- */
.responsive-two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
@media (max-width: 768px) {
    .responsive-two-column-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}
@media (max-width: 768px) {
    .vision-mission-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.classification-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 992px) {
    .classification-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .classification-grid {
        grid-template-columns: 1fr;
    }
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* --- News Responsive Layout Grid --- */
.responsive-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
@media (max-width: 992px) {
    .responsive-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .responsive-news-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Hero Slider Slide Transition Effect --- */
.hero-slider.effect-slide .slides-container {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
}
.hero-slider.effect-slide .slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    opacity: 1;
    left: auto;
    top: auto;
    transition: none;
}

/* ── Anti-FOUC: Hide login button & show avatar placeholder instantly ── */
html.user-logged-in .nav-login-item,
html.user-logged-in nav ul li:has(a[href="/login"]),
html.user-logged-in nav ul li:has(a[href*="login"]) {
    display: none !important;
}

/* Placeholder avatar: visible instantly when logged in, before JS runs */
.nav-auth-placeholder {
    display: none;
    margin-left: 20px;
    margin-right: 15px;
}
html.user-logged-in .nav-auth-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Hide placeholder once real auth container is injected */
html.user-logged-in .nav-auth-placeholder:has(~ .sc-auth-container),
html.user-logged-in nav:has(.sc-auth-container) .nav-auth-placeholder {
    display: none !important;
}
.nav-auth-placeholder .placeholder-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e4e4e7;
    border: 1.5px solid var(--accent-gray);
    animation: placeholderPulse 1.5s ease-in-out infinite;
}
@keyframes placeholderPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}
@media (max-width: 992px) {
    .nav-auth-placeholder {
        margin-left: auto;
        margin-right: 12px;
    }
}

/* --- PREMIUM LIGHT THEME OVERRIDES --- */
body, html {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Intercept hardcoded inline text colors and convert to high contrast charcoal */
[style*="color: white"],
[style*="color:white"],
[style*="color: #fff"],
[style*="color:#fff"],
[style*="color: #eee"],
[style*="color:#eee"],
[style*="color: #ddd"],
[style*="color:#ddd"],
[style*="color: #ccc"],
[style*="color:#ccc"],
[style*="color: #aaa"],
[style*="color:#aaa"] {
    color: var(--text-color) !important;
}

/* Intercept muted texts */
[style*="color: #888"],
[style*="color:#888"],
[style*="color: #666"],
[style*="color:#666"] {
    color: var(--text-muted) !important;
}

/* Intercept dark container backgrounds and convert to clean white/light panels */
[style*="background: #000"],
[style*="background:#000"],
[style*="background: #050505"],
[style*="background:#050505"],
[style*="background: #080808"],
[style*="background:#080808"],
[style*="background: #0d0d0d"],
[style*="background:#0d0d0d"],
[style*="background: #111"],
[style*="background:#111"],
[style*="background: #151515"],
[style*="background:#151515"],
[style*="background: #181818"],
[style*="background:#181818"],
[style*="background: #1a1a1a"],
[style*="background:#1a1a1a"],
[style*="background: #222"],
[style*="background:#222"],
[style*="background: rgba(0,0,0,0.8"],
[style*="background: rgba(0,0,0,0.9"],
[style*="background: rgba(10,10,10"],
[style*="background: rgba(20,20,20"],
[style*="background: rgba(20, 20, 20"],
[style*="background:rgba(20, 20, 20"],
.glass-card {
    background: var(--glass-bg) !important;
    border-color: var(--glass-border-soft) !important;
    color: var(--text-color) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

.glass-card:hover {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

/* Also intercept background-color dark variants */
[style*="background-color: #000"],
[style*="background-color:#000"],
[style*="background-color: #111"],
[style*="background-color:#111"],
[style*="background-color: #1a1a1a"],
[style*="background-color:#1a1a1a"],
[style*="background-color: #181818"],
[style*="background-color:#181818"],
[style*="background-color: #222"],
[style*="background-color:#222"],
[style*="background-color: #0d0d0d"],
[style*="background-color:#0d0d0d"],
[style*="background-color: #080808"],
[style*="background-color:#080808"] {
    background-color: var(--accent-dark) !important;
    color: var(--text-color) !important;
    border-color: var(--accent-gray) !important;
}

/* Alternate sections background */
.bg-alt, [style*="background-color: #080808"] {
    background-color: var(--accent-dark) !important;
    border-color: var(--accent-gray) !important;
}

/* Table overrides for clean light look */
.leaderboard-table, .prs-table, table {
    background: #ffffff !important;
    color: var(--text-color) !important;
}

.leaderboard-table th, .prs-table th, table th {
    background: var(--accent-dark) !important;
    color: var(--accent-red) !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--accent-gold) !important;
}

.leaderboard-table td, .prs-table td, table td {
    border-bottom: 1px solid var(--accent-gray) !important;
    color: var(--text-color) !important;
}

.leaderboard-table tr:hover, .prs-table tr:hover, table tr:hover {
    background: rgba(204, 0, 0, 0.03) !important;
}

/* Form controls (inputs, selects, textareas) */
input, select, textarea {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid var(--accent-gray) !important;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.1) !important;
    outline: none !important;
}

/* Dropdowns & searchable select overrides */
.searchable-select-header {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid var(--accent-gray) !important;
}

.searchable-select-header:hover {
    border-color: var(--accent-gold) !important;
    background: #fafafa !important;
}

.searchable-select-header input {
    color: #1a1a1a !important;
}

.searchable-select-dropdown {
    background: var(--bg-color) !important;
    border: 1px solid var(--accent-gray) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.searchable-select-item {
    color: #333 !important;
    border-bottom: 1px solid var(--accent-gray) !important;
}

.searchable-select-item:hover {
    background: rgba(204, 0, 0, 0.05) !important;
    color: var(--accent-red) !important;
}

.searchable-select-item.selected {
    background: var(--accent-red) !important;
    color: #ffffff !important;
}

/* Nav bar styles */
nav {
    background: rgba(245, 239, 228, 0.95) !important;
    border-bottom: 1px solid var(--accent-gray) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03) !important;
}

nav a {
    color: #1a1a1a !important;
}

nav a:hover {
    color: var(--accent-red) !important;
}

nav a::after {
    background: var(--accent-red) !important;
}


/* Slanted Banner Accent (Inspired by the slanted design in Perbakin document) */
.slanted-accent {
    position: relative;
    overflow: hidden;
}

.slanted-accent::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(135deg, transparent 50%, var(--accent-red) 50%);
    opacity: 0.15;
    pointer-events: none;
}

/* Pagination Overrides */
.table-pagination button {
    background: var(--bg-color) !important;
    color: #333 !important;
    border: 1px solid var(--accent-gray) !important;
}

.table-pagination button:hover:not(:disabled) {
    background: var(--accent-red) !important;
    color: #ffffff !important;
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.2) !important;
}

.table-pagination button:disabled {
    background: #f4f4f5 !important;
    color: #a0a0a5 !important;
    border-color: var(--accent-gray) !important;
}

/* Membership Card visualizer watermark overrides */
.member-card-viz::before {
    color: rgba(0, 0, 0, 0.04) !important;
}

/* ── Dark Border Color Overrides ── */
[style*="border: 1px solid #222"],
[style*="border: 1px solid #333"],
[style*="border: 1px solid #444"],
[style*="border-top: 1px solid #222"],
[style*="border-bottom: 1px solid #222"],
[style*="border-color: #222"],
[style*="border-color:#222"],
[style*="border-color: #333"],
[style*="border-color:#333"] {
    border-color: var(--accent-gray) !important;
}

/* ── Dark Inline Section Backgrounds (catch section/div tags) ── */
section[style*="#0d0d0d"],
section[style*="#080808"],
section[style*="#111"],
div[style*="background: #0d0d0d"],
div[style*="background:#0d0d0d"] {
    background: var(--accent-dark) !important;
    border-color: var(--accent-gray) !important;
}

/* ── Fix remaining rgba dark backgrounds used in card items ── */
[style*="background: rgba(255,255,255,0.03)"],
[style*="background:rgba(255,255,255,0.03)"],
[style*="background: rgba(255, 255, 255, 0.03)"] {
    background: var(--bg-color) !important;
    border-color: var(--accent-gray) !important;
}

[style*="border: 1px solid rgba(255,255,255,0.08)"],
[style*="border: 1px solid rgba(255, 255, 255, 0.08)"] {
    border-color: var(--accent-gray) !important;
}

/* ── Nav-bar mobile menu dark override ── */
/* Regular white navbar mobile */
nav:not(.nav-red) ul {
    background: rgba(245, 239, 228, 0.98) !important;
}

/* Red navbar mobile menu stays red */
nav.nav-red ul {
    background: var(--accent-red) !important;
}

nav.nav-red ul a {
    color: rgba(255,255,255,0.75) !important;
}

nav.nav-red ul a:hover {
    color: #ffffff !important;
}

/* ── Fix unreadable light inline text inside glass cards on light background ── */
:not(.section-red):not(.section-red-dark) .glass-card [style*="color: #ccc"],
:not(.section-red):not(.section-red-dark) .glass-card [style*="color:#ccc"],
:not(.section-red):not(.section-red-dark) .glass-card [style*="color: #aaa"],
:not(.section-red):not(.section-red-dark) .glass-card [style*="color:#aaa"],
:not(.section-red):not(.section-red-dark) .glass-card [style*="color: white"],
:not(.section-red):not(.section-red-dark) .glass-card [style*="color:white"],
:not(.section-red):not(.section-red-dark) .glass-card [style*="color: #888"],
:not(.section-red):not(.section-red-dark) .glass-card [style*="color:#888"] {
    color: var(--text-color) !important;
}

/* ─── DYNAMIC SUBPAGE OVERRIDES (Clubs, Events, News, Shooters) ─── */
.club-hero, .event-hero, .article-hero, .profile-hero {
    background: linear-gradient(rgba(47, 55, 48, 0.85), rgba(47, 55, 48, 0.95)),
                url('https://images.unsplash.com/photo-1595350350702-8646b9a2c3bb?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover !important;
    border-bottom: 2px solid var(--accent-gold) !important;
    padding: 100px 5% 50px 5% !important;
}

.club-hero h1, .event-title, .article-hero h1, .profile-hero h1 {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.article-hero .meta, .profile-hero .meta, .profile-hero .div-badge, .article-hero .cat-badge {
    color: #d4caa8 !important;
}

.profile-avatar, .match-logo, .club-logo-box {
    background-color: #ffffff !important;
    border: 2px solid #d4caa8 !important;
    color: #2f3730 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

.club-content, .event-content, .article-content, .profile-body {
    background-color: #f5efe4 !important;
    color: #2f3730 !important;
    padding: 40px 5% !important;
}

.club-info-container, .match-info-container {
    border-bottom: 1px solid #d4caa8 !important;
}

.section-title, .event-section-title {
    color: #2f3730 !important;
    border-bottom: 1px solid #d4caa8 !important;
}

/* Subpage Tables overrides */
.members-table, .match-details-table table, .info-table, .match-table {
    background-color: #ffffff !important;
    color: #2f3730 !important;
}

.members-table tr, .info-table tr, .info-table td, .match-table tr, .match-table td {
    border-bottom: 1px solid #d4caa8 !important;
    color: #2f3730 !important;
}

.match-table thead th {
    background-color: #2f3730 !important;
    color: #f5efe4 !important;
    border-bottom: 2px solid var(--accent-gold) !important;
}

.club-details table td:first-child, .match-details-table table td:first-child, .info-table td:first-child {
    color: #555555 !important;
}

.club-details table td:last-child, .match-details-table table td:last-child, .info-table td:last-child {
    color: #2f3730 !important;
    font-weight: bold !important;
}

.members-table tr:hover, .match-table tbody tr:hover {
    background-color: rgba(189, 28, 28, 0.05) !important;
}

/* Stat Cards in subpages */
.stat-cards .stat-card, .stats-grid .stat-card {
    background-color: #e5dcc9 !important;
    border: 1px solid #d4caa8 !important;
}

.stat-value, .stat-card .val {
    color: #bd1c1c !important;
}

.stat-label, .stat-card .lbl {
    color: #555555 !important;
}

/* Register & Links */
.btn-register {
    background-color: #bd1c1c !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-register:hover {
    background-color: #8b0000 !important;
}

.back-link {
    color: #2f3730 !important;
}

.back-link:hover {
    color: #bd1c1c !important;
}