/* Global Variables & Scientific Theme */
:root {
    --bg-primary: #0b0f17;
    --bg-sidebar: #131b2e;
    --bg-card: #1e293b;
    --border-color: #2e3d56;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --brand-blue: #3b82f6;
    --brand-blue-hover: #2563eb;
    --brand-red: #ef4444;
    --brand-red-hover: #dc2626;
    --brand-gray: #475569;
    --brand-gray-hover: #334155;
    
    --element-h: #60a5fa;
    --element-o: #f87171;
    --element-c: #94a3b8;
    --element-n: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Dashboard Container Layout */
.dashboard-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Sidebar Layout */
.sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.sidebar-header .logo-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.badge {
    align-self: flex-start;
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--brand-blue);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-btn {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 14px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-btn.active {
    background-color: var(--brand-blue);
    color: white;
    font-weight: 600;
}

/* Info Section (Atoms details) */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-section h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.element-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.element-card .atomic-num {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.element-card .symbol {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 4px;
}

.element-card .name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Color accents for elements */
.h-card .symbol { color: var(--element-h); }
.o-card .symbol { color: var(--element-o); }
.c-card .symbol { color: var(--element-c); }
.n-card .symbol { color: var(--element-n); }

/* Gesture Guide */
.gesture-guide {
    margin-top: auto;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.gesture-guide h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.gesture-guide ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gesture-guide li {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.gesture-guide strong {
    color: var(--text-primary);
}

/* Main Workspace Panel */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* App Header */
.app-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.status-dot.green {
    background-color: #10b981;
}

.chemical-success {
    display: none;
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Workspace Frame & Canvas Overlay */
.workspace {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #080c12;
    padding: 32px;
    position: relative;
}

.view-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 4 / 3;
    height: auto;
    background-color: #000;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

#webcam {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror camera stream */
}

#outputCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
}

/* Floating QWERTY Virtual Keyboard Styling */
.virtual-keyboard {
    position: absolute;
    bottom: -450px; /* Slide down completely initially */
    left: 50%;
    transform: translateX(-50%);
    width: 480px; /* Wider full keyboard size */
    background: rgba(19, 27, 46, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.virtual-keyboard.active {
    bottom: 15px; /* Slide up nicely overlaying bottom of blackboard container */
}

.kb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

#close-kb-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

.kb-input-area input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 1.15rem;
    text-align: center;
    font-weight: 700;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.invalid-shake {
    animation: shake 0.4s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: none !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.kb-rows-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kb-row {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.kb-key {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    height: 38px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 1;
}

/* Hands-free Virtual Keyboard Hover/Press Effects */
.kb-key.kb-hovered {
    background: rgba(59, 130, 246, 0.4) !important;
    border-color: var(--brand-blue) !important;
    transform: scale(1.08);
}

.kb-key.kb-pressed {
    background: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    transform: scale(0.92);
}

.kb-key.btn-action {
    background: #334155;
    font-size: 0.85rem;
}
.kb-key.btn-action:hover {
    background: #475569;
}

.kb-key.btn-danger {
    background: var(--brand-red);
    border-color: var(--brand-red);
    font-size: 0.85rem;
}
.kb-key.btn-danger:hover {
    background: var(--brand-red-hover);
}

/* Hands-free General Button Hover/Press Effects */
.nui-hovered {
    border-color: var(--brand-blue) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    transform: scale(1.06);
    transition: all 0.15s ease !important;
}

.nui-pressed {
    transform: scale(0.94) !important;
    box-shadow: none !important;
    transition: all 0.05s ease !important;
}

/* Control Panel */
.control-panel {
    height: 90px;
    border-top: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-sidebar);
}

.panel-left, .panel-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s ease;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-blue-hover);
}

.btn-danger {
    background-color: var(--brand-red);
    color: white;
}

.btn-danger:hover {
    background-color: var(--brand-red-hover);
}

.btn-secondary {
    background-color: var(--brand-gray);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--brand-gray-hover);
}

/* Minimalist Icon-only Buttons */
.btn-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    padding: 0;
    border-radius: 8px;
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--brand-blue);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Fullscreen Mode Styling Override */
.view-container:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    border-radius: 0 !important;
}

.view-container:fullscreen #webcam,
.view-container:fullscreen #outputCanvas {
    width: 100vw !important;
    height: 100vh !important;
}

/* Webkit specific fallback for full coverage */
.view-container:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
}
.view-container:-webkit-full-screen #webcam,
.view-container:-webkit-full-screen #outputCanvas {
    width: 100vw !important;
    height: 100vh !important;
}

/* Floating High-Index Glowing NUI Cursor overlay styling */
#nui-cursor {
    position: absolute;
    width: 16px;
    height: 16px;
    background: rgba(59, 130, 246, 0.7); /* translucent brand blue */
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100; /* stays above the virtual keyboard! */
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease, width 0.15s ease, height 0.15s ease;
}

/* Cursor state: Closed Fist ✊ (grabbing/dragging) */
#nui-cursor.fist {
    width: 11px;
    height: 11px;
    background: rgba(239, 68, 68, 0.9) !important;
    border-color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

/* Cursor state: Pinching 👌 (clicking/typing) */
#nui-cursor.pinch {
    width: 12px;
    height: 12px;
    background: rgba(16, 185, 129, 0.9) !important;
    border-color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

/* ==========================================================================
   ✨ PREMIUM LANDING & PROMO PAGE STYLING (AI VIRTUAL LAB)
   ========================================================================== */



/* Glassmorphic Sticky Header */
.landing-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 80px;
    background: rgba(11, 15, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.landing-logo .logo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.landing-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.landing-nav a:hover {
    color: var(--text-primary);
}

.btn-launch-header {
    background: var(--brand-blue);
    color: white !important;
    padding: 8px 20px;
    border-radius: 999px;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease !important;
}

.btn-launch-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 60px 5%;
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 580px;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--brand-blue);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-title span.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #c084fc, #60a5fa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
    to { background-position: 200% center; }
}

.hero-desc {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

/* Naming Explanation Block */
.naming-explanation-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-right: 3px solid #60a5fa;
    border-left: none;
    padding: 14px 18px;
    border-radius: 4px 12px 12px 4px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.naming-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.naming-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.naming-text strong {
    color: #60a5fa;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--brand-blue);
    color: white;
    padding: 16px 36px;
    border-radius: 14px;
    font-size: 1.18rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-hero-primary:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.btn-hero-primary:active {
    transform: translateY(-2px) scale(1.0);
}

/* Shiny white reflection sweep animation */
.btn-hero-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: all 0.75s ease;
    animation: shineSweep 4s infinite ease-in-out;
}

@keyframes shineSweep {
    0% { left: -60%; }
    20%, 100% { left: 140%; }
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Gorgeous CSS Interactive Laptop Mockup */
.hero-media {
    flex: 1.2;
    min-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    gap: 20px;
}

.laptop-mockup {
    position: relative;
    width: 1150px; /* Massive size for absolute clarity */
    max-width: 100%;
    perspective: 1000px;
    animation: floatLaptop 6s ease-in-out infinite alternate;
}

@keyframes floatLaptop {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-15px); }
}

.laptop-screen {
    background: #1e293b;
    border: 12px solid #0f172a;
    border-radius: 20px 20px 0 0;
    aspect-ratio: 16/10;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.laptop-workspace {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #080c12;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Mock App Layout inside Laptop Mockup */
.mock-app-body {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    direction: rtl; /* Force RTL direction inside mock laptop */
}

.mock-sidebar {
    width: 180px;
    background-color: #0b0f17;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    gap: 10px;
    flex-shrink: 0;
}

.mock-sidebar-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mock-menu-item {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: 6px;
    text-align: right;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer; /* Make mock menu item clickable */
}

.mock-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.mock-menu-item.active {
    background-color: var(--brand-blue);
    color: white;
    font-weight: 700;
}

.mock-sidebar-footer {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
    margin-top: auto;
}

.mock-ui-header {
    height: 25px;
    background: #0b0f17;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.mock-dots {
    display: flex;
    gap: 4px;
}
.mock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.mock-dot.r { background: #ef4444; }
.mock-dot.y { background: #fbbf24; }
.mock-dot.g { background: #10b981; }

.mock-title {
    font-size: 0.6rem;
    color: var(--text-secondary);
}

.mock-canvas-area {
    flex: 1;
    position: relative;
    background: radial-gradient(circle at center, #0e1726 0%, #05080f 100%);
    overflow: hidden;
}

/* Floating Atoms inside Laptop Display Mockup */
.mock-atom {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: floatAtom 6s ease-in-out infinite alternate;
}

.mock-atom.h1 {
    background: var(--element-h);
    color: #0b0f17;
    top: 25%;
    left: 20%;
    animation-delay: 0s;
}

.mock-atom.h2 {
    background: var(--element-h);
    color: #0b0f17;
    top: 65%;
    left: 15%;
    animation-delay: 1.5s;
}

.mock-atom.o {
    background: var(--element-o);
    top: 40%;
    right: 20%;
    animation-delay: 0.8s;
}

/* Moving Hand drawing a floating glowing molecule */
.mock-drawing-hand {
    position: absolute;
    width: 24px;
    height: 24px;
    background: rgba(59, 130, 246, 0.85);
    border: 2px solid white;
    border-radius: 50%;
    z-index: 100;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    animation: drawCircle 8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* Drawing trail line in CSS */
.mock-drawing-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border: 3px dashed rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    animation: rotateDashed 20s infinite linear;
}

.mock-molecule-glowing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(30, 41, 59, 0.8);
    border: 1.5px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: pulseGlow 2.5s ease-in-out infinite alternate;
}

.mock-molecule-glowing::after {
    content: 'H₂O';
    font-size: 0.9rem;
    font-weight: 800;
    color: #60a5fa;
}

.laptop-base {
    background: #e2e8f0;
    height: 12px;
    border-radius: 0 0 16px 16px;
    width: 108%;
    margin-left: -4%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    position: relative;
}

.laptop-base::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 5px;
    background: #94a3b8;
    border-radius: 0 0 4px 4px;
}

/* Laptop Animations */
@keyframes floatAtom {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-10px) translateX(5px) rotate(3deg); }
    100% { transform: translateY(-20px) translateX(-5px) rotate(-3deg); }
}

@keyframes drawCircle {
    0% { top: 15%; left: 50%; }
    12.5% { top: 25.2%; left: 74.7%; }
    25% { top: 50%; left: 85%; }
    37.5% { top: 74.7%; left: 74.7%; }
    50% { top: 85%; left: 50%; }
    62.5% { top: 74.7%; left: 25.2%; }
    75% { top: 50%; left: 15%; }
    87.5% { top: 25.2%; left: 25.2%; }
    100% { top: 15%; left: 50%; }
}

@keyframes rotateDashed {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.97); }
    100% { transform: translate(-50%, -50%) scale(1.03); }
}

/* Showcase Examples Section */
.showcase-section {
    padding: 100px 8%;
    background-color: #0b0f17;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-subtitle {
    color: var(--brand-blue);
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    display: inline-block;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(170px, auto);
    gap: 20px;
}

.bento-span-2 { grid-column: span 2; }
.bento-span-1 { grid-column: span 1; }

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
    border-color: #475569;
}

.card-content-wrapper {
    position: relative;
    z-index: 2;
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: inline-block;
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bento-item:hover .card-icon { transform: scale(1.05); }

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative; z-index: 2;
}

.card-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    position: relative; z-index: 2;
}

/* Scroll Reveal Classes (Smooth Animation) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Testimonials Section */
.testimonials-section {
    padding: 100px 0;
    background: radial-gradient(circle at bottom, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    position: relative;
    overflow: hidden;
}

.testimonials-slider-container {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
    position: relative;
    direction: ltr; /* slider flows LTR for translation scrolling */
}

/* Fade overlays at the edges for a premium smooth look */
.testimonials-slider-container::before,
.testimonials-slider-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.testimonials-slider-container::before {
    left: 0;
    background: linear-gradient(to right, #07090e, transparent);
}

.testimonials-slider-container::after {
    right: 0;
    background: linear-gradient(to left, #07090e, transparent);
}

.testimonials-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scrollTestimonials 40s linear infinite;
}

/* Pause on hover so users can easily read cards */
.testimonials-slider-container:hover .testimonials-track {
    animation-play-state: paused;
}

@keyframes scrollTestimonials {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    direction: rtl; /* keep card content in Arabic RTL */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: #475569;
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

@media (max-width: 480px) {
    .testimonial-card {
        width: 290px;
        padding: 20px;
    }
}

.quote-text {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 24px;
    position: relative;
}

.quote-text::before {
    content: '“';
    font-size: 4rem;
    color: rgba(59, 130, 246, 0.15);
    position: absolute;
    top: -30px;
    right: -15px;
    font-family: serif;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.user-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-details span {
    font-size: 0.8rem;
    color: var(--brand-blue);
    font-weight: 600;
}

/* App Wrapper Section */
.app-section-wrapper {
    position: relative;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
}



.app-divider-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 8px 24px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 10;
}

/* Responsive Scaling for Mobiles */
@media (max-width: 968px) {
    .hero-section {
        flex-direction: column;
        padding-top: 40px;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .laptop-mockup {
        width: 100%;
        max-width: 400px;
    }
    
    .landing-nav {
        display: none; /* Hide top nav links on mobile for simplicity */
    }

    .bento-span-2, .bento-span-1 {
        grid-column: span 1;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .dashboard-container {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }

    .workspace {
        padding: 16px;
        min-height: 500px;
    }

    .virtual-keyboard {
        width: 95%;
        max-width: 480px;
    }
}



/* Physics Tool Selector Buttons */
.physics-tool-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.physics-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.physics-tool-btn.active {
    background: #3b82f6; /* beautiful active blue for barrier */
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#physics-tool-ball.active {
    background: #8b5cf6; /* gorgeous purple accent for ball selector */
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Guide / Instructions Section */
.guide-section {
    padding: 100px 8%;
    background-color: #0b0f17;
    position: relative;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 50px;
}

.guide-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 35px 28px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: right;
    position: relative;
    overflow: hidden;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.guide-card:hover::before {
    opacity: 1;
}

.guide-card-icon {
    font-size: 2.8rem;
    margin-bottom: 22px;
    display: inline-block;
}

.guide-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.guide-card p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .guide-section {
        padding: 60px 5%;
    }
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Premium Footer */
.premium-footer {
    background-color: #0b0f17;
    border-top: 1px solid var(--border-color);
    padding: 65px 8% 35px 8%;
    color: var(--text-primary);
    font-family: inherit;
    text-align: right;
    direction: rtl;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 45px;
}

.footer-info {
    flex: 1 1 400px;
}

.footer-info h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand-blue);
    margin-bottom: 15px;
}

.footer-info p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 500px;
}

.footer-contact {
    flex: 0 1 300px;
}

.footer-contact h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.contact-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    direction: ltr;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-item a:hover {
    color: var(--brand-blue);
    transform: translateX(-4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .premium-footer {
        padding: 50px 5% 25px 5%;
        text-align: center;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    .footer-info p {
        margin: 0 auto;
    }
    .contact-item {
        justify-content: center;
    }
    .contact-item a:hover {
        transform: none;
    }
}

/* ==========================================================================
   🎬 INTERACTIVE DEMO BAR STYLING
   ========================================================================== */
.demo-instruction-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: rgba(56, 189, 248, 0.04);
    border: 1px dashed rgba(56, 189, 248, 0.25);
    padding: 10px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    line-height: 1.6;
}

.mock-sidebar .stop-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
    font-size: 0.9rem !important; /* Increased from 0.52rem */
    font-weight: 700 !important;
    padding: 10px 8px !important; /* Increased from 6px 2px */
    border-radius: 6px !important; /* Increased from 4px */
    cursor: pointer !important;
    text-align: center !important;
    width: 100% !important;
    margin-top: 14px !important; /* Increased from 8px */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important; /* Increased from 3px */
    animation: stopBtnPulse 2s infinite ease-in-out !important;
    box-shadow: none !important;
    transform: none !important;
}

@keyframes stopBtnPulse {
    0%, 100% { border-color: rgba(239, 68, 68, 0.4); box-shadow: none; }
    50% { border-color: rgba(239, 68, 68, 0.8); box-shadow: 0 0 8px rgba(239, 68, 68, 0.2); }
}

.mock-sidebar .stop-btn:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    animation: none !important;
}

/* Disabled styling during active demo playbacks */
.mock-sidebar.playing .mock-menu-item:not(.active) {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(0.7);
}

/* ==========================================================================
   🔬 MODERN MINIMAL SVG LOGO
   ========================================================================== */
.logo-svg {
    width: 32px;
    height: 32px;
    stroke: #3b82f6; /* Modern clean science blue */
    fill: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.landing-logo:hover .logo-svg,
.sidebar-header:hover .logo-svg {
    transform: rotate(15deg) scale(1.05);
}

/* ==========================================================================
   📊 IMPACT & STATISTICS SECTION
   ========================================================================== */
.impact-section {
    padding: 100px 5%;
    background: linear-gradient(180deg, #05080f 0%, #0b0f17 100%);
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.impact-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.impact-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.impact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.impact-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: var(--brand-blue);
    opacity: 0.15;
    border-radius: 50%;
    filter: blur(30px);
    transition: all 0.5s ease;
}

.impact-card:hover {
    transform: translateY(-10px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.04);
}

.impact-card:hover::before {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    width: 200px;
    height: 200px;
}

.impact-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.impact-card:hover .impact-icon {
    transform: scale(1.15) rotate(5deg);
}

.impact-number {
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.impact-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.impact-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
