@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-hover: #4f46e5;
    --secondary: #a855f7;
    --secondary-light: #c084fc;
    --dark-bg: #030712;
    --dark-surface: #111827;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --radius: 16px;
    --radius-lg: 24px;
    --accent-glow: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);

    /* Animation Delays */
    --delay-1: 0.1s;
    --delay-2: 0.2s;
    --delay-3: 0.3s;
    --delay-4: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Sections */
.hero-section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    opacity: 0.6;
}

.section {
    padding: 3rem 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Navbar - Floating Pill */
.navbar {
    position: sticky;
    top: 1rem;
    z-index: 1000;
    margin: 0 1rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    isolation: isolate;
}

.nav-container::after {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: -1;
    border-radius: inherit;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Navigation Pills */
.nav-pill,
.lang-pill {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

.nav-pill-item,
.lang-item {
    padding: 0.4rem 1rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.nav-pill-item:hover,
.lang-item:hover {
    color: white;
}

.nav-pill-item.active,
.lang-item.active {
    background: white;
    color: var(--dark-bg);
}

/* User Avatar & Dropdown */
.user-wrapper {
    position: relative;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--dark-bg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 280px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(50px) saturate(210%);
    -webkit-backdrop-filter: blur(50px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: none;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.user-dropdown.active {
    display: flex;
}

.dropdown-user-info {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.dropdown-name {
    display: block;
    font-weight: 700;
    color: white;
}

.dropdown-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dropdown-item.danger {
    color: #fca5a5;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Notifications */
.notification-area {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.notification-header {
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 0.75rem;
}

.notification-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.btn-clear {
    font-size: 0.65rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
}

.notification-item {
    display: block;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.notification-item.admin {
    border-left: 3px solid var(--secondary);
}

.notification-item:not(.admin) {
    border-left: 3px solid var(--primary);
}

.notification-text {
    font-size: 0.85rem;
    color: white;
    display: block;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 800;
}

.notification-time {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* --- Premium Aesthetic Utilities --- */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--primary-light, #818cf8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-glow-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--accent-glow);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.hero-section {
    position: relative;
    padding: 8rem 1rem;
    overflow: hidden;
}

/* --- Premium Animations --- */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-reveal {
    animation: revealUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.animate-fade {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: var(--delay-1);
}

.delay-2 {
    animation-delay: var(--delay-2);
}

.delay-3 {
    animation-delay: var(--delay-3);
}

.delay-4 {
    animation-delay: var(--delay-4);
}

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* Logged Out Actions */
.logged-out-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-link {
    font-weight: 600;
    color: white;
}

.btn-nav-primary {
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: white;
    border-radius: 100px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn-nav-primary:hover {
    background: white;
    color: var(--dark-bg);
    border-color: white;
    transform: scale(1.05);
}

/* Base Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 8px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Cards */
.card {
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-hover-pill:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    gap: 0.6rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect */
.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn:hover::after {
    left: 120%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: white;
    color: var(--dark-bg);
    border-color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 24px -6px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: white;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: white;
    color: var(--dark-bg);
    border-color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 24px -6px rgba(255, 255, 255, 0.3);
}

.btn-block {
    width: 100%;
}

/* System Alerts */
.system-alerts-container {
    margin-bottom: 2rem;
}

.alert-glass {
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(35px) saturate(190%);
    -webkit-backdrop-filter: blur(35px) saturate(190%);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: revealUp 0.5s ease-out;
    margin-bottom: 1rem;
}

.alert-glass.success {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 8px 16px -4px rgba(34, 197, 94, 0.1);
}

.alert-glass.error {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.1);
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-message {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Mobile Utilities */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .hero-section {
        padding: 5rem 1rem;
    }

    .hero-section h1 {
        font-size: 2.8rem !important;
    }

    .grid {
        gap: 1.25rem;
    }

    .user-dropdown {
        position: fixed;
        top: 4.5rem;
        left: 1rem;
        right: 1rem;
        width: auto;
        transform-origin: top center;
    }

    .nav-logo {
        display: flex;
        align-items: center;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .dropdown-user-info-full {
        padding: 1rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: var(--radius);
        margin-bottom: 0.5rem;
    }

    .user-avatar-large {
        width: 50px;
        height: 50px;
        background: var(--primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        font-weight: 700;
        color: white;
    }

    .user-meta {
        display: flex;
        flex-direction: column;
    }

    .user-name {
        font-weight: 700;
        color: white;
    }

    .user-role {
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    .lang-dropdown-section {
        padding: 0.75rem 1rem;
    }

    .section-label {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 0.5rem;
        display: block;
    }

    .lang-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .lang-btn {
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius);
        text-align: center;
        color: white;
        font-weight: 600;
        border: 1px solid var(--glass-border);
    }

    .lang-btn.active {
        background: var(--primary);
    }
}

/* Custom Select */
.custom-select {
    position: relative;
    min-width: 160px;
}

.select-trigger {
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-trigger:after {
    content: '▼';
    font-size: 0.6rem;
    color: var(--text-muted);
}

.select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--dark-surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: none;
    z-index: 100;
}

.custom-select.open .select-options {
    display: block;
}

.option-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-muted);
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.option-item.selected {
    background: var(--primary);
    color: white;
}

/* Course Player Layout */
.course-player-layout {
    display: flex;
    min-height: 100vh;
}

.player-main {
    flex: 1;
    padding: 3rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* --- Mobile Components (Consolidated) --- */

/* iOS-Style Layout Components */
.ios-section {
    margin-bottom: 0.5rem;
}

.ios-section-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 0.75rem 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ios-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ios-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: white;
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
}

.ios-list-item.bordered {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ios-list-item:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Refinements */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem;
    animation: slideDown 0.3s ease-out;
}

.navbar.expanded .mobile-menu {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cinema Mode (Expanded Player) */
.cinema-mode .player-sidebar {
    display: none;
}

.cinema-mode .player-main {
    max-width: 1100px;
}

.action-hub {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .action-hub {
        gap: 0.5rem;
    }

    .action-hub .btn {
        padding: 0.75rem 1rem;
        font-size: 0.7rem;
        letter-spacing: 0.05em;
    }
}

.player-sidebar {
    width: 320px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    margin: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.sidebar-content {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.sidebar-header {
    padding: 1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-lesson {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.sidebar-lesson:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-lesson.active {
    background: var(--primary);
    color: white;
}

/* Mobile Player Toggle */
.mobile-player-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    z-index: 900;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .player-sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 75vh;
        margin: 0;
        background: rgba(30, 41, 59, 0.65);
        backdrop-filter: blur(30px) saturate(180%) brightness(1.1);
        -webkit-backdrop-filter: blur(30px) saturate(180%) brightness(1.1);
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 30px 30px 0 0;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        z-index: 1000;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    }

    .player-sidebar.open {
        transform: translateY(0);
    }

    .sidebar-header {
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .sidebar-header::before {
        content: '';
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 100px;
        margin-bottom: 0.5rem;
    }

    .sidebar-header span {
        font-size: 1.1rem;
        font-weight: 800;
        color: white;
    }

    .sidebar-content {
        padding: 1.5rem;
        padding-bottom: 5rem;
    }

    .mobile-player-toggle {
        display: flex;
        bottom: 2rem;
        transition: transform 0.3s, opacity 0.3s;
    }

    .mobile-player-toggle.hidden {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
}

/* Syllabus */
.syllabus-unit {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.unit-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unit-title-text {
    font-weight: 700;
    color: white;
}

.lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.lesson-title-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Lightbox / Fullscreen Image (V3 - Absolute Isolation) */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 99999;
    /* Absolute top */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-overlay.active {
    display: flex;
    animation: fadeInOverlay 0.3s forwards;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Device Max Width Constraint */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: scale(0.5) translateY(50px);
    opacity: 0;
}

.lightbox-overlay.active .lightbox-content {
    animation: popUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popUp {
    from {
        transform: scale(0.5) translateY(50px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.lightbox-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: contain;
}

.lightbox-close {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.lightbox-close:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.instruction-box:hover .hover-lift {
    transform: translateY(-5px);
}

.instruction-hint {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.instruction-box:hover .instruction-hint {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Footer */
footer {
    position: relative;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 3rem;
    overflow: hidden;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.03));
}

#footer-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}