/* =========================================
   1. VARIABLES & RESET (PREMIUM THEME)
   ========================================= */
:root {
    /* Core Theme Colors */
    --bg-dark: #050505;       /* Deepest Black */
    --bg-panel: #1e1a1c;      /* Premium Card Background */
    --bg-hover: #2a2a2a;
    
    /* Accents */
    --primary: #ff2e59;       /* Asrar Red */
    --primary-glow: rgba(255, 46, 89, 0.4);
    --gold: #d4af37;
    
    /* Text */
    --text-white: #f5f0f2;
    --text-grey: #9c8e93;
    
    /* UI Elements */
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(18, 16, 17, 0.85);
    
    /* Plyr Video Settings */
    --plyr-color-main: #ff2e59;
    --plyr-video-background: #000;
    --plyr-menu-background: #1e1e1e;
    --plyr-menu-color: #ffffff;
    
    /* Breakpoints (Unchanged) */
    --mobile: 480px;
    --tablet: 768px;
    --laptop: 1024px;
    --desktop: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', sans-serif; /* Updated to Premium Font */
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    background-color: var(--bg-dark);
    /* PREMIUM GRADIENT BACKGROUND */
    background-image: radial-gradient(circle at 50% 0%, #361e21 0%, #1a1214 40%, #050505 100%);
    background-attachment: fixed;
    background-size: cover;
    
    color: var(--text-white);
    display: flex;
    overflow: hidden;
}

body.public-page {
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* =========================================
   2. FLEX & CONTAINER UTILITIES
   ========================================= */
.flex-container {
    flex-wrap: wrap;
    min-width: 0;
}

/* =========================================
   3. SIDEBAR NAVIGATION
   ========================================= */
.sidebar {
    width: 260px;
    background-color: rgba(15, 15, 15, 0.95); /* Semi-transparent */
    display: flex;
    flex-direction: column;
    padding: 25px;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 50px;
    color: var(--text-white);
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
}

.nav-item {
    padding: 14px 16px;
    color: var(--text-grey);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 15px;
    margin-bottom: 5px;
    border-radius: 12px; /* Smoother radius */
    transition: all 0.2s ease;
}

.nav-item i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.nav-item.active {
    background-color: rgba(255, 46, 89, 0.1); /* Red Tint */
    color: var(--primary);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

/* =========================================
   4. MAIN CONTENT & HEADERS
   ========================================= */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 40px;
    background: transparent !important; /* Allow gradient to show */
}

body.public-page .main-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px;
}

h1 {
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

/* MAIN HEADER (Admin/General) */
.main-header {
    height: 70px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    flex-shrink: 0;
    z-index: 1000;
}

.header-logo {
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
}

.header-logo span {
    color: var(--primary);
}

.header-nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--text-grey);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* =========================================
   5. CARD & GRID COMPONENTS (THEMED)
   ========================================= */
.surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-panel);
    border-radius: 16px; /* Smoother corners */
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    border-color: #443a3e;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    height: 150px;
    background: linear-gradient(45deg, #1a1a1a, #252525);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    color: #eee;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: auto;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-sub {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-grey);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.cat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    background: linear-gradient(145deg, #1e1e1e, #252525);
}

.cat-icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    transition: 0.3s;
}

.cat-card:hover .cat-icon-box {
    background: var(--primary);
    color: white;
}

.cat-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.cat-info span {
    font-size: 12px;
    color: var(--text-grey);
}

.cat-arrow {
    margin-left: auto;
    color: #444;
    font-size: 12px;
}

.cat-card:hover .cat-arrow {
    color: white;
}

/* =========================================
   6. VIDEO PLAYER LAYOUT
   ========================================= */
.player-container {
    display: flex;
    gap: 30px;
    max-width: 1800px;
    margin: 0 auto;
    height: calc(100vh - 60px);
}

.video-area {
    flex: 7;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 10px;
}

.video-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    margin-bottom: 25px;
    position: relative;
    aspect-ratio: 16/9;
}

.plyr {
    height: 100%;
    width: 100%;
    border-radius: 16px;
}

.action-buttons {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-grey);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    margin-right: 10px;
    transition: 0.2s;
}

.tab-btn:hover {
    color: var(--text-white);
}

.tab-btn.active {
    color: var(--text-white);
    border-bottom: 3px solid var(--primary);
}

.playlist-area {
    flex: 3;
    background-color: var(--bg-panel);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.playlist-header {
    padding: 20px;
    background-color: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.playlist-scroll {
    overflow-y: auto;
    flex: 1;
    padding: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.playlist-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.playlist-item.active {
    background-color: rgba(255, 46, 89, 0.1);
    border: 1px solid var(--primary);
}

.playlist-icon {
    margin-right: 15px;
    color: var(--text-grey);
    width: 20px;
    text-align: center;
}

.item-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-white);
    font-weight: 500;
    line-height: 1.4;
}

.item-info span {
    font-size: 12px;
    color: var(--text-grey);
}

/* =========================================
   7. ADMIN DASHBOARD
   ========================================= */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.lang-switcher {
    background: var(--bg-panel);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
}

.lang-switcher i {
    color: var(--gold);
    margin-right: 10px;
}

.lang-switcher select {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 16px;
    outline: none;
    cursor: pointer;
}

.lang-switcher select option {
    background: #000;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-panel);
    padding: 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.icon-box.red {
    background: rgba(255, 46, 89, 0.1);
    color: var(--primary);
}

.icon-box.gold {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

.icon-box.blue {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.icon-box.green {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.stat-info h3 {
    font-size: 28px;
    margin-bottom: 5px;
}

.stat-info span {
    color: var(--text-grey);
    font-size: 14px;
}

.dashboard-split {
    display: flex;
    gap: 25px;
    height: 400px;
}

.chart-container, .table-container {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 20px;
    flex: 1;
    border: 1px solid var(--border-color);
}

.chart-container h3, .table-container h3 {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-grey);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 15px;
    color: var(--text-grey);
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.badge.active {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

/* =========================================
   8. USER MENU & DROPDOWN (Global)
   ========================================= */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 30px;
    transition: 0.2s;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #b8860b);
    color: black;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.username-text {
    font-weight: 500;
    font-size: 14px;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 5px 0;
    z-index: 1000;
    margin-top: 10px;
}

.user-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: rgba(255, 46, 89, 0.1);
    color: white;
}

.admin-link {
    color: #3498db;
    font-weight: 600;
}

.admin-link:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
}

.logout-item:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.dropdown-header strong {
    color: white;
    display: block;
}

.dropdown-header span {
    color: #888;
    font-size: 12px;
}

/* =========================================
   9. UTILITY CLASSES
   ========================================= */
.btn-back {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-back:hover {
    background: rgba(255,255,255,0.2);
}

.desktop-only {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   10. RESPONSIVE DESIGN (Untouched Logic, New Colors)
   ========================================= */

/* MOBILE HEADER & MENU */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95); /* Semi-transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 1px;
}

.mobile-header-logo span {
    color: var(--primary);
}

.mobile-menu-toggle {
    background: var(--bg-panel);
    color: var(--text-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(3px);
}

/* PUBLIC PAGE MOBILE MENU */
@media (max-width: 768px) {
    .public-page .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(18, 16, 17, 0.95);
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 500;
    }

    .public-page .mobile-menu-toggle {
        background: none;
        border: none;
        color: white;
        font-size: 22px;
        cursor: pointer;
    }

    .public-page .mobile-side-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: #1e1a1c;
        border-right: 1px solid #333;
        z-index: 20000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        overflow-y: auto;
    }

    .public-page .mobile-side-menu.active {
        transform: translateX(0);
    }

    .public-page .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(3px);
        z-index: 19999;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
    }

    .public-page .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .public-page .mobile-link {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        color: #ccc;
        text-decoration: none;
        font-size: 15px;
        border-radius: 8px;
        margin-bottom: 5px;
        transition: 0.2s;
    }

    .public-page .mobile-link:hover,
    .public-page .mobile-link.active {
        background: rgba(255,255,255,0.05);
        color: white;
    }

    .public-page .mobile-link i {
        width: 25px;
        text-align: center;
        margin-right: 10px;
    }
}

/* HIDE MOBILE ELEMENTS ON DESKTOP */
@media (min-width: 769px) {
    .mobile-header,
    .mobile-side-menu,
    .sidebar-overlay,
    .public-page .mobile-header,
    .public-page .mobile-side-menu,
    .public-page .sidebar-overlay {
        display: none !important;
    }
}

/* GENERAL MOBILE RESPONSIVENESS */
@media (max-width: 1024px) {
    /* Mobile Header */
    .mobile-header {
        display: flex;
    }

    body {
        padding-top: 74px;
        height: calc(100vh - 74px);
    }

    /* Sidebar */
    .sidebar {
        position: fixed;
        top: 74px;
        left: -260px;
        height: calc(100vh - 74px);
        width: 260px;
        z-index: 1001;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
        border-right: none;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Main Content */
    .main-content {
        padding: 20px;
        padding-top: 20px;
        height: calc(100vh - 74px);
        overflow-y: auto;
    }

    body.public-page .main-content {
        padding-bottom: 80px;
    }

    .sidebar .logo {
        display: none;
    }

    /* Header Nav (Bottom Bar) */
    .header-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(18, 16, 17, 0.98); /* New Theme Color */
        backdrop-filter: blur(15px);
        border-top: 1px solid var(--border-color);
        justify-content: space-around;
        padding: 15px;
        z-index: 999;
    }

    .nav-link {
        flex-direction: column;
        font-size: 10px;
        gap: 4px;
    }

    .nav-link i {
        font-size: 18px;
    }

    .desktop-only {
        display: none;
    }

    /* Grids */
    .surah-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Player */
    .player-container {
        flex-direction: column;
        height: auto;
        gap: 20px;
        margin-top: 20px;
    }

    .video-area,
    .playlist-area {
        flex: none;
        width: 100%;
        height: auto;
    }

    .playlist-area {
        height: 400px;
    }

    /* Typography */
    h1 {
        font-size: 24px;
    }

    /* Admin */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-split {
        flex-direction: column;
    }

    /* User Bar */
    .user-bar {
        position: static;
        margin-bottom: 20px;
        background: rgba(0, 0, 0, 0.5);
        padding: 10px 15px;
        border-radius: 10px;
        width: auto;
    }

    /* User Dropdown */
    .user-dropdown {
        position: fixed;
        top: 74px;
        right: 15px;
        left: 15px;
        width: auto;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-header {
        display: none;
    }

    body {
        padding-top: 0;
        height: 100vh;
    }

    .sidebar {
        width: 220px;
        top: 0;
        left: 0;
        height: 100vh;
    }

    .main-content {
        padding: 25px 30px;
        height: auto;
    }

    .surah-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .player-container {
        flex-direction: column;
        height: auto;
    }

    .video-area,
    .playlist-area {
        flex: none;
        width: 100%;
    }

    .playlist-area {
        height: 500px;
        margin-top: 20px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .mobile-header {
        padding: 12px 15px;
    }

    body {
        padding-top: 68px;
        height: calc(100vh - 68px);
    }

    .sidebar {
        top: 68px;
        height: calc(100vh - 68px);
    }

    .main-content {
        padding: 15px;
        height: calc(100vh - 68px);
    }

    .mobile-header-logo {
        font-size: 20px;
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .surah-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .user-dropdown {
        position: fixed;
        top: 68px;
        right: 15px;
        left: 15px;
        width: auto;
    }
}

/* Large Mobile Devices */
@media (min-width: 481px) and (max-width: 768px) {
    .user-dropdown {
        position: fixed;
        top: 74px;
        right: 20px;
        left: 20px;
        width: auto;
    }
}

/* =========================================
   11. SURAH VIEW & INNER SIDEBAR
   ========================================= */
.inner-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1002;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: transform 0.3s ease;
}

.inner-sidebar-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .inner-sidebar {
        position: fixed;
        top: 74px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 74px);
        z-index: 1001;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: #050505;
    }

    .inner-sidebar.active {
        left: 0;
    }

    .inner-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* =========================================
   12. LAYOUT FIXES
   ========================================= */
@media (max-width: 1024px) {
    body.public-page {
        padding-top: 0 !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    body.public-page .main-content {
        height: auto !important;
        overflow: visible !important;
    }

    .main-header {
        position: relative;
        top: 0;
    }
}

body.public-page .main-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}

/* =========================================
   13. LANGUAGE GRID
   ========================================= */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.lang-card {
    height: 350px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-decoration: none;
    transition: transform 0.4s;
}

.lang-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.lang-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    transition: 0.5s;
}

.lang-card:hover .lang-bg {
    filter: brightness(0.4);
    transform: scale(1.1);
}

.lang-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 2;
}

.lang-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
}

.lang-sub {
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Mobile Language Grid */
@media (max-width: 768px) {
    .lang-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        margin-top: 20px !important;
        height: auto !important;
    }

    .lang-card {
        width: 100% !important;
        height: 180px !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    }

    .lang-bg {
        opacity: 0.6 !important;
        background-position: center center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        height: 100% !important;
        width: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
        transition: transform 0.5s ease;
    }

    .lang-content {
        padding: 8px 30px !important;
        justify-content: center !important;
        align-items: flex-start !important;
        background: linear-gradient(to right, rgba(0,0,0,0.9) 20%, transparent) !important;
    }

    .lang-title {
        font-size: 24px !important;
        margin-bottom: 5px !important;
        font-weight: 800 !important;
        text-transform: uppercase;
        letter-spacing: 1px;
        text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }

    .lang-sub {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #d4af37 !important;
        background: none !important;
        padding: 0 !important;
        opacity: 1 !important;
        letter-spacing: 0.5px;
    }
}

/* Tablet Language Grid */
@media (min-width: 769px) and (max-width: 1024px) {
    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   14. PREMIUM FOOTER STYLES (FIXED)
   ========================================= */
.main-footer {
    position: relative;
    background: linear-gradient(to bottom, #151213, #050505);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px 0;
    margin-top: 100px;
    z-index: 10;
    overflow: hidden;

    /* DESKTOP BREAKOUT (Matches 60px padding) */
    margin-left: -60px;
    margin-right: -60px;
    margin-bottom: -40px; 
    width: calc(100% + 120px);
}

/* Subtle Top Shine */
.footer-shine {
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
    box-shadow: 0 0 20px var(--primary);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 50px;
}

/* BRAND COLUMN */
.footer-brand {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.footer-logo {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.footer-logo span {
    display: block;
    font-size: 13px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    margin-top: 5px;
}

.footer-desc {
    color: var(--text-grey);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* SOCIAL ICONS */
.social-links {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 46, 89, 0.3);
}

/* NAVIGATION COLUMNS */
.footer-nav-wrapper {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: -8px;
    width: 30px; height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-col a {
    display: block;
    color: var(--text-grey);
    font-size: 14px;
    margin-bottom: 15px;
    transition: 0.2s;
    position: relative;
    padding-left: 0;
}

.footer-col a:hover {
    color: #fff;
    padding-left: 5px;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* BOTTOM COPYRIGHT */
.footer-bottom {
    margin-top: 60px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #555;
    font-size: 13px;
    background: #000;
}

/* --- RESPONSIVE FIXES (Crucial for Scrollbar) --- */
@media (max-width: 1024px) {
    /* On laptops/tablets, padding reduces to 20px */
    .main-footer {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
    
    .footer-container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding-bottom: 100px; /* Space for mobile nav */
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }

    .footer-container {
        flex-direction: column;
        padding: 0 20px;
        gap: 40px;
    }

    .footer-nav-wrapper {
        gap: 40px;
        width: 100%;
        justify-content: space-between;
    }
    
    .footer-col {
        width: 45%;
    }
}

/* --- FOOTER OVERRIDES FOR WATCH PAGE --- */
        .main-footer {
            /* Mobile Default (Matches 24px padding) */
            margin-left: -24px !important;
            margin-right: -24px !important;
            width: calc(100% + 48px) !important;
            margin-bottom: -24px;
        }

        /* Desktop Adjustment (Matches the 120px/40px layout) */
        @media (min-width: 1025px) {
            .main-footer {
                margin-left: -120px !important;
                margin-right: -40px !important;
                width: calc(100% + 160px) !important;
            }
        }

        /* Mobile Fix to prevent horizontal scrollbar */
        .main-content {
            overflow-x: hidden !important; 
        }