/* ============================================
   منصة تدريب الشطرنج - النظام التصميمي
   Arabic Chess Training Platform - Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    /* Background Colors - Clean Dark Theme */
    --bg-primary: #0b0f14;
    --bg-surface: #141a22;
    --bg-surface-hover: #1c232e;
    --bg-sidebar: #0b0f14;
    --bg-header: #0b0f14;
    --bg-secondary: #0f131a;
    --bg-tertiary: #1a202b;

    /* Borders */
    --border: #1f2733;
    --border-hover: #2d3646;

    /* Accent Colors - Neon Cyberpunk */
    --accent: #00C8FF;
    /* Cyan */
    --accent-secondary: #FF00D4;
    /* Pink */
    --accent-hover: #33d3ff;
    --accent-active: #00a0cc;
    --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);

    --accent-transparent: rgba(0, 200, 255, 0.1);
    --accent-glow: rgba(0, 200, 255, 0.3);
    --accent-glow-strong: rgba(0, 200, 255, 0.5);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-on-accent: #000000;

    /* Status */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --sidebar-width: 240px;
    --sidebar-width-collapsed: 72px;
    --header-height: 72px;

    /* Shadows (Soft & Subtle) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 15px rgba(46, 196, 168, 0.15);

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.3s ease;

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Z-Index */
    --z-dropdown: 100;
    --z-fixed: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* SaaS Layout Utilities */
.saas-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.dashboard-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px 16px 40px;
    /* Top padding for fixed header */
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin 0.3s ease;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-inline-end: 1px solid var(--border);
    z-index: 50;
    transition: width 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    inset-inline-start: 0;
    /* Automatic RTL Logic */
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-logo {
    padding: 0;
    justify-content: center;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-transparent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
}

.nav-icon {
    font-size: 1.25rem;
    min-width: 24px;
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .nav-item {
    padding: 12px 0;
    justify-content: center;
}

.sidebar.collapsed .nav-text {
    display: none;
}

/* Header Styling */
.top-header {
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Surface Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

/* Grid System */
.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.col-3 {
    grid-column: span 3;
}

.col-4 {
    grid-column: span 4;
}

.col-6 {
    grid-column: span 6;
}

.col-8 {
    grid-column: span 8;
}

.col-12 {
    grid-column: span 12;
}

@media (max-width: 1024px) {
    .col-3 {
        grid-column: span 6;
    }

    .col-4 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {

    .col-3,
    .col-4,
    .col-6,
    .col-8 {
        grid-column: span 12;
    }

    .sidebar {
        transform: translateX(calc(var(--sidebar-width) * -1));
    }

    [dir="rtl"] .sidebar {
        transform: translateX(var(--sidebar-width));
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

/* Logical Properties - Set base direction */
html[dir="rtl"],
html[dir="ltr"] {
    --direction: rtl;
    direction: rtl;
}

/* ============================================
   Base Reset
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    direction: rtl;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
}

/* ── Global Ambient Background ── */
body::before {
    content: '';
    position: fixed;
    top: -25%;
    right: -15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0, 204, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 102, 204, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Global Decorative Chess Symbols ── */
.bg-decor {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    font-size: 120px;
    opacity: 0.018;
    color: #fff;
    font-family: serif;
    user-select: none;
}

.bg-decor.d1 { top: 12%; left: 5%; transform: rotate(-15deg); }
.bg-decor.d2 { top: 40%; right: 3%; transform: rotate(20deg); }
.bg-decor.d3 { bottom: 15%; left: 10%; transform: rotate(-8deg); }
.bg-decor.d4 { top: 65%; left: 45%; transform: rotate(12deg); font-size: 90px; }
.bg-decor.d5 { bottom: 35%; right: 12%; transform: rotate(-25deg); font-size: 100px; }

/* Ensure content sits above global background */
.saas-layout, .container, .dashboard-container, .main-content {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--accent);
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: 960px;
}

.section {
    padding: var(--space-3xl) 0;
}

.section-lg {
    padding: var(--space-4xl) 0;
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: var(--z-fixed);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid #2EC4A8;
    transition: all var(--transition-base);
    padding: 0.75rem 0;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    justify-content: space-between;
    position: relative;
    height: 75px;
}

.logo {
    position: absolute;
    inset-inline-end: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2EC4A8;
    transition: all var(--transition-base);
    height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
    text-align: start;
    /* Logical alignment */
}

.logo:hover {
    transform: translateY(-2px);
    color: #33d3ff;
}

.logo-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 8px rgba(46, 196, 168, 0.5));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: var(--space-xs) 0;
    position: relative;
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    inset-inline-start: 0;
    /* logic property */
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
    box-shadow: var(--shadow-glow);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    position: absolute;
    inset-inline-start: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    white-space: nowrap;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--accent-glow);
    border: none;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #ff4dde 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 30px var(--accent-glow-strong);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    background: var(--accent-active);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--border-hover);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 0 20px var(--success-glow);
}

.btn-success:hover:not(:disabled) {
    background: #16a34a;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    padding: 0.75rem;
    aspect-ratio: 1;
}

.btn-full {
    width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding-top: calc(75px + var(--space-4xl));
    padding-bottom: var(--space-4xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.15) 0%, rgba(255, 0, 212, 0.05) 50%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: var(--space-lg);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease-out;
}

.hero p {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero .btn {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* ============================================
   Search & Filters
   ============================================ */
.search-section {
    padding: var(--space-xl) 0;
}

.search-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.25rem; /* Corrected padding */
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--transition-base);
    font-size: 1rem;
}

/* ── Premium User Dropdown (Aura Glass) ── */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    min-width: 180px;
    max-width: 240px;
    width: max-content;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.1);
    padding: 8px 0;
    z-index: 2000;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
    white-space: nowrap;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    
    /* Always-visible Scrollbar for Dropdown */
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.8) rgba(30, 41, 59, 0.5);
}

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 8px;
    margin: 8px 0; /* padding effect */
}
.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.8);
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.dropdown-menu.show {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Mobile dropdown UX */
@media (max-width: 768px) {
    body.menu-active {
        overflow: hidden;
    }
    body.menu-active::before {
        content: '';
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(10, 15, 25, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 999; /* Below header dropdown 1000 */
        pointer-events: auto;
    }
    .dropdown-menu {
        position: fixed;
        top: 80px;
        right: 20px;
        left: 20px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 100px);
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

.menu-group {
    padding: 6px 0;
}

.menu-label {
    padding: 8px 18px 4px;
    font-size: 10px; /* Smaller */
    font-weight: 600; /* Lighter */
    color: rgba(0, 200, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px; /* Slightly tighter gap */
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 12.5px; /* More compact */
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    transform: none !important;
}

.dropdown-item i {
    font-size: 14px; /* Scaled down */
    width: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.25s ease;
}

.dropdown-item:hover {
    background: rgba(168, 85, 247, 0.15);
    color: #fff;
    padding-inline-start: 24px;
}

.dropdown-item:hover i {
    color: #00e5ff;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.dropdown-divider-neon {
    height: 1px;
    margin: 8px 15px;
    background: linear-gradient(90deg, transparent 0%, rgba(168, 85, 247, 0.4) 50%, transparent 100%);
}

.logout-item {
    color: rgba(239, 68, 68, 0.85) !important;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}

/* RTL Support */
[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
    transform-origin: top left;
}

[dir="rtl"] .dropdown-item:hover {
    padding-inline-start: 20px;
    padding-inline-end: 24px;
}

/* English (LTR) Desktop Offset - Requested 50px */
@media (min-width: 992px) {
    [dir="ltr"] .dropdown-menu {
        margin-right: -80px;
        /* Moves menu 50px to the left from the right edge */
    }
}

/* Disable Any Icon Rotation in Dropdown Items */
.dropdown-item:hover i,
.aura-settings-trigger:hover i,
.dropdown-item:active i {
    transform: none !important;
}

/* ── Search & Filters ── */
.search-box input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--transition-base);
    font-size: 1rem;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-tertiary);
}

.search-icon {
    position: absolute;
    inset-inline-end: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown select {
    appearance: none;
    padding-block: 1rem;
    padding-inline: 1.25rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1rem;
    min-width: 150px;
}

.filter-dropdown select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}


/* ============================================
   Dashboard & Profile Styles
   ============================================ */
.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    width: 100%;
}

.page-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Progress Card */
.progress-card-main {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-md);
}

.progress-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-percentage {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.progress-bar-container {
    height: 10px;
    background: var(--bg-surface-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 1s ease-out;
    box-shadow: 0 0 10px var(--accent-glow);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Activity List */
.activity-section {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.activity-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

[dir="rtl"] .activity-item:hover {
    transform: translateX(-4px);
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-title {
    font-weight: 600;
    color: var(--text-primary);
}

.activity-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.activity-score {
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-transparent);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
}

/* Profile Styles */
.profile-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-glow);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-transparent);
    color: var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.profile-details {
    text-align: start;
    border-top: 1px solid var(--border);
    padding-top: var(--space-lg);
    display: grid;
    gap: var(--space-md);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-sm);
    border-bottom: 1px dashed var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.mini-stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
}

.mini-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mini-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

@media (max-width: 600px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .profile-stats-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .activity-item:hover {
        transform: none !important;
    }
}

.filter-dropdown {
    position: relative;
    width: 200px;
}

.filter-dropdown select {
    width: 100%;
    padding: 12px 16px;
    padding-inline-end: 32px;
    /* Space for arrow */
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: var(--transition);
    height: 50px;
    /* Explicit height to prevent cutting */
    line-height: 1.5;
}

.filter-dropdown select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.filter-dropdown::after {
    content: '◄';
    position: absolute;
    inset-inline-start: 1rem;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* ============================================
   Course Cards Grid
   ============================================ */
.courses-section {
    padding: var(--space-2xl) 0;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.course-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-slow);
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--shadow-xl), 0 0 30px var(--accent-glow);
}

.course-image {
    position: relative;
    height: 200px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.course-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: var(--space-lg);
}

.course-badge {
    position: absolute;
    top: var(--space-md);
    inset-inline-start: var(--space-md);
    background: var(--accent);
    color: var(--text-on-accent);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
}

.card-board {
    aspect-ratio: 1;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-slow);
}

.course-card:hover .card-board {
    transform: scale(1.03);
}

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.375rem;
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.card-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-progress {
    margin-bottom: var(--space-lg);
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #4ade80);
    border-radius: var(--radius-full);
    transition: width var(--transition-slower);
    box-shadow: 0 0 10px var(--success-glow);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    gap: var(--space-md);
}

.lines-count {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lines-count svg {
    width: 18px;
    height: 18px;
}

.difficulty-badge {
    font-size: 0.8125rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.difficulty-beginner {
    background: var(--success-bg);
    color: #4ade80;
}

.difficulty-intermediate {
    background: var(--warning-bg);
    color: #fbbf24;
}

.difficulty-advanced {
    background: var(--error-bg);
    color: #f87171;
}

.card-cta {
    width: 100%;
}

/* ============================================
   Canvas Chessboard
   ============================================ */
.board-canvas-container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.board-canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    cursor: pointer;
    touch-action: none;
    direction: ltr;
    /* Ensure board structure remains standard */
}

.board-controls {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

/* ============================================
   Training Page
   ============================================ */
.training-page {
    min-height: 100vh;
    padding-top: calc(75px + var(--space-2xl));
    padding-bottom: var(--space-2xl);
}

.training-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.training-instruction {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.training-feedback {
    min-height: 40px;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.feedback-success {
    color: var(--success);
}

.feedback-error {
    color: var(--error);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-4xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand p {
    margin-top: var(--space-md);
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}


.training-stats {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    min-width: 120px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ============================================
   Profile Page
   ============================================ */
.profile-page {
    min-height: 100vh;
    padding-top: calc(75px + var(--space-2xl));
    padding-bottom: var(--space-2xl);
}

.profile-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding: var(--space-2xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto var(--space-lg);
    box-shadow: 0 0 40px var(--accent-glow);
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.profile-level {
    display: inline-flex;
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent-glow);
    color: var(--accent-hover);
    border-radius: var(--radius-full);
    font-weight: 600;
    border: 1px solid var(--accent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-card-title {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.stat-card-unit {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background:
        radial-gradient(ellipse at top, var(--accent-glow), transparent 60%),
        var(--bg-primary);
}

.login-card {
    width: 100%;
    max-width: 450px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-header .logo {
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

.login-header p {
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--transition-base);
    font-size: 1rem;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-tertiary);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.forgot-link {
    color: var(--accent);
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--accent-hover);
}

.divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    gap: var(--space-md);
}

.btn-google:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.signup-prompt {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: 1rem;
    color: var(--text-secondary);
}

.signup-prompt a {
    color: var(--accent);
    font-weight: 600;
}

.signup-prompt a:hover {
    color: var(--accent-hover);
}

/* ============================================
   Subscription Page
   ============================================ */
.subscription-page {
    min-height: 100vh;
    padding-top: calc(75px + var(--space-2xl));
    padding-bottom: var(--space-2xl);
}

.subscription-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    inset-inline: 0;
    margin-inline: auto;
    width: fit-content;
    transform: none;
    background: var(--accent);
    color: white;
    padding: var(--space-xs) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-secondary);
}

/* ============================================
   LOGOUT CONFIRMATION MODAL (Warning Style)
   ============================================ */
.logout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logout-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.logout-modal-container {
    background: rgba(20, 26, 34, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 68, 102, 0.4);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 68, 102, 0.15);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logout-modal-overlay.active .logout-modal-container {
    transform: scale(1);
}

.logout-icon-glow {
    width: 80px;
    height: 80px;
    background: rgba(255, 68, 102, 0.1);
    border: 1px solid rgba(255, 68, 102, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: #ff4466;
    box-shadow: 0 0 20px rgba(255, 68, 102, 0.2);
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 10px rgba(255, 68, 102, 0.2); }
    50% { box-shadow: 0 0 25px rgba(255, 68, 102, 0.4); }
    100% { box-shadow: 0 0 10px rgba(255, 68, 102, 0.2); }
}

.logout-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ff4466, #ff8844);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 68, 102, 0.4));
}

.logout-modal-msg {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.logout-modal-actions {
    display: flex;
    gap: 1rem;
}

.logout-modal-actions .btn {
    flex: 1;
    padding: 12px;
    font-weight: 700;
    border-radius: 12px;
}

.btn-logout-confirm-neon {
    background: linear-gradient(135deg, #ff4466, #ff1144);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 102, 0.3);
}

.btn-logout-confirm-neon:hover {
    background: linear-gradient(135deg, #ff5577, #ff2255);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 68, 102, 0.5);
}

.btn-logout-cancel-glass {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout-cancel-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ============================================
   SHARE MODAL (Glassmorphism + Neon Cyan)
   ============================================ */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.share-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.share-modal-container {
    background: rgba(20, 26, 34, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 200, 255, 0.4);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 200, 255, 0.15);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.share-modal-overlay.active .share-modal-container {
    transform: scale(1);
}

.btn-close-share {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-close-share:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

html[dir="rtl"] .btn-close-share {
    right: auto;
    left: 15px;
}

.share-icon-glow {
    width: 90px;
    height: 90px;
    background: rgba(0, 200, 255, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: #00C8FF;
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.3);
    animation: pulseCyan 2.5s infinite alternate ease-in-out;
}

@keyframes pulseCyan {
    0% { box-shadow: 0 0 15px rgba(0, 200, 255, 0.2); }
    100% { box-shadow: 0 0 35px rgba(0, 200, 255, 0.5); }
}

.share-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #00C8FF, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(0, 200, 255, 0.3));
    line-height: 1.5;
}

.share-link-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    user-select: all;
    transition: all 0.3s ease;
}

.share-link-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 200, 255, 0.3);
}

.share-link-box code {
    color: #a78bfa;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: monospace;
}

.share-modal-actions {
    display: flex;
    justify-content: center;
}

.btn-share-neon {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #00C8FF, #0088CC);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 200, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-share-neon:hover {
    background: linear-gradient(135deg, #00d4ff, #0099e6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 200, 255, 0.5);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    text-align: center;
}

.pricing-price {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin-block-end: var(--space-xl);
}

.pricing-features li {
    padding-block: var(--space-md);
    padding-inline: 0;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-secondary);
    border-block-end: 1px solid var(--border);
}

.pricing-features li:last-child {
    border-block-end: none;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 1.25rem;
}

.pricing-features li.disabled {
    opacity: 0.4;
}

.pricing-features li.disabled::before {
    content: '×';
    color: var(--text-muted);
}

/* ============================================
   New Premium Auth & Pricing Styles
   ============================================ */

/* --- Split Layout for Auth --- */
.auth-split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--bg-primary);
}

.auth-marketing {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: linear-gradient(135deg, #141a22 0%, #0b0f14 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.auth-pattern {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    inset-block-end: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(244, 197, 66, 0.03) 0%, transparent 20%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.01) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.01) 75%, rgba(255, 255, 255, 0.01)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.01) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.01) 75%, rgba(255, 255, 255, 0.01));
    background-size: 100% 100%, 60px 60px, 60px 60px;
    background-position: 0 0, 0 0, 30px 30px;
    opacity: 0.4;
    z-index: 1;
}

.auth-marketing-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    margin-inline: auto;
    text-align: center;
}

.auth-marketing h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-block-end: 24px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.auth-panel {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background: var(--bg-primary);
    border-inline-start: 1px solid var(--border);
    /* Logical border - starts on left for LTR, right for RTL */
    /* for RTL, otherwise border-left */
}

/* Auth Card */
.auth-card {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.auth-header {
    text-align: center;
    margin-block-end: 32px;
}

.auth-logo {
    display: inline-block;
    width: 48px;
    height: 48px;
    margin-block-end: 16px;
}

.form-group {
    margin-block-end: 20px;
}

.form-label {
    display: block;
    margin-block-end: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    height: 48px;
    padding-inline: 16px;
    padding-block: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
    outline: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #000;
    font-weight: 700;
    height: 48px;
    border-radius: 10px;
    width: 100%;
    transition: var(--transition);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow-strong);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin-block: 24px;
    margin-inline: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding-inline: 12px;
    padding-block: 0;
}

/* --- Pricing Styles --- */
.pricing-section {
    padding-block: 80px;
    padding-inline: 0;
}

.pricing-header {
    text-align: center;
    max-width: 700px;
    margin-inline: auto;
    margin-block-end: 60px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    /* Reduced gap from 40px */
    max-width: 1000px;
    margin-inline: auto;
    align-items: center;
    /* Center align vertically to emphasize scale */
    padding-block: 20px;
    padding-inline: 0;
    /* Add padding to prevent clipping of scaled items */
}

.pricing-card {
    background: rgba(11, 15, 20, 0.4);
    /* More transparent for glassmorphism */
    border: 1px solid rgba(176, 38, 255, 0.2);
    /* Neon Purple hint */
    border-radius: 20px;
    padding: 32px 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(176, 38, 255, 0.15);
    /* Purple shadow */
    border-color: rgba(176, 38, 255, 0.6);
    background: rgba(176, 38, 255, 0.05);
    /* Slight purple tint */
}

/* Pro Plan Highlight */
.pricing-card.popular {
    background: rgba(0, 200, 255, 0.05);
    border: 2px solid #00C8FF;
    /* Cyan */
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.2);
    z-index: 10;
    transform: scale(1.02);
    padding-block-start: 40px;
    position: relative;
    animation: cyanPulse 2s infinite alternate ease-in-out;
}

@keyframes cyanPulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 200, 255, 0.2), 0 0 0 rgba(0, 200, 255, 0.1) inset;
    }

    100% {
        box-shadow: 0 0 40px rgba(0, 200, 255, 0.5), 0 0 20px rgba(0, 200, 255, 0.2) inset;
    }
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-6px);
    box-shadow: 0 15px 50px rgba(0, 200, 255, 0.6), 0 0 30px rgba(0, 200, 255, 0.3) inset;
    animation: none;
    /* stop pulse on hover to show solid strong glow */
}

.popular-badge {
    position: absolute;
    inset-block-start: -12px;
    /* Adjusted position */
    inset-inline-start: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 15px var(--accent-glow);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 20;
}

.plan-name {
    font-size: 1.25rem;
    /* Reduced from 1.5rem */
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.plan-price {
    font-size: 2.5rem;
    /* Reduced from 3rem */
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.plan-features {
    margin: 0 0 32px 0;
    padding: 0;
    list-style: none;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.plan-features li svg {
    flex-shrink: 0;
    color: var(--accent);
    width: 20px;
    height: 20px;
}

/* Responsive auth */
@media (max-width: 900px) {
    .auth-split-layout {
        flex-direction: column;
    }

    .auth-marketing {
        padding: 40px;
        min-height: 200px;
    }

    .auth-panel {
        max-width: 100%;
        padding: 32px 16px;
        border: none;
    }
}

/* ============================================
   Footer (Restored)
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: var(--space-2xl) 0;
    margin-top: auto;
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer-text {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ============================================
   Animations (Restored)
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* ============================================
   Global Responsive (Restored)
   ============================================ */
@media (max-width: 968px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav.open .nav-links,
    .nav.open .nav-actions {
        display: flex;
    }

    .nav.open {
        position: fixed;
        top: 75px;
        right: 0;
        left: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        box-shadow: var(--shadow-lg);
    }

    .nav.open .nav-links,
    .nav.open .nav-actions {
        flex-direction: column;
        width: 100%;
    }

    .nav.open .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero {
        padding-top: calc(75px + var(--space-2xl));
        padding-bottom: var(--space-2xl);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .courses-grid,
    .search-container,
    .pricing-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        max-width: 100%;
    }

    /* Fix Header Items on Mobile */
    .cr-topbar-actions .cr-topbar-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .cr-topbar-icons {
        display: none;
        /* Hide streak on very small screens if needed */
    }
}

/* ── Mobile Header: hide site name, keep logo only ── */
@media (max-width: 768px) {
    .cr-topbar-logo span {
        display: none;
    }

    /* Make logo slightly larger and stand out more on mobile */
    .cr-topbar-logo img {
        width: 38px !important;
        height: 38px !important;
        box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
        /* Subtle glow to match theme */
    }

    .cr-topbar {
        height: 60px;
    }

    .cr-topbar-inner {
        padding: 0 16px;
        /* Safe distance from screen edge */
    }

    .cr-topbar-actions {
        gap: 6px;
    }

    .cr-topbar-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* Hide streak on mobile to make more space for branding */
    .cr-topbar-icons {
        display: none;
    }
}

/* ============================================
   Utility Classes (Restored)
   ============================================ */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   Global Canvas Background
   ============================================ */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ============================================
    Dropdown Menu Styles
    ============================================ */
.dropdown-container {
    position: relative;
}

.dropdown-divider {
    height: 1px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: -25px;
    font-size: 0.9rem;
    color: #b026ff;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #b026ff;
}

.btn-contact-submit {
    width: 100%;
    background: linear-gradient(135deg, #b026ff 0%, #00C8FF 100%);
    color: #fff;
    border: none;
    padding: 20px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(176, 38, 255, 0.3);
}

.btn-contact-submit:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(176, 38, 255, 0.5);
}

/* ============================================
   Privacy Page Styles (Documentation Style)
   ============================================ */
.privacy-page {
    padding: 140px 0 100px;
    background: #0b0f14;
}

.privacy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    gap: 80px;
}

.privacy-toc {
    flex: 0 0 280px;
    position: sticky;
    top: 120px;
    height: fit-content;
    /* In RTL, sidebar appears after content (on the right) */
    /* In LTR, sidebar appears before content (on the left) */
}

.privacy-toc h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00C8FF;
    margin-bottom: 30px;
    font-weight: 800;
}

.privacy-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-inline-start: 2px solid rgba(255, 255, 255, 0.05);
}

.privacy-toc-link {
    display: block;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    transition: all 0.3s ease;
    border-inline-start: 2px solid transparent;
    margin-inline-start: -2px;
}

.privacy-toc-link:hover,
.privacy-toc-link.active {
    color: #b026ff;
    border-right-color: #b026ff;
    background: linear-gradient(to left, rgba(176, 38, 255, 0.05), transparent);
}

.privacy-content {
    flex: 1;
}

.privacy-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 60px;
    color: #fff;
}

.privacy-section {
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.privacy-section:hover {
    border-color: rgba(0, 200, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.privacy-section h2 {
    color: #00C8FF;
    /* Blue highlighted headings */
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.privacy-section p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    font-size: 1.1rem;
}

.privacy-section ul {
    list-style: none;
    padding-inline-start: 20px;
}

.privacy-section ul li {
    position: relative;
    padding-inline-start: 25px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.privacy-section ul li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #b026ff;
    /* Purple bullet points */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.5);
}

@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .privacy-container {
        flex-direction: column;
    }

    .privacy-toc {
        display: none;
    }
}

/* ============================================
   Global Header (Redesigned)
   ============================================ */
.cr-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: #0b0f14;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cr-topbar-inner {
    width: 100%;
    max-width: 1336px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.cr-topbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
}

.cr-topbar-logo span {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    color: #fff;
}

/* ── Central Navigation ── */
.cr-topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cr-topbar-nav a {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13.5px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.cr-topbar-nav a i {
    font-size: 13px;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.cr-topbar-nav a:hover {
    color: #fff;
    background: rgba(138, 43, 226, 0.1);
}

.cr-topbar-nav a:hover i { opacity: 1; }

.cr-topbar-nav a.active {
    color: #c4a7e7;
    background: rgba(138, 43, 226, 0.14);
}

.cr-topbar-nav a.active i { opacity: 1; }

@media (max-width: 900px) {
    .cr-topbar-nav a span { display: none; }
    .cr-topbar-nav a { padding: 8px 10px; }
    .cr-topbar-nav a i { font-size: 16px; opacity: 0.8; }
    .cr-topbar-nav { gap: 2px; }
}

@media (max-width: 480px) {
    .cr-topbar-nav { display: none; }
}

.cr-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cr-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.cr-topbar-btn.ghost {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
}

.cr-topbar-btn.ghost:hover {
    color: #fff;
}

.cr-topbar-btn.ghost.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cr-topbar-btn.outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.cr-topbar-btn.outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.cr-topbar-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-inline-start: 12px;
    padding-inline-start: 12px;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
}

.cr-streak {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
}

/* ============================================
   Layout Spacing (Fix Header Overlap)
   ============================================ */
.dashboard-container {
    padding-top: 100px !important;
    padding-bottom: 2rem;
    min-height: 100vh;
    width: 100%;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 1200px;
}

.hero {
    padding-top: 120px !important;
}

/* Ensure create-course wrapper clears too */
.create-course-wrapper {
    padding-top: 100px !important;
}

/* ── FAQ Accordion Styles ── */
.faq-container {
    max-width: 800px;
    margin: 60px auto 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: rgba(11, 15, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.faq-item.active {
    border-color: #00C8FF;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.2);
    background: rgba(0, 200, 255, 0.05);
}

.faq-question {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    transition: color 0.3s ease;
}

.faq-item.active .faq-question h3 {
    color: #00C8FF;
}

.faq-icon {
    font-size: 1.2rem;
    color: #b026ff;
    /* Neon Purple */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    /* Turns + into x */
    color: #00C8FF;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.4s ease;
    opacity: 0;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    opacity: 1;
    padding-bottom: 24px;
}

.faq-answer p {
    color: #cbd5e1;
    margin: 0;
    line-height: 1.6;
}

/* Subscribe Buttons Modifiers */
.btn-subscribe {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-subscribe:hover {
    transform: scale(1.05) translateY(-3px);
}

/* Mobile Adjustments for Pricing */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        padding-inline: 16px;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: scale(1.02) translateY(-4px);
    }

    .faq-question h3 {
        font-size: 1rem;
    }

    .faq-question {
        padding: 20px;
    }
}

/* ============================================
   The Ultimate Modern Footer
   ============================================ */
.ultimate-footer {
    position: relative;
    background: rgba(11, 15, 20, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid transparent;
    padding: 80px 0 30px;
    margin-top: auto;
    overflow: hidden;
}

/* Redefined Top Glow Bar */
.ultimate-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #b026ff 0%, #00C8FF 100%);
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.3), 0 0 10px rgba(0, 200, 255, 0.3);
    z-index: 10;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-main-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col {
    flex: 1;
    min-width: 150px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* About Column */
.footer-about-col .footer-logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-about-col .footer-logo-small img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.footer-about-col .footer-logo-small span {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.footer-about-col p {
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    font-size: 0.9rem;
    max-width: 280px;
}

/* Links Columns */
.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-list li {
    margin-bottom: 12px;
}

.footer-nav-list a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* Professional Hover Shift */
.footer-nav-list a:hover {
    color: #00C8FF;
    transform: translateX(2px);
}

[dir="rtl"] .footer-nav-list a:hover {
    transform: translateX(-2px);
}

/* Newsletter Column */
.newsletter-slim {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* High-Gloss Subscribe Button */
.btn-subscribe-wide {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #b026ff 0%, #00C8FF 100%);
    color: #fff;
    text-align: center;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 200, 255, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-subscribe-wide::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn-subscribe-wide:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 200, 255, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-subscribe-wide:hover::after {
    left: 120%;
}

/* Bottom Bar */
.footer-bottom-bar {
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Social Glow Links - Neon Version */
.social-glow-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-glow-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.social-glow-link:hover {
    transform: translateY(-8px) scale(1.15);
}

/* Individual Neon Colors */
.social-glow-link.inst:hover {
    color: #E1306C;
    border-color: #E1306C;
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.5);
}

.social-glow-link.fb:hover {
    color: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.5);
}

.social-glow-link.wa:hover {
    color: #25D366;
    border-color: #25D366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
}

.social-glow-link.tw:hover {
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.social-glow-link.tt:hover {
    color: #00f2ea;
    border-color: #00f2ea;
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.5);
}

.social-glow-link.yt:hover {
    color: #FF0000;
    border-color: #FF0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.social-glow-link.ln:hover {
    color: #0A66C2;
    border-color: #0A66C2;
    box-shadow: 0 0 15px rgba(10, 102, 194, 0.5);
}

/* Extra Small Gray Copyright */
.copyright-minimal {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

/* ============================================
   Contact Page Styles (Premium Overhaul)
   ============================================ */
.contact-page {
    padding: 140px 0 100px;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 200, 255, 0.05) 0%, transparent 40%);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.contact-info-side h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 25px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info-side p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 50px;
    font-family: 'Inter', sans-serif;
}

.contact-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    backdrop-filter: blur(5px);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: #00C8FF;
    transform: translateX(-15px) scale(1.03);
}

[dir="rtl"] .contact-card:hover {
    transform: translateX(15px) scale(1.03);
}

.contact-card i {
    font-size: 1.8rem;
    color: #00C8FF;
    width: 65px;
    height: 65px;
    background: rgba(0, 200, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.1);
}

.contact-card-text h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 6px;
}

.contact-card-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0;
}

/* Premium Form Side */
.contact-form-side {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(176, 38, 255, 0.2);
    padding: 50px;
    border-radius: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.contact-form-side::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(176, 38, 255, 0.1) 0%, transparent 70%);
}

.contact-form-side .form-group {
    position: relative;
    margin-bottom: 40px;
}

.contact-form-side .form-group input,
.contact-form-side .form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

.contact-form-side .form-group label {
    position: absolute;
    top: 12px;
    right: 0;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.contact-form-side .form-group input:focus~label,
.contact-form-side .form-group input:not(:placeholder-shown)~label,
.contact-form-side .form-group textarea:focus~label,
.contact-form-side .form-group textarea:not(:placeholder-shown)~label {
    top: -25px;
    font-size: 0.9rem;
    color: #b026ff;
}

.contact-form-side .form-group input:focus,
.contact-form-side .form-group textarea:focus {
    border-color: #b026ff;
}

.btn-contact-submit {
    width: 100%;
    background: linear-gradient(135deg, #b026ff 0%, #00C8FF 100%);
    color: #fff;
    border: none;
    padding: 20px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(176, 38, 255, 0.3);
}

.btn-contact-submit:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(176, 38, 255, 0.5);
}

/* ============================================
   Privacy Page Styles (Documentation Style)
   ============================================ */
.privacy-page {
    padding: 140px 0 100px;
    background: #0b0f14;
}

.privacy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    gap: 80px;
}

.privacy-toc {
    flex: 0 0 280px;
    position: sticky;
    top: 120px;
    height: fit-content;
    order: 2;
    /* In RTL, sidebar on the right */
}

.privacy-toc h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00C8FF;
    margin-bottom: 30px;
    font-weight: 800;
}

.privacy-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-right: 2px solid rgba(255, 255, 255, 0.05);
}

.privacy-toc-link {
    display: block;
    padding: 12px 24px 12px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    transition: all 0.3s ease;
    border-right: 2px solid transparent;
    margin-right: -2px;
}

.privacy-toc-link:hover,
.privacy-toc-link.active {
    color: #b026ff;
    border-right-color: #b026ff;
    background: linear-gradient(to left, rgba(176, 38, 255, 0.05), transparent);
}

.privacy-content {
    flex: 1;
    order: 1;
}

.privacy-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 60px;
    color: #fff;
}

.privacy-section {
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.privacy-section:hover {
    border-color: rgba(0, 200, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.privacy-section h2 {
    color: #00C8FF;
    /* Blue highlighted headings */
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.privacy-section p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    font-size: 1.1rem;
}

.privacy-section ul {
    list-style: none;
    padding-right: 20px;
}

.privacy-section ul li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.privacy-section ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #b026ff;
    /* Purple bullet points */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.5);
}

@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .privacy-container {
        flex-direction: column;
    }

    .privacy-toc {
        display: none;
    }
}

/* Mobile Optimization */
@media (max-width: 992px) {
    .footer-col {
        flex: 1 1 40%;
    }
}
}

@media (max-width: 768px) {
    .ultimate-footer {
        padding: 60px 0 40px;
    }

    .footer-main-grid {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .footer-col {
        flex: 1 1 100%;
    }

    .footer-about-col .footer-logo-small {
        justify-content: center;
    }

    .footer-about-col p {
        margin: 0 auto;
    }

    .footer-bottom-bar {
        flex-direction: column;
        gap: 24px;
    }

    .social-glow-links {
        order: -1;
    }
}

/* ============================================
   Aura Premium Components
   ============================================ */

/* ── Premium Feature Cards (Standard) ── */
.aura-card {
    background: rgba(15, 15, 20, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.aura-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.aura-icon-lg {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* ── Premium Feature Cards (Wide/Horizontal) ── */
.aura-card-wide {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 50px;
    background: rgba(15, 15, 20, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 40px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.aura-card-wide:hover {
    transform: translateY(-5px);
}

/* Color Variants */
.aura-card-wide.cyan { box-shadow: 0 10px 40px rgba(0, 242, 254, 0.1); border-color: rgba(0, 242, 254, 0.3); }
.aura-card-wide.purple { box-shadow: 0 10px 40px rgba(191, 90, 242, 0.1); border-color: rgba(191, 90, 242, 0.3); }
.aura-card-wide.gold { box-shadow: 0 10px 40px rgba(255, 215, 0, 0.1); border-color: rgba(255, 215, 0, 0.3); }

.aura-card-wide.cyan:hover { box-shadow: 0 15px 50px rgba(0, 242, 254, 0.2); }
.aura-card-wide.purple:hover { box-shadow: 0 15px 50px rgba(191, 90, 242, 0.2); }
.aura-card-wide.gold:hover { box-shadow: 0 15px 50px rgba(255, 215, 0, 0.2); }

.aura-card-image {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.aura-card-image img {
    width: 100%;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 20px;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.aura-card-wide:hover .aura-card-image img {
    transform: scale(1.03) rotate(1deg);
}

.aura-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: right;
    align-items: flex-start;
}

[dir="ltr"] .aura-card-content {
    text-align: left;
}

/* ── Typography inside cards ── */
.aura-card-content h2, 
.aura-card h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    line-height: 1.2;
    color: #fff;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #aab2ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.aura-card-content p,
.aura-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    font-size: 1.05rem;
    margin: 0;
}

/* ── Aura Badge ── */
.aura-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
}

.aura-badge.cyan { background: rgba(0, 242, 254, 0.1); color: #00f2fe; border: 1px solid rgba(0, 242, 254, 0.2); }
.aura-badge.purple { background: rgba(191, 90, 242, 0.1); color: #bf5af2; border: 1px solid rgba(191, 90, 242, 0.2); }
.aura-badge.gold { background: rgba(255, 215, 0, 0.1); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.2); }

/* ── Aura Buttons ── */
.aura-btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
    margin-top: 10px;
    font-size: 1.05rem;
}

.aura-btn-outline.cyan { 
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%); 
    color: #000;
    box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
}
.aura-btn-outline.purple { 
    background: linear-gradient(135deg, #bf5af2 0%, #8921ff 100%); 
    color: #fff;
    box-shadow: 0 10px 20px rgba(191, 90, 242, 0.3);
}
.aura-btn-outline.gold { 
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%); 
    color: #000;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.aura-btn-outline:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255,255,255,0.1);
}

/* ── Responsive Utilities ── */
@media (max-width: 992px) {
    .aura-card-wide {
        flex-direction: column-reverse;
        text-align: right;
        gap: 30px;
        padding: 30px 20px;
    }
    [dir="ltr"] .aura-card-wide {
        text-align: left;
    }
    .aura-card-image, .aura-card-content {
        flex: 1 1 100%;
        width: 100%;
    }
    .aura-card-content {
        align-items: flex-start;
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(0, 242, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}
/* ============================================
   Profile Menu Mobile Modal & Overlay
   ============================================ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

body.menu-active {
    overflow: hidden;
}

body.menu-active .menu-overlay {
    opacity: 1;
    visibility: visible;
}

.menu-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2005;
    transition: all 0.2s;
}

[dir="rtl"] .menu-close-btn {
    right: auto;
    left: 15px;
}

.menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .dropdown-menu#userDropdown {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -45%) scale(0.95);
        width: 90%;
        max-width: 320px;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 3000;
        margin: 0 !important;
        padding: 40px 10px 20px;
        border: 1px solid rgba(168, 85, 247, 0.4);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 85, 247, 0.2);
        display: none;
    }

    .dropdown-menu#userDropdown.show {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    .menu-close-btn {
        display: flex;
    }
    
    .dropdown-item {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* ============================================
   Piece Dragging Overrides (Aura Touch Fixes)
   ============================================ */
.cm-chessboard-draggable-piece, .dragging-piece {
    z-index: 10000 !important;
    position: absolute !important;
    pointer-events: none !important;
    transition: filter 0.15s ease-out;
}

.dragging-white {
    filter: drop-shadow(0 0 15px rgba(0, 200, 255, 0.8)) !important;
}

.dragging-black {
    filter: drop-shadow(0 0 15px rgba(255, 0, 212, 0.8)) !important;
}

/* ════════════════════════════════════════════════════════════════
   AURA CHESS GLOBAL PREMIUM BOARD THEME (VISUALS ONLY)
   ════════════════════════════════════════════════════════════════ */
.aura-board-premium-theme {
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 229, 255, 0.03),
        0 0 20px rgba(204, 0, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.aura-board-premium-theme .cm-chessboard .marker.frame .marker-frame {
    stroke: #00E5FF !important;
    stroke-width: 3px !important;
    opacity: 0.8 !important;
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
}

.aura-board-premium-theme .cm-chessboard .marker.framePrimary .marker-frame {
    stroke: #00E5FF !important;
    stroke-width: 3px !important;
    opacity: 0.6 !important;
}

.aura-board-premium-theme .cm-chessboard .marker.square .marker-square {
    fill: rgba(0, 229, 255, 0.15) !important;
}

.aura-board-premium-theme .cm-chessboard .coordinates .coordinate {
    font-weight: 700 !important;
    opacity: 0.85 !important;
}

.aura-board-premium-theme .onboard-move-icon {
    transition: all 0.3s ease;
    animation: iconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aura-board-premium-theme .onboard-move-icon.quality-sigma { filter: drop-shadow(0 0 8px #CC00FF); }
.aura-board-premium-theme .onboard-move-icon.quality-brilliant { filter: drop-shadow(0 0 8px #00E5FF); }
.aura-board-premium-theme .onboard-move-icon.quality-great { filter: drop-shadow(0 0 6px rgba(59,130,246,0.8)); }
.aura-board-premium-theme .onboard-move-icon.quality-best { filter: drop-shadow(0 0 6px rgba(92,184,92,0.8)); }
.aura-board-premium-theme .onboard-move-icon.quality-good { filter: drop-shadow(0 0 4px rgba(255,255,255,0.4)); }
.aura-board-premium-theme .onboard-move-icon.quality-book { filter: drop-shadow(0 0 6px rgba(217,119,6,0.8)); }
.aura-board-premium-theme .onboard-move-icon.quality-inaccuracy { filter: drop-shadow(0 0 6px rgba(250,204,21,0.8)); }
.aura-board-premium-theme .onboard-move-icon.quality-mistake { filter: drop-shadow(0 0 6px rgba(249,115,22,0.8)); }
.aura-board-premium-theme .onboard-move-icon.quality-blunder { filter: drop-shadow(0 0 8px #ef4444); }

/* Force Eval Bar Visibility and Dimensions (Arena/Learn Pages) */
.eval-bar-container {
    width: 30px !important;
    min-width: 30px !important;
    min-height: 400px;
    background-color: #2a2a35;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-right: 12px;
    display: none; /* Handled by JS */
    flex-direction: column-reverse;
}
.eval-bar-fill {
    width: 100%;
    background-color: #fff;
    transition: height 0.3s ease;
}
.eval-bar-score {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 5;
    color: #fff !important;
    text-shadow: 1px 1px 1px #000, -1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000, 0 0 5px rgba(0,0,0,0.8) !important;
    pointer-events: none;
}

/* --- Shared Toast Notification --- */
.smart-toast, .aura-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(18, 24, 33, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.smart-toast.show, .aura-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

