@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

        /* Firefox & Cross-browser compatibility fixes */
        *, *::before, *::after {
            box-sizing: border-box;
            -moz-box-sizing: border-box;
            -webkit-box-sizing: border-box;
        }

        html {
            -moz-text-size-adjust: 100%;
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: #0d0d0d;
            color: #fff;
            position: relative;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            overflow-x: hidden;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        
        body::before {
            content: '';
            position: fixed; /* Ensures the background layer is fixed to the viewport */
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Combines the dark overlay with the background image */
            background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../imgs/bg.png?v=1.0');
            background-size: cover;
            background-position: top;
            background-repeat: no-repeat;
            z-index: -1;
        }
        
        /* New: Common container style */
        .custom-container {
            width: 100%;
            max-width: 950px;
            padding-right: 15px;
            padding-left: 15px;
            margin-right: auto;
            margin-left: auto;
        }

        /* Header Styling */
        .header-bg {
            background-color: rgba(0,0,0,0.3);
            /*-webkit-backdrop-filter: blur(5px);
            backdrop-filter: blur(5px);*/
            padding: 24px 0;
            margin-bottom: 32px;
            width: 100%;
        }
        .header-row {
            align-items: center;
            justify-content: space-between;
        }

        .header-logo{
            max-width: 180px;
        }
        .media {
            display: flex;
            align-items: center;
            margin-top: 8px;
        }
        .header-title {
            font-size: 26px;
            font-weight: 600;
            color: #fff;
            text-decoration: none;
            display: inline-block;
            transition: color 0.3s;
        }
        .header-title:hover {
            color: #BF1622;
            text-decoration: none;
        }
        .logo-h1 {
            font-size: 36px;
            font-weight: bold;
            margin: 0;
            line-height: 1;
        }
        .user-profile {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 16px;
        }
        .user-avatar-large {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background-color: #4b5563;
            border: 1px solid #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: normal;
        }
        .user-info p {
            font-size: 16px;
            font-weight: normal;
            margin: 0;
        }
        .user-info .total-points {
            font-size: 11px;
            color: #d1d5db;
        }

        /* Main Content and Leaderboard Rows */
        .leaderboard-container {
            background-color: rgba(0,0,0,0.4);
            -webkit-backdrop-filter: blur(5px);
            backdrop-filter: blur(5px);
            border-radius: 8px;
            padding: 24px;
            box-shadow: inset 0 0 5px rgba(255, 0, 0, 0.8), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            position: relative;
            border: 2px solid rgba(107, 114, 128, 0.2);
            min-height: 450px; /* Added for loader positioning */
            display: flex;
            flex-direction: column; /* Added to ensure content stacks correctly */
        }
        
        @media (max-width: 767px) {

        body::before {
            background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../imgs/bg-mobile.png?v=1.0');
        }

        .header-logo {
            max-width: 127px;
        }

        .header-title {
            font-size: 22px;
        }

        .user-info p {
            font-size: 13px;
        }


.user-avatar-large {
    width: 36px;
    height: 36px;
    font-size: 15px;
}

.user-info .total-points {
    font-size: 9px;
    color: #d1d5db;
}

    }



    .content-wrapper {
        padding: 0 15px;
        width: 100%;
    }


     /* Wrapper for Switcher and Profile */
     .profile-and-switcher-wrapper {
        display: flex;
        align-items: center; /* Vertically center both items */
        gap: 16px; /* Space between switcher and profile */
        /* Default LTR: content is pushed to the right edge of the column */
        justify-content: flex-end; 
    }

      /* Language Switcher Styling */
      .lang-switcher a {
        color: #fff;
        text-decoration: none;
        font-weight: bold;
        padding: 4px 7px;
        border: 2px solid #BF1622;
        border-radius: 4px;
        transition: background-color 0.3s, color 0.3s;
        font-size: 12px;
        display: inline-block;
        white-space: nowrap; 
    }
    .lang-switcher a:hover {
        background-color: #BF1622;
        color: #fff;
    }

    /* Sound Toggle Styling */
    .sound-toggle {
        transition: transform 0.2s ease;
    }

    .sound-toggle:hover {
        transform: scale(1.1);
    }

    .sound-toggle i {
        transition: color 0.3s ease;
    }

    @media (max-width: 767px) {
        .sound-toggle {
            width: 32px !important;
            height: 32px !important;
            margin: 0 6px !important;
        }

        .sound-toggle i {
            font-size: 1.2em !important;
        }
    }

    /* Footer Styling */
    .site-footer {
        background-color: rgba(0, 0, 0, 0.8);
        padding: 20px 0;
        margin-top: auto;
        width: 100%;
        position: relative;
        z-index: 10;
    }
    .footer-links {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }
    .footer-links a {
        color: #fff;
        text-decoration: none;
        font-size: 14px;
        transition: color 0.3s;
    }
    .footer-links a:hover {
        color: #BF1622;
    }
    .footer-divider {
        color: rgba(255, 255, 255, 0.5);
    }

    /* FAQ Page Styling */
    .faq-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
    }
    .faq-title {
        font-size: 26px;
        font-weight: 600;
        text-align: center;
        margin-bottom: 30px;
        color: #fff;
    }
    .accordion-item {
        background-color: rgba(0, 0, 0, 0.4);
        border: 1px solid #BF1622;
        border-radius: 4px;
        margin-bottom: 10px;
        overflow: hidden;
    }
    .accordion-header {
        background-color: rgba(0, 0, 0, 0.6);
        padding: 15px 20px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background-color 0.3s;
    }
    .accordion-header:hover {
        background-color: rgba(191, 22, 34, 0.2);
    }
    .accordion-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
        color: #fff;
    }
    .accordion-header .accordion-icon {
        color: #BF1622;
        font-size: 14px;
        transition: transform 0.3s;
    }
    .accordion-item.active .accordion-icon {
        transform: rotate(180deg);
    }
    .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        background-color: rgba(0, 0, 0, 0.3);
    }
    .accordion-content p {
        padding: 15px 20px;
        margin: 0;
        color: #d1d5db;
        font-size: 14px;
        line-height: 1.6;
    }
    .accordion-item.active .accordion-content {
        max-height: 2000px;
    }

    /* Terms Page Styling */
    .terms-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
    }
    .terms-title {
        font-size: 26px;
        font-weight: 600;
        text-align: center;
        margin-bottom: 30px;
        color: #fff;
    }
    .terms-content {
        color: #d1d5db;
        font-size: 14px;
        line-height: 1.8;
    }
    .terms-content h2 {
        color: #fff;
        font-size: 18px;
        margin-top: 25px;
        margin-bottom: 15px;
    }
    .terms-content p {
        margin-bottom: 15px;
    }
    .terms-content ul {
        margin-bottom: 15px;
        padding-left: 20px;
    }
    .terms-content li {
        margin-bottom: 8px;
    }
