/* ========== CSS Variables & Reset ========== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;600;700;800&display=swap');
:root {
    /* Dark futuristic palette */
    --bg-1: #080D18;
    /* page background */
    --bg-2: #0B1020;
    /* secondary */
    --bg-3: #111827;
    /* depth */
    --dark: #0B1224;
    --dark-2: #111B33;
    --dark-3: #0D1528;
    --primary: #2563EB;
    /* blue */
    --primary-2: #3B82F6;
    --secondary: #60A5FA;
    --accent: #00D9FF;
    /* cyan */
    --accent-2: #00E5FF;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray: #94A3B8;
    --gray-light: #CBD5E1;
    --muted: #94A3B8;
    --white: #FFFFFF;
    --light: #F8FAFC;
    --soft-white: #E5E7EB;
    --gradient: linear-gradient(135deg, #2563EB 0%, #00D9FF 100%);
    --gradient-hover: linear-gradient(135deg, #4F46E5 0%, #22D3EE 100%);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
    --shadow-soft: 0 8px 30px rgba(2, 6, 23, 0.6);
    --neon-shadow: 0 8px 40px rgba(0, 217, 255, 0.08);
    --glow: 0 6px 30px rgba(36, 153, 255, 0.12);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 22px;
    --transition: all 0.28s cubic-bezier(.2, .9, .2, 1);
    --font-sans: 'Tajawal', 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font: var(--font-sans);
    --mono: 'SFMono-Regular', Consolas, 'Courier New', monospace;
}


/* ========== Global Styles ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: var(--font-sans);
    background: radial-gradient(1200px 600px at 10% 10%, rgba(37, 99, 235, 0.03), transparent), var(--bg-1);
    color: var(--soft-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ========== Buttons ========== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
    background: var(--gradient-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #E0001B;
    transform: translateY(-3px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}


/* ========== Navbar ========== */

.navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand i {
    color: var(--secondary);
    -webkit-text-fill-color: var(--secondary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: rgba(229, 231, 235, 0.88);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--secondary);
}

.nav-toggle {
    display: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}


/* ========== Hero Section ========== */

.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 50%, var(--dark-3) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(108, 99, 255, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(0, 210, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 50% 80%, rgba(255, 101, 132, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}


/* ========== 3D Room Layout (New) ========== */

.room {
    min-height: calc(100vh - 80px);
    padding-top: 80px;
    display: grid;
    grid-template-columns: 260px 1fr 360px;
    gap: 32px;
    align-items: start;
    position: relative;
}

.left-shelf {
    position: relative;
    padding: 30px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.shelf-title {
    font-weight: 700;
    color: var(--soft-white);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    margin-bottom: 6px;
}

.nav-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-panel a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45);
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.nav-panel a .icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    color: var(--accent);
}

.nav-panel a:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 18px 40px rgba(0, 217, 255, 0.08);
    filter: saturate(1.05);
}

.nav-panel a.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(0, 217, 255, 0.06));
    border-left: 4px solid var(--primary);
}

.center-hub {
    padding: 40px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.005));
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-badge {
    width: 220px;
    height: 220px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(0, 217, 255, 0.03));
    box-shadow: 0 18px 60px rgba(3, 7, 18, 0.6), 0 0 30px rgba(59, 130, 246, 0.05) inset;
    margin-bottom: 20px;
}

.brand-badge img.logo {
    max-width: 160px;
    height: auto;
}

.hub-title {
    font-size: 42px;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 8px;
}

.hub-subtitle {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 20px;
    font-size: 18px;
}

.hub-cta {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.workstation {
    width: 100%;
    max-width: 840px;
    height: 320px;
    margin-top: 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.02);
    box-shadow: 0 40px 90px rgba(2, 6, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.right-shelves {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.shelf-card {
    padding: 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.005));
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.02);
    display: flex;
    gap: 12px;
    align-items: center;
}

.shelf-card .thumb {
    width: 84px;
    height: 64px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(0, 217, 255, 0.06));
}

.shelf-card h4 {
    color: var(--white);
    margin: 0;
}

.shelf-card p {
    color: rgba(229, 231, 235, 0.78);
    margin: 0;
    font-size: 13px;
}


/* Responsive: collapse to single column on small screens */

@media (max-width: 992px) {
    .room {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    .left-shelf {
        order: 2;
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
        gap: 10px;
    }
    .nav-panel {
        flex-direction: row;
    }
    .center-hub {
        order: 1;
    }
    .right-shelves {
        order: 3;
        flex-direction: column;
    }
    .workstation {
        height: 220px;
    }
}

@media (max-width: 520px) {
    .hub-title {
        font-size: 28px;
    }
    .brand-badge {
        width: 160px;
        height: 160px;
    }
    .workstation {
        height: 180px;
    }
}


/* small utilities for neon text */

.neon {
    text-shadow: 0 2px 8px rgba(0, 213, 255, 0.06);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--secondary);
    display: block;
}

.stat-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}


/* ========== Features Section ========== */

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    color: #64748B;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.8;
}


/* ========== Courses Section ========== */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.course-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--white);
    position: relative;
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--white);
    padding: 5px 15px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.course-body {
    padding: 25px;
}

.course-category {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.course-body h3 {
    font-size: 20px;
    margin: 10px 0;
    color: var(--dark);
}

.course-body p {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-instructor img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gradient);
}

.course-instructor span {
    font-size: 14px;
    color: #475569;
}

.course-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.course-price.free {
    color: var(--success);
}


/* ========== Auth Pages ========== */

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark), var(--dark-3));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header .logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.auth-header h2 {
    font-size: 28px;
    color: var(--dark);
}

.auth-header p {
    color: #475569;
    margin-top: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.form-group .input-group {
    position: relative;
}

.form-group .input-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.form-control {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
    font-family: var(--font);
    color: var(--dark);
    background: #F8FAFC;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.14);
}

.form-control::placeholder {
    color: rgba(15, 23, 42, 0.55);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--gray);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* ========== Dashboard ========== */

.dashboard {
    min-height: 100vh;
    background: var(--light);
    padding-top: 80px;
}

.dashboard-header {
    background: var(--white);
    padding: 30px 0;
    box-shadow: var(--shadow);
}

.dashboard-header h1 {
    font-size: 32px;
    color: var(--dark);
}

.dashboard-header p {
    color: var(--gray);
    margin-top: 5px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card .stat-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.stat-card .stat-icon.blue {
    background: var(--gradient);
}

.stat-card .stat-icon.green {
    background: linear-gradient(135deg, var(--success), #00E676);
}

.stat-card .stat-icon.orange {
    background: linear-gradient(135deg, var(--warning), #FFAB00);
}

.stat-card .stat-icon.red {
    background: linear-gradient(135deg, var(--accent), #FF8A80);
}

.stat-card .stat-info h3 {
    font-size: 28px;
    color: var(--dark);
}

.stat-card .stat-info p {
    color: var(--gray);
    font-size: 14px;
}


/* ========== Video Section ========== */

.video-section {
    padding: 40px 0;
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.video-box {
    background: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.video-box .video-label {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 5px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.video-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.video-controls .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    font-size: 20px;
}

.video-controls .btn.end-call {
    background: var(--danger);
    color: var(--white);
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.chat-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
}

.chat-message {
    margin-bottom: 15px;
}

.chat-message .msg-user {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.chat-message .msg-text {
    background: var(--gray-light);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    margin-top: 5px;
    font-size: 14px;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--gray-light);
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.chat-input input:focus {
    border-color: var(--primary);
    outline: none;
}


/* ========== Footer ========== */

.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient);
}

.footer-col p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.78);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.68);
}


/* ========== Alert Messages ========== */

.alert {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid #90CAF9;
}


/* ========== Modal ========== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 22px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #475569;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}


/* ========== Responsive ========== */

@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 36px;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .video-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark);
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        box-shadow: var(--shadow);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-toggle {
        display: block;
    }
    .auth-container {
        padding: 30px;
    }
    .section-title h2 {
        font-size: 28px;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 28px;
    }
}


/* ========== Loading Spinner ========== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* ========== Room List ========== */

.room-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.room-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.room-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark);
}

.room-card .room-meta {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 15px;
}

.room-card .room-meta i {
    margin-left: 5px;
}


/* ========== Progress Bar ========== */

.progress-bar {
    height: 8px;
    background: var(--gray-light);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    transition: width 0.5s ease;
}


/* ========== Code Editor ========== */

.code-editor {
    background: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 20px 0;
}

.code-editor .editor-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-editor .editor-header span {
    color: var(--white);
    font-size: 13px;
}

.code-editor pre {
    padding: 20px;
    color: var(--white);
    font-size: 14px;
    line-height: 1.8;
    overflow-x: auto;
}


/* ========== Code Editor Page (Monaco) ========== */

.editor-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #1e1e1e;
    padding-top: 0;
    overflow: hidden;
}

.editor-navbar {
    background: #252526;
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 48px;
    min-height: 48px;
    border-bottom: 1px solid #3c3c3c;
    z-index: 100;
    direction: ltr;
}

.editor-navbar .editor-brand {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    text-decoration: none;
}

.editor-navbar .editor-brand i {
    color: #6C63FF;
}

.editor-navbar .nav-separator {
    width: 1px;
    height: 24px;
    background: #3c3c3c;
    margin: 0 10px;
}

.editor-navbar .nav-item {
    color: #cccccc;
    font-size: 13px;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    text-decoration: none;
}

.editor-navbar .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.editor-navbar .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.editor-toolbar {
    background: #252526;
    display: flex;
    align-items: center;
    padding: 6px 15px;
    gap: 10px;
    border-bottom: 1px solid #3c3c3c;
    flex-wrap: wrap;
    direction: ltr;
}

.editor-toolbar .toolbar-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.editor-toolbar .tool-btn {
    background: transparent;
    border: none;
    color: #cccccc;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.editor-toolbar .tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.editor-toolbar .tool-btn.primary {
    background: #6C63FF;
    color: #fff;
}

.editor-toolbar .tool-btn.primary:hover {
    background: #5A52D5;
}

.editor-toolbar .tool-btn.success {
    background: #00C853;
    color: #fff;
}

.editor-toolbar .tool-btn.success:hover {
    background: #00A844;
}

.editor-toolbar .tool-btn.danger {
    background: #FF1744;
    color: #fff;
}

.editor-toolbar .tool-btn.danger:hover {
    background: #D50000;
}

.editor-toolbar .lang-select {
    background: #3c3c3c;
    color: #fff;
    border: 1px solid #555;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.editor-toolbar .lang-select:focus {
    border-color: #6C63FF;
}

.editor-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.editor-sidebar {
    width: 220px;
    min-width: 220px;
    background: #252526;
    border-right: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-sidebar-header {
    padding: 10px 15px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-sidebar-header button {
    background: transparent;
    border: none;
    color: #cccccc;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 5px;
    border-radius: 3px;
}

.editor-sidebar-header button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.editor-file-list {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
}

.editor-file-item {
    padding: 6px 15px;
    color: #cccccc;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.editor-file-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.editor-file-item.active {
    background: #37373d;
    color: #fff;
}

.editor-file-item .file-icon {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.editor-file-item .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-file-item .file-close {
    opacity: 0;
    font-size: 12px;
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
}

.editor-file-item:hover .file-close {
    opacity: 1;
}

.editor-file-item .file-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-tabs {
    display: flex;
    background: #252526;
    border-bottom: 1px solid #3c3c3c;
    overflow-x: auto;
    direction: ltr;
}

.editor-tab {
    padding: 8px 15px;
    color: #969696;
    font-size: 13px;
    cursor: pointer;
    border-right: 1px solid #3c3c3c;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s;
    min-width: 0;
}

.editor-tab.active {
    background: #1e1e1e;
    color: #fff;
    border-bottom: 2px solid #6C63FF;
}

.editor-tab .tab-close {
    font-size: 12px;
    padding: 2px;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
}

.editor-tab:hover .tab-close {
    opacity: 0.6;
}

.editor-tab .tab-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.editor-monaco-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

#monaco-editor {
    width: 100%;
    height: 100%;
}

.editor-output {
    background: #1e1e1e;
    border-top: 1px solid #3c3c3c;
    max-height: 40%;
    display: flex;
    flex-direction: column;
}

.editor-output.collapsed {
    display: none;
}

.editor-output-header {
    background: #252526;
    padding: 6px 15px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    direction: ltr;
}

.editor-output-header button {
    background: transparent;
    border: none;
    color: #cccccc;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 5px;
}

.editor-output-header button:hover {
    color: #fff;
}

.editor-output-content {
    padding: 10px 15px;
    color: #d4d4d4;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.5;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    max-height: 200px;
}

.editor-output-content .error {
    color: #f44747;
}

.editor-output-content .success {
    color: #6a9955;
}

.editor-output-content .warn {
    color: #cca700;
}

.editor-output-content .info {
    color: #569cd6;
}

.editor-output-content .timestamp {
    color: #808080;
    margin-left: 8px;
}


/* Tabs bar at bottom for output */

.editor-panel-tabs {
    display: flex;
    background: #252526;
    border-top: 1px solid #3c3c3c;
    direction: ltr;
}

.editor-panel-tab {
    padding: 6px 15px;
    color: #969696;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    border-right: 1px solid #3c3c3c;
    transition: all 0.2s;
}

.editor-panel-tab.active {
    background: #1e1e1e;
    color: #fff;
}

.editor-panel-tab .badge {
    background: #4d4d4d;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
}


/* Iframe for preview */

.editor-preview {
    flex: 1;
    background: #fff;
    border: none;
}

.editor-statusbar {
    background: #007acc;
    color: #fff;
    font-size: 12px;
    padding: 3px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: ltr;
}

.editor-statusbar span {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* New file modal */

.editor-new-file-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.editor-new-file-modal.active {
    display: flex;
}

.editor-new-file-modal .modal-box {
    background: #252526;
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.editor-new-file-modal .modal-box h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.editor-new-file-modal .modal-box label {
    color: #cccccc;
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
}

.editor-new-file-modal .modal-box input,
.editor-new-file-modal .modal-box select {
    width: 100%;
    padding: 8px 12px;
    background: #3c3c3c;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    outline: none;
    box-sizing: border-box;
}

.editor-new-file-modal .modal-box input:focus,
.editor-new-file-modal .modal-box select:focus {
    border-color: #6C63FF;
}

.editor-new-file-modal .modal-box .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.editor-new-file-modal .modal-box .modal-actions button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.editor-new-file-modal .modal-box .modal-actions .btn-cancel {
    background: #3c3c3c;
    color: #ccc;
}

.editor-new-file-modal .modal-box .modal-actions .btn-cancel:hover {
    background: #555;
}

.editor-new-file-modal .modal-box .modal-actions .btn-create {
    background: #6C63FF;
    color: #fff;
}

.editor-new-file-modal .modal-box .modal-actions .btn-create:hover {
    background: #5A52D5;
}


/* Responsive editor */

@media (max-width: 768px) {
    .editor-sidebar {
        display: none;
    }
    .editor-toolbar {
        gap: 5px;
    }
    .editor-toolbar .tool-btn span {
        display: none;
    }
}


/* ========== Empty State ========== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray);
}