/* ===== CORE VARIABLES ===== */
        :root {
            --primary-color: #e63946;
            --primary-dark: #c1121f;
            --primary-light: #f28482;
            --secondary-color: #2a9d8f;
            --dark-bg: #0b0b12;
            --darker-bg: #07070c;
            --card-bg: #171721;
            --card-hover: #1e1e2d;
            --text-primary: #ffffff;
            --text-secondary: #8E9097;
            --text-muted: #6c757d;
            --border-color: rgba(255, 255, 255, 0.1);
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
            --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
            --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            --glow: 0 0 20px rgba(230, 57, 70, 0.4);
        }

        /* ===== BASE STYLES ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background-color: var(--dark-bg);
            color: var(--text-primary);
            line-height: 1.7;
            overflow-x: hidden;
        }

        html {
            scroll-behavior: smooth;
        }

        /* ===== TYPOGRAPHY ===== */
        h1, h2, h3, h4, h5, h6 {
            font-weight: 700;
            line-height: 1.2;
            margin-bottom: 0.5rem;
        }

        .section-title {
            font-size: 2.5rem;
            color: var(--text-primary);
            margin-bottom: 1rem;
            position: relative;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: var(--gradient);
            border-radius: 2px;
        }

        .section-subtitle {
            font-size: 1.1rem;
            color: var(--text-secondary);
            max-width: 600px;
            margin: 0 auto;
        }

        .section-header.text-center .section-title::after {
            left: 50%;
            transform: translateX(-50%);
        }

        .section-header:not(.text-center) .section-title::after {
            left: 0;
            transform: none;
        }

        /* ===== LAYOUT & SECTIONS ===== */
        .section-padding {
            padding: 6rem 0;
        }

        .bg-dark {
            background-color: var(--darker-bg) !important;
        }

        .container {
            max-width: 1200px;
        }

        /* ===== NAVIGATION ===== */
        .navbar {
            background-color: transparent;
            padding: 1rem 0;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .navbar-scrolled {
            background-color: rgba(11, 11, 18, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: var(--shadow);
            padding: 0.75rem 0;
        }

        .navbar-brand {
            font-weight: 700;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
        }

        .navbar-brand img {
            transition: transform 0.3s ease;
        }

        .navbar-brand:hover img {
            transform: scale(1.1);
        }

        .nav-link {
            color: var(--text-primary) !important;
            font-weight: 500;
            padding: 0.5rem 1rem !important;
            margin: 0 0.25rem;
            border-radius: 6px;
            transition: all 0.3s ease;
            position: relative;
        }

        .nav-link:hover {
            color: var(--primary-color) !important;
            background: rgba(230, 57, 70, 0.1);
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 2px;
            background: var(--primary-color);
            transition: all 0.3s ease;
            transform: translateX(-50%);
        }

        .nav-link:hover::after {
            width: 80%;
        }

        .discord-btn {
            background: var(--primary-color);
            border: none;
            padding: 0.5rem 1.25rem;
            border-radius: 8px;
            font-weight: 500;
            transition: all 0.3s ease;
            margin-left: 0.5rem;
        }

        .discord-btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
        }

        /* ===== HERO SECTION ===== */
        .hero-section {
            background: linear-gradient(135deg, rgba(11, 11, 18, 0.95) 0%, rgba(11, 11, 18, 0.8) 100%), 
                        url('images/background.jpg') center/cover no-repeat;
            min-height: 100vh;
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .hero-background {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 0;
        }

        .hero-glow {
            position: absolute;
            border-radius: 50%;
            filter: blur(60px);
            opacity: 0.4;
        }

        .hero-glow-1 {
            width: 300px;
            height: 300px;
            background: var(--primary-color);
            top: 10%;
            left: 10%;
            animation: float-glow 8s ease-in-out infinite;
        }

        .hero-glow-2 {
            width: 200px;
            height: 200px;
            background: var(--primary-dark);
            top: 60%;
            right: 10%;
            animation: float-glow 6s ease-in-out infinite reverse;
        }

        .hero-glow-3 {
            width: 150px;
            height: 150px;
            background: #2a9d8f;
            bottom: 20%;
            left: 20%;
            animation: float-glow 10s ease-in-out infinite;
        }

        @keyframes float-glow {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-20px) scale(1.1); }
        }

        .hero-logo {
            animation: float 6s ease-in-out infinite;
            position: relative;
            z-index: 2;
        }

        .logo-glow {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 250px;
            height: 250px;
            background: radial-gradient(circle, rgba(230, 57, 70, 0.3) 0%, transparent 70%);
            border-radius: 50%;
            filter: blur(30px);
            z-index: 1;
        }

        .hero-logo img {
            filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
            transition: all 0.4s ease;
            position: relative;
            z-index: 2;
        }

        .hero-logo:hover img {
            transform: scale(1.05) rotate(2deg);
            filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.6));
        }

        .hero-title {
            font-size: 3.5rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 1rem;
            position: relative;
            z-index: 2;
        }

        .hero-subtitle {
            font-size: 1.5rem;
            color: var(--primary-color);
            font-weight: 600;
            margin-bottom: 1.5rem;
            position: relative;
            z-index: 2;
        }

        .hero-description {
            font-size: 1.2rem;
            color: var(--text-secondary);
            max-width: 600px;
            margin: 0 auto 2rem;
            position: relative;
            z-index: 2;
        }

        .hero-buttons .btn {
            padding: 0.75rem 2rem;
            font-weight: 600;
            border-radius: 8px;
            transition: all 0.3s ease;
            position: relative;
            z-index: 2;
        }

        .hero-buttons .btn-primary {
            background: var(--gradient);
            border: none;
            box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
            position: relative;
            overflow: hidden;
        }

        .hero-buttons .btn-primary::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .hero-buttons .btn-primary:hover::before {
            left: 100%;
        }

        .hero-buttons .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
        }

        .hero-buttons .btn-outline-light {
            border: 2px solid rgba(255, 255, 255, 0.2);
            background: transparent;
            position: relative;
            overflow: hidden;
        }

        .hero-buttons .btn-outline-light::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transition: left 0.5s ease;
        }

        .hero-buttons .btn-outline-light:hover::before {
            left: 100%;
        }

        .hero-buttons .btn-outline-light:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-3px);
        }

        .scroll-indicator {
            position: absolute;
            bottom: 2rem;
            left: 50%;
            transform: translateX(-50%);
            animation: bounce 2s infinite;
            z-index: 2;
        }

        .scroll-link {
            color: var(--text-secondary);
            font-size: 1.5rem;
            transition: color 0.3s ease;
            background: rgba(11, 11, 18, 0.5);
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
            border: 1px solid var(--border-color);
        }

        .scroll-link:hover {
            color: var(--primary-color);
            background: rgba(230, 57, 70, 0.1);
            border-color: var(--primary-color);
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% {
                transform: translateX(-50%) translateY(0);
            }
            40% {
                transform: translateX(-50%) translateY(-10px);
            }
            60% {
                transform: translateX(-50%) translateY(-5px);
            }
        }

        /* ===== STATS PAGE STYLES ===== */

        /* Stats Hero Section */
        .stats-hero {
            background: linear-gradient(135deg, rgba(11, 11, 18, 0.9) 0%, rgba(11, 11, 18, 0.7) 100%), 
                        url('images/background.jpg') center/cover no-repeat;
            min-height: 100vh;
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .stats-hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 50% 50%, rgba(46, 139, 87, 0.1) 0%, transparent 50%);
        }

        .stats-logo {
            animation: float 6s ease-in-out infinite;
            font-size: 5rem;
            color: var(--primary-color);
        }

        .stats-title {
            font-size: 3.5rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 1rem;
        }

        .stats-subtitle {
            font-size: 1.5rem;
            color: var(--primary-color);
            font-weight: 600;
            margin-bottom: 1.5rem;
        }

        .stats-description {
            font-size: 1.2rem;
            color: var(--text-secondary);
            max-width: 600px;
            margin: 0 auto 2rem;
        }

        /* Stats Controls */
        .stats-controls {
            margin-bottom: 3rem;
        }

        .control-card {
            background: var(--card-bg);
            border-radius: 16px;
            padding: 2rem;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow);
        }

        .form-label {
            color: var(--text-primary);
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .form-select {
            background-color: var(--darker-bg);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            font-size: 1rem;
        }

        .form-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.25rem rgba(46, 139, 87, 0.25);
        }

        /* Loading Container */
        .loading-container {
            padding: 3rem 0;
        }

        .loading-spinner {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
            animation: spin 1.5s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Player Count */
        .player-count {
            font-size: 1.1rem;
            color: var(--text-secondary);
        }

        .player-count .positive {
            color: var(--primary-color);
            font-weight: 600;
        }

        .player-count .negative {
            color: var(--secondary-color);
            font-weight: 600;
        }

        /* Error Message */
        .error-message {
            background: rgba(250, 73, 73, 0.1);
            border: 1px solid rgba(250, 73, 73, 0.3);
            border-radius: 8px;
            padding: 1rem 1.5rem;
            margin-bottom: 2rem;
        }

        /* Stats Table */
        .stats-table-container {
            background: var(--card-bg);
            border-radius: 16px;
            overflow: hidden;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow);
        }

        .stats-table {
            width: 100%;
            border-collapse: collapse;
            margin: 0;
        }

        .stats-table th {
            background-color: var(--darker-bg);
            color: var(--text-primary);
            padding: 1.25rem 1rem;
            text-align: left;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 0.9rem;
            border-bottom: 2px solid var(--primary-color);
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .stats-table th:hover {
            background-color: rgba(46, 139, 87, 0.1);
            color: var(--primary-color);
        }

        .stats-table th.active {
            color: var(--primary-color);
        }

        .sort-arrow {
            margin-left: 5px;
            opacity: 0.6;
        }

        .stats-table th.active .sort-arrow {
            opacity: 1;
        }

        .stats-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-primary);
            transition: all 0.3s ease;
        }

        .stats-table tr:not(:last-child) td {
            border-bottom: 1px solid var(--border-color);
        }

        .stats-table tr:hover td {
            background-color: var(--card-hover);
        }

        .stats-table .positive {
            color: var(--primary-color);
            font-weight: 600;
        }

        .stats-table .negative {
            color: var(--secondary-color);
            font-weight: 600;
        }

        .stats-table .neutral {
            color: #3498db;
            font-weight: 600;
        }

        /* Footer */
        .footer {
            background: var(--darker-bg);
            padding: 2rem 0;
            border-top: 1px solid var(--border-color);
            position: relative;
            overflow: hidden;
        }

        .footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: var(--gradient);
        }

        .footer p {
            color: var(--text-secondary);
            margin: 0;
        }

        .footer-link {
            color: var(--text-secondary);
            text-decoration: none;
            transition: color 0.3s ease;
            display: inline-flex;
            align-items: center;
            position: relative;
        }

        .footer-link::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 1px;
            background: var(--primary-color);
            transition: width 0.3s ease;
        }

        .footer-link:hover {
            color: var(--primary-color);
        }

        .footer-link:hover::after {
            width: 100%;
        }

        /* Responsive Adjustments */
        @media (max-width: 992px) {
            .stats-title {
                font-size: 2.5rem;
            }
            
            .stats-subtitle {
                font-size: 1.25rem;
            }
            
            .control-card {
                padding: 1.5rem;
            }
        }

        @media (max-width: 768px) {
            .stats-title {
                font-size: 2rem;
            }
            
            .stats-subtitle {
                font-size: 1.1rem;
            }
            
            .stats-description {
                font-size: 1rem;
            }
            
            .stats-table {
                font-size: 0.9rem;
            }
            
            .stats-table th,
            .stats-table td {
                padding: 0.75rem 0.5rem;
            }
            
            .stats-table th {
                font-size: 0.8rem;
            }
        }

        @media (max-width: 576px) {
            .stats-table-container {
                overflow-x: auto;
            }
            
            .stats-table {
                min-width: 800px;
            }
            
            .control-card .row {
                flex-direction: column;
                gap: 1rem;
            }
            
            .control-card .col-md-4,
            .control-card .col-md-6,
            .control-card .col-md-2 {
                width: 100%;
            }
        }

        /* Additional CSS for background randomization */
        .hero-section {
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            transition: background-image 0.5s ease-in-out;
        }

        .rules-hero {
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            transition: background-image 0.5s ease-in-out;
        }

        /* Additional styling for the new table structure */
        .stats-table th .sort-arrow { 
            float: right; 
            font-size: 0.8em;
            opacity: 0.5;
        }

        .stats-table th.sorted-asc .sort-arrow, .stats-table th.sorted-desc .sort-arrow {
            opacity: 1;
        }