:root {
    --bg-dark: #09090b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-neon: #06b6d4;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);

    --subject-theme-color: #06b6d4;
    --subject-theme-color-rgb: 6, 182, 212;}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif; background-color: var(--bg-dark); color: var(--text-primary);
    min-height: 100vh; display: flex; justify-content: center; align-items: center;
    overflow: hidden; position: relative; cursor: none; transition: background-color 0.5s ease;
}
a, button, input { cursor: none; }

/* Light Mode Overrides */
body.light-mode {
    --bg-dark: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* Global Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.light-mode ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}
body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

body.light-mode .email-contact { color: #0f172a; border-color: rgba(6, 182, 212, 0.5); }
body.light-mode .newsletter-input { color: #0f172a; border-color: rgba(0,0,0,0.2); background: rgba(255,255,255,0.5); }
body.light-mode .newsletter-input:focus { background: white; border-color: var(--accent-purple); }
body.light-mode .topics-marquee { background: rgba(255,255,255,0.8); border-top: 1px solid rgba(0,0,0,0.1); }
body.light-mode .marquee-content span { color: #0f172a; }
body.light-mode .theme-toggle, body.light-mode .audio-toggle { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: #0f172a; }
body.light-mode .lang-toggle { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }
body.light-mode .lang-toggle button { color: #475569; }
body.light-mode .lang-toggle button.active { color: #8b5cf6; text-shadow: none; font-weight: bold; }
body.light-mode .cursor-dot { background: #8b5cf6; }
body.light-mode .cursor-outline { border-color: rgba(139, 92, 246, 0.5); }
body.light-mode .glow-orb { opacity: 0.3; }

/* Light Mode Background Manager Overrides */
body.light-mode #matrix-canvas { filter: invert(1) hue-rotate(180deg); opacity: 0.5; }
body.light-mode #cyber-grid-container { background: var(--bg-dark); }
body.light-mode #cyber-grid { filter: invert(1); opacity: 0.2; }
body.light-mode #data-streams { background: var(--bg-dark); }
body.light-mode .stream { background: rgba(0,0,0,0.05); }
body.light-mode #pcb-texture { background-color: var(--bg-dark); filter: invert(0.8); }
body.light-mode #nebula-container { filter: invert(1); opacity: 0.5; }
body.light-mode #wave-canvas { filter: invert(1); }

/* Language Toggle Logic */
body.lang-hu-active .lang-en { display: none !important; }
body.lang-en-active .lang-hu { display: none !important; }

/* Custom Cursor */
.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999999; pointer-events: none; mix-blend-mode: difference; }
.cursor-dot { width: 16px; height: 16px; background: white; transition: width 0.2s, height 0.2s, background-color 0.2s; }
.cursor-outline { width: 60px; height: 60px; border: 3px solid white; background: rgba(255,255,255,0.1); transition: width 0.2s, height 0.2s, border-color 0.2s; }
.cursor-dot.hover { width: 24px; height: 24px; background: white !important; }
.cursor-outline.hover { width: 80px; height: 80px; border-color: white !important; background: rgba(255,255,255,0.3); }

/* Flashlight Effect */
#flashlight { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 5; background: radial-gradient(circle 500px at var(--mouse-x, 50vw) var(--mouse-y, 50vh), rgba(255,255,255,0.03), transparent 70%); opacity: 1; transition: opacity 0.5s; }
body.light-mode #flashlight { opacity: 0; }

/* Noise Overlay (Film Grain) */
#noise-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 1; opacity: 0.04;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}
body.light-mode #noise-overlay { opacity: 0.08; filter: invert(1); }

/* Hacker Boot Sequence */
#boot-sequence {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000; z-index: 100000;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
    padding: 2rem; font-family: 'Fira Code', monospace; font-size: 1.1rem; color: #0f0;
    pointer-events: auto; transition: opacity 0.3s;
}
#boot-text { white-space: pre-line; line-height: 1.5; text-shadow: 0 0 5px #0f0; }

/* RGB Glitch Effect */
.glitch-hover { position: relative; transition: all 0.2s; }
.glitch-hover:hover { animation: rgbGlitch 0.2s infinite alternate; }
@keyframes rgbGlitch {
    0% { text-shadow: 2px 0 0 rgba(255,0,0,0.8), -2px 0 0 rgba(0,255,255,0.8); transform: translate(-1px, 1px); }
    50% { text-shadow: -2px 0 0 rgba(255,0,0,0.8), 2px 0 0 rgba(0,255,255,0.8); transform: translate(1px, -1px); }
    100% { text-shadow: 2px 0 0 rgba(255,0,0,0.8), -2px 0 0 rgba(0,255,255,0.8); transform: translate(-1px, 0); }
}

/* Glass Shimmer Effect */
.shimmer-panel { position: relative; overflow: hidden; }
.shimmer-panel::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.03) 55%, transparent 60%);
    transform: rotate(30deg) translateY(-100%);
    animation: shimmerEffect 6s infinite; pointer-events: none; z-index: 10;
}
@keyframes shimmerEffect {
    0%, 70% { transform: rotate(30deg) translateY(-100%); }
    100% { transform: rotate(30deg) translateY(100%); }
}

/* Cursor Trail Canvas (DISABLED by request to remove cursor trail) */
#cursor-trail { display: none !important; }

.shortcut-icon.is-open {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15) !important;
}

/* Tooltip Hover Card */
#tooltip-card { position: fixed; pointer-events: none; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); border: 1px solid var(--accent-neon); color: white; padding: 1.5rem; border-radius: 1rem; box-shadow: 0 10px 40px rgba(0,0,0,0.6); z-index: 10000; opacity: 0; transition: opacity 0.3s ease; transform: translate(-50%, -110%); font-family: 'Outfit', sans-serif; max-width: 300px; text-align: center; }
#tooltip-card h4 { color: var(--accent-neon); margin-bottom: 0.5rem; font-size: 1.1rem; }
#tooltip-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.4; }
body.light-mode #tooltip-card { background: rgba(255,255,255,0.95); border-color: var(--accent-purple); box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
body.light-mode #tooltip-card h4 { color: var(--accent-purple); }
body.light-mode #tooltip-card p { color: #475569; }

/* Preloader */
#preloader { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--bg-dark); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
.loader-content { text-align: center; }
.loading-bar { width: 250px; height: 2px; background: rgba(255,255,255,0.1); margin: 2rem auto; position: relative; overflow: hidden; }
.loading-progress { position: absolute; top: 0; left: 0; height: 100%; width: 50%; background: var(--accent-neon); animation: loadingAnim 1.5s infinite ease-in-out; }
@keyframes loadingAnim { 0% { left: -50%; width: 50%; } 100% { left: 100%; width: 50%; } }
.loading-text { color: var(--text-secondary); font-size: 0.9rem; font-family: 'Fira Code', monospace; letter-spacing: 2px; text-transform: uppercase; }

/* Header & Controls */
.top-header { position: fixed; top: 0; left: 0; width: 100%; padding: 2rem 4rem; display: flex; justify-content: space-between; align-items: flex-start; z-index: 50; pointer-events: none; }
.top-header * { pointer-events: auto; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; }
.header-controls { 
    display: flex; 
    gap: 1rem; 
    align-items: center; 
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
/* Header Controls Buttons - Personalized Cyberdeck Theme */
.theme-toggle, .audio-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.theme-toggle:hover, .audio-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Base icon styling inside controls */
.theme-toggle i, .audio-toggle i {
    font-size: 1.15rem;
    transition: all 0.3s ease;
    z-index: 2;
}

/* Theme Toggle Button Specifics (Amber/Sun and Indigo/Moon) */
#theme-btn {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.1), inset 0 0 5px rgba(251, 191, 36, 0.05);
}
#theme-btn:hover {
    transform: scale(1.15) rotate(15deg);
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4), inset 0 0 8px rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.1);
}
#theme-btn i {
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* Light Mode Overrides for Theme Toggle */
body.light-mode #theme-btn {
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1), inset 0 0 5px rgba(99, 102, 241, 0.05);
}
body.light-mode #theme-btn:hover {
    border-color: #6366f1;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3), inset 0 0 8px rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.08);
}
body.light-mode #theme-btn i {
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* RFID Admin Override Button Specifics (Crimson Red Biometric Vibe) */
#rfid-btn {
    color: #f43f5e;
    border-color: rgba(244, 63, 94, 0.25);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.1), inset 0 0 5px rgba(244, 63, 94, 0.05);
}
#rfid-btn:hover {
    transform: scale(1.15);
    border-color: #f43f5e;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.4), inset 0 0 8px rgba(244, 63, 94, 0.2);
    background: rgba(244, 63, 94, 0.1);
}
#rfid-btn i {
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

/* Admin Override Active Pulsing State (Rapid Alarm pulse & scanner glow) */
body.admin-mode #rfid-btn {
    color: #ef4444;
    /* removed border color */
    background: rgba(239, 68, 68, 0.15);
    animation: pulseRfid 1.5s infinite ease-in-out;
}
body.admin-mode #rfid-btn i {
    text-shadow: 0 0 10px #ef4444;
}

@keyframes pulseRfid {
    0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.4), inset 0 0 5px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8), inset 0 0 10px rgba(239, 68, 68, 0.4); }
    100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.4), inset 0 0 5px rgba(239, 68, 68, 0.2); }
}

/* Audio Focus Music Button Specifics (Neon Cyan/Blue Beat Vibe) */
#audio-btn {
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.08);
}
#audio-btn:hover {
    transform: scale(1.15);
    color: var(--accent-neon);
    /* removed border color */
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.05);
}

/* Audio Playing Pulsing State */
#audio-btn.pulsing {
    color: var(--accent-neon);
    border-color: var(--accent-neon);
    background: rgba(6, 182, 212, 0.1);
    animation: pulseAudio 2s infinite ease-in-out;
}
#audio-btn.pulsing i {
    text-shadow: 0 0 8px var(--accent-neon);
}

@keyframes pulseAudio {
    0% { box-shadow: 0 0 5px rgba(6, 182, 212, 0.4), inset 0 0 5px rgba(6, 182, 212, 0.2); }
    50% { box-shadow: 0 0 18px rgba(6, 182, 212, 0.7), inset 0 0 8px rgba(6, 182, 212, 0.3); }
    100% { box-shadow: 0 0 5px rgba(6, 182, 212, 0.4), inset 0 0 5px rgba(6, 182, 212, 0.2); }
}

/* Light Mode adaptations for buttons */
body.light-mode .theme-toggle, body.light-mode .audio-toggle {
    background: rgba(255, 255, 255, 0.7);
}
body.light-mode #audio-btn {
    color: #475569;
    border-color: rgba(0, 0, 0, 0.1);
}
body.light-mode #audio-btn:hover {
    color: #8b5cf6;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}
body.light-mode #audio-btn.pulsing {
    color: #8b5cf6;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    animation: pulseAudioLight 2s infinite ease-in-out;
}
@keyframes pulseAudioLight {
    0% { box-shadow: 0 0 5px rgba(139, 92, 246, 0.3), inset 0 0 5px rgba(139, 92, 246, 0.1); }
    50% { box-shadow: 0 0 15px rgba(139, 92, 246, 0.6), inset 0 0 8px rgba(139, 92, 246, 0.2); }
    100% { box-shadow: 0 0 5px rgba(139, 92, 246, 0.3), inset 0 0 5px rgba(139, 92, 246, 0.1); }
}

/* Language Toggle */
.lang-toggle { display: flex; gap: 0.5rem; align-items: center; background: rgba(255,255,255,0.05); padding: 0.5rem 1rem; border-radius: 2rem; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(10px); }
.lang-toggle button { background: none; border: none; color: var(--text-secondary); font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; transition: color 0.3s; }
.lang-toggle button.active { color: var(--accent-neon); text-shadow: 0 0 10px var(--accent-neon); }

/* Glitch Effect */
.glitch-wrapper { display: inline-block; position: relative; }
.glitch-text { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; letter-spacing: 0.1em; position: relative; color: white; }
.header-logo .glitch-text { font-size: 1.5rem; }
.glitch-text::before, .glitch-text::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-dark); }
.glitch-text::before { left: 2px; text-shadow: -1px 0 red; clip: rect(44px, 450px, 56px, 0); animation: glitch-anim 3s infinite linear alternate-reverse; }
.glitch-text::after { left: -2px; text-shadow: -1px 0 var(--accent-neon); clip: rect(44px, 450px, 56px, 0); animation: glitch-anim2 4s infinite linear alternate-reverse; }
@keyframes glitch-anim { 0% { clip: rect(10px, 9999px, 86px, 0); } 10% { clip: rect(69px, 9999px, 7px, 0); } 20% { clip: rect(12px, 9999px, 45px, 0); } 30% { clip: rect(4px, 9999px, 60px, 0); } 40% { clip: rect(45px, 9999px, 86px, 0); } 50% { clip: rect(20px, 9999px, 10px, 0); } 60%, 100% { clip: rect(0, 0, 0, 0); } }
@keyframes glitch-anim2 { 0% { clip: rect(65px, 9999px, 100px, 0); } 10% { clip: rect(3px, 9999px, 20px, 0); } 20% { clip: rect(40px, 9999px, 70px, 0); } 30% { clip: rect(10px, 9999px, 30px, 0); } 40% { clip: rect(80px, 9999px, 100px, 0); } 50% { clip: rect(45px, 9999px, 60px, 0); } 60%, 100% { clip: rect(0, 0, 0, 0); } }

/* Interactive Terminal */
.terminal-container { 
    background: linear-gradient(145deg, rgba(20, 25, 30, 0.7) 0%, rgba(5, 10, 15, 0.9) 100%); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-top: 1px solid rgba(255, 255, 255, 0.3); 
    border-left: 1px solid rgba(255, 255, 255, 0.3); 
    border-radius: 0.75rem; 
    padding: 0.85rem 1rem; 
    margin-top: 0.5rem; 
    font-family: 'Fira Code', monospace; 
    font-size: 0.85rem; 
    color: #a7f3d0; 
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 10px 30px -5px rgba(6, 182, 212, 0.15); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    backdrop-filter: blur(10px);
}
.terminal-container:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 15px 35px -5px rgba(6, 182, 212, 0.3);
    border-color: rgba(6, 182, 212, 0.4);
}
.terminal-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; } .dot.yellow { background: #eab308; } .dot.green { background: #22c55e; }
.terminal-title { color: var(--text-secondary); font-size: 0.75rem; margin-left: 0.5rem; }
.terminal-body { line-height: 1.6; min-height: 5em; max-height: 150px; overflow-y: auto; padding-right: 5px; cursor: none; }
.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
.term-input-line { display: flex; width: 100%; align-items: center; margin-top: 0.25rem; }
.prompt { color: #10b981; margin-right: 0.5rem; white-space: nowrap; font-weight: bold; }
#term-input { flex: 1; background: transparent; border: none; color: #a7f3d0; font-family: 'Fira Code', monospace; font-size: 0.85rem; outline: none; cursor: none; }
.term-info { color: #93c5fd; }
.term-cmd { color: #fde047; }
.term-err { color: #f87171; margin-top: 2px; }

/* ADVANCED BACKGROUND MANAGER (7 MODES, FADING) */
#bg-manager { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; overflow: hidden; pointer-events: none; }
#bg-manager > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 3s ease-in-out; }

.bg-mode-particles #particles-js { opacity: 1; }
.bg-mode-matrix #matrix-canvas { opacity: 0.8; }
.bg-mode-grid #cyber-grid-container { opacity: 1; }
.bg-mode-pcb #pcb-texture { opacity: 0.9; }
.bg-mode-streams #data-streams { opacity: 1; }
.bg-mode-nebula #nebula-container { opacity: 1; }
.bg-mode-waves #wave-canvas { opacity: 1; }

#matrix-canvas { background: var(--bg-dark); }
#wave-canvas { background: var(--bg-dark); }

#cyber-grid-container { background: var(--bg-dark); perspective: 1000px; overflow: hidden; }
#cyber-grid { 
    position: absolute; bottom: -50%; left: -50%; width: 200%; height: 150%;
    background: 
        linear-gradient(rgba(139, 92, 246, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: rotateX(75deg);
    animation: gridMove 5s linear infinite;
}
@keyframes gridMove { 0% { background-position: 0 0; } 100% { background-position: 0 50px; } }

#data-streams { background: var(--bg-dark); }
.stream { position: absolute; top: 0; width: 2px; height: 100%; background: rgba(255,255,255,0.02); }
.stream::after { 
    content: ''; position: absolute; top: -100px; left: 0; width: 100%; height: 100px; 
    background: linear-gradient(to bottom, transparent, var(--accent-neon)); 
    animation: streamDrop linear infinite; 
}
.s-left-1 { left: 5%; } .s-left-1::after { animation-duration: 3s; animation-delay: 0s; }
.s-left-2 { left: 10%; } .s-left-2::after { animation-duration: 4s; animation-delay: 1.5s; background: linear-gradient(to bottom, transparent, var(--accent-purple)); }
.s-right-1 { right: 5%; } .s-right-1::after { animation-duration: 2.5s; animation-delay: 0.5s; }
.s-right-2 { right: 10%; } .s-right-2::after { animation-duration: 3.5s; animation-delay: 2s; background: linear-gradient(to bottom, transparent, var(--accent-blue)); }
@keyframes streamDrop { 0% { top: -100px; } 100% { top: 100%; } }

#pcb-texture { 
    background-color: var(--bg-dark);
    background-image: radial-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px), radial-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

#nebula-container { background: radial-gradient(circle at 30% 70%, rgba(139, 92, 246, 0.3), transparent 60%), radial-gradient(circle at 70% 30%, rgba(6, 182, 212, 0.3), transparent 60%), radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.2), transparent 50%); filter: blur(30px); animation: nebulaRotate 40s infinite alternate ease-in-out; }
@keyframes nebulaRotate { 0% { transform: rotate(0deg) scale(1.2); } 100% { transform: rotate(45deg) scale(1.5); } }

.global-glitch { animation: globalGlitch 0.15s cubic-bezier(.25, .46, .45, .94) both infinite; filter: contrast(1.2) saturate(1.5); }
@keyframes globalGlitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

/* Noise Filter & Particles */
.noise-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"); }
#particles-js, .background-effects { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; pointer-events: none; }
.glow-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5; animation: float 20s infinite ease-in-out alternate; transition: opacity 0.5s; }
.orb-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(139,92,246,0.3) 0%, rgba(9,9,11,0) 70%); }
.orb-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, rgba(9,9,11,0) 70%); animation-delay: -5s; }
.orb-3 { top: 40%; left: 40%; width: 30vw; height: 30vw; background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, rgba(9,9,11,0) 70%); animation-delay: -10s; }

/* Floating Icons */
.floating-icon { position: absolute; font-size: 2rem; color: rgba(255,255,255,0.05); animation: floatIcon 15s infinite ease-in-out alternate; }
.icon-a { top: 20%; left: 10%; font-size: 3rem; animation-delay: 0s; }
.icon-b { top: 70%; left: 15%; animation-delay: -3s; }
.icon-c { top: 15%; right: 15%; animation-delay: -7s; }
.icon-d { bottom: 20%; right: 10%; font-size: 4rem; animation-delay: -10s; }
.icon-e { top: 50%; left: 50%; animation-delay: -5s; }
@keyframes floatIcon { 0% { transform: translate(0,0) rotate(0deg); } 100% { transform: translate(30px, 40px) rotate(20deg); } }

/* Marquee Ticker */
.topics-marquee { position: fixed; bottom: 0; left: 0; width: 100vw; background: rgba(0,0,0,0.5); border-top: 1px solid rgba(255,255,255,0.05); padding: 0.75rem 0; overflow: hidden; white-space: nowrap; z-index: 40; backdrop-filter: blur(5px); transition: background 0.5s; }
.marquee-content { display: inline-block; animation: marquee 30s linear infinite; }
.marquee-content span { display: inline-block; padding: 0 2rem; color: var(--text-secondary); font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: none; }
.marquee-content span:hover { color: white; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.marquee-content span i { color: var(--accent-neon); margin-right: 0.5rem; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Container & Layout */
.container { width: 100%; min-height: 100vh; display: flex; z-index: 1; perspective: 1500px; padding: 50px 0 100px 0; margin: 0; overflow-y: auto; overflow-x: hidden; }
.scale-wrapper { width: 1250px; height: 850px; display: flex; justify-content: center; align-items: center; transform-origin: top center; transition: transform 0.1s ease-out; margin: auto; }
.glass-panel { 
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2rem; 
    padding: 2rem 3rem; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem; 
    align-items: stretch; 
    box-shadow: 
        0 0 80px rgba(139, 92, 246, 0.25),
        0 0 120px rgba(6, 182, 212, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.05),
        0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transform-style: preserve-3d; 
    width: 100%; 
    height: 100%; 
    transition: background 0.5s, border-color 0.5s, box-shadow 0.5s; 
}
body.light-mode .glass-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 60px rgba(139, 92, 246, 0.15),
        0 0 100px rgba(6, 182, 212, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.2);
}
.inner-element { transform: translateZ(40px); }
.text-section { display: flex; flex-direction: column; gap: 0.6rem; overflow: hidden; justify-content: space-between; }

/* Top Date Clock */
.top-date-clock { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; margin-bottom: 0.3rem; }
.tdc-date { 
    font-family: 'Outfit', sans-serif; 
    font-size: 1rem; 
    color: var(--text-secondary); 
    text-transform: capitalize; 
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    order: 1;
}
.tdc-date i { color: var(--accent-purple); }
.tdc-clock { 
    font-family: 'Space Grotesk', sans-serif; 
    font-size: 3rem; 
    font-weight: 700; 
    color: #fff; 
    letter-spacing: 0.05em;
    text-shadow: 0 0 25px rgba(6, 182, 212, 0.9), 0 0 50px rgba(6, 182, 212, 0.5), 0 0 80px rgba(6, 182, 212, 0.2); 
    display: flex; align-items: center; gap: 0.5rem;
    order: 2;
}
.tdc-clock i { font-size: 2rem; color: var(--accent-neon); text-shadow: none; }

/* Typography */
.badge { align-self: flex-start; font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.5rem 1rem; background: rgba(139, 92, 246, 0.1); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.2); border-radius: 2rem; }
.title { font-family: 'Space Grotesk', sans-serif; font-size: 3.2rem; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.gradient-text { background: linear-gradient(135deg, var(--accent-neon), var(--accent-purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.description { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.4; max-width: 90%; }

/* ADVANCED TELEMETRY V2 */
.floating-telemetry {
    position: fixed;
    top: 6rem;
    left: 2rem;
    right: auto;
    pointer-events: auto;
    background: linear-gradient(135deg, rgba(20, 25, 30, 0.95) 0%, rgba(5, 10, 15, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 0 20px rgba(16, 185, 129, 0.05);
    width: 320px;
    min-width: 250px;
    min-height: 200px;
    z-index: 100;
    transition: background-color 0.3s;
    overflow: hidden;
    resize: both;
}
#telemetry-matrix { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.05; pointer-events: none; z-index: 0; }
.telemetry-header-bar {
    display: flex; justify-content: space-between; align-items: center; cursor: grab; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.75rem; position: relative; z-index: 1;
}
.telemetry-header-bar:active { cursor: grabbing; }
.telemetry-title { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; font-weight: bold; }
#telemetry-collapse-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; transition: color 0.3s; padding: 0.2rem; }
#telemetry-collapse-btn:hover { color: white; }

.telemetry-body { position: relative; z-index: 1; transition: opacity 0.3s, max-height 0.3s; max-height: 600px; overflow: hidden; opacity: 1; }
.floating-telemetry.collapsed .telemetry-body { max-height: 0; opacity: 0; margin: 0; }
.floating-telemetry.collapsed { width: 230px; }

/* Top Section (Gauge & Radar) */
.telemetry-top { display: flex; justify-content: space-around; align-items: center; margin-bottom: 1rem; padding: 0.5rem; background: rgba(0,0,0,0.3); border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.05); }
.health-gauge, .radar-wrapper { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; position: relative; }
.gauge-label { font-size: 0.55rem; color: var(--text-secondary); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 5px; }
.circular-chart { display: block; margin: 0 auto; max-width: 50px; max-height: 50px; }
.circle-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 3.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke: #10b981; transition: stroke-dasharray 1s ease-out, stroke 0.3s; }
.gauge-value { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); font-family: 'Fira Code', monospace; font-size: 0.75rem; font-weight: bold; color: #10b981; text-shadow: 0 0 5px rgba(16, 185, 129, 0.5); transition: color 0.3s; }

.mini-radar { 
    width: 55px; height: 55px; 
    border-radius: 50%; 
    border: 1px solid rgba(6, 182, 212, 0.6); 
    position: relative; 
    background: 
        repeating-radial-gradient(circle, transparent 0, transparent 9px, rgba(6, 182, 212, 0.3) 10px),
        linear-gradient(90deg, transparent 48%, rgba(6, 182, 212, 0.4) 49%, rgba(6, 182, 212, 0.4) 51%, transparent 52%),
        linear-gradient(0deg, transparent 48%, rgba(6, 182, 212, 0.4) 49%, rgba(6, 182, 212, 0.4) 51%, transparent 52%),
        radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(0, 0, 0, 0.6) 100%); 
    overflow: hidden; 
    box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.4), 0 0 10px rgba(6, 182, 212, 0.1);
}
.radar-sweep { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 70%, rgba(6, 182, 212, 0.1) 80%, rgba(6, 182, 212, 0.8) 100%); 
    animation: sweep 3s linear infinite; 
}
.radar-dot { 
    position: absolute; width: 4px; height: 4px; background: #fff; 
    border-radius: 50%; box-shadow: 0 0 8px 2px #06b6d4; 
    top: 30%; left: 60%;
    opacity: 0; 
    animation: pingDot 3s infinite; 
}
@keyframes sweep { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pingDot { 
    0%, 85% { opacity: 0; transform: scale(0.5); } 
    90% { opacity: 1; transform: scale(1.5); } 
    100% { opacity: 0; transform: scale(1); } 
}

/* Grid & Sparklines */
.telemetry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.floating-telemetry .stat-box { padding: 0.5rem; background: rgba(0,0,0,0.4); box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05); border-radius: 0.5rem; display: flex; flex-direction: column; justify-content: center; transition: background 0.3s; }
.floating-telemetry .stat-box:hover { background: rgba(6, 182, 212, 0.1); }
.floating-telemetry .stat-label { font-size: 0.55rem; margin-bottom: 0.2rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.25rem; }

/* Animated Icons */
.fa-globe.animated { animation: spin 4s linear infinite; }
.fa-broadcast-tower.animated { animation: pulseIcon 1.5s infinite alternate; }
.fa-microchip.animated { animation: glitchIcon 2s infinite; }
@keyframes pulseIcon { 0% { opacity: 0.5; text-shadow: none; } 100% { opacity: 1; text-shadow: 0 0 5px var(--accent-neon); } }
@keyframes glitchIcon { 0%, 95% { transform: none; } 96% { transform: skewX(10deg); color: red; } 100% { transform: skewX(-10deg); color: cyan; } }

.floating-telemetry .stat-value { font-size: 0.9rem; font-family: 'Fira Code', monospace; font-weight: bold; color: #10b981; }

.sparkline-container { width: 100%; height: 12px; margin-top: 0.25rem; display: flex; align-items: flex-end; gap: 2px; }
.spark-bar { flex: 1; background: #10b981; opacity: 0.5; transition: height 0.3s, background 0.3s; min-height: 2px; border-radius: 1px 1px 0 0; }

/* Global Map */
.global-map-container { margin-top: 0.75rem; background: rgba(0,0,0,0.4); border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.05); padding: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.map-title { font-size: 0.55rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.25rem; }
#global-map { width: 100%; height: 90px; background: rgba(0,0,0,0.2); border-radius: 0.25rem; }

/* Mini Log */
.telemetry-log { margin-top: 0.75rem; padding: 0.5rem; background: rgba(0,0,0,0.5); border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.05); height: 60px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.log-entry { font-family: 'Fira Code', monospace; font-size: 0.55rem; color: #94a3b8; animation: slideUp 0.3s ease-out forwards; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.log-entry span.time { color: var(--accent-neon); margin-right: 0.25rem; }
@keyframes slideUp { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }

/* Status Colors */
.text-green { color: #10b981 !important; text-shadow: 0 0 5px rgba(16, 185, 129, 0.4); }
.text-yellow { color: #eab308 !important; text-shadow: 0 0 5px rgba(234, 179, 8, 0.4); }
.text-red { color: #ef4444 !important; text-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
.text-blue { color: #3b82f6 !important; }
.bg-green { background: #10b981 !important; }
.bg-yellow { background: #eab308 !important; }
.bg-red { background: #ef4444 !important; }
.stroke-green { stroke: #10b981 !important; }
.stroke-yellow { stroke: #eab308 !important; }
.stroke-red { stroke: #ef4444 !important; }
.pulse-red { animation: text-pulse-red 0.5s infinite alternate; }
@keyframes text-pulse-red { 0% { opacity: 1; text-shadow: 0 0 10px #ef4444; } 100% { opacity: 0.5; text-shadow: 0 0 20px #ef4444; } }
.stat-box { 
    background: linear-gradient(145deg, rgba(20, 25, 30, 0.7) 0%, rgba(5, 10, 15, 0.9) 100%); 
    border: 1px solid rgba(255,255,255,0.15); border-top: 1px solid rgba(255,255,255,0.3); border-left: 1px solid rgba(255,255,255,0.3);
    border-radius: 0.75rem; padding: 0.85rem; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 5px 15px -5px rgba(16, 185, 129, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.stat-box:hover { transform: translateY(-2px) scale(1.02); box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 10px 25px -5px rgba(16, 185, 129, 0.3); border-color: rgba(16, 185, 129, 0.4); }
.stat-label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 0.05em; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.35rem; }
.stat-dot { font-size: 0.5rem; color: #10b981; animation: text-pulse 2s infinite; }
.stat-value { font-family: 'Fira Code', monospace; font-size: 1.2rem; color: #10b981; font-weight: 700; text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.pulse-text { animation: text-pulse 2s infinite; }
@keyframes text-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Roadmap Animations */
.roadmap-wrapper { 
    margin-top: 0.5rem; 
    background: linear-gradient(145deg, rgba(30, 20, 40, 0.6) 0%, rgba(10, 5, 20, 0.8) 100%); 
    border-radius: 1rem; 
    padding: 1.25rem 1.5rem; 
    border: 1px solid rgba(255,255,255,0.15); 
    border-top: 1px solid rgba(255, 255, 255, 0.3); 
    border-left: 1px solid rgba(255, 255, 255, 0.3); 
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 10px 30px -5px rgba(139, 92, 246, 0.15); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}
.roadmap-wrapper:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5), 0 15px 35px -5px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
}
.roadmap-title { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.roadmap-item { margin-bottom: 1rem; }
.roadmap-item:last-child { margin-bottom: 0; }
.rm-info { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 0.5rem; font-weight: 500; }
.rm-info i { color: var(--accent-blue); margin-right: 0.5rem; width: 15px; text-align: center; }
.rm-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.rm-fill { width: 0%; height: 100%; border-radius: 3px; transition: width 2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rm-fill.pulse { animation: progressPulse 2s infinite ease-in-out; }
@keyframes progressPulse { 0%, 100% { opacity: 0.6; box-shadow: 0 0 10px var(--accent-blue); } 50% { opacity: 1; box-shadow: 0 0 20px var(--accent-blue); } }

/* Right Widgets */
.image-section { display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 0.8rem; overflow: hidden; }
.widget-row { display: flex; gap: 1rem; width: 100%; justify-content: center; align-items: stretch; flex-wrap: wrap; }

/* Clock & Contact */
/* Project Stats Table */
.project-stats-table { width: 100%; max-width: 450px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 0.8rem; padding: 0.5rem; box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.3rem; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0.8rem; background: rgba(255, 255, 255, 0.02); border-radius: 0.5rem; border-left: 3px solid var(--row-color); transition: background 0.3s, transform 0.3s; }
.stat-row:hover { background: rgba(255, 255, 255, 0.05); transform: translateX(2px); }
.stat-lbl { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 0.75rem; }
.stat-lbl i { font-size: 1rem; width: 20px; text-align: center; color: var(--row-color); filter: drop-shadow(0 0 5px var(--row-color)); }
.stat-val { font-family: 'Fira Code', monospace; font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.email-contact { display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.7rem 1.2rem; background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.3); border-radius: 0.8rem; color: var(--text-primary); text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.05em; transition: all 0.3s ease; }
.email-contact:hover { background: rgba(6, 182, 212, 0.2); box-shadow: 0 5px 20px rgba(6, 182, 212, 0.4); transform: translateY(-2px); color: white; }

/* Countdown */
.countdown-wrapper { width: 100%; }
.countdown-title { text-align: center; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.countdown-container { display: flex; justify-content: center; align-items: center; gap: 0.4rem; background: rgba(0, 0, 0, 0.3); padding: 0.6rem; border-radius: 0.8rem; border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: inset 0 2px 10px rgba(0,0,0,0.2); }
.cd-box { display: flex; flex-direction: column; align-items: center; width: 45px; }
.cd-num { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--accent-purple); line-height: 1; transition: color 0.5s; }
.cd-label { font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; margin-top: 0.25rem; font-weight: 500; }
.cd-colon { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; color: rgba(255,255,255,0.2); margin-bottom: 15px; }

/* Form & Socials */
.form-row { display: flex; width: 100%; max-width: 500px; gap: 1rem; align-items: center; }
.newsletter-form { flex: 1; display: flex; gap: 0.5rem; position: relative; z-index: 10; }
.newsletter-input { flex: 1; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.5rem; padding: 0.75rem 1rem; color: var(--text-primary); font-family: 'Outfit', sans-serif; font-size: 0.9rem; outline: none; transition: all 0.3s ease; }
.newsletter-input:focus { /* removed border color */ background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 15px rgba(59, 130, 246, 0.3); }
.newsletter-btn { background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.3); color: var(--text-primary); border-radius: 0.5rem; padding: 0.75rem 1.25rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: 0.05em; font-size: 0.9rem; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem; }
.newsletter-btn:hover { background: rgba(139, 92, 246, 0.2); box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4); transform: translateY(-2px); color: white; }
.newsletter-btn.success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4); color: #10b981; pointer-events: none; }
.social-icons { display: flex; gap: 0.5rem; }
.social-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: center; align-items: center; color: var(--text-secondary); text-decoration: none; font-size: 1.1rem; transition: all 0.3s ease; }
.social-icon:hover { transform: translateY(-3px); color: white; }
.social-icon.facebook:hover { background: #1877f2; border-color: #1877f2; box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4); color: white; }
.social-icon.instagram:hover { background: #e4405f; border-color: #e4405f; box-shadow: 0 5px 15px rgba(228, 64, 95, 0.4); color: white; }

/* Parallax Owl Image */
.image-container { position: relative; width: 100%; max-width: 400px; border-radius: 1.2rem; cursor: none; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease; box-shadow: 0 0 40px rgba(139, 92, 246, 0.3); z-index: 10; flex-shrink: 1; overflow: hidden; }
.hero-image { width: 100%; height: auto; display: block; object-fit: cover; border-radius: 1.5rem; transition: filter 0.5s; }
.parallax-hover { transform: scale(1.05) translateY(-10px); box-shadow: 0 20px 50px rgba(6, 182, 212, 0.5); }
.parallax-hover .hero-image { filter: brightness(1.2) contrast(1.1); }

/* Contact Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 100000; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
    width: 90%; max-width: 500px; padding: 2.5rem; position: relative; display: block;
    transform: translateY(50px) scale(0.95); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); 
    border: 1px solid rgba(255, 255, 255, 0.15); border-top: 1px solid rgba(255, 255, 255, 0.4); border-left: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 1.5rem; box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
.close-btn {
    position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%;
    width: 35px; height: 35px; color: var(--text-secondary); display: flex; justify-content: center; align-items: center; transition: all 0.3s;
    cursor: pointer; z-index: 9999; pointer-events: auto;
}
.close-btn:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; border-color: #ef4444; transform: rotate(90deg); }
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; margin-bottom: 1.5rem; text-align: center; }
.input-group { position: relative; margin-bottom: 1.5rem; }
.input-group input, .input-group textarea {
    width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.5rem; padding: 1rem; color: var(--text-primary); font-family: 'Outfit', sans-serif; font-size: 1rem; outline: none; transition: all 0.3s;
}
.input-group textarea { resize: vertical; min-height: 100px; }
.input-group input:focus, .input-group textarea:focus { border-color: var(--accent-neon); box-shadow: 0 0 15px rgba(6, 182, 212, 0.3); background: rgba(255, 255, 255, 0.1); }
.input-group label {
    position: absolute; left: 1rem; top: 1rem; color: var(--text-secondary); pointer-events: none; transition: 0.3s ease all;
}
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label, .input-group textarea:not(:placeholder-shown) ~ label {
    top: -0.5rem; left: 0.8rem; font-size: 0.75rem; background: var(--bg-dark); padding: 0 0.5rem; color: var(--accent-neon); border-radius: 0.25rem;
}
.modal-submit { width: 100%; justify-content: center; margin-top: 1rem; font-size: 1.1rem; }

body.light-mode .modal-overlay { background: rgba(255, 255, 255, 0.6); }
body.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.8); border-left: 1px solid rgba(255, 255, 255, 0.8);
}
body.light-mode .input-group input, body.light-mode .input-group textarea { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.1); color: #0f172a; }
body.light-mode .input-group input:focus ~ label, body.light-mode .input-group input:not(:placeholder-shown) ~ label,
body.light-mode .input-group textarea:focus ~ label, body.light-mode .input-group textarea:not(:placeholder-shown) ~ label {
    background: white; color: var(--accent-purple);
}

/* Responsive */
@media (max-width: 1100px) {
    .glass-panel { grid-template-columns: 1fr; padding: 3rem 2rem; text-align: center; gap: 3rem; }
    .badge { align-self: center; }
    .title { font-size: 3.5rem; }
    .description { max-width: 100%; }
    .widget-row { flex-direction: column; align-items: center; }
    .email-contact { width: 100%; max-width: 300px; }
    .form-row { flex-direction: column; }
    .top-header { padding: 1.5rem 2rem; }
    .cursor-dot, .cursor-outline, #flashlight, #tooltip-card { display: none !important; }
    body, a, button, input { cursor: auto; }
}

@media (max-width: 480px) {
    .title { font-size: 2.5rem; }
    .glass-panel { padding: 2rem 1.5rem; }
    .cd-num { font-size: 1.2rem; }
    .cd-box { width: 35px; }
    .top-header { flex-direction: column; gap: 1rem; padding: 1rem; position: absolute; }
    .container { margin-top: 5rem; }
    .roadmap-wrapper { padding: 1rem; }
    .rm-info { font-size: 0.8rem; }
    .image-container { max-width: 100%; }
}

/* ==========================================
   CYBERDECK TAB SELECTOR BUTTONS REDESIGN
   ========================================== */
.python-tab-selector-btn {
    background: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.6rem 1rem !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
}

/* Base Hover Translation */
.python-tab-selector-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.02) !important;
    color: white !important;
}

.python-tab-selector-btn:active {
    transform: translateY(-0.5px);
}

/* Unique Signature Colors for Each Tab (Dark Mode) */

/* 1. Links & Csoportok (Cyan) */
#main-aids-tab-links:hover,
#analytics-subtab-assignments:hover {
    border-color: rgba(6, 182, 212, 0.5) !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2) !important;
    color: var(--accent-neon) !important;
}
#main-aids-tab-links.active,
#analytics-subtab-assignments.active {
    background: rgba(6, 182, 212, 0.12) !important;
    border-color: var(--accent-neon) !important;
    color: var(--accent-neon) !important;
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.3) !important;
    text-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
}

/* 2. Tantárgyak (Blue) */
#main-aids-tab-subjects:hover {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}
#main-aids-tab-subjects.active {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: var(--accent-blue) !important;
    color: #60a5fa !important;
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.3) !important;
    text-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

/* 3. Tantervek / Topics / Tools (Green / Emerald) */
#main-aids-tab-curricula:hover,
#curr-subtab-btn-topics:hover,
#curr-subtab-btn-tools:hover {
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}
#main-aids-tab-curricula.active,
#curr-subtab-btn-topics.active,
#curr-subtab-btn-tools.active {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.3) !important;
    text-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

/* 4. Settings & Backup (Purple) */
#main-aids-tab-settings:hover,
#analytics-subtab-quiz:hover,
#curr-subtab-btn-textbooks:hover {
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa !important;
}
#main-aids-tab-settings.active,
#analytics-subtab-quiz.active,
#curr-subtab-btn-textbooks.active {
    background: rgba(139, 92, 246, 0.12) !important;
    border-color: var(--accent-purple) !important;
    color: #a78bfa !important;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.3) !important;
    text-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

/* 5. Student Analytics / Syllabus (Yellow / Amber) */
#main-aids-tab-analytics:hover,
#curr-subtab-btn-syllabus:hover {
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
}
#main-aids-tab-analytics.active,
#curr-subtab-btn-syllabus.active {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.3) !important;
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}


/* ==========================================
   LIGHT MODE OVERRIDES FOR TAB BUTTONS
   ========================================== */
body.light-mode .python-tab-selector-btn {
    background: rgba(15, 23, 42, 0.05) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}

body.light-mode .python-tab-selector-btn:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}

/* Light Mode active and hover colors mapped to standard styling without glowing shadows */
body.light-mode #main-aids-tab-links.active,
body.light-mode #analytics-subtab-assignments.active {
    background: rgba(6, 182, 212, 0.1) !important;
    border-color: #0891b2 !important;
    color: #0891b2 !important;
    text-shadow: none;
    box-shadow: none !important;
}
body.light-mode #main-aids-tab-subjects.active {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: #2563eb !important;
    color: #2563eb !important;
    text-shadow: none;
    box-shadow: none !important;
}
body.light-mode #main-aids-tab-curricula.active,
body.light-mode #curr-subtab-btn-topics.active,
body.light-mode #curr-subtab-btn-tools.active {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: #059669 !important;
    color: #059669 !important;
    text-shadow: none;
    box-shadow: none !important;
}
body.light-mode #main-aids-tab-settings.active,
body.light-mode #analytics-subtab-quiz.active,
body.light-mode #curr-subtab-btn-textbooks.active {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: #7c3aed !important;
    color: #7c3aed !important;
    text-shadow: none;
    box-shadow: none !important;
}
body.light-mode #main-aids-tab-analytics.active,
body.light-mode #curr-subtab-btn-syllabus.active {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: #d97706 !important;
    color: #d97706 !important;
    text-shadow: none;
    box-shadow: none !important;
}

/* ==========================================================================
   SUBJECT MODAL LOGO BADGES AND THEMES
   ========================================================================== */
.subject-logo-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(var(--subject-theme-color-rgb), 0.12);
    border: 2px solid rgba(var(--subject-theme-color-rgb), 0.4);
    box-shadow: 0 0 15px rgba(var(--subject-theme-color-rgb), 0.25),
                inset 0 0 10px rgba(var(--subject-theme-color-rgb), 0.15);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.logo-outer-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1.5px dashed rgba(var(--subject-theme-color-rgb), 0.6);
    border-radius: 50%;
    animation: spin-clockwise 15s linear infinite;
    pointer-events: none;
}

.logo-inner-ring {
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid rgba(var(--subject-theme-color-rgb), 0.2);
    border-top: 1.5px solid rgba(var(--subject-theme-color-rgb), 0.85);
    border-radius: 50%;
    animation: spin-counter-clockwise 5s linear infinite;
    pointer-events: none;
}

#subject-modal-logo-icon {
    font-size: 1.6rem;
    color: var(--subject-theme-color, #06b6d4);
    text-shadow: 0 0 10px var(--subject-theme-color, #06b6d4);
    z-index: 2;
    transition: all 0.3s ease;
}

.subject-modal-tag {
    font-size: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--subject-theme-color, #06b6d4);
    background: rgba(var(--subject-theme-color-rgb), 0.15);
    border: 1px solid rgba(var(--subject-theme-color-rgb), 0.35);
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(var(--subject-theme-color-rgb), 0.15);
    transition: all 0.3s ease;
}

body.light-mode .subject-logo-badge {
    background: rgba(var(--subject-theme-color-rgb), 0.08);
    border: 2px solid rgba(var(--subject-theme-color-rgb), 0.6);
    box-shadow: 0 2px 8px rgba(var(--subject-theme-color-rgb), 0.15);
}

body.light-mode .logo-outer-ring {
    border-color: rgba(var(--subject-theme-color-rgb), 0.5);
}

body.light-mode .logo-inner-ring {
    border-color: rgba(var(--subject-theme-color-rgb), 0.15);
    border-top-color: rgba(var(--subject-theme-color-rgb), 0.85);
}

body.light-mode #subject-modal-logo-icon {
    text-shadow: none;
    color: var(--subject-theme-color, #0891b2);
}

body.light-mode .subject-modal-tag {
    background: rgba(var(--subject-theme-color-rgb), 0.06);
    border: 1px solid rgba(var(--subject-theme-color-rgb), 0.4);
    box-shadow: none;
}

@keyframes spin-clockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-counter-clockwise {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Dynamic hover animations for cards/buttons in subject modal */
#subject-modal .textbook-card {
    transition: all 0.3s ease;
}
#subject-modal .textbook-card:hover {
    border-color: rgba(var(--subject-theme-color-rgb), 0.5) !important;
    background: rgba(var(--subject-theme-color-rgb), 0.05) !important;
    box-shadow: 0 0 15px rgba(var(--subject-theme-color-rgb), 0.15) !important;
    transform: translateY(-2px);
}

#subject-modal .generator-card {
    transition: all 0.3s ease;
}
#subject-modal .generator-card:hover {
    border-color: rgba(var(--subject-theme-color-rgb), 0.35) !important;
    box-shadow: 0 0 20px rgba(var(--subject-theme-color-rgb), 0.1) !important;
}

#subject-modal .newsletter-btn {
    transition: all 0.3s ease;
}
#subject-modal .newsletter-btn:hover {
    background: rgba(var(--subject-theme-color-rgb), 0.2) !important;
    border-color: var(--subject-theme-color, #06b6d4) !important;
    box-shadow: 0 0 12px rgba(var(--subject-theme-color-rgb), 0.3) !important;
}

/* Interactive Filter Pills */
.filter-pill {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    cursor: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}
.filter-pill.active {
    background: rgba(6, 182, 212, 0.15) !important;
    border-color: var(--accent-neon, #06b6d4) !important;
    color: var(--accent-neon, #06b6d4) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
    text-shadow: 0 0 5px rgba(6, 182, 212, 0.3);
}
.filter-pill:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    transform: translateY(-1px);
}
body.light-mode .filter-pill {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #475569 !important;
}
body.light-mode .filter-pill.active {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: #8b5cf6 !important;
    color: #8b5cf6 !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
    text-shadow: none;
}
body.light-mode .filter-pill:hover:not(.active) {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

#teacher_aids_modal.fullscreen { top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; max-width: none !important; max-height: none !important; border-radius: 0 !important; transform: none !important; margin: 0 !important; padding: 2rem !important; display: flex; flex-direction: column; background: var(--bg-main) !important; }
#teacher_aids_modal.fullscreen .modal-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
#teacher_aids_modal.fullscreen #aids-content-area { flex: 1; overflow-y: auto; }

body.light-mode .header-controls { background: rgba(0, 0, 0, 0.05) !important; border-color: rgba(0,0,0,0.1) !important; }

/* ==========================================================================
   SIMPLE MODE (SIMPLIFIED / CLEAN DISPLAY) OVERRIDES
   ========================================================================== */
body.simple-mode {
    cursor: default !important;
}

body.simple-mode,
body.simple-mode *:not(.marquee-content):not(#marquee-content-inner) {
    animation: none !important;
    transition: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    filter: none !important;
    clip-path: none !important;
}

/* Specific elements to hide completely in simple mode to achieve a clean layout */
body.simple-mode .cursor-dot,
body.simple-mode .cursor-outline,
body.simple-mode #flashlight,
body.simple-mode #cursor-trail,
body.simple-mode .glow-orb,
body.simple-mode .floating-icon,
body.simple-mode .background-effects,
body.simple-mode #bg-manager,
body.simple-mode #noise-overlay,
body.simple-mode .hud-reticle,
body.simple-mode .hologram-overlay,
body.simple-mode .corner-decor,
body.simple-mode .logo-outer-ring,
body.simple-mode .logo-inner-ring {
    display: none !important;
}

/* Ensure default cursor pointers for interactive elements */
body.simple-mode a,
body.simple-mode button,
body.simple-mode select,
body.simple-mode input,
body.simple-mode textarea,
body.simple-mode [role="button"],
body.simple-mode .python-tab-selector-btn,
body.simple-mode .filter-pill,
body.simple-mode .marquee-item {
    cursor: pointer !important;
}

/* Clean background gradients/solid styles */
body.simple-mode {
    background: #09090b !important;
}
body.simple-mode.light-mode {
    background: #f8fafc !important;
}
body.simple-mode .glass-panel {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Ensure QR code scales perfectly when widget is resized */
#desktop-url-qr canvas, #desktop-url-qr img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* System Monitor Enhancements */
#sys-monitor-overlay {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.5; /* Ghost mode by default */
}
#sys-monitor-overlay:hover, #sys-monitor-overlay[data-is-dragging="true"], #sys-monitor-overlay.active {
    opacity: 1;
}

#sys-monitor-overlay .sys-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15cqmin; /* Responsive font size */
    transition: color 0.3s, text-shadow 0.3s;
}

#sys-monitor-overlay .sys-metric i {
    width: 1.2em;
    text-align: center;
}

@keyframes critical-pulse {
    0% { transform: scale(1); text-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
    50% { transform: scale(1.05); text-shadow: 0 0 15px rgba(239, 68, 68, 1); color: #ef4444; }
    100% { transform: scale(1); text-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
}

.critical-load {
    color: #ef4444 !important;
    animation: critical-pulse 1s infinite;
}

.warning-load {
    color: #f59e0b !important;
}

.sys-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12cqmin;
    z-index: 10;
    transition: 0.2s;
}
.sys-close-btn:hover {
    color: #ef4444;
}

#sys-chart-container {
    margin-top: 10px;
    width: 100%;
    height: 30cqmin;
    min-height: 20px;
    position: relative;
}
body.simple-mode.light-mode .glass-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Premium Lofi Volume Slider Styling */
#volume-slider::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
}
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: var(--accent-neon);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: -3px;
    box-shadow: 0 0 5px var(--accent-neon);
    transition: transform 0.1s;
}
#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}
body.light-mode #volume-slider::-webkit-slider-thumb {
    background: var(--accent-purple);
    box-shadow: 0 0 5px var(--accent-purple);
}

/* --- Real-time Search Query Highlights --- */
.search-highlight {
    background: rgba(6, 182, 212, 0.25) !important;
    color: var(--accent-neon) !important;
    padding: 0 0.15rem;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
    border-bottom: 1px solid var(--accent-neon);
}
body.light-mode .search-highlight {
    background: rgba(168, 85, 247, 0.15) !important;
    color: var(--accent-purple) !important;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
    border-bottom: 1px solid var(--accent-purple);
}

/* ===========================================
   PREMIUM VISUAL ENHANCEMENTS v2.0
   =========================================== */

/* 1. Drawer Link Card Hover Effects */
.drawer-link-card:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
    transform: translateX(-3px);
    box-shadow: 0 2px 12px rgba(6, 182, 212, 0.15);
}
body.light-mode .drawer-link-card:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.1);
}

/* 2. CRUD Button Micro-Animations */
.crud-btn {
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}
.crud-btn:hover {
    transform: scale(1.08) !important;
    filter: brightness(1.2);
}
.crud-btn.edit-btn:hover {
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4) !important;
}
.crud-btn.delete-btn:hover {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

/* 3. Badge Slot Animations */
.badge-slot {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
}
.badge-slot:hover {
    transform: scale(1.15);
}
.badge-slot.unlocked {
    animation: badgeGlow 3s ease-in-out infinite;
}
@keyframes badgeGlow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255,255,255,0.1)); }
    50% { filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5)); }
}
body.simple-mode .badge-slot.unlocked { animation: none; }

/* 4. Link Item Card Hover */
.link-item-card {
    transition: all 0.25s ease !important;
    position: relative;
}
.link-item-card:hover {
    border-color: rgba(6, 182, 212, 0.3) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.link-item-card:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-neon), var(--accent-purple));
    border-radius: 3px 0 0 3px;
}
body.light-mode .link-item-card:hover {
    border-color: rgba(139, 92, 246, 0.3) !important;
    background: rgba(139, 92, 246, 0.03) !important;
}

/* 5. Fixed Button Idle Breathing Animation */
@keyframes buttonBreathe {
    0%, 100% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.15); }
    50% { box-shadow: 0 0 22px rgba(6, 182, 212, 0.35), 0 0 40px rgba(6, 182, 212, 0.1); }
}
.links-drawer-btn { animation: buttonBreathe 4s ease-in-out infinite; }

@keyframes buttonBreatheP {
    0%, 100% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.15); }
    50% { box-shadow: 0 0 22px rgba(168, 85, 247, 0.35), 0 0 40px rgba(168, 85, 247, 0.1); }
}
.achievements-btn { animation: buttonBreatheP 4s ease-in-out infinite; }
body.simple-mode .links-drawer-btn,
body.simple-mode .achievements-btn { animation: none; }

/* 6. Status Badges */
.link-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 0.3rem;
    flex-shrink: 0;
}
.link-status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
    animation: statusPulse 2s ease-in-out infinite;
}
.link-status-dot.offline {
    background: #f87171;
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}
.link-status-dot.warning {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
body.simple-mode .link-status-dot.online { animation: none; }

/* 7. Skeleton Loading Placeholder */
.skeleton-loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
body.simple-mode .skeleton-loading { animation: none; }
body.light-mode .skeleton-loading {
    background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.07) 50%, rgba(0,0,0,0.03) 75%);
    background-size: 200% 100%;
}

/* 8. Teacher Aids Modal Form Input Focus Glow */
#teacher-aids-modal input:focus,
#teacher-aids-modal textarea:focus,
#teacher-aids-modal select:focus {
    border-color: var(--accent-neon) !important;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15), 0 0 12px rgba(6, 182, 212, 0.2) !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}
body.light-mode #teacher-aids-modal input:focus,
body.light-mode #teacher-aids-modal textarea:focus,
body.light-mode #teacher-aids-modal select:focus {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 12px rgba(139, 92, 246, 0.1) !important;
}

/* 9. Student Card Hover */
.student-card-item:hover {
    border-color: rgba(6, 182, 212, 0.25) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 10. Preview/QR Button Hover */
.preview-btn:hover, .qr-btn:hover {
    transform: scale(1.12);
    filter: brightness(1.3);
}

/* 11. Responsive Drawer & Modal Optimization */
@media (max-width: 768px) {
    .links-drawer,
    .achievements-drawer {
        width: calc(100vw - 2rem) !important;
        right: 1rem !important;
        left: 1rem !important;
        max-width: none !important;
    }
    .links-drawer {
        top: 1rem !important;
        bottom: 4.5rem !important;
    }
    .achievements-drawer {
        bottom: 4.5rem !important;
        max-height: 60vh !important;
    }
    .links-drawer-btn,
    .achievements-btn {
        bottom: 1rem !important;
        right: 1rem !important;
        padding: 0.6rem 0.9rem !important;
        font-size: 0.8rem !important;
    }
    .links-drawer-btn {
        right: auto !important;
        left: 1rem !important;
    }

    /* Modal content fullscreen on mobile */
    .modal-overlay .modal-content {
        width: 95% !important;
        max-width: none !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 1.5rem !important;
    }
    #teacher-aids-modal .modal-content {
        width: 98% !important;
        height: 95vh !important;
        max-height: 95vh !important;
        border-radius: 1rem !important;
    }

    /* Toast on mobile */
    #toast-container {
        right: 0.5rem !important;
        left: 0.5rem !important;
        max-width: none !important;
    }
}

@media (max-width: 480px) {
    .links-drawer-btn span,
    .achievements-btn span {
        display: none;
    }
    .links-drawer-btn,
    .achievements-btn {
        padding: 0.7rem !important;
        border-radius: 50% !important;
        width: 48px !important;
        height: 48px !important;
        justify-content: center !important;
    }
}

/* 12. Smooth Focus Ring for Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
    border-radius: 4px;
}
body.light-mode *:focus-visible {
    outline-color: var(--accent-purple);
}

/* 13. Keyboard Shortcut Hint Tooltip */
.kbd-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-left: 0.5rem;
}
.kbd-hint kbd {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    padding: 0.05rem 0.3rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary);
}
body.light-mode .kbd-hint kbd {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.15);
}

/* ===========================================
   AMPLIFIED GRAPHICS: GLOW & NEON BORDERS
   =========================================== */

/* Animated Ambient Backlighting behind Glass Panel */
.glass-panel::before {
    content: '';
    position: absolute;
    top: -2%;
    left: -2%;
    right: -2%;
    bottom: -2%;
    background: radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.22), transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.22), transparent 50%);
    filter: blur(40px);
    z-index: -1;
    border-radius: 2.2rem;
    pointer-events: none;
    animation: ambientGlow 8s ease-in-out infinite alternate;
}

@keyframes ambientGlow {
    0% { opacity: 0.8; transform: scale(0.98); }
    100% { opacity: 1.2; transform: scale(1.02); }
}

/* Enhancing Glass Panel border with solid semi-transparent line and cyan/purple glow */
.glass-panel {
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 
        0 0 40px rgba(6, 182, 212, 0.15),
        0 0 80px rgba(139, 92, 246, 0.15),
        inset 0 0 30px rgba(255, 255, 255, 0.05),
        0 30px 60px rgba(0, 0, 0, 0.8) !important;
}

/* Terminal neon border glow */
.terminal-container {
    border: 1.5px solid rgba(6, 182, 212, 0.3) !important;
    box-shadow: 
        inset 0 2px 20px rgba(0, 0, 0, 0.6), 
        0 0 15px rgba(6, 182, 212, 0.15) !important;
}
.terminal-container:hover {
    border-color: rgba(6, 182, 212, 0.6) !important;
    box-shadow: 
        inset 0 2px 25px rgba(0, 0, 0, 0.6), 
        0 0 25px rgba(6, 182, 212, 0.3) !important;
}

/* Roadmap neon border glow */
.roadmap-wrapper {
    border: 1.5px solid rgba(139, 92, 246, 0.3) !important;
    box-shadow: 
        inset 0 2px 20px rgba(0, 0, 0, 0.6), 
        0 0 15px rgba(139, 92, 246, 0.15) !important;
}
.roadmap-wrapper:hover {
    border-color: rgba(139, 92, 246, 0.6) !important;
    box-shadow: 
        inset 0 2px 25px rgba(0, 0, 0, 0.6), 
        0 0 25px rgba(139, 92, 246, 0.3) !important;
}

/* Image Container Frame & Background Lighting */
.image-container {
    border: 1px solid rgba(6, 182, 212, 0.05) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1) !important;
}
.image-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: none;
    pointer-events: none;
    border-radius: 1.2rem;
}

/* Corner bracket elements for sci-fi look */
.image-container::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px solid transparent;
    background: 
        linear-gradient(to right, var(--accent-neon) 12px, transparent 12px) 0 0,
        linear-gradient(to bottom, var(--accent-neon) 12px, transparent 12px) 0 0,
        linear-gradient(to left, var(--accent-neon) 12px, transparent 12px) 100% 0,
        linear-gradient(to bottom, var(--accent-neon) 12px, transparent 12px) 100% 0,
        linear-gradient(to right, var(--accent-neon) 12px, transparent 12px) 0 100%,
        linear-gradient(to top, var(--accent-neon) 12px, transparent 12px) 0 100%,
        linear-gradient(to left, var(--accent-neon) 12px, transparent 12px) 100% 100%,
        linear-gradient(to top, var(--accent-neon) 12px, transparent 12px) 100% 100%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 12;
    opacity: 0.8;
    transition: all 0.3s ease;
}
.image-container:hover::before {
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--accent-neon));
}

/* Stats table border and glow */
.project-stats-table {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.02) !important;
}
.project-stats-table:hover {
    border-color: rgba(6, 182, 212, 0.25) !important;
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(6, 182, 212, 0.1) !important;
}

/* Countdown container border & glow */
.countdown-container {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.4), 0 0 15px rgba(255,255,255,0.02) !important;
}
.countdown-container:hover {
    border-color: rgba(139, 92, 246, 0.25) !important;
    box-shadow: inset 0 2px 12px rgba(0,0,0,0.4), 0 0 20px rgba(139, 92, 246, 0.1) !important;
}

/* Connection Status Indicator Widget */
.connection-status-widget {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    height: 40px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    user-select: none;
}
.connection-status-widget:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}
.connection-status-widget .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background 0.3s, box-shadow 0.3s;
}
.connection-status-widget.online {
    border-color: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}
.connection-status-widget.online .status-dot {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    animation: statusPulse 2s ease-in-out infinite;
}
.connection-status-widget.offline {
    border-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}
.connection-status-widget.offline .status-dot {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
}
.connection-status-widget.syncing {
    border-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}
.connection-status-widget.syncing .status-dot {
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
    animation: statusPulse 1s ease-in-out infinite;
}
body.light-mode .connection-status-widget {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
body.light-mode .connection-status-widget:hover {
    background: rgba(0, 0, 0, 0.06);
}
body.light-mode .connection-status-widget.online {
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.2);
}
body.light-mode .connection-status-widget.online .status-dot {
    background: #16a34a;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}
body.light-mode .connection-status-widget.offline {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}
body.light-mode .connection-status-widget.offline .status-dot {
    background: #dc2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}
body.light-mode .connection-status-widget.syncing {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.2);
}
body.light-mode .connection-status-widget.syncing .status-dot {
    background: #d97706;
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}

/* Premium Enhancements for Tab Bar & Sync Modals */
.crud-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    width: 100%;
}

.crud-tab-bar-wrapper {
    width: 100%;
    margin-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 0.4rem;
}

body.light-mode .crud-tab-bar-wrapper {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Button overrides for tab bar to make them look uniform and gorgeous */
.crud-tab-bar .python-tab-selector-btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
}

.crud-tab-bar .python-tab-selector-btn:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.crud-tab-bar .python-tab-selector-btn.active {
    background: rgba(6, 182, 212, 0.15) !important;
    border-color: var(--accent-neon, #06b6d4) !important;
    color: var(--accent-neon, #06b6d4) !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2) !important;
    text-shadow: 0 0 4px rgba(6, 182, 212, 0.3);
}

body.light-mode .crud-tab-bar .python-tab-selector-btn {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #475569 !important;
}

body.light-mode .crud-tab-bar .python-tab-selector-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

body.light-mode .crud-tab-bar .python-tab-selector-btn.active {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: #8b5cf6 !important;
    color: #8b5cf6 !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1) !important;
    text-shadow: none;
}

/* Student Badge Styles */
.student-badges-container {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    margin-left: 0.5rem;
}
.student-mini-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Space Grotesk', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.student-mini-badge.python {
    background: rgba(55, 118, 171, 0.2);
    border-color: rgba(55, 118, 171, 0.4);
    color: #ffd43b;
}
.student-mini-badge.web {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.4);
    color: #fb7185;
}
.student-mini-badge.database {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.student-mini-badge.exam {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

/* Offline Sync Queue Modal Content */
.sync-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s;
}
.sync-item-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}
.sync-item-action {
    font-weight: bold;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
}
.sync-item-action.save {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}
.sync-item-action.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}





/* Crop baked-in thick border from hero image */
.hero-image-crop-wrapper {
    width: 100%;
    border-radius: 1.4rem;
    overflow: hidden;
    border: 1px solid var(--accent-neon);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}
.hero-image-crop-wrapper .hero-image {
    width: 100% !important; /* Scale up to push the baked-in border out of view */
    max-width: 100% !important;
    height: auto;
    margin: 0; /* Pull it outside the wrapper to hide the border */
    border-radius: 0 !important; /* Let the wrapper handle the radius */
}


/* --- Görgetési Javítás a Fiók Ablakokhoz (Drawer Scroll Fix) --- */
.links-drawer {
    display: flex !important;
    flex-direction: column !important;
}
#drawer-links-content {
    min-height: 0 !important;
}

.achievements-drawer {
    display: flex !important;
    flex-direction: column !important;
}
#badge-shelf {
    overflow-y: auto !important;
    min-height: 0 !important;
    flex-grow: 1 !important;
    align-content: start !important;
}
\n\n/* FIX SCROLLING IN CRUD PANELS */\n.crud-list-panel, .crud-form-panel { min-height: 0 !important; }\n#teacher-links-container, #crud-groups-list, #crud-subjects-list { min-height: 0 !important; }\n\n\n/* FIX SCROLLING IN CRUD PANELS PART 2 */\n#link-form-container, #group-form-container, #subject-form-container, #content-form-container, #class-form-container, #student-form-container, #textbook-form-container, #syllabus-form-container, #scrum-form-container, #teacher-form-container, #teacher-analytics-container, #teacher-law-container, #teacher-exam-container, #settings-container { min-height: 0 !important; }\n
/* ==========================================================================
   Window Manager & Taskbar Styles
   ========================================================================== */

/* Taskbar Container */
#desktop-taskbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    position: fixed;
    bottom: 40px; /* Exact height of the marquee */
    left: 0;
    width: 100vw;
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 45px;
    overflow-x: auto;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

/* Taskbar Button */
.taskbar-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.taskbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.taskbar-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) inset;
}

/* Window Controls (Minimize, Maximize, Close) */
.window-controls {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.window-controls button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.window-control:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.window-control.selected {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.window-control .icon-wrap {
    color: var(--text-primary);
}

.window-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.window-controls button.btn-close:hover {
    background: #ef4444;
    color: #fff;
}

/* Maximized Window State */
.window-maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    resize: none !important;
    transform: none !important;
}

/* Focus animation */
@keyframes windowFocusGlow {
    0% { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1); }
    50% { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 2px var(--accent-blue); }
    100% { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1); }
}

.window-focused {
    animation: windowFocusGlow 0.5s ease;
}

@media (max-width: 768px) { .header-center-logo { position: relative !important; left: auto !important; transform: none !important; margin: 0.5rem auto !important; order: -1; } .top-header { flex-direction: column; align-items: center; } }

/* Focus Mode Styles */
body.focus-mode #desktop-shortcuts { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
body.focus-mode #desktop-taskbar { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
body.focus-mode .marquee-container { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
body.focus-mode .top-header { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
body.focus-mode #floating-qr-btn { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
body.focus-mode #focus-mode-btn { background: rgba(239, 68, 68, 0.2) !important; border-color: rgba(239, 68, 68, 0.4) !important; color: #ef4444 !important; }

/* Neon 3D Windows Effect */
.window-frame, .floating-os-window, .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.9),
        0 0 35px rgba(6, 182, 212, 0.5),
        0 0 65px rgba(139, 92, 246, 0.4),
        inset 1px 1px 3px rgba(255, 255, 255, 0.4),
        inset -1px -1px 4px rgba(0,0,0,0.7) !important;
    transform: perspective(1000px) translateZ(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.window-frame:hover, .floating-os-window:hover, .modal-content:hover {
    box-shadow: 
        0 25px 60px rgba(0,0,0,1), 
        0 0 45px rgba(6, 182, 212, 0.7), 
        0 0 85px rgba(139, 92, 246, 0.6), 
        inset 1px 1px 4px rgba(255, 255, 255, 0.6), 
        inset -1px -1px 5px rgba(0,0,0,0.9) !important;
}

body.light-mode .window-frame, body.light-mode .floating-os-window, body.light-mode .modal-content {
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.2),
        0 0 35px rgba(6, 182, 212, 0.4),
        0 0 65px rgba(139, 92, 246, 0.3),
        inset 1px 1px 3px rgba(255, 255, 255, 0.8),
        inset -1px -1px 4px rgba(0,0,0,0.1) !important;
}

/* Zebra Striping for Lists and Tables */
table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.04);
}
table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.accordion-content > *:nth-child(even),
.stat-row:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-radius: 6px;
}

body.light-mode table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.03);
}
body.light-mode table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .accordion-content > *:nth-child(even),
body.light-mode .stat-row:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* --- Settings Modal & Toggle Switch --- */
#settings-modal .modal-content {
    max-width: 650px;
}
.settings-group {
    margin-bottom: 24px;
}
.settings-group-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-neon);
    font-size: 1.1rem;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(6, 182, 212, 0.3);
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
}
.setting-row:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(6, 182, 212, 0.4);
}
.setting-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.setting-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.setting-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Cyberpunk Toggle Switch */
.cyber-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}
.cyber-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cyber-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    transition: .4s;
    border-radius: 34px;
}
.cyber-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .4s;
    border-radius: 50%;
}
input:checked + .cyber-slider {
    background-color: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-neon);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}
input:checked + .cyber-slider:before {
    transform: translateX(22px);
    background-color: var(--accent-neon);
    box-shadow: 0 0 10px var(--accent-neon);
}
body.light-mode .setting-row {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.1);
}
body.light-mode .setting-title { color: #0f172a; }
body.light-mode .setting-desc { color: #334155; }

/* Round 5 CSS */
#live-wallpaper {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -3;
    pointer-events: none;
    opacity: 0.3;
}
.glitch-active {
    animation: glitchAnim 0.3s cubic-bezier(.25, .46, .45, .94) both;
}
@keyframes glitchAnim {
    0% { transform: translate(0); filter: hue-rotate(0deg); }
    20% { transform: translate(-3px, 3px); filter: hue-rotate(90deg); }
    40% { transform: translate(-3px, -3px); filter: hue-rotate(180deg); }
    60% { transform: translate(3px, 3px); filter: hue-rotate(270deg); }
    80% { transform: translate(3px, -3px); filter: hue-rotate(360deg); }
    100% { transform: translate(0); filter: hue-rotate(0deg); }
}
#xp-widget {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-neon);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
#xp-widget .xp-bar-container {
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}
#xp-widget .xp-bar-fill {
    height: 100%;
    background: var(--accent-neon);
    width: 0%;
    transition: width 0.3s ease;
}

/* Mobile Optimization (max-width: 768px) */
@media (max-width: 768px) {
    /* 1. Full screen windows */
    .window-frame {
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 45px) !important; /* taskbar is min 45px */
        border-radius: 0 !important;
        resize: none !important;
        transform: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        max-width: 100vw !important;
        max-height: calc(100vh - 45px) !important;
    }

    /* Disable dragging cursor on mobile */
    .window-frame .window-header {
        cursor: default !important;
    }

    /* 2. Taskbar Scroll */
    .taskbar {
        padding-left: 10px !important;
        padding-right: 10px !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .taskbar::-webkit-scrollbar {
        display: none;
    }
    #active-windows {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
    }
    .taskbar-btn {
        flex: 0 0 auto !important;
        padding: 0.6rem 0.8rem !important;
    }

    /* 3. Desktop Grid */
    #desktop {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        align-content: flex-start !important;
        gap: 20px !important;
        padding: 20px !important;
    }
    .desktop-icon {
        position: static !important; /* Override absolute positioning */
        width: 80px !important;
        margin: 0 !important;
        transform: none !important;
    }

    /* 4. Modals */
    .modal-content {
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 100vh !important;
        border-radius: 0 !important;
        padding: 2rem 1.5rem !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .modal-overlay {
        align-items: flex-start !important; /* to cover full screen */
    }
    .hide-on-mobile {
        display: none !important;
    }
}

/* --- PRINT CSS --- */
@media print {
    body {
        background: white !important;
        color: black !important;
        margin: 0;
        padding: 0;
    }
    
    /* Hide EVERYTHING by default in print mode */
    body > * {
        display: none !important;
    }

    /* Unless it has .printable-area */
    .printable-area, .printable-area * {
        display: block !important;
    }
    
    /* Specific overrides for printable areas */
    .printable-area {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }

    /* Hide UI elements inside printable area */
    .printable-area button,
    .printable-area .no-print,
    .printable-area .fa-print {
        display: none !important;
    }

    /* Timetable Print Adjustments */
    .printable-area .timetable-grid {
        border-color: #ccc !important;
        background: white !important;
        box-shadow: none !important;
    }
    .printable-area .timetable-header {
        background: #eee !important;
        color: black !important;
        border-color: #ccc !important;
    }
    .printable-area .timetable-cell {
        border-color: #ccc !important;
        color: black !important;
        background: white !important;
    }
    .printable-area .timetable-cell.active-class-cell {
        background: #f0f0f0 !important;
        border: 2px solid #666 !important;
    }
    .printable-area .subject-pill {
        background: #f8f8f8 !important;
        color: black !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    .printable-area .timeline-progress-bar,
    .printable-area .current-time-indicator {
        display: none !important;
    }
}
