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

:root {
    /* ═══════════════════════════════════════════════════════
       DARK PREMIUM DESIGN SYSTEM — Mensa Platform
       ═══════════════════════════════════════════════════════ */

    /* Base Colors */
    --bg-main: #0a0e1a;
    --bg-card: rgba(17, 24, 45, 0.7);
    --bg-card-solid: #111829;
    --bg-sidebar: rgba(13, 18, 35, 0.92);
    --border-color: rgba(99, 102, 241, 0.1);
    --border-glow: rgba(99, 102, 241, 0.25);

    /* Text */
    --text-primary: #e8ecf4;
    --text-secondary: #8892b0;
    --text-muted: #5a6484;

    /* Primary Palette — Indigo/Violet */
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --primary-glow: rgba(99, 102, 241, 0.35);

    /* Accent — Cyan/Teal */
    --accent: #06b6d4;
    --accent-hover: #22d3ee;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);

    /* Status Colors */
    --color-success: #10b981;
    --color-danger: #f43f5e;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);

    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ══════════════════════════════════════════════════════════
   GLOBAL RESETS & BASE
   ══════════════════════════════════════════════════════════ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-ar), var(--font-en);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* ══════════════════════════════════════════════════════════
   AUTHENTICATION LAYOUT (LOGIN & REGISTER)
   ══════════════════════════════════════════════════════════ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-main);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: rgba(17, 24, 45, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.2rem;
}

.auth-header h1 {
    font-weight: 800;
    font-size: 1.9rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
}

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238892b0' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 2.5rem;
}

select.form-control option {
    background: #1a2038;
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-accent {
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD LAYOUT (SIDEBAR & MAIN CONTENT)
   ══════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    width: 270px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.25rem;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.sidebar-logo h2 {
    font-weight: 800;
    font-size: 1.35rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-smooth);
    border-right: 3px solid transparent;
}

.nav-item a:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.06);
}

.nav-item.active a, .nav-item a.active {
    color: var(--primary-hover);
    background: rgba(99, 102, 241, 0.1);
    border-right: 3px solid var(--primary);
    font-weight: 700;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

.user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.main-content {
    flex-grow: 1;
    margin-right: 270px;
    padding: 2.5rem;
    min-height: 100vh;
    width: calc(100% - 270px);
    max-width: calc(100% - 270px);
    overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════
   CARDS & TABLES
   ══════════════════════════════════════════════════════════ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: var(--border-glow);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-primary);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.custom-table th {
    background: rgba(13, 18, 35, 0.95);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 1rem 1.25rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Modals */
.glass-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1.5rem;
}

.glass-modal-content {
    background: rgba(17, 24, 45, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Badges */
.badge {
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    display: inline-block;
}

.bg-indigo { background: rgba(99, 102, 241, 0.15) !important; color: #a5b4fc !important; }
.bg-secondary { background: rgba(255, 255, 255, 0.06) !important; color: var(--text-secondary) !important; }

/* Video Protection */
.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #000;
}

.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.video-player-container video,
.video-player-container iframe,
.video-player-container .plyr {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

.video-overlay {
    pointer-events: none;
}

.watermark-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2147483647 !important;
}

.floating-watermark {
    position: absolute;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 1.1rem;
    font-weight: 700;
    user-select: none;
    pointer-events: none;
    animation: floatWatermark 35s infinite linear;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.8);
    z-index: 2147483647 !important;
}

@keyframes floatWatermark {
    0% { top: 10%; left: -20%; }
    50% { top: 30%; left: 60%; }
    100% { top: 10%; left: 110%; }
}

.blurred-protection {
    filter: blur(35px) grayscale(100%);
}

.blur-alert-overlay {
    position: absolute;
    inset: 0;
    display: none !important;
    background: rgba(10, 14, 26, 0.96);
    z-index: 15;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 2rem;
    user-select: none;
    pointer-events: none;
}

.blurred-protection .blur-alert-overlay,
.blackout-protection .blur-alert-overlay {
    display: flex !important;
}

.blur-alert-icon {
    font-size: 2.5rem;
    color: var(--color-danger);
}

/* Mobile Top Header Navigation Bar & Mobile Drawer */
.mobile-header-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(13, 18, 35, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
}

/* Modern Animated Hamburger Toggle Button */
.mobile-hamburger-btn {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.18);
    outline: none;
}

.mobile-hamburger-btn:hover, .mobile-hamburger-btn:focus, .mobile-hamburger-btn:active {
    background: rgba(99, 102, 241, 0.28);
    border-color: rgba(168, 85, 247, 0.6);
    transform: scale(1.04);
}

.hamburger-bar {
    display: block;
    height: 2.5px;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-bar.bar-1 { width: 20px; }
.hamburger-bar.bar-2 { width: 14px; margin-right: auto; }
.hamburger-bar.bar-3 { width: 20px; }

/* Active morphing to cross */
.mobile-hamburger-btn.active .bar-1 {
    transform: translateY(6.5px) rotate(45deg);
}
.mobile-hamburger-btn.active .bar-2 {
    opacity: 0;
    transform: translateX(10px);
}
.mobile-hamburger-btn.active .bar-3 {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Modern Video Quality Switcher Bar */
.quality-switcher-bar {
    background: rgba(13, 18, 35, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(124, 92, 255, 0.22);
    border-radius: 16px;
    padding: 0.65rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.quality-pills-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.modern-quality-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 9px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    outline: none;
    user-select: none;
}

.modern-quality-btn:hover {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.35);
}

.modern-quality-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.02);
}

.modern-quality-btn .quality-badge {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    font-weight: 700;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1045;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    #sidebarContainer {
        width: 100% !important;
    }
    .mobile-header-bar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        height: 60px !important;
        background: rgba(13, 18, 35, 0.98) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        z-index: 1040 !important;
        padding: 0 1rem !important;
        width: 100% !important;
    }
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 1050 !important;
        width: 280px !important;
        height: 100vh !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease-in-out !important;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5) !important;
    }
    .sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    .main-content {
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 70px 0.85rem 1.5rem 0.85rem !important;
        overflow-x: hidden !important;
    }
    .card-grid {
        grid-template-columns: 1fr !important;
    }
}/* Auth Screen - Pixel Perfect Matching Image */
.auth-bg {
    background: radial-gradient(circle at 50% 40%, #12142e 0%, #070814 100%) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
}

.auth-card {
    background: rgba(14, 16, 38, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    box-shadow: 0 0 40px rgba(110, 86, 248, 0.15), inset 0 0 20px rgba(124, 92, 255, 0.05);
}

.auth-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #9d7bff;
    text-shadow: 0 0 20px rgba(157, 123, 255, 0.4);
    margin-bottom: 2rem;
    text-align: center;
}

.auth-card .form-label {
    color: #8e95b3;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: block;
    text-align: right;
    font-weight: 500;
}

.auth-card .form-control {
    background: #141731 !important;
    border: 1px solid rgba(124, 92, 255, 0.2) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease;
}

.auth-card .form-control:focus {
    background: #181c3d !important;
    border-color: #8c68ff !important;
    box-shadow: 0 0 15px rgba(140, 104, 255, 0.3) !important;
    outline: none !important;
}

.auth-card .form-control::placeholder {
    color: #4e567a !important;
}

.auth-card .form-check-label {
    color: #8e95b3;
    font-size: 0.9rem;
    cursor: pointer;
}

.auth-card .form-check-input {
    background-color: #141731;
    border-color: rgba(124, 92, 255, 0.3);
    border-radius: 4px;
    width: 1.1em;
    height: 1.1em;
}

.auth-card .form-check-input:checked {
    background-color: #7c5cff;
    border-color: #7c5cff;
}

.btn-purple-gradient {
    background: linear-gradient(135deg, #7c5cff 0%, #6366f1 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    padding: 0.85rem !important;
    box-shadow: 0 8px 25px rgba(124, 92, 255, 0.4) !important;
    transition: all 0.3s ease !important;
}

.btn-purple-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.6) !important;
    opacity: 0.95;
}

.forgot-password-link {
    color: #8c68ff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #b094ff;
    text-decoration: underline;
}

/* Center the Create Exam view */
#createExamView {
    padding: 2.5rem 0;
}

#createExamView .create-exam-inner {
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    #createExamView {
        padding: 1rem;
    }
}

/* Fix date/time inputs in RTL layout */
input[type="date"],
input[type="time"] {
    direction: ltr !important;
    text-align: right;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
    direction: ltr !important;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper {
    direction: ltr !important;
}

/* Ultra-Premium Exam Choice Cards */
.exam-opt-card {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.exam-opt-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.exam-opt-card.selected-mcq {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%) !important;
    border-color: #a78bfa !important;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.35) !important;
}

.exam-opt-card.selected-true {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(16, 185, 129, 0.25) 100%) !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.35) !important;
}

.exam-opt-card.selected-false {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(225, 29, 72, 0.25) 100%) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.35) !important;
}

.opt-badge-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid #818cf8;
    color: #c7d2fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
}

.opt-radio-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.exam-opt-card.selected-mcq .opt-radio-indicator {
    border-color: #a78bfa;
    background: #a78bfa;
    box-shadow: 0 0 10px #a78bfa;
}

.exam-opt-card.selected-mcq .opt-radio-indicator::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
}

/* Exam Pagination Palette & Navigation */
.q-palette-container {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 4px 12px 4px;
    scrollbar-width: thin;
}

.q-num-pill {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.q-num-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
    color: #ffffff;
}

.q-num-pill.active {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
    border-color: #a855f7 !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4) !important;
    transform: scale(1.08);
}

.q-num-pill.answered {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #4ade80;
}

.q-num-pill.answered.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
}

/* Ultra-Modern Exam Navigation Buttons */
.nav-prev-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-prev-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
    color: #ffffff;
    transform: translateX(3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.nav-prev-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    transform: none;
}

.nav-next-btn {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.nav-next-btn:hover {
    transform: translateX(-3px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
    color: #ffffff;
}

.nav-submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.nav-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.55);
    color: #ffffff;
}

/* Leaderboard Rank Badges & Analytics Cards */
.rank-badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(148, 163, 184, 0.4);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(180, 83, 9, 0.4);
}

.rank-badge.rank-normal {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

.analytics-card {
    background: rgba(23, 30, 56, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Luxury Modern Button System for Exams & Analytics */
.btn-glass-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #f1f5f9;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn-glass-action:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.btn-gradient-accent {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.btn-gradient-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(168, 85, 247, 0.5);
    color: #ffffff;
}

.btn-gradient-info {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}
.btn-gradient-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
    color: #ffffff;
}

.btn-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}
.btn-gradient-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
    color: #ffffff;
}

.btn-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}
.btn-gradient-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
    color: #ffffff;
}

.btn-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}
.btn-gradient-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.5);
    color: #ffffff;
}

/* Custom Luxury Glass Select Dropdowns */
.custom-select-glass {
    background-color: rgba(15, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 9px 16px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    backdrop-filter: blur(12px) !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.custom-select-glass:hover, .custom-select-glass:focus {
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.35) !important;
    outline: none !important;
}

.custom-select-glass option {
    background-color: #0f172a !important;
    color: #ffffff !important;
    padding: 10px !important;
}
