/* ==========================================================================
   Procaay Hub - Master Design System & Next-Gen UI/UX
   Features: Glassmorphism, Cinematic Blur Backgrounds, 60fps Animations,
   Anti-Piracy CSS Locks, Pristine Print-to-PDF Rules, Auto-Optimized Layouts,
   Top-Center Toasts, Blurry Notification Drawer, Mobile Menu Drawer (Fixed Left),
   Dynamic Admin Banners, Custom Dialog Engine, Floating Coin Particles,
   Notification Blur Overlay, Real-Time Maintenance Mode, Penalty Lockouts,
   AI Quota Dashboard, Master Telemetry Trackers, Dedicated AI Studio UI,
   Fake Global App Update Engine, Secure Custom Video UI & Gesture Animations.
   ========================================================================== */

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

:root {
    --bg-color: #030305;
    --surface-color: #0c0e16;
    --surface-glass: rgba(12, 14, 22, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 243, 255, 0.4);
    --neon-cyan: #00f3ff;
    --neon-purple: #b537f2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-main: #ffffff;
    --text-secondary: #94a3b8;
    --font-family: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --fluid-padding: clamp(16px, 3.5vw, 36px);
    --fluid-gap: clamp(12px, 2vw, 24px);
}

/* ==========================================================================
   1. BASE RESET & ANTI-PIRACY SECURITY LOCKS
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-user-select: none;
    user-select: none;
}

input, textarea, select {
    -webkit-user-select: auto;
    user-select: auto;
}

img {
    -webkit-user-drag: none;
    pointer-events: auto;
}

/* App-Like Touch Feedback & Button Micro-Animations */
.btn:active, .nav-link:active, .bottom-nav a:active, .coin-badge:active {
    transform: scale(0.96) translateZ(0);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. CINEMATIC ANIMATED BLURRY BACKGROUND (Hardware Accelerated)
   ========================================================================== */
.cinematic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-color: var(--bg-color);
    overflow: hidden;
    pointer-events: none;
}

.cinematic-bg::before,
.cinematic-bg::after {
    content: "";
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(95px);
    opacity: 0.15;
    animation: ambientShift 22s infinite alternate ease-in-out;
    will-change: transform;
}

.cinematic-bg::before {
    background: var(--neon-cyan);
    top: -15%;
    left: -15%;
}

.cinematic-bg::after {
    background: var(--neon-purple);
    bottom: -15%;
    right: -15%;
    animation-delay: -11s;
}

@keyframes ambientShift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8vw, 12vh) scale(1.15); }
}

/* ==========================================================================
   3. BLUR MICRO-LOADERS
   ========================================================================== */
.global-loader, .glass-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 3, 5, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-modal-overlay {
    opacity: 0;
    pointer-events: none;
}

.glass-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-card { text-align: center; }

.moving-loader-bars {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
}

.moving-bar {
    width: 4px;
    height: 28px;
    background: var(--neon-cyan);
    border-radius: 2px;
    animation: eqBars 1s ease-in-out infinite;
}
.moving-bar:nth-child(2) { animation-delay: 0.15s; background: var(--neon-purple); }
.moving-bar:nth-child(3) { animation-delay: 0.3s; }
.moving-bar:nth-child(4) { animation-delay: 0.45s; background: var(--neon-purple); }
.moving-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes eqBars {
    0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
    50% { transform: scaleY(1); opacity: 1; }
}

#loader-text {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ==========================================================================
   4. APP LAYOUT, HEADER SPACING & NAVIGATION
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    min-width: 0;
}

.sidebar {
    width: 260px;
    background: var(--surface-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .brand {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.sidebar .brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(0, 243, 255, 0.08);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 243, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.08);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding-bottom: 80px;
    transition: margin 0.3s ease;
    min-width: 0;
}

.top-bar {
    position: sticky;
    top: 0;
    background: rgba(3, 3, 5, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 90;
    gap: 16px;
    min-width: 0;
}

.search-container { flex: 1; max-width: 400px; min-width: 0; }
.search-input, select.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 11px 16px;
    border-radius: 10px;
    outline: none;
    font-size: 13px;
    transition: all 0.2s ease;
}
.search-input:focus, select.search-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

select.search-input option {
    background: var(--surface-color);
    color: #fff;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    min-width: 0;
}

/* ==========================================================================
   5. COIN BADGE & ANIMATIONS
   ========================================================================== */
.coin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.12);
    padding: 6px 14px;
    border-radius: 30px;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
}
.coin-badge:hover {
    background: rgba(0, 243, 255, 0.12);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.coin-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    animation: slowPulse 3s infinite alternate ease-in-out;
}
@keyframes slowPulse {
    0% { transform: scale(0.95); opacity: 0.85; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* ==========================================================================
   6. RIGHT-CLICK / LONG-PRESS TOOLTIP
   ========================================================================== */
#procaay-tooltip {
    position: fixed;
    background: rgba(12, 14, 22, 0.95);
    border: 1px solid var(--neon-cyan);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    max-width: 260px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#procaay-tooltip.visible {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
}

/* ==========================================================================
   7. PAGE SHELL, FULLY ANIMATED CARDS & BUTTONS 
   ========================================================================== */
.page-content {
    padding: var(--fluid-padding);
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
    animation: fadeInPage 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-shell-head { margin-bottom: 32px; }
.page-shell-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.page-shell-head p { color: var(--text-secondary); font-size: 13px; max-width: 580px; }
.feature-kicker { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; display: block; margin-bottom: 6px; text-transform: uppercase; }

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--fluid-gap);
    min-width: 0;
}

.modern-card {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 26px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    min-width: 0;
}
.modern-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 243, 255, 0.08);
}
.modern-card h3 { word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }

/* STRICT BUTTON UI & MOBILE OVERLAP FIX */
.btn {
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.btn:disabled { opacity: 0.6 !important; cursor: not-allowed !important; transform: none !important; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover:not(:disabled) { 
    background: #e2e8f0; 
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); 
    transform: translateY(-2px); 
}
.btn-secondary { background: rgba(255, 255, 255, 0.04); color: #fff; border: 1px solid var(--border-color); }
.btn-secondary:hover:not(:disabled) { 
    background: rgba(255, 255, 255, 0.08); 
    border-color: var(--border-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

/* PREMIUM DOWNLOAD BUTTON ANIMATION */
.btn-download-animated {
    background: linear-gradient(135deg, var(--success), #047857);
    color: #fff;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}
.btn-download-animated::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
    opacity: 0; transform: scale(0.5); transition: opacity 0.3s, transform 0.3s;
}
.btn-download-animated:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5); border-color: #34d399;
}
.btn-download-animated:hover:not(:disabled)::after {
    opacity: 1; transform: scale(1); animation: downloadPulse 1.5s infinite alternate;
}
@keyframes downloadPulse { 0% { transform: scale(1); opacity: 0.3; } 100% { transform: scale(1.1); opacity: 0.6; } }

/* Card Bookmark Button */
.card-bookmark {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color);
    border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px; transition: all 0.2s ease;
}
.card-bookmark:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.1); }
.card-bookmark.active-bookmark {
    background: rgba(245, 158, 11, 0.15); border-color: var(--warning);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   8. GLASS MODALS & BACKGROUND BLUR OVERLAYS
   ========================================================================== */
.glass-modal {
    background: rgba(12, 14, 22, 0.88); border: 1px solid var(--border-hover); border-radius: 20px;
    padding: 32px; width: 90%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 243, 255, 0.15);
    transform: translateY(20px) scale(0.95); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-modal-overlay.active .glass-modal { transform: translateY(0) scale(1); }
.close-modal { float: right; background: none; border: none; color: var(--text-secondary); font-size: 20px; cursor: pointer; transition: color 0.2s; }
.close-modal:hover { color: #fff; transform: scale(1.1); }

/* Global Notification Blur Overlay */
.notification-blur-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(3, 3, 5, 0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    z-index: 999998; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out;
}
.notification-blur-overlay.active { opacity: 1; pointer-events: auto; }

/* Signout Transition Overlay */
.signout-transition-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(3, 3, 5, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 99999999; display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.signout-transition-overlay.active { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   9. ULTRA-REALISTIC CORPORATE INVOICE STYLING
   ========================================================================== */
.invoice-card {
    background: #ffffff !important; color: #0f172a !important; padding: 32px !important;
    border-radius: 16px !important; font-family: var(--font-family) !important;
    border: 1px solid #cbd5e1 !important; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
    position: relative !important; overflow: hidden !important; width: 100% !important; box-sizing: border-box !important;
}
.invoice-card::before {
    content: "PROCAAY VERIFIED" !important; position: absolute !important; top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%) rotate(-25deg) !important; font-size: 52px !important;
    color: rgba(181, 55, 242, 0.04) !important; white-space: nowrap !important; pointer-events: none !important; font-weight: 900 !important; letter-spacing: 6px !important;
}
@media print { body { padding: 0; background: #fff; } .invoice-container { border: none; padding: 0; box-shadow: none; } .no-print { display: none; } }

/* ==========================================================================
   10. TOP-CENTER NOTIFICATION TOAST ENGINE
   ========================================================================== */
#procaay-toast-container {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    z-index: 999999; display: flex; flex-direction: column; align-items: center;
    pointer-events: none; width: 100%; max-width: 480px; padding: 0 16px;
}
@keyframes slideInDown { 0% { opacity: 0; transform: translateY(-20px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

/* ==========================================================================
   11. MOBILE MENU DRAWER & BURGER BUTTON
   ========================================================================== */
.mobile-burger-btn {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color); color: #fff;
    width: 38px; height: 38px; border-radius: 8px; display: none; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.mobile-burger-btn:active { transform: scale(0.9); }
.mobile-menu-drawer {
    position: fixed; top: 0; left: -100%; width: 100%; max-width: 320px; height: 100vh;
    background: rgba(12, 14, 22, 0.95); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid var(--border-hover); z-index: 1000001;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.9); transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; padding: 24px;
}
.mobile-menu-drawer.active { left: 0; }
.mobile-drawer-link {
    display: flex; align-items: center; gap: 12px; color: var(--text-main); text-decoration: none;
    padding: 12px 14px; border-radius: 10px; margin-bottom: 6px; font-size: 14px; font-weight: 600;
    background: rgba(255, 255, 255, 0.02); border: 1px solid transparent; transition: all 0.2s ease;
}
.mobile-drawer-link:hover, .mobile-drawer-link:active {
    background: rgba(0, 243, 255, 0.08); color: var(--neon-cyan); border-color: rgba(0, 243, 255, 0.2);
}

/* ==========================================================================
   12. MOBILE NAV & DEEP RESPONSIVE ADAPTATIONS (WITH TRASH BUTTON FIXES)
   ========================================================================== */
.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(12, 14, 22, 0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-color); padding: 10px 16px; z-index: 100;
    justify-content: space-around; align-items: center;
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-secondary); text-decoration: none; font-size: 18px; transition: color 0.2s; }
.bottom-nav a span { font-size: 9px; font-weight: 700; text-transform: uppercase; }
.bottom-nav a.active { color: var(--neon-cyan); }

body.device-mobile .sidebar { display: none; }
body.device-mobile .main-content { margin-left: 0; padding-bottom: 95px; }
body.device-mobile .bottom-nav { display: flex; }

.admin-tab-btn .tab-icon { margin-right: 6px; }

/* STRICT AUTO-SCALING OVERRIDES FOR ACTION BUTTONS */
.btn-auto-shrink, 
button[onclick*="Delete"], 
button[onclick*="clear"], 
.admin-course-actions-row button {
    width: auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding-bottom: 95px; }
    .bottom-nav { display: flex; }
    .top-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 18px; }
    .search-container { max-width: 100%; width: 100%; }
    .top-actions { justify-content: space-between; width: 100%; }
    .mobile-burger-btn { display: flex; }
    #procaay-toast-container { top: 12px; padding: 0 12px; max-width: 100%; }
    
    #admin-users-list, #admin-vault-tracks-list, #admin-payments-list, #admin-support-list {
        grid-template-columns: 1fr !important; display: flex !important; flex-direction: column !important; gap: 16px !important;
    }
    .admin-tab-content .modern-card { padding: 16px !important; }
    .admin-tab-content > div > div { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
    .admin-tab-content > div > div > div { width: 100%; overflow: hidden; text-overflow: ellipsis; }
    
    /* Ensure regular action buttons scale to 100% on mobile */
    .admin-tab-content .btn:not(.btn-auto-shrink):not([onclick*="Delete"]):not([onclick*="clear"]),
    .modern-card .btn:not(.btn-auto-shrink):not([onclick*="Delete"]):not([onclick*="clear"]),
    .glass-modal .btn:not(.btn-auto-shrink):not([onclick*="Delete"]):not([onclick*="clear"]) { 
        width: 100%; 
        margin-top: 4px; 
    }
    
    /* MOBILE FIX: Shrink Delete/Trash buttons so they don't clash with text */
    button[onclick*="Delete"], button[onclick*="clear"], .admin-course-actions-row button {
        width: auto !important;
        flex-shrink: 0 !important;
        padding: 8px 14px !important;
        font-size: 11px !important;
        align-self: flex-start;
    }
    
    /* MOBILE FIX: Admin Course Manager Alignment */
    .admin-course-actions-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
        width: 100% !important;
    }
    .admin-course-actions-row select { 
        flex: 1 !important; 
        width: auto !important; 
        margin: 0 !important; 
        min-width: 0 !important;
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    .admin-course-actions-row button { 
        flex: 0 0 auto !important; 
        margin: 0 !important; 
    }

    /* Auto-Truncation / Icon-Only for Admin Tabs on Mobile */
    .admin-tab-btn { padding: 12px 16px !important; flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; }
    .admin-tab-btn .tab-text { display: none; }
    .admin-tab-btn .tab-icon { font-size: 18px; margin: 0; }
    .admin-tab-content .search-input { font-size: 12px; }
}

/* ==========================================================================
   13. HIGH-END DYNAMIC GLOBAL AUDIO PLAYER
   ========================================================================== */
.global-audio-player {
    position: fixed; bottom: -160px; left: 50%; transform: translateX(-50%) translateZ(0);
    width: 92%; max-width: 900px; background: rgba(12, 14, 22, 0.95);
    backdrop-filter: blur(35px); -webkit-backdrop-filter: blur(35px); border: 1px solid var(--border-hover);
    border-radius: 20px; padding: 16px 24px; display: flex; align-items: center; gap: 20px;
    z-index: 99998; box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 30px rgba(0, 243, 255, 0.2);
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1), left 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}
.global-audio-player.active { bottom: 24px; }
.global-audio-player::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 20px;
    background: linear-gradient(90deg, rgba(0,243,255,0.05), transparent 50%, rgba(181,55,242,0.05));
    background-size: 200% 100%; animation: waveformPan 4s infinite linear; pointer-events: none; z-index: -1;
}
@keyframes waveformPan { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.player-track-info { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.player-title { font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.player-status { font-size: 9px; color: var(--neon-cyan); text-transform: uppercase; letter-spacing: 1px; font-weight: 800; display: flex; align-items: center; gap: 6px; }

.live-dots { display: flex; gap: 2px; align-items: flex-end; height: 8px; }
.live-dot { width: 3px; background: var(--neon-cyan); border-radius: 2px; animation: liveWave 1s infinite alternate; }
.live-dot:nth-child(2) { animation-delay: 0.2s; }
.live-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes liveWave { 0% { height: 3px; } 100% { height: 8px; } }

.player-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.play-pause-btn { background: #fff; color: #000; border: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; transition: all 0.2s; flex-shrink: 0; box-shadow: 0 0 15px rgba(255,255,255,0.2); }
.play-pause-btn:hover { transform: scale(1.08); box-shadow: 0 0 20px rgba(255,255,255,0.4); }

.player-timeline { flex: 2; display: flex; align-items: center; gap: 12px; min-width: 0; }
.time-text { font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); font-weight: 700; width: 40px; text-align: center; flex-shrink: 0; letter-spacing: 0.5px; }
.progress-bar-container { flex: 1; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; cursor: pointer; position: relative; min-width: 60px; overflow: hidden; }
.progress-fill { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple)); border-radius: 4px; width: 0%; transition: width 0.1s linear; position: relative; }
.progress-fill::after { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; background: #fff; border-radius: 50%; box-shadow: 0 0 8px rgba(255,255,255,0.8); }

.player-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.close-player-btn, .hide-player-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; cursor: pointer; transition: all 0.2s; }
.close-player-btn { color: var(--text-secondary); }
.close-player-btn:hover { color: #fff; background: rgba(239, 68, 68, 0.2); border-color: var(--danger); }
.hide-player-btn { color: var(--neon-cyan); }
.hide-player-btn:hover { background: rgba(0,243,255,0.1); border-color: var(--neon-cyan); }

@media (max-width: 1024px) {
    .global-audio-player { 
        bottom: 95px !important; left: -120%; transform: translateX(0); width: calc(100% - 32px); 
        padding: 16px; gap: 16px; flex-direction: column; align-items: stretch; margin-left: 16px;
    }
    .global-audio-player.active { left: 0; }
    .global-audio-player.hidden { left: calc(-100% + 56px); }
    
    .audio-toggle-tab {
        position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
        width: 40px; height: 40px; background: var(--surface-glass);
        border: 1px solid var(--neon-cyan); border-left: none; border-radius: 0 10px 10px 0;
        display: none; align-items: center; justify-content: center; color: var(--neon-cyan);
        cursor: pointer; box-shadow: 5px 0 15px rgba(0, 243, 255, 0.2); backdrop-filter: blur(24px);
    }
    .global-audio-player.hidden .audio-toggle-tab { display: flex; }

    .player-track-info { text-align: center; align-items: center; }
    .player-title { font-size: 14px; white-space: normal; line-height: 1.3; }
    .player-timeline { width: 100%; gap: 8px; }
    .time-text { font-size: 10px; width: 36px; }
    .player-controls-wrapper { display: flex; justify-content: center; align-items: center; width: 100%; position: relative; }
    .player-controls { margin: 0 auto; }
    .player-actions { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
}

/* ==========================================================================
   14. SOVEREIGN FOUNDER WELCOME OVERLAY
   ========================================================================== */
.founder-welcome-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, rgba(181, 55, 242, 0.15), var(--bg-color) 80%);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    z-index: 9999999; display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 1; transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 20px; box-sizing: border-box;
}
.founder-crown { font-size: 80px; margin-bottom: 24px; animation: floatCrown 3s ease-in-out infinite, glowCrown 2s infinite alternate; }
.founder-text { font-size: clamp(22px, 6vw, 32px); font-weight: 800; color: #fff; text-shadow: 0 0 25px rgba(181, 55, 242, 0.9); letter-spacing: 2px; text-transform: uppercase; text-align: center; width: 100%; max-width: 600px; box-sizing: border-box; padding: 0 10px; }
.founder-subtext { font-size: 13px; color: var(--neon-cyan); margin-top: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; text-align: center; }
@keyframes floatCrown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes glowCrown { 0% { filter: drop-shadow(0 0 10px rgba(255,215,0,0.4)); } 100% { filter: drop-shadow(0 0 40px rgba(255,215,0,1)); } }

/* ==========================================================================
   15. REAL-TIME NOTIFICATION DRAWER & BELL ANIMATION
   ========================================================================== */
.notification-drawer {
    position: fixed; top: 0; right: -420px; width: 100%; max-width: 380px; height: 100vh;
    background: rgba(12, 14, 22, 0.92); backdrop-filter: blur(35px); -webkit-backdrop-filter: blur(35px);
    border-left: 1px solid var(--border-hover); z-index: 1000000;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 243, 255, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; padding: 24px;
}
.notification-drawer.active { right: 0; }
.notification-drawer-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; margin-bottom: 20px; }
.notification-drawer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }

@keyframes bellRingPulse {
    0% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 0 rgba(0,243,255,0)); }
    20% { transform: rotate(-15deg) scale(1.15); filter: drop-shadow(0 0 10px var(--neon-cyan)); }
    40% { transform: rotate(15deg) scale(1.15); filter: drop-shadow(0 0 15px var(--neon-purple)); }
    60% { transform: rotate(-10deg) scale(1.1); filter: drop-shadow(0 0 10px var(--neon-cyan)); }
    80% { transform: rotate(10deg) scale(1.1); filter: drop-shadow(0 0 12px var(--neon-purple)); }
    100% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 5px var(--neon-cyan)); }
}
.pulsing-active { animation: bellRingPulse 1.2s infinite ease-in-out !important; border-color: var(--neon-cyan) !important; box-shadow: 0 0 20px rgba(0, 243, 255, 0.3) !important; }

@media (max-width: 768px) {
    .notification-drawer { 
        right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.9);
        height: auto; max-height: 85vh; width: 90%; border-radius: 20px; border: 1px solid var(--border-hover);
        opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .notification-drawer.active { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
}

/* ==========================================================================
   16. RIGHT-TO-LEFT SLOW MARQUEE GLOBAL BANNER
   ========================================================================== */
.global-admin-banner-modern {
    position: sticky; top: 0; z-index: 999999;
    background: linear-gradient(135deg, rgba(12, 14, 22, 0.95), rgba(26, 11, 46, 0.95));
    border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-cyan)) 1;
    box-shadow: 0 4px 30px rgba(181, 55, 242, 0.3); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    color: #fff; padding: 14px 24px; font-weight: 700; font-size: 14px;
    overflow: hidden; display: flex; align-items: center;
}
.global-admin-banner-text { display: inline-block; white-space: nowrap; padding-left: 100vw; animation: marqueeRightToLeft 80s linear infinite; }
.global-admin-banner-text span.banner-pulse-icon { display: inline-block; margin-right: 12px; font-size: 16px; animation: iconBounce 1.5s infinite ease-in-out alternate; }
@keyframes marqueeRightToLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@keyframes iconBounce { 0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--neon-cyan)); } 100% { transform: scale(1.2); filter: drop-shadow(0 0 12px var(--neon-purple)); } }

/* ==========================================================================
   17. REAL-TIME PLATFORM MAINTENANCE OVERLAY
   ========================================================================== */
.maintenance-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(12, 14, 22, 0.98); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    z-index: 99999999; display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
    text-align: center; padding: 24px; box-sizing: border-box;
}
.maintenance-overlay.active { opacity: 1; pointer-events: auto; }
.maintenance-icon { font-size: 64px; margin-bottom: 24px; animation: pulseWarning 2s infinite; }
.maintenance-title { font-size: 28px; font-weight: 900; color: var(--warning); margin-bottom: 12px; letter-spacing: 1px; text-transform: uppercase; }
.maintenance-message { font-size: 15px; color: #cbd5e1; max-width: 500px; line-height: 1.6; margin-bottom: 24px; }
.maintenance-timer { font-size: 24px; font-weight: 800; color: #fff; background: rgba(245,158,11,0.1); border: 1px solid var(--warning); padding: 12px 24px; border-radius: 12px; font-family: var(--font-mono); }
@keyframes pulseWarning { 0% { filter: drop-shadow(0 0 10px rgba(245,158,11,0.4)); } 50% { filter: drop-shadow(0 0 30px rgba(245,158,11,1)); } 100% { filter: drop-shadow(0 0 10px rgba(245,158,11,0.4)); } }

/* ==========================================================================
   18. AUTOMATIC DEVICE INTELLIGENCE & CUSTOM IN-APP MODAL ENGINE
   ========================================================================== */
.custom-dialog-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(3, 3, 5, 0.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    z-index: 9999999; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.custom-dialog-overlay.active { opacity: 1; pointer-events: auto; }
.custom-dialog-box {
    background: rgba(12, 14, 22, 0.95); border: 1px solid var(--neon-cyan);
    border-radius: 16px; padding: 24px; width: 90%; max-width: 440px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 25px rgba(0, 243, 255, 0.2);
    transform: translateY(20px) scale(0.95); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-dialog-overlay.active .custom-dialog-box { transform: translateY(0) scale(1); }
.dialog-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; color: #fff; }
.dialog-message { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.dialog-input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: #fff; padding: 12px; border-radius: 10px; outline: none; margin-bottom: 20px; font-size: 14px; transition: border-color 0.2s ease; }
.dialog-input:focus { border-color: var(--neon-cyan); }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 10px; }

/* ==========================================================================
   19. DYNAMIC COIN PARTICLES & HISTORY MODAL
   ========================================================================== */
.coin-particle {
    position: fixed; font-size: 16px; font-weight: 800; pointer-events: none; z-index: 999999;
    animation: floatUpAndFade 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; text-shadow: 0 0 10px currentColor;
}
@keyframes floatUpAndFade { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-60px) scale(1.5); } }

.history-item {
    display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color); padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; transition: background 0.2s ease;
}
.history-item:hover { background: rgba(255,255,255,0.06); }
.history-item.positive .history-amount { color: var(--success); font-weight: 800; }
.history-item.negative .history-amount { color: var(--danger); font-weight: 800; }

/* ==========================================================================
   20. AI STUDIO: PRE-PROCESSING, LIVE CHECKING & LOCK UI
   ========================================================================== */
.ai-processing-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 5, 9, 0.75); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    z-index: 50; display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-radius: 30px; opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.ai-processing-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

/* AI Free User Lock Overlay */
.ai-lock-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(12, 14, 22, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 60; display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-radius: 30px; border: 1px solid var(--danger); opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
    text-align: center; padding: 24px; box-sizing: border-box;
}
.ai-lock-overlay.active { opacity: 1; pointer-events: auto; }

/* Live Trial Countdown Timer Styling */
.ai-trial-timer {
    font-size: 24px; font-weight: 800; color: #fff; background: rgba(16, 185, 129, 0.1); 
    border: 1px solid var(--success); padding: 12px 24px; border-radius: 12px; font-family: var(--font-mono); 
    display: inline-block; margin-top: 16px;
}

.ai-checking-card {
    background: rgba(15, 20, 30, 0.95); border: 1px solid var(--neon-cyan); padding: 36px;
    border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 30px rgba(0, 243, 255, 0.15);
    width: 100%; max-width: 440px; display: none; flex-direction: column; margin-bottom: 25px;
}
.ai-checking-card.active { display: flex; }

.ai-checking-title {
    font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 24px;
    display: flex; align-items: center; gap: 10px; justify-content: center;
    letter-spacing: -0.5px; text-transform: uppercase;
}
.checking-pulse {
    width: 12px; height: 12px; background: var(--neon-cyan); border-radius: 50%;
    animation: pulse-dot 1.5s infinite; box-shadow: 0 0 10px var(--neon-cyan);
}

.validation-step {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid transparent;
    font-size: 14px; font-weight: 600; color: var(--text-secondary); transition: all 0.4s ease;
    border-radius: 12px; margin-bottom: 8px; position: relative; overflow: hidden;
}
.validation-step:last-child { margin-bottom: 0; }
.validation-step.active { 
    color: #fff; background: rgba(0, 243, 255, 0.05); border-color: rgba(0, 243, 255, 0.2);
    box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.05);
}
.validation-step.active::after {
    content: ''; position: absolute; top: 0; left: -150%; width: 150%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg); animation: softGlassySweep 2.5s infinite linear;
}

.validation-step.success { color: var(--success); background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.2); }
.validation-step.error { color: var(--danger); background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.2); }

.step-icon-box {
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 16px; transition: all 0.3s ease; z-index: 2;
}
.validation-step.active .step-icon-box { filter: drop-shadow(0 0 8px var(--neon-cyan)); }
.step-spinner {
    width: 20px; height: 20px; border: 3px solid rgba(0, 243, 255, 0.2);
    border-top-color: var(--neon-cyan); border-radius: 50%; animation: spinContinuous 1s linear infinite;
}

.ai-processing-state {
    text-align: center; display: none; flex-direction: column; align-items: center;
    background: rgba(15, 20, 30, 0.95); border: 1px solid var(--neon-purple); padding: 40px 30px;
    border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 30px rgba(181, 55, 242, 0.15);
    width: 100%; max-width: 440px; margin-bottom: 25px;
}
.ai-processing-state.active { display: flex; }

.summary-box {
    background: rgba(0, 243, 255, 0.03); border: 1px solid rgba(0, 243, 255, 0.15);
    border-radius: 12px; padding: 16px; margin-bottom: 24px; width: 100%;
}
.summary-row {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
    padding: 6px 0; font-size: 13px; gap: 8px;
}
.summary-label { color: var(--text-secondary); font-weight: 600; }
.summary-value { color: #fff; font-weight: 800; font-family: var(--font-mono); text-align: right;}
.summary-value.highlight { color: var(--neon-cyan); }
.summary-value.warning { color: var(--warning); }
.summary-value.danger { color: var(--danger); }
.summary-value.success { color: var(--success); }

/* ==========================================================================
   21. AI QUOTA DASHBOARD & WHAT'S NEW FEED
   ========================================================================== */
.quota-progress-container {
    width: 100%; height: 8px; background: rgba(255,255,255,0.08);
    border-radius: 4px; overflow: hidden; margin-top: 12px; position: relative;
}
.quota-progress-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease, background-color 0.4s ease; }
.quota-progress-fill.safe { background: linear-gradient(90deg, var(--neon-cyan), var(--success)); }
.quota-progress-fill.warning { background: linear-gradient(90deg, var(--warning), #fb923c); }
.quota-progress-fill.danger { background: linear-gradient(90deg, var(--danger), #dc2626); }

.quota-lock-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(12, 14, 22, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: inherit; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 10;
}
.quota-lock-overlay.active { opacity: 1; pointer-events: auto; }
.lock-icon-anim { font-size: 36px; margin-bottom: 8px; animation: lockShake 0.5s ease-in-out infinite alternate; }

.whats-new-item {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; display: flex;
    align-items: flex-start; gap: 12px; transition: background 0.2s ease;
}
.whats-new-item:hover { background: rgba(255,255,255,0.06); }
.whats-new-icon { font-size: 20px; flex-shrink: 0; }
.whats-new-content { flex: 1; min-width: 0; }
.whats-new-title { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.whats-new-desc { color: var(--text-secondary); font-size: 11px; line-height: 1.4; }
.whats-new-time { color: var(--neon-cyan); font-size: 10px; font-weight: 600; margin-top: 4px; }

.admin-master-progress {
    width: 100%; height: 12px; background: rgba(0,0,0,0.5); border-radius: 6px;
    overflow: hidden; margin-top: 8px; border: 1px solid var(--border-color); position: relative;
}
.admin-master-fill {
    height: 100%; background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    transition: width 0.4s ease; position: relative;
}
.admin-master-fill::after {
    content: ''; position: absolute; top: 0; left: -100%; right: 0; bottom: 0; width: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: waveformPan 2s infinite linear;
}

/* ==========================================================================
   22. FAKE APP UPDATE OVERLAY & PENALTY LOCKOUT SCREENS
   ========================================================================== */
.app-update-overlay, .penalty-lockout-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(12, 14, 22, 0.98); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    z-index: 999999999; display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
    text-align: center; padding: 24px; box-sizing: border-box;
}
.app-update-overlay.active, .penalty-lockout-overlay.active { opacity: 1; pointer-events: auto; }

.update-icon, .penalty-icon { font-size: 64px; margin-bottom: 24px; animation: bounceUpdate 2s infinite; }
.update-title { font-size: 28px; font-weight: 900; color: var(--neon-cyan); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.update-message { font-size: 14px; color: #cbd5e1; max-width: 450px; line-height: 1.6; margin-bottom: 30px; }

/* Real-Time Penalty Lockout specific styles */
.penalty-lockout-overlay { background: rgba(5, 0, 0, 0.98); border: 2px solid rgba(239, 68, 68, 0.3); }
.penalty-title { color: var(--danger); font-size: 28px; font-weight: 900; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.penalty-message { font-size: 15px; color: #fca5a5; max-width: 500px; line-height: 1.6; margin-bottom: 30px; }
.penalty-timer-box { font-size: 32px; font-weight: 800; color: #fff; background: rgba(239, 68, 68, 0.15); border: 1px solid var(--danger); padding: 16px 32px; border-radius: 12px; font-family: var(--font-mono); letter-spacing: 2px;}

.update-progress-container { 
    width: 100%; max-width: 400px; height: 12px; background: rgba(255,255,255,0.05); 
    border-radius: 6px; overflow: hidden; border: 1px solid var(--border-color); 
    display: none; margin-bottom: 16px; position: relative; 
}
.update-progress-fill { 
    height: 100%; background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan)); 
    width: 0%; transition: width 0.3s linear; position: relative; 
}
.update-progress-fill::after { 
    content:''; position:absolute; top:0; left:0; right:0; bottom:0; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); 
    animation: sweepShimmer 1s infinite linear; 
}
.update-percentage { font-size: 14px; font-family: var(--font-mono); font-weight: 700; color: var(--neon-cyan); display: none; }

@keyframes bounceUpdate { 
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 10px rgba(0,243,255,0.4)); } 
    50% { transform: translateY(-10px); filter: drop-shadow(0 0 25px rgba(0,243,255,0.8)); } 
}
@keyframes sweepShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ==========================================================================
   23. MASTERCLASS CUSTOM VIDEO PLAYER (16:9, MOBILE-FIRST, AUTO-HIDE, SPINNER)
   ========================================================================== */
.course-category-tabs {
    display: flex; gap: 12px; margin-bottom: 32px; border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px; flex-wrap: wrap;
}

.course-badge {
    position: absolute; top: 16px; right: 16px;
    font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 20px;
    text-transform: uppercase; z-index: 50;
}

/* Strict 16:9 Custom Player Card Container */
.secure-video-wrapper, .procaay-custom-player {
    position: relative;
    width: 100%;
    background: #000000;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    margin-bottom: 24px;
    -webkit-user-select: none;
    user-select: none;
}

/* 16:9 Aspect Ratio Container Enforcement */
.procaay-video-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}

.procaay-video-screen video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
    background: #000;
    pointer-events: none; 
}

/* Strict Fullscreen Overhaul (100vw/100vh constraints) */
.procaay-custom-player:fullscreen,
.procaay-custom-player:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    background: #000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.procaay-custom-player:fullscreen .procaay-video-screen,
.procaay-custom-player:-webkit-full-screen .procaay-video-screen {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: unset !important; 
}

/* Anti-Piracy Transparent Overlay (Now acts as Tap-to-Play trigger) */
.anti-piracy-shield {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: transparent;
    cursor: pointer;
}

/* Cinematic Gradient Overlay for Controls */
.procaay-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 20px 16px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s ease;
    opacity: 1;
}

/* Auto-Hide State */
.procaay-custom-player.controls-hidden .procaay-controls-overlay {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.procaay-custom-player.controls-hidden .procaay-big-center-controls {
    opacity: 0;
    pointer-events: none;
}

/* Center Play/Pause Control Hub */
.procaay-big-center-controls {
    position: absolute;
    inset: 0;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transition: opacity 0.3s ease;
    pointer-events: none; 
}

.center-control-btn:not(.main-play-circle) {
    display: none !important;
}

/* Animated Center Play/Pause Feedback (Popup Animation) */
.center-control-btn.main-play-circle {
    width: clamp(50px, 10vw, 72px);
    height: clamp(50px, 10vw, 72px);
    font-size: clamp(20px, 4.5vw, 28px);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; 
    transform: scale(0.8);
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.center-play-anim {
    animation: centerPopFade 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes centerPopFade {
    0% { opacity: 1; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.4); }
}

/* ==========================================================================
   PREMIUM YOUTUBE-STYLE GESTURE ANIMATIONS (DOUBLE TAP / KEYBOARD)
   ========================================================================== */
.video-touch-zone {
    position: absolute;
    top: 0;
    bottom: 60px; 
    width: 50%;
    z-index: 25;
    cursor: pointer;
}
.touch-zone-left { left: 0; }
.touch-zone-right { right: 0; }

.video-ripple-container {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 30;
    overflow: hidden;
}
.video-ripple-left { left: 0; }
.video-ripple-right { right: 0; }

.ripple-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: scale(0);
    opacity: 1;
    animation: ripple-anim 0.6s ease-out forwards;
}

.skip-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    background: rgba(0,0,0,0.6);
    padding: 12px 20px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(0.8);
    animation: skip-pop 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.skip-indicator span { font-size: 20px; margin-bottom: 4px; }

@keyframes ripple-anim {
    0% { transform: scale(0); opacity: 1; border-radius: 50%; }
    50% { opacity: 0.5; border-radius: 20%; }
    100% { transform: scale(2.5); opacity: 0; border-radius: 0; }
}
@keyframes skip-pop {
    0% { opacity: 0; transform: scale(0.8); }
    20% { opacity: 1; transform: scale(1.1); }
    80% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); }
}

/* Premium YouTube-Style Buffering Spinner */
.procaay-buffering-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: bufferSpin 1s linear infinite;
    z-index: 25;
    display: none;
    pointer-events: none;
}
.procaay-buffering-spinner.active {
    display: block;
}
@keyframes bufferSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Sleek Dynamic Gradient Seekbar & Visible Thumb */
.procaay-video-seek {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: height 0.2s ease;
}

.procaay-video-seek:hover {
    height: 7px;
}

.procaay-video-seek::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    opacity: 1; 
    transition: transform 0.2s ease;
}

.procaay-video-seek:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* Mobile-First Bottom Control Bar (Single Row Flexbox) */
.procaay-video-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
    padding-right: 4px; 
}

.procaay-video-row button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.procaay-video-row button:hover {
    color: var(--neon-cyan);
    transform: scale(1.1);
}

.procaay-video-time {
    font-size: 11px;
    color: #cbd5e1;
    font-family: var(--font-mono);
    min-width: 80px;
    flex-shrink: 0;
}

.procaay-vol-slider {
    width: 70px;
    accent-color: var(--neon-cyan);
    cursor: pointer;
    flex-shrink: 0;
}

/* Stream Error Alert Box */
.procaay-video-err {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(84, 24, 34, 0.92);
    border: 1px solid rgba(255, 176, 176, 0.2);
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    z-index: 15;
}

/* Global Blur Overlay for Anti-Screen Recording */
.video-blackout-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.96); z-index: 9999999; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: var(--danger);
    font-weight: 800; font-size: 18px; text-transform: uppercase; opacity: 0;
    pointer-events: none; transition: opacity 0.2s; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    text-align: center; padding: 20px;
}
.video-blackout-overlay.active {
    opacity: 1; pointer-events: auto;
}

/* MOBILE FIX FOR VIDEO CONTROLS */
@media (max-width: 768px) {
    .procaay-vol-slider, .vol-icon-elem {
        display: none !important;
    }
    .procaay-video-time {
        min-width: 60px;
    }
}