/* ============ RESET & TOKENS ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 80px 0;
}

:root {
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --blue: oklch(55% 0.22 250);
    --blue-light: oklch(75% 0.15 250);
    --blue-dark: oklch(40% 0.22 250);
    /* Default (Nanami) theme values — js/os.js applyTheme() overrides these
       once it runs; pages that don't load os.js (e.g. whitepaper.html) still
       render correctly with these instead of falling through to nothing. */
    --accent-color: #2972B6;
    --accent-rgb: 41, 114, 182;
    --accent-glow: rgba(41, 114, 182, 0.3);
    --accent-bokeh: rgba(41, 114, 182, 0.15);
    --accent-gradient: linear-gradient(135deg, #2972B6, #89A5C3);
    --accent-light: #89A5C3;
    --accent-secondary: #89A5C3;
    --accent-neutral: #D5D9DD;
    --bg-neutral: #D5D9DD;
    --accent: var(--accent-color);
    --win-red: #F25022;
    --win-green: #7FBA00;
    --win-blue: #00A4EF;
    --win-yellow: #FFB900;
    --text-primary: #1E293B;
    --text-secondary: rgba(30, 41, 59, 0.7);
    --navbar-text: #1E293B;
    --text-gradient: linear-gradient(135deg, #2972B6, #89A5C3);
    --text: var(--text-primary, #1E293B);
    --text-muted: var(--text-secondary, #64748B);
    --bg-top: #D5D9DD;
    --bg-bottom: #D5D9DD;
    --bg: var(--bg-top, #F8FAFC);
    --hero-overlay-start: rgba(255, 255, 255, 0.3);
    --hero-overlay-mid: rgba(255, 255, 255, 0.1);
    
    /* Motion.dev S-Tier Springs */
    --spring-bouncy: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
    --spring-soft: linear(0, 0.002, 0.008 2.6%, 0.031, 0.066, 0.113 9%, 0.168, 0.231, 0.301, 0.375 16.9%, 0.449, 0.522, 0.591, 0.655, 0.713 26.6%, 0.765, 0.811, 0.852, 0.887, 0.916 35.5%, 0.939, 0.957, 0.971, 0.982, 0.989 45.1%, 0.994, 0.997, 0.999, 1);
    --spring-stiff: linear(0, 0.14 6.7%, 0.54 11.1%, 0.72 12.9%, 0.86 14.8%, 0.94 16.7%, 1, 1.03, 1.05, 1.06, 1.07 24.1%, 1.07, 1.07 27.3%, 1.06 30.1%, 1.04 33.3%, 1.01 37.9%, 1);

    --glass-alpha: 0.1;
    --glass: rgba(255, 255, 255, var(--glass-alpha));
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 4px 16px rgba(255, 255, 255, 0.1); /* White glow instead of black shadow */
    --glass-inner: inset 0 1px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(0, 0, 0, 0.05);
    
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 28px;
    --shadow: 0 4px 20px rgba(var(--accent-rgb), 0.05); /* Colored, extremely subtle shadow */
    --shadow-lg: 0 12px 40px rgba(255, 255, 255, 0.05);
    --transition-fast: 0.18s ease-out; /* Emil Kowalski Ideal Speed */
    --transition-snappy: 0.25s var(--spring-stiff);
    --transition: 0.25s var(--spring-soft); /* Alterado de 0.6s para veloz */
    --on-accent: #FFFFFF;
    --aurora-opacity: 0.4;
    --navbar-bg: rgba(255, 255, 255, 0.5);
}

/* ============ ACCESSIBILITY: FOCUS & MOTION ============ */
:focus-visible {
    outline: 2px solid var(--accent, #0078D7);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.os-theme-btn.active {
    background: var(--accent); 
    color: #FFFFFF !important; 
    border-color: var(--accent); 
}

.theme-dark-mode {
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.2);
    --aurora-opacity: 0.3;
    --navbar-bg: rgba(255, 255, 255, 0.1);
}

/* Button Resets */
button.desktop-icon,
button.start-orb,
button.taskbar-pin,
button.tray-icon,
button.aero-peek-btn {
    background: transparent;
    border: none;
    font-family: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;
}
button.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text-primary, var(--text));
    background: var(--bg-top, #FFFFFF); /* Pure white foundation */
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition-fast), color var(--transition-fast);
}

h1, h2, h3, .logo span { 
    font-family: 'Outfit', sans-serif;
    color: var(--accent); 
    transition: color var(--transition-fast);
    letter-spacing: -0.02em;
    text-shadow: none;
}

h4, h5, h6, .nav-links a, .btn-buy-nav, .os-window-title {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary, var(--text)); 
    transition: color var(--transition-fast);
}

section { 
    position: relative; 
    overflow: hidden; 
    transition: background var(--transition-fast);
}

/* Glass Section Style */
.glass-section {
    background: var(--bg-top, #FFFFFF);
    transition: background var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
}

.section-divider {
    display: none;
}

/* ============ NAVBAR ============ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; height: 64px;
    background: var(--navbar-bg);
    backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition-fast), border-color var(--transition-fast);
    will-change: background;
}
.navbar.scrolled { 
    background: var(--navbar-bg); 
    box-shadow: var(--shadow);
    height: 52px;
}
.logo { 
    display: flex; align-items: center; gap: 8px; 
    font-weight: 800; font-size: 1.1rem; 
    color: var(--text-primary); 
    text-decoration: none;
    transition: transform 0.3s var(--spring-bouncy), opacity 0.3s ease;
}
.clover-icon { flex-shrink: 0; }
.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    position: relative; /* For the indicator */
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-indicator {
    position: absolute;
    height: calc(100% - 12px);
    top: 6px;
    left: 0;
    width: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    z-index: -1;
    transition: transform var(--transition-snappy), width var(--transition-snappy), opacity var(--transition-fast);
    box-shadow: none;
    will-change: transform, width;
}

.nav-links a {
    padding: 6px 14px; border-radius: 6px;
    font-size: 0.8rem; font-weight: 500; color: var(--navbar-text);
    opacity: 0.8;
    text-decoration: none; transition: transform 0.4s var(--spring-soft), opacity var(--transition-fast), color var(--transition-fast);
    border: 1px solid transparent;
}
.nav-links a:hover { 
    opacity: 1;
    color: var(--accent);
    font-weight: 650;
}
.nav-links a.active { 
    opacity: 1;
    color: var(--accent); 
    font-weight: 800;
}
.btn-buy-nav {
    padding: 8px 22px; border-radius: 10px;
    background: var(--accent);
    color: #fff !important;
    font-size: 0.8rem; font-weight: 700;
    text-decoration: none; transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.btn-buy-nav:hover { 
    transform: translateY(-2px); 
    filter: brightness(1.1);
}
.btn-buy-nav::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}
.btn-buy-nav:hover::after {
    left: 100%;
}

/* ============ MOBILE NAV TOGGLE ============ */
.nav-toggle {
    display: none;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 44px; height: 44px; padding: 0; margin-left: 8px;
    background: transparent; border: none; cursor: pointer; flex-shrink: 0;
}
.nav-toggle span {
    display: block; width: 20px; height: 2px; border-radius: 2px;
    background: var(--navbar-text, var(--text-primary, #1E293B));
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center bottom;
    background-repeat: no-repeat;
    z-index: 1; transition: background-image 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
@media (max-width: 992px) {
    .hero-bg {
        background-position: center bottom;
        opacity: 0.3;
        filter: blur(5px);
    }
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--hero-overlay-start) 0%, var(--hero-overlay-mid) 45%, transparent 100%);
}
.hero-container {
    position: relative; z-index: 2;
    width: 100%; max-width: 1400px; margin: 0 auto;
    display: flex; flex-direction: column;
    align-items: flex-start; text-align: left;
    padding: 110px 5% 40px;
}
.hero-content {
    max-width: 680px; padding: 0; margin-bottom: 20px;
    text-align: left;
}
.badge {
    display: inline-block; padding: 6px 16px; border-radius: 30px;
    background: rgba(var(--accent-rgb), 0.1); 
    color: var(--accent) !important; 
    font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em;
    margin-bottom: 24px;
    border: 1px solid var(--accent-light, rgba(var(--accent-rgb), 0.2));
    backdrop-filter: blur(8px);
    text-transform: uppercase;
}
.hero h1 {
    font-size: 3.4rem; font-weight: 800; line-height: 1.1;
    color: var(--accent); margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.text-gradient {
    background: linear-gradient(135deg, var(--accent-light, var(--accent)), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}
.hero-description {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 500px;
}

[data-theme="metan"] .hero-description,
[data-theme="claudia"] .hero-description,
[data-theme="inori"] .hero-description {
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Global Typography & UI Fix */
p, .bento-card p, .mascot-grid-card p, .timeline-desc, .footer p {
    color: var(--text-primary);
}

h2, h3, .card-content h3, .mascot-grid-card h3 {
    color: var(--text-primary);
}

/* Use accent color for highlights and Icons */
.badge, .bento-subtitle, .peek-title, .timeline-date, .footer-links a {
    color: var(--accent-color, var(--accent)) !important;
}

.card-icon-primary svg, .card-icon svg {
    stroke: var(--accent-color, var(--accent));
}

/* Fix desktop icons and cards */
.desktop-icon span {
    color: var(--text-primary) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Dynamic Glass Panels */
.glass-panel, .glass-card, .bento-card {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), var(--glass-bg, rgba(255, 255, 255, 0.7)));
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.05));
    transition: background 0.8s ease, transform var(--transition-snappy);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
/* Theme support logic handled by CSS variables */
/* Removed low-contrast dark mode override */
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.btn {
    padding: 10px 22px; border-radius: 10px;
    font-size: 0.82rem; font-weight: 600; text-decoration: none;
    transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary { 
    background: var(--accent-gradient, var(--accent));
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.2);
}
.btn-primary:hover { 
    transform: translateY(-2px); 
    filter: brightness(1.1);
    box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.3);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}
.btn-primary:hover::after {
    left: 100%;
    transition: 0.5s;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.85); 
    color: #1E293B; 
    border: 1px solid rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.btn-secondary:hover { 
    background: #fff; 
    border-color: var(--accent); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Removed legacy section - consolidated below */

/* ============ HERO CAROUSEL ============ */


.hero-carousel {
    width: 100%;
    margin-top: 30px;
    position: relative;
    z-index: 10;
}

.carousel-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px 20px 60px;
    perspective: 1000px;
}

/* Mobile-First Scrollable Carousel */
@media (max-width: 768px) {
    .carousel-track {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-left: 20px;
        padding-right: 20px;
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    .carousel-track::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari */
    }
    .carousel-card {
        scroll-snap-align: center;
        flex-shrink: 0;
    }
}

.carousel-card {
    min-width: clamp(48px, 10vw, 70px);
    height: clamp(48px, 10vw, 70px);
    cursor: pointer;
    transition: transform var(--transition-snappy), opacity var(--transition-fast);
    will-change: transform, opacity;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;

    /* Blurriness Fixes */
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    transform: translateZ(0);
    will-change: transform;

    /* Entrance Animation */
    opacity: 0;
    translate: 0 40px;
    scale: 0.9;
    filter: blur(10px);
    animation: dockEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--i) * 0.08s + 0.5s);
}

@keyframes dockEntrance {
    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
        filter: blur(0);
    }
}

.carousel-card-img {
    width: 200%;
    height: 200%;
    position: absolute;
    top: -50%;
    left: -50%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform var(--transition), filter var(--transition-fast);
    will-change: transform, filter;
    border-radius: 28px; /* Proportional to 200% size */
    
    /* Super-Sampling Quality */
    transform: scale(0.5) translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    filter: brightness(1.02) contrast(1.05);
    backface-visibility: hidden;
    will-change: transform, filter;
}

.carousel-card:hover,
.carousel-card.active:hover {
    transform: translateY(-15px) scale(1.1);
    z-index: 50;
    transform-origin: bottom center;
}

.carousel-card:hover .carousel-card-img {
    transform: scale(0.7) translateZ(0);
    filter: brightness(1.05) contrast(1.1);
}

.carousel-card.active {
    transform: translateY(-8px);
    z-index: 5;
}

.carousel-card.active .carousel-card-img {
    filter: none;
}

.carousel-card.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 3px;
    background: var(--accent);
    border-radius: 4px;
}



.carousel-card .mascot-tooltip {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.6);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    color: #1E293B;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.15s var(--spring-soft), opacity 0.15s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 100;
}

.carousel-card:hover .mascot-tooltip {
    opacity: 1;
    /* scale(0.71) is the inverse of the card's scale(1.4) to keep text size constant */
    transform: translateX(-50%) translateY(0) scale(0.71) translateZ(0);
}

.carousel-card.special-card .carousel-card-img {
    filter: drop-shadow(0 0 5px var(--accent));
}

.carousel-arrow { display: none; } /* Arrows not needed for dock style */

/* ============ SECTION HEADERS ============ */
.section-header { text-align: center; margin-bottom: 48px; position: relative; z-index: 5; }
.section-header h2 { 
    font-size: 2.8rem; font-weight: 900; 
    color: #1E293B; 
    letter-spacing: -1.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.section-header h2 span { color: var(--accent-color, var(--accent)); }
.section-header p { 
    font-size: 1rem; color: #475569; 
    opacity: 0.9; margin-top: 12px; max-width: 600px; margin-inline: auto; 
    line-height: 1.6;
}

/* ============ OS PREVIEW ============ */
.os-section { 
    padding: 80px 2rem 120px; 
    background: var(--bg-top, #FFFFFF); 
    position: relative; 
    transition: background var(--transition-fast);
}

/* Theme bar - Horizontal Scroll Dock */
.os-theme-bar {
    display: flex; 
    justify-content: center; /* Centralize themes */
    align-items: center;
    gap: 8px;
    margin-bottom: 25px; 
    flex-wrap: nowrap; 
    overflow-x: auto;
    padding: 12px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.os-theme-bar::-webkit-scrollbar {
    height: 4px;
}
.os-theme-bar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
.os-theme-btn {
    flex: 0 0 auto;
    padding: 6px 14px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.9); 
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 0.75rem; font-weight: 700; cursor: pointer;
    transition: var(--transition); color: #1E293B;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.os-theme-btn:hover { border-color: var(--accent); background: #fff; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.2); }
.os-theme-btn.active { background: var(--accent); color: var(--on-accent) !important; border-color: var(--accent); box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.3); }

/* Computer frame */
.computer-frame { max-width: 900px; margin: 0 auto; position: relative; }
.computer-bezel {
    background: #1a1a1e; border-radius: 12px 12px 4px 4px;
    padding: 8px; box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.1);
}
.aero-desktop {
    position: relative; width: 100%; aspect-ratio: 16/10;
    border-radius: 4px; overflow: hidden;
    overflow: clip; /* never scrollable: focus/scrollIntoView would shift windows and hide their title bars */
    background: #1a5276;
}
.desktop-wallpaper {
    position: absolute; top: 0; left: 0; right: 0; bottom: 32px;
    background-size: cover; background-position: center;
    background-repeat: no-repeat;
    transition: background-image var(--transition-fast), background-color var(--transition-fast);
}

/* Desktop icons */
.desktop-icons {
    position: absolute; top: 8px; left: 8px; bottom: 40px; z-index: 5;
    display: flex; flex-direction: column; flex-wrap: wrap; gap: 4px;
}
.desktop-icon {
    width: 64px; text-align: center; padding: 4px;
    border-radius: 4px; cursor: pointer; transition: var(--transition);
}
.desktop-icon:hover { background: rgba(var(--accent-rgb), 0.15); }
.desktop-icon .icon-img { font-size: 1.6rem; margin-bottom: 2px; }
.desktop-icon span { font-size: 0.6rem; font-weight: 600; color: #1E293B !important; text-shadow: none !important; display: block; }

/* Aurora Background Effect */
.aurora-bg {
    position: absolute; inset: 0;
    background: var(--accent);
    opacity: 0.15;
    filter: blur(80px);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 1.2s var(--spring-soft), opacity 1.2s ease;
    will-change: transform, opacity;
    z-index: 0;
}

/* Aero Snap Preview Layer */
.aero-snap-preview {
    position: absolute; 
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px var(--accent-glow);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--spring-soft), opacity 0.3s ease;
    will-change: transform, opacity;
    border-radius: 8px;
    z-index: 100;
}
.aero-snap-preview.visible { opacity: 1; }

/* /* Aero Glass Windows V2 */
.aero-window {
    position: absolute; z-index: 10; min-width: 320px;
    /* Bound height to the desktop frame so window-body's overflow-y:auto can
       actually scroll internally instead of the window ballooning past the
       frame (very visible once the frame is short on mobile). */
    max-height: calc(100% - 16px);
    border-radius: 8px 8px 4px 4px; overflow: hidden;
    background: var(--glass);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: 
        box-shadow 0.3s ease, 
        transform var(--transition-snappy), 
        border-color 0.3s ease, 
        opacity 0.4s var(--spring-soft),
        filter var(--transition-fast);
    transform-origin: center center;
    will-change: transform, opacity, filter, width, height, top, left;
    display: flex;
    flex-direction: column;
}

/* Spring-based Maximize/Restore Hook */
.aero-window.transitioning {
    transition: 
        width var(--transition-snappy), 
        height var(--transition-snappy), 
        top var(--transition-snappy), 
        left var(--transition-snappy),
        transform var(--transition-snappy),
        opacity var(--transition),
        filter var(--transition-fast);
}
.aero-window.maximized {
    border-radius: 0;
    box-shadow: none;
    border-top: none;
}

/* Glass Caustics Effect */
.aero-window::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(
        circle at var(--caustic-x, 50%) var(--caustic-y, 20%), 
        rgba(255,255,255,0.25) 0%, 
        transparent 50%
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

.aero-window.focused { 
    z-index: 20; 
    box-shadow: 
        0 15px 60px var(--accent-glow),
        0 0 0 1px rgba(var(--accent-rgb), 0.3),
        inset 0 1px 2px rgba(255,255,255,0.8);
    border-color: rgba(255, 255, 255, 0.8);
}

.aero-window.peek-mode {
    opacity: 0.15;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.aero-window.minimized-state {
    transform: scale(0.8) translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.aero-window .title-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 12px; min-height: 32px; cursor: move;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.5) 0%, 
        rgba(255,255,255,0.2) 45%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0.05) 100%
    );
    background-color: rgba(var(--accent-rgb), 0.5);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
    transition: background-color var(--transition-fast);
}

.aero-window .title-bar-text {
    font-size: 0.75rem; color: #fff; font-weight: 600;
    text-shadow: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    letter-spacing: 0.02em;
}

.aero-window .title-bar-controls { display: flex; gap: 4px; }
.aero-window .title-bar-controls button {
    width: 26px; height: 20px; border: none; border-radius: 3px;
    font-size: 0.7rem; cursor: pointer; transition: background 0.2s ease, transform 0.2s var(--spring-bouncy);
    background: rgba(255,255,255,0.2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.aero-window .title-bar-controls button:hover { 
    background: rgba(255,255,255,0.4); 
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 8px rgba(255,255,255,0.3);
}

.aero-window .title-bar-controls button.close-btn:hover { 
    background: linear-gradient(180deg, #ff7e7e, #e74c3c); 
    border-color: #c0392b;
}

.aero-window .window-body {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 16px; font-size: 0.75rem; color: #1e293b;
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Welcome window content — the mascot <img> has no intrinsic constraint
   otherwise, so it renders at native resolution and balloons the whole
   window to match (very visible on the mobile-sized demo frame). */
.window-welcome { display: flex; flex-direction: column; height: 100%; }
.welcome-hero {
    flex-shrink: 0; height: 130px; border-radius: 6px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.welcome-hero img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.welcome-content { padding: 14px 2px 2px; }
.welcome-content h3 { font-size: 0.95rem; margin: 0 0 6px; color: #1e293b; }
.welcome-content p { font-size: 0.75rem; color: #475569; line-height: 1.5; margin: 0 0 12px; }
.welcome-tips { display: flex; flex-direction: column; gap: 6px; }
.welcome-tips .tip { font-size: 0.7rem; color: #334155; background: rgba(0,0,0,0.04); padding: 7px 10px; border-radius: 6px; }

.aero-window .status-bar {
    display: flex; justify-content: space-between;
    padding: 4px 12px; 
    background: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.65rem; color: #64748b;
    backdrop-filter: blur(5px);
}

/* Window Resize Handles */
.resize-handle {
    position: absolute;
    z-index: 50;
}
.resize-handle.n  { top: -3px; left: 8px; right: 8px; height: 6px; cursor: n-resize; }
.resize-handle.s  { bottom: -3px; left: 8px; right: 8px; height: 6px; cursor: s-resize; }
.resize-handle.e  { right: -3px; top: 8px; bottom: 8px; width: 6px; cursor: e-resize; }
.resize-handle.w  { left: -3px; top: 8px; bottom: 8px; width: 6px; cursor: w-resize; }
.resize-handle.nw { top: -3px; left: -3px; width: 12px; height: 12px; cursor: nw-resize; }
.resize-handle.ne { top: -3px; right: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.resize-handle.sw { bottom: -3px; left: -3px; width: 12px; height: 12px; cursor: sw-resize; }
.resize-handle.se { bottom: -3px; right: -3px; width: 12px; height: 12px; cursor: se-resize; }

/* Window Lifecycle Animations (Jakub Krehel Entry Recipe) */
.aero-window.entering {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(4px);
    transition: none;
}

.aero-window.focused { 
    opacity: 1;
    transform: translateY(0px);
    filter: blur(0px);
    transition: transform 0.45s var(--spring-bouncy), 
                opacity var(--transition-snappy), 
                filter var(--transition-snappy);
}

/* Global Interaction Feedback (Emil Kowalski) */
button:active, 
.desktop-icon:active, 
.start-item:active, 
.mascot-grid-card:active, 
.bento-card:active,
.gallery-item:active,
.nav-link:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s var(--spring-stiff) !important;
}

/* Lightbox Motion Refinement */
#lightbox {
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

#lightbox.open {
    pointer-events: auto;
    opacity: 1;
}

#lightbox-img {
    transform: scale(0.9) translateY(20px);
    filter: blur(10px);
    transition: transform var(--transition-snappy), 
                filter var(--transition);
}

#lightbox.open #lightbox-img {
    transform: scale(1) translateY(0);
    filter: blur(0);
}

.aero-window.exiting {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    filter: blur(8px);
    transition: opacity 0.3s var(--spring-soft), transform 0.4s var(--spring-soft), filter 0.3s ease-in;
    pointer-events: none;
}

/* Minimize Animation */
.aero-window.minimizing {
    transition: transform var(--transition), opacity var(--transition-fast) !important;
    opacity: 0;
    pointer-events: none;
}

.aero-window.restoring {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Maximize Animation */
.aero-window.maximizing {
    transition: transform 0.35s var(--spring-bouncy), opacity 0.3s ease, filter 0.3s ease !important;
}

/* Context Menu */
.context-menu {
    position: absolute;
    z-index: 200;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.12),
        0 0 0 1px rgba(255,255,255,0.2),
        inset 0 1px 0 rgba(255,255,255,0.5);
    padding: 4px 0;
    font-size: 0.68rem;
    color: #1e293b;
    animation: contextMenuIn 0.15s ease-out;
    overflow: hidden;
}

@keyframes contextMenuIn {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.context-menu-item {
    padding: 6px 12px 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
    position: relative;
}
.context-menu-item:hover {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-color);
}
.context-menu-item .ctx-icon {
    width: 16px;
    text-align: center;
    font-size: 0.72rem;
    opacity: 0.7;
}
.context-menu-separator {
    height: 1px;
    margin: 4px 8px;
    background: rgba(0,0,0,0.08);
}
.context-menu-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}
.context-menu-item .ctx-shortcut {
    margin-left: auto;
    font-size: 0.58rem;
    opacity: 0.4;
    padding-left: 20px;
}
.context-menu-item .ctx-arrow {
    margin-left: auto;
    font-size: 0.5rem;
    opacity: 0.5;
    padding-left: 10px;
}
.context-menu-submenu {
    display: none;
    position: absolute;
    left: calc(100% - 2px);
    top: -4px;
    min-width: 150px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 4px 0;
    z-index: 201;
}
.context-menu-item:hover > .context-menu-submenu {
    display: block;
    animation: contextMenuIn 0.1s ease-out;
}


/* Taskbar */
.aero-taskbar {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 32px; z-index: 50;
    display: flex; align-items: center;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.2) 0%, 
        rgba(255,255,255,0.05) 45%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0.15) 100%
    );
    background-color: rgba(var(--accent-rgb), 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255,255,255,0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    padding: 0 4px;
}
.start-orb {
    width: 36px; height: 28px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
    background: radial-gradient(circle at 50% 40%, rgba(100,200,255,0.4), transparent 70%);
    border: 1px solid rgba(255,255,255,0.15);
}
.start-orb:hover { background: radial-gradient(circle at 50% 40%, rgba(130,220,255,0.6), transparent 70%); }
.taskbar-pins { flex: 1; display: flex; gap: 1px; margin-left: 2px; }
.taskbar-pin {
    padding: 4px 8px; border-radius: 4px;
    font-size: 0.6rem; color: #fff; cursor: pointer;
    background: rgba(255,255,255,0.08);
    transition: transform 0.3s var(--spring-soft), background 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    will-change: transform;
}
/* Mobile touch target optimization & Responsiveness */
@media (max-width: 768px) {
    .aero-taskbar { height: 52px; }
    .taskbar-pin { padding: 12px 18px; font-size: 0.85rem; min-height: 44px; border-radius: 8px; }
    .taskbar-tray { gap: 12px; padding-right: 10px; }
    .tray-icon { font-size: 1.1rem; }
    
    .start-menu {
        width: calc(100% - 20px);
        left: 10px;
        bottom: 62px;
        border-radius: 20px;
        max-height: 75vh;
        overflow-y: auto;
    }
    .start-menu-body { flex-direction: column; min-height: auto; }
    .start-menu-left { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .start-menu-right { width: 100%; background: rgba(255,255,255,0.05); }
    .start-item, .start-item-right { padding: 15px 20px; font-size: 0.95rem; }
    .start-menu-header { padding: 18px 20px; font-size: 1rem; }
    .start-menu-avatar { width: 44px; height: 44px; }
}
.taskbar-pin:hover { 
    background: rgba(255,255,255,0.25); 
    border-color: rgba(255,255,255,0.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 10px rgba(255,255,255,0.2);
}
.taskbar-pin.active { 
    background: rgba(255,255,255,0.3); 
    border-bottom: 2px solid rgba(255,255,255,0.8); 
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.taskbar-tray { display: flex; align-items: center; gap: 8px; margin-left: auto; height: 100%; padding-right: 2px; }
.tray-icon { font-size: 0.7rem; cursor: pointer; opacity: 0.8; transition: opacity 0.2s; color: #fff; }
.tray-icon:hover { opacity: 1; }
.taskbar-clock { font-size: 0.65rem; color: #fff; font-weight: 500; margin: 0 4px; white-space: nowrap; }

.aero-peek-btn {
    width: 14px; height: 100%; border: none;
    background: rgba(255,255,255,0.05);
    border-left: 1px solid rgba(255,255,255,0.2);
    cursor: pointer; transition: var(--transition);
    margin-left: 4px;
}
.aero-peek-btn:hover { background: rgba(255,255,255,0.2); }

/* Desktop Icons */
.desktop-icons {
    position: absolute; top: 0; left: 0; bottom: 32px; right: 0;
    padding: 10px; display: grid;
    grid-template-columns: repeat(auto-fill, 70px);
    grid-template-rows: repeat(auto-fill, 80px);
    grid-auto-flow: column; gap: 4px;
    pointer-events: none;
}
.desktop-icon {
    width: 70px; height: 80px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 4px; border-radius: 4px;
    cursor: pointer; pointer-events: auto;
    transition: background var(--transition-fast), border var(--transition-fast);
    border: 1px solid transparent;
}
.desktop-icon:hover {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}
.desktop-icon.selected {
    background: rgba(255,255,255,0.2) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
}
.desktop-icon.dragging {
    opacity: 0.8;
    z-index: 1000;
    pointer-events: none;
    transition: none !important;
    background: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.4);
    scale: 1.05;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.desktop-icon .icon-img {
    font-size: 1.8rem; margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(255,255,255,0.2));
}
.desktop-icon span {
    font-size: 0.65rem; color: #fff; text-align: center;
    text-shadow: none;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* Start Menu Avatar */
.start-menu-avatar {
    width: 48px; height: 48px; border-radius: 4px;
    border: 2px solid #fff; box-shadow: none;
    overflow: hidden; background: #fff;
    margin-right: 12px;
}
.start-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Physical Hardware Details */
.bezel-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2px 12px; margin-top: 4px;
}
.bezel-logo {
    font-size: 0.6rem; color: rgba(255,255,255,0.3);
    font-weight: 800; letter-spacing: 2px;
    text-transform: uppercase;
}
.bezel-controls { display: flex; align-items: center; gap: 15px; }
.status-led {
    width: 4px; height: 4px; border-radius: 50%;
    background: #333; transition: all 0.5s;
    box-shadow: 0 0 0px transparent;
}
.status-led.on {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.power-btn {
    width: 14px; height: 14px; border-radius: 50%;
    background: linear-gradient(145deg, #2a2a2e, #1a1a1e);
    border: 1px solid #333; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.5rem; color: #555;
    transition: all 0.2s;
}
.power-btn:active { transform: scale(0.95); }
.power-btn:hover { color: var(--accent); border-color: #444; }

/* Start Menu */
.start-menu {
    position: absolute; bottom: 32px; left: 0;
    width: 280px; z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    border-radius: 8px 8px 0 0;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.5),
        0 -15px 45px var(--accent-glow);
    display: none; flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: transform var(--transition-snappy), opacity var(--transition-fast);
    will-change: transform, opacity;
}
.start-menu.open { display: flex; animation: startMenuPop var(--transition-snappy); }
@keyframes startMenuPop {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.start-menu-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(80,140,220,0.8), rgba(60,100,180,0.8));
    color: #fff; font-size: 0.72rem; font-weight: 600;
    border-radius: 6px 6px 0 0;
}
.start-avatar { font-size: 1.2rem; }
.start-menu-body { display: flex; min-height: 160px; }
.start-menu-left { flex: 1; padding: 6px 0; border-right: 1px solid rgba(255,255,255,0.2); }
.start-menu-right { width: 110px; padding: 6px 0; background: rgba(var(--accent-rgb), 0.1); backdrop-filter: blur(5px); }
.start-item, .start-item-right {
    padding: 5px 12px; font-size: 0.65rem; cursor: pointer;
    transition: var(--transition); color: var(--text);
}
.start-item:hover, .start-item-right:hover { background: rgba(37,99,235,0.1); color: var(--accent); }
.start-menu-footer {
    padding: 6px 12px; border-top: 1px solid rgba(255,255,255,0.2);
    text-align: right;
    background: rgba(255,255,255,0.3);
}
.start-shutdown {
    padding: 4px 12px; border-radius: 4px;
    background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1);
    font-size: 0.62rem; cursor: pointer; transition: var(--transition);
}
.start-shutdown:hover { background: rgba(231,76,60,0.1); color: #e74c3c; }

/* Fullscreen */
.fullscreen-btn {
    display: block; margin: 12px auto 0; padding: 6px 16px;
    border-radius: 8px; background: var(--accent); color: #fff;
    font-size: 0.72rem; font-weight: 600; border: none;
    cursor: pointer; transition: var(--transition);
}
.fullscreen-btn:hover { background: var(--blue-dark); }
.computer-frame.fullscreen {
    position: fixed; inset: 0; z-index: 9999;
    max-width: none; margin: 0; display: flex; flex-direction: column;
}
.computer-frame.fullscreen .computer-bezel {
    flex: 1; border-radius: 0; padding: 0;
}
.computer-frame.fullscreen .aero-desktop { border-radius: 0; aspect-ratio: auto; height: 100%; }
.computer-frame.fullscreen .monitor-stand,
.computer-frame.fullscreen .fullscreen-btn { display: none; }

/* Monitor stand */
.monitor-stand { display: flex; flex-direction: column; align-items: center; }
.stand-neck { width: 60px; height: 28px; background: linear-gradient(90deg, #2a2a2e, #3a3a3e, #2a2a2e); }
.stand-base { width: 140px; height: 8px; background: linear-gradient(90deg, #2a2a2e, #3a3a3e, #2a2a2e); border-radius: 0 0 4px 4px; }

/* ============ DESKTOP GADGETS ============ */
.desktop-gadgets {
    position: absolute;
    right: 8px; top: 8px;
    display: flex; flex-direction: column;
    gap: 6px; z-index: 5;
    pointer-events: auto;
}
.gadget {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 10px;
    padding: 10px 14px;
    color: #1e293b;
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
    transition: opacity 0.3s, transform 0.3s;
    min-width: 110px;
}
.gadget:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.02);
}

/* Clock Gadget */
.gadget-clock { text-align: center; }
.gadget-time {
    font-size: 1.4rem; font-weight: 300;
    letter-spacing: 1px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.1;
}
.gadget-date {
    font-size: 0.52rem; opacity: 0.7;
    margin-top: 2px;
}
.gadget-seconds {
    font-size: 0.6rem; opacity: 0.5;
    font-weight: 300;
}

/* Weather Gadget */
.gadget-weather { text-align: center; }
.gadget-weather-icon { font-size: 1.3rem; line-height: 1; }
.gadget-weather-temp { font-size: 1rem; font-weight: 300; margin: 2px 0; }
.gadget-weather-desc { font-size: 0.5rem; opacity: 0.7; }
.gadget-weather-location { font-size: 0.45rem; opacity: 0.5; margin-top: 2px; }

/* System Monitor Gadget */
.gadget-monitor-title {
    font-size: 0.55rem; font-weight: 600;
    margin-bottom: 6px; opacity: 0.8;
}
.gadget-monitor-bar {
    display: flex; align-items: center; gap: 4px;
    margin-bottom: 4px; font-size: 0.48rem;
}
.gadget-monitor-bar span { min-width: 18px; }
.monitor-bar-track {
    flex: 1; height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px; overflow: hidden;
}
.monitor-bar-fill {
    height: 100%; border-radius: 2px;
    background: var(--accent-color, #0078D7);
    width: 100%;
    transform-origin: left;
    transition: transform var(--transition-snappy);
}
.monitor-val { min-width: 22px; text-align: right; opacity: 0.7; }

/* ============ NOTIFICATIONS ============ */
.notification-container {
    position: absolute;
    bottom: 40px; right: 8px;
    display: flex; flex-direction: column-reverse;
    gap: 6px; z-index: 500;
    pointer-events: none;
}
.notification-toast {
    pointer-events: auto;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 12px 16px;
    min-width: 260px; max-width: 320px;
    margin-bottom: 8px;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.1),
        inset 0 0 0 1px rgba(255,255,255,0.3);
    animation: notif-in 0.5s cubic-bezier(0.17, 0.89, 0.32, 1.15) forwards;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s;
}

.notification-toast::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
    pointer-events: none;
}

.notification-toast:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px) scale(1.01);
}

.notification-toast.exiting {
    animation: notif-out 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.notif-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 6px;
}

.notif-icon { 
    font-size: 1rem; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.notif-title { 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: var(--theme-color);
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.notif-body { 
    font-size: 0.7rem; 
    color: #1a1a1a; 
    line-height: 1.4;
    opacity: 0.9;
}

.notif-time { 
    font-size: 0.6rem; 
    color: rgba(0,0,0,0.4); 
    margin-top: 8px;
    text-align: right;
}

.notif-progress {
    position: absolute;
    bottom: 0; left: 0; height: 2px;
    background: var(--theme-color);
    width: 100%;
    transform-origin: left;
    animation: notif-progress linear forwards;
}

@keyframes notif-in {
    from { opacity: 0; transform: translateX(120%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes notif-out {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(120%) scale(0.8); }
}

@keyframes notif-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ============ SNAP PREVIEW (REFINED) ============ */
.aero-snap-preview {
    position: absolute;
    background: rgba(var(--accent-rgb), 0.12);
    border: 2px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 8px;
    z-index: 4;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    backdrop-filter: blur(4px);
}
.aero-snap-preview.visible { opacity: 1; }

/* Snap Zones — account for taskbar height */
.aero-snap-preview.snap-left {
    left: 0; top: 0; width: 50%; height: calc(100% - 32px);
}
.aero-snap-preview.snap-right {
    right: 0; top: 0; width: 50%; height: calc(100% - 32px);
}
.aero-snap-preview.snap-top {
    left: 0; top: 0; width: 100%; height: calc(100% - 32px);
}

/* ============ AERO SHAKE ANIMATION ============ */
@keyframes aero-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}
.shaking { animation: aero-shake 0.35s ease; }

/* ============ NOTEPAD APP ============ */
.notepad-app { display: flex; flex-direction: column; height: 100%; flex: 1; }
.notepad-menubar {
    display: flex; gap: 0; padding: 2px 4px;
    background: rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.notepad-menu-item {
    padding: 2px 8px; font-size: 0.62rem; cursor: pointer;
    border-radius: 2px; transition: background 0.15s;
}
.notepad-menu-item:hover { background: rgba(var(--accent-rgb), 0.15); }
.notepad-textarea {
    flex: 1; border: none; outline: none; resize: none;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.72rem; line-height: 1.6;
    padding: 8px 12px; background: #fff;
    color: #1e293b; min-height: 100%;
}

/* ============ CALCULATOR APP ============ */
.calc-app { padding: 0; display: flex; flex-direction: column; height: 100%; flex: 1; }
.calc-display {
    padding: 16px 12px 8px;
    font-size: 1.6rem; font-weight: 300;
    text-align: right; color: #1e293b;
    background: rgba(255,255,255,0.6);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; min-height: 48px;
}
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px; padding: 1px;
    background: rgba(0,0,0,0.04);
    flex: 1;
}
.calc-btn {
    padding: 14px 8px; border: none; cursor: pointer;
    font-size: 0.82rem; font-weight: 500;
    background: rgba(255,255,255,0.85);
    color: #1e293b;
    transition: background 0.12s, transform 0.08s;
}
.calc-btn:hover { background: rgba(var(--accent-rgb), 0.1); }
.calc-btn:active { transform: scale(0.95); background: rgba(var(--accent-rgb), 0.2); }
.calc-btn.op {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-color);
    font-weight: 600;
}
.calc-btn.op:hover { background: rgba(var(--accent-rgb), 0.25); }
.calc-btn.func {
    background: rgba(0,0,0,0.04);
    color: #64748b;
}
.calc-btn.func:hover { background: rgba(0,0,0,0.08); }
.calc-btn.equals {
    background: var(--accent);
    color: #fff; font-weight: 600;
}
.calc-btn.equals:hover { filter: brightness(1.1); }
.calc-btn.zero { grid-column: span 2; }

/* ============ TERMINAL APP ============ */
.terminal-app {
    background: #0c0c0c;
    color: #cccccc;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.68rem;
    padding: 8px;
    display: flex; flex-direction: column;
    height: 100%; flex: 1;
}
.terminal-output {
    flex: 1; overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
.term-line {
    line-height: 1.5;
    min-height: 1em;
}
.terminal-input-line {
    display: flex; align-items: center;
    gap: 0; margin-top: 2px;
}
.term-prompt {
    color: #cccccc;
    white-space: nowrap;
    flex-shrink: 0;
}
.terminal-input {
    flex: 1; background: transparent;
    border: none; outline: none;
    color: #cccccc;
    font-family: inherit; font-size: inherit;
    caret-color: #fff;
    padding: 0;
}

/* ============ SETTINGS APP ============ */
.settings-app {
    display: flex; height: 100%; flex: 1;
}
.settings-sidebar {
    width: 100px; flex-shrink: 0;
    background: rgba(0,0,0,0.03);
    border-right: 1px solid rgba(0,0,0,0.06);
    padding: 8px 0;
}
.settings-nav-item {
    padding: 6px 10px; font-size: 0.62rem;
    cursor: pointer; transition: background 0.15s;
    white-space: nowrap;
}
.settings-nav-item:hover { background: rgba(var(--accent-rgb), 0.1); }
.settings-nav-item.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-left: 2px solid var(--accent-color);
    font-weight: 600;
}

/* ============ MISSING APP CONTAINERS ============ */
.browser-v2, .lore-v2, .about-v2, .explorer-v2 {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}
/* Image logos used in place of emoji icons (desktop + start menu) */
.app-logo {
    width: 1em; height: 1em;
    border-radius: 22%;
    object-fit: contain;
    vertical-align: -0.15em;
}
/* Custom Aero app icons (assets/icons/*.svg) */
.app-icon {
    width: 1.15em; height: 1.15em;
    vertical-align: -0.25em;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}
.browser-frame {
    flex: 1;
    min-height: 0;
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.browser-chart { background: #0b0e11; }
.chart-placeholder {
    height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 6px; text-align: center;
    color: #c9d1d9;
    background: radial-gradient(circle at 50% 40%, #1a2230, #0b0e11 70%);
}
.chart-placeholder img { width: 44px; height: 44px; border-radius: 10px; margin-bottom: 4px; }
.chart-placeholder h3 { color: #fff; font-size: 1.1rem; letter-spacing: 0.04em; }
.chart-placeholder p { font-size: 0.75rem; color: #8b98a9; }
.chart-placeholder span {
    margin-top: 6px; padding: 4px 12px;
    font-size: 0.65rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 999px;
}
.browser-frame iframe {
    width: 100%; height: 100%;
    border: 0; display: block;
}
.settings-content {
    flex: 1; padding: 12px 16px;
    overflow-y: auto;
}
.settings-section { margin-bottom: 16px; }
.settings-label {
    display: block; font-size: 0.68rem;
    font-weight: 600; margin-bottom: 8px;
    color: #475569;
}
.settings-mascot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.settings-mascot-card {
    display: flex; flex-direction: column;
    align-items: center; padding: 6px 4px;
    border-radius: 6px; cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: rgba(0,0,0,0.02);
}
.settings-mascot-card:hover { background: rgba(var(--accent-rgb), 0.08); }
.settings-mascot-card.active { background: rgba(var(--accent-rgb), 0.12); }
.settings-mascot-card img {
    width: 32px; height: 32px;
    border-radius: 4px; object-fit: cover;
    margin-bottom: 3px;
}
.settings-mascot-card span {
    font-size: 0.55rem; text-align: center;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 100%;
}
.settings-range {
    width: 100%; cursor: pointer;
    accent-color: var(--accent-color);
}
.settings-value {
    font-size: 0.65rem; color: #64748b;
    margin-left: 8px;
}
.settings-info {
    font-size: 0.65rem; color: #64748b;
    line-height: 1.8;
    padding: 8px 10px;
    background: rgba(0,0,0,0.02);
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.04);
}

/* ============ ABOUT ============ */
.about-section { padding: 120px 2rem; background: transparent; position: relative; }

/* OPTION 1: Frutiger Aero Glass Spheres & Aurora */
.about-aero-elements {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.section-decoration, .bg-aero-elements {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* High Fidelity Aero Spheres */
.aero-sphere {
    position: absolute;
    border-radius: 50%;
    /* Pure Bokeh: transparent center, glowing edges */
    background: radial-gradient(circle at center, transparent 30%, var(--accent-bokeh) 100%);
    box-shadow: 
        inset 0 0 20px rgba(255,255,255,0.8),
        inset 0 0 0 2px rgba(255,255,255,0.5), /* crisp white edge */
        0 0 40px var(--accent-bokeh); /* outer colored glow */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: float-bokeh 25s infinite ease-in-out alternate;
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
}

/* Glass Tiles for Mascots */
.aero-tile {
    position: absolute;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.3), 
        inset 0 0 30px var(--accent-glow),
        inset 0 1px 0 rgba(255,255,255,0.5);
    animation: float-3d 18s ease-in-out infinite alternate-reverse;
    border-radius: 24px;
    opacity: 0.7;
    overflow: hidden;
}

.aero-tile::after {
    content: '';
    position: absolute;
    top: -100%; left: -100%; width: 300%; height: 300%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: aero-shimmer 6s infinite;
}

/* Glass Frames for Gallery */
.aero-frame {
    position: absolute;
    border: 3px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1), inset 0 0 50px var(--accent-glow);
    animation: float-3d 25s ease-in-out infinite alternate;
    opacity: 0.6;
    border-radius: 4px; /* Crisp edges for frames */
}

@keyframes aero-shimmer {
    0% { transform: translate(-30%, -30%) rotate(0deg); }
    100% { transform: translate(30%, 30%) rotate(0deg); }
}

@keyframes float-3d {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(20px, -30px) rotate(3deg) scale(1.05); }
    66% { transform: translate(-15px, 20px) rotate(-2deg) scale(0.95); }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes float-bokeh {
    0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    33% { transform: translate(30px, -40px) scale(1.1); opacity: 0.6; }
    66% { transform: translate(-20px, 30px) scale(0.9); opacity: 0.5; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
}

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



.theme-dark-mode .hero-mesh-gradient {
    opacity: 0.15;
    filter: blur(100px);
}



.sphere-1 { width: 180px; height: 180px; top: 5%; left: -2%; animation-delay: 0s; }
.sphere-2 { width: 100px; height: 100px; bottom: 10%; left: 10%; animation-delay: -4s; }
.sphere-3 { width: 220px; height: 220px; top: 20%; right: -5%; animation-delay: -9s; }
.sphere-4 { width: 150px; height: 150px; top: 40%; right: 15%; animation-delay: -2s; }
.sphere-5 { width: 300px; height: 300px; bottom: -5%; left: 30%; animation-delay: -12s; }
.sphere-6 { width: 120px; height: 120px; top: 15%; left: 25%; animation-delay: -7s; }

/* Positions for decorations */
.tile-1 { width: 120px; height: 120px; top: 15%; right: 8%; }
.tile-2 { width: 80px; height: 80px; bottom: 15%; left: 5%; animation-delay: -4s; }
.tile-3 { width: 60px; height: 60px; top: 45%; left: 12%; animation-delay: -7s; }

.frame-1 { width: 300px; height: 200px; top: -50px; right: -80px; }
.frame-2 { width: 250px; height: 350px; bottom: -100px; left: -50px; animation-delay: -5s; }

.data-1 { top: 15%; left: 25%; animation-delay: -2s; }
.data-2 { top: 80%; right: 20%; animation-delay: -5s; }
.data-3 { bottom: 25%; left: 8%; animation-delay: -8s; }

.ring-1 { width: 400px; height: 400px; top: -100px; right: -100px; }
.ring-2 { width: 200px; height: 200px; bottom: -50px; left: -50px; animation-direction: reverse; }

.pulse-1 { width: 600px; height: 600px; top: -200px; left: -200px; }
.pulse-2 { width: 400px; height: 400px; bottom: -100px; right: -100px; animation-delay: -5s; }

/* Removed .aero-wave (smoke) as requested */

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-40px) translateX(20px); }
}

@keyframes wave-pulse {
    0% { transform: rotate(-5deg) scale(1); opacity: 0.15; }
    100% { transform: rotate(-2deg) scale(1.1); opacity: 0.25; }
}

/* ============ ABOUT BENTO GRID & ROADMAP GRID ============ */
.about-bento-grid, .roadmap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.bento-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform var(--transition-snappy);
    overflow: visible; /* Allowed for shadow pseudo-element */
    position: relative;
    background: none !important; /* Move bg to pseudo */
}

/* S-Tier Shadow Optimization */
.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    backdrop-filter: inherit;
    -webkit-backdrop-filter: inherit;
    border-radius: inherit;
    z-index: -1;
    transition: transform var(--transition-snappy);
}

.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 20px 40px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.8);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
    z-index: -2;
}

.bento-card:hover {
    transform: scale(1.025);
    z-index: 2;
}

.bento-card:hover::after {
    opacity: 1;
}

.theme-dark-mode .bento-card::after {
    box-shadow: 0 10px 40px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.1);
}

.primary-card {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.theme-dark-mode .primary-card {
    background: linear-gradient(135deg, rgba(30,30,40,0.6) 0%, rgba(10,15,30,0.4) 100%);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--glass-bg, rgba(255,255,255,0.5));
    border-radius: 15px;
    border: 1px solid var(--glass-border, rgba(255,255,255,0.3));
    box-shadow: 0 4px 15px var(--accent-glow, rgba(0,0,0,0.1));
    color: var(--accent-color, var(--accent));
}

.theme-dark-mode .card-icon {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px var(--accent-glow);
    color: #ffffff !important;
}

.primary-card .card-icon {
    background: transparent;
    box-shadow: none;
    width: auto; height: auto;
    margin-bottom: 0;
}

.card-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
    line-height: 1.2;
}

.bento-subtitle {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 15px !important;
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3);
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.bento-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 20px;
    align-self: flex-start;
}

.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--win-green);
    box-shadow: 0 0 8px var(--win-green);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

@media (max-width: 900px) {
    .about-bento-grid, .roadmap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .about-bento-grid, .roadmap-grid {
        grid-template-columns: 1fr;
    }
    .primary-card {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ============ MASCOTS ============ */
.mascots-section { padding: 120px 2rem; background: transparent; }
.mascot-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.mascot-filter {
    background: var(--glass-bg, rgba(255,255,255,0.7));
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.3));
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-primary);
}
.mascot-filter:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}
.mascot-filter.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.mascot-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; max-width: 1200px; margin: 0 auto;
}

@media (max-width: 600px) {
    .mascot-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .mascot-grid-card {
        padding: 16px;
    }
    
    .mascot-grid-avatar {
        width: 80px;
        height: 80px;
    }

    .aero-window { min-width: 240px; }

    .aero-window .title-bar-controls button {
        width: 44px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .aero-window .title-bar {
        height: 44px;
    }
    
    .title-bar-text {
        font-size: 1rem;
    }

    /* Scale up desktop icons for touch */
    .desktop-icon {
        width: 84px !important;
        height: 94px !important;
    }
    .desktop-icon img {
        width: 44px !important;
        height: 44px !important;
    }
}

.mascot-grid-card {
    background: var(--glass-bg, rgba(255,255,255,0.7));
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.3));
    color: var(--text-primary);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 15px 35px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.mascot-grid-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), var(--aero-shadow);
}
.mascot-grid-card:hover { 
    transform: scale(1.02); 
    border-color: var(--accent); 
    z-index: 5;
}

.mascot-grid-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 16px;
    border: 3px solid rgba(255,255,255,0.5);
    box-shadow: 0 0 15px var(--accent-glow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mascot-grid-card:hover .mascot-grid-avatar {
    transform: scale(1.1) rotate(5deg);
}

.mascot-grid-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.mascot-grid-card:hover .mascot-grid-content {
    opacity: 0;
    transform: translateY(-10px);
}

.mascot-aero-peek {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity var(--transition-fast), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 1px solid rgba(255,255,255,0.6);
}
.theme-dark-mode .mascot-aero-peek {
    background: rgba(30, 41, 59, 0.85);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mascot-grid-card:hover .mascot-aero-peek {
    opacity: 1;
    transform: translateY(0);
}

.peek-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.peek-stat {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 10px;
}
.peek-stat span {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary);
}
.peek-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.5);
}
.theme-dark-mode .peek-bar {
    background: rgba(255,255,255,0.1);
}
.peek-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light, var(--accent)));
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0;
}
.mascot-grid-card:hover .peek-fill {
    width: var(--target-width, 50%);
}

/* ============ GALLERY ============ */
.gallery-section { padding: 120px 2rem; background: transparent; }
.gallery-filters {
    display: flex; justify-content: center; gap: 12px;
    margin: 32px 0 48px; flex-wrap: wrap;
}
.gallery-filter {
    padding: 10px 24px; border-radius: 30px;
    background: var(--glass-bg, rgba(255,255,255,0.4));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.2));
    color: var(--text-primary);
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}
.gallery-filter:hover { border-color: var(--accent-color); background: rgba(255,255,255,0.6); }
.gallery-filter.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.gallery-grid {
    display: flex; flex-wrap: wrap; gap: 24px;
    max-width: 1200px; margin: 0 auto; justify-content: center;
}
.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1/1.2;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow var(--transition-fast),
                border-color 0.3s ease;
    flex: 0 1 calc(25% - 20px);
    min-width: 260px;
    box-shadow: var(--aero-shadow);
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--accent);
    box-shadow: 0 20px 60px var(--accent-glow);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter var(--transition-fast);
}

.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px; 
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    color: #000000; 
    transform: translateY(10px); 
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.gallery-overlay h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #000000;
}
.gallery-overlay small {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.gallery-item:hover .gallery-overlay {
    transform: translateY(0); opacity: 1;
}
.gallery-item:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
/* ============ TOKENOMICS ============ */
.tokenomics-section { padding: 120px 2rem; background: transparent; }
/* ============ OS WINDOWS GRID ============ */
.os-windows-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .os-windows-grid { grid-template-columns: 1fr; }
}

/* ============ TASK MANAGER ============ */
.tm-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}
.tm-graphs {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 15px;
    background: #fff;
}
.theme-dark-mode .tm-graphs {
    background: #1e1e1e;
}
.tm-graph-box {
    border: 1px solid #ccc;
    padding: 10px;
}
.theme-dark-mode .tm-graph-box {
    border-color: #444;
}
.tm-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.tm-screen {
    height: 80px;
    background: #000;
    border: 1px inset #666;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}
.tm-grid-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(0deg, transparent 24%, rgba(0, 255, 0, 0.3) 25%, rgba(0, 255, 0, 0.3) 26%, transparent 27%, transparent 74%, rgba(0, 255, 0, 0.3) 75%, rgba(0, 255, 0, 0.3) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(0, 255, 0, 0.3) 25%, rgba(0, 255, 0, 0.3) 26%, transparent 27%, transparent 74%, rgba(0, 255, 0, 0.3) 75%, rgba(0, 255, 0, 0.3) 76%, transparent 77%, transparent);
    background-size: 20px 20px;
}
.tm-line {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #0f0;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}
.tm-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}
.tm-desc {
    font-size: 0.75rem;
    color: #666;
}
.theme-dark-mode .tm-desc { color: #aaa; }
.tm-stats {
    display: flex;
    border-top: 1px solid #ddd;
    background: #f0f0f0;
    padding: 10px 15px;
    gap: 20px;
}
.theme-dark-mode .tm-stats {
    background: #2a2a2a;
    border-color: #444;
}
.tm-stat-group {
    flex: 1;
}
.tm-stat-group h4 {
    margin: 0 0 5px 0;
    font-size: 0.8rem;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 2px;
}
.theme-dark-mode .tm-stat-group h4 {
    color: #eee;
    border-color: #555;
}
.tm-stat-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
}
.tm-stat-group li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}
.tm-desc-sub {
    font-size: 0.7rem;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* ============ WINDOWS UPDATE ============ */
.update-body {
    padding: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.theme-dark-mode .update-body { background: #1e1e1e; }
.update-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(to right, #e6f0fa, #fff);
    border-bottom: 1px solid #ddd;
}
.theme-dark-mode .update-hero {
    background: linear-gradient(to right, #1a2a3a, #1e1e1e);
    border-color: #444;
}
.update-icon-large {
    width: 48px;
    height: 48px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="%233296ec" xmlns="http://www.w3.org/2000/svg"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></svg>') no-repeat center;
}
.update-status-text h3 {
    margin: 0 0 5px 0;
    color: #003399;
    font-size: 1.2rem;
}
.theme-dark-mode .update-status-text h3 { color: #66b2ff; }
.update-status-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
}
.theme-dark-mode .update-status-text p { color: #aaa; }
.update-list {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.update-item {
    display: flex;
    gap: 15px;
}
.update-item-icon {
    font-size: 1.5rem;
}
.update-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}
.update-item-info p {
    margin: 0 0 5px 0;
    font-size: 0.8rem;
    color: #666;
}
.theme-dark-mode .update-item-info p { color: #aaa; }
.update-status {
    font-size: 0.75rem;
    font-weight: 600;
}
.update-item.installed .update-status { color: #2e8b57; }
.update-item.downloading .update-status { color: #3296ec; }
.update-item.pending .update-status { color: #d2691e; }
.update-progress-bar {
    width: 100%;
    height: 12px;
    background: #e6e6e6;
    border: 1px solid #ccc;
    margin: 5px 0;
}
.theme-dark-mode .update-progress-bar { background: #333; border-color: #555; }
.update-progress-fill {
    height: 100%;
    background: #2e8b57;
    width: 45%;
}

/* ============ FOOTER ============ */
.footer { 
    padding: 40px 2rem; 
    background: #FFFFFF;
    backdrop-filter: blur(20px);
    color: #1E293B; 
    border-top: 1px solid rgba(0,0,0,0.05);
}
.footer-content { max-width: 1000px; margin: 0 auto; text-align: center; }
.footer-brand {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 1.1rem; font-weight: 800; color: #1E293B; margin-bottom: 24px;
}
.footer-brand i { color: var(--blue-light); font-size: 1.4rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 32px; margin-bottom: 32px; }
.footer-links a { 
    color: var(--text-primary); 
    text-decoration: none; 
    font-size: 0.9rem; 
    transition: var(--transition); 
    font-weight: 700; 
    opacity: 0.7; 
}
.footer-links a:hover { color: var(--accent); opacity: 1; transform: translateY(-2px); }
.footer-disclaimer p { font-size: 0.75rem; line-height: 1.8; margin-bottom: 8px; max-width: 800px; margin-left: auto; margin-right: auto; color: #64748B; }

/* Consolidation done above */

/* ============ 7. LIGHTBOX / GALLERY MODAL ============ */
.gallery-filter.submit-fanart {
    margin-left: auto;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark, var(--accent)));
    color: white;
    border-color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gallery-filter.submit-fanart:hover {
    background: linear-gradient(180deg, var(--accent-light, var(--accent)), var(--accent));
    color: white;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
    pointer-events: none;
}
.lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.photo-viewer-window {
    background: #f0f0f0;
    border: 1px solid #999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 8px;
    width: 90vw;
    max-width: 900px;
    height: 80vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.theme-dark-mode .photo-viewer-window {
    background: #1e1e1e;
    border-color: #444;
}
.lightbox.open .photo-viewer-window {
    transform: scale(1);
}

.photo-viewer-window .window-titlebar {
    background: linear-gradient(to bottom, #f9f9f9, #e0e0e0);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
    border-radius: 8px 8px 0 0;
}
.theme-dark-mode .photo-viewer-window .window-titlebar {
    background: linear-gradient(to bottom, #333, #222);
    border-bottom-color: #000;
}
.photo-viewer-window .title-text {
    font-size: 12px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.theme-dark-mode .photo-viewer-window .title-text {
    color: #eee;
}

.photo-viewer-toolbar {
    background: #f5f6f7;
    border-bottom: 1px solid #d9d9d9;
    padding: 4px 8px;
    display: flex;
    gap: 4px;
}
.theme-dark-mode .photo-viewer-toolbar {
    background: #2d2d30;
    border-bottom-color: #1e1e1e;
}
.toolbar-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 12px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    border-radius: 3px;
}
.theme-dark-mode .toolbar-btn {
    color: #eee;
}
.toolbar-btn:hover {
    background: #e5f3ff;
    border-color: #cce8ff;
}
.theme-dark-mode .toolbar-btn:hover {
    background: #3f3f46;
    border-color: #555;
}

.photo-viewer-content {
    flex-grow: 1;
    background: #eef3fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.theme-dark-mode .photo-viewer-content {
    background: #111;
}
#lightbox-img {
    max-width: 100%;
    max-height: calc(100% - 60px);
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid #ccc;
    background: white;
}
.theme-dark-mode #lightbox-img {
    border-color: #444;
}
.lightbox-info {
    position: absolute;
    bottom: 20px;
    text-align: center;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.theme-dark-mode .lightbox-info {
    background: rgba(0,0,0,0.6);
    color: #fff;
}
.lightbox-info h3 { font-size: 14px; margin-bottom: 2px; }
.lightbox-info p { font-size: 12px; margin: 0; opacity: 0.8; }

.photo-viewer-controls {
    background: #f0f0f0;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #ccc;
    border-radius: 0 0 8px 8px;
}
.theme-dark-mode .photo-viewer-controls {
    background: #252526;
    border-top-color: #1e1e1e;
}
.viewer-btn, .viewer-btn-large {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #444;
    transition: all 0.2s;
}
.theme-dark-mode .viewer-btn, .theme-dark-mode .viewer-btn-large {
    color: #ccc;
}
.viewer-btn { width: 32px; height: 32px; }
.viewer-btn-large { width: 44px; height: 44px; font-size: 24px; background: rgba(0,0,0,0.05); }
.theme-dark-mode .viewer-btn-large { background: rgba(255,255,255,0.05); }

.viewer-btn:hover, .viewer-btn-large:hover {
    background: #e5f3ff;
    border-color: #cce8ff;
    color: var(--win-blue);
}
.theme-dark-mode .viewer-btn:hover, .theme-dark-mode .viewer-btn-large:hover {
    background: #3f3f46;
    border-color: #555;
    color: #fff;
}
.viewer-divider {
    width: 1px;
    height: 24px;
    background: #ccc;
    margin: 0 8px;
}
.theme-dark-mode .viewer-divider {
    background: #444;
}


.lore-timeline {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 20px 10px;
    overflow: visible;
}

.lore-track {
    display: flex; 
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.lore-track::before {
    content: ''; position: absolute; top: 31px; left: 20px; right: 20px;
    height: 1px; background: var(--glass-border);
    z-index: 0;
}

.lore-item {
    display: flex; flex-direction: column; align-items: center;
    flex: 1; min-width: 0; cursor: pointer; position: relative; z-index: 1;
    transition: var(--transition);
}
.lore-item:hover { transform: translateY(-3px); }
.lore-dot {
    width: 10px; height: 10px; border-radius: 50%;
    border: 1px solid var(--glass-border); background: var(--glass-bg);
    margin-bottom: 12px; transition: var(--transition);
}
.lore-item.active .lore-dot,
.lore-item:hover .lore-dot {
    border-color: var(--accent); background: var(--accent);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}
.lore-year { font-size: 0.55rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.lore-name { 
    font-size: 0.5rem; 
    color: var(--text-secondary); 
    text-align: center; 
    width: 100%;
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3; 
}
.lore-item.active .lore-name { color: var(--accent-color); font-weight: 600; }

@media (max-width: 768px) {
    /* 16 items shrunk to fit the viewport becomes illegible — scroll horizontally
       at a readable size instead of squeezing every label into a sliver. */
    .lore-timeline { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 20px 16px; }
    .lore-track { justify-content: flex-start; gap: 22px; width: max-content; }
    .lore-track::before { left: 10px; right: 10px; }
    .lore-item { flex: 0 0 60px; min-width: 60px; }
    .lore-year { font-size: 0.68rem; }
    .lore-name { font-size: 0.62rem; }

    /* Family tree: nodes are positioned by percentage, so a narrow mobile width
       squashes 16 node labels into overlapping mush. Keep the diagram at a
       desktop-legible pixel width and let it scroll horizontally instead. */
    .family-tree-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
    .family-tree-scroll #family-tree-container { min-width: 960px; }
}

/* ============ COMMUNITY CTA ============ */
.community-section {
    padding: 120px 2rem;
    background: transparent;
    text-align: center;
}
.msn-container { display: none; } /* Keeping class empty to overwrite cleanly */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.community-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transform-style: preserve-3d;
}
.theme-dark-mode .community-card {
    color: var(--text-light);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.community-glass-shine {
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    opacity: 0.5;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}
.theme-dark-mode .community-glass-shine {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
}
.community-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--win-blue), var(--accent));
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 8px 16px rgba(37,99,235,0.3);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.community-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.community-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.community-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 0 2px rgba(255,255,255,0.3) inset;
    border-color: rgba(255,255,255,0.5);
}
.theme-dark-mode .community-card:hover {
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.community-card:hover .community-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 24px rgba(37,99,235,0.4);
}
.community-card:hover .community-glass-shine {
    opacity: 1;
}



/* ============ FLOATING CTA ============ */
.floating-cta {
    position: fixed; bottom: 24px; right: 24px; z-index: 900;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 28px;
    background: var(--accent); color: #fff;
    text-decoration: none; font-size: 0.75rem; font-weight: 600;
    box-shadow: 0 4px 20px rgba(37,99,235,0.35);
    transition: var(--transition);
    opacity: 0; pointer-events: none;
    transform: translateY(10px);
}
.floating-cta.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.floating-cta:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 6px 28px rgba(37,99,235,0.5); }
.floating-cta svg { flex-shrink: 0; }

/* ============ DEEP THEME TRANSITIONS ============ */
.gallery-section, .about, .tokenomics, .roadmap, .community-section, .mascots-section {
    padding: 100px 2rem;
    background: transparent;
    transition: background var(--transition-fast);
    position: relative;
}
.token-card, .about-card, .phase-content, .gallery-filter,
.section-header h2, .section-header p, .badge,
.token-ca, .footer, .glass-section, .os-section {
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

/* ============ CLEAN BACKGROUNDS ============ */
/* ============ CLEAN BACKGROUNDS (SECTIONS ONLY) ============ */
.glass-section, 
.os-section, 
.gallery-section, 
.mascots-section, 
.timeline-section, 
.roadmap-section, 
.tokenomics-section, 
.community-section {
    background: #FFFFFF !important;
    background-image: none !important;
}

.bg-aero-elements, .section-decoration, .aurora-bg {
    display: none !important;
}

.footer { 
    padding: 20px 2rem !important; 
    border-top: 1px solid #EEEEEE;
}

/* Theme Specific Tweaks */


body[data-theme="95tan"] .os-theme-btn.active,
body[data-theme="metan"] .os-theme-btn.active,
.os-theme-btn.active,
.gallery-filter.active,
.mascot-filter.active {
    color: #FFFFFF !important;
}

/* ============ AERO REFINEMENT ============ */
::selection {
    background: var(--accent);
    color: #fff;
}

.window-glass {
    position: relative;
    overflow: hidden;
}

.window-glass::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 55%
    );
    transform: rotate(-45deg);
    animation: glassShine 8s infinite;
    pointer-events: none;
}

@keyframes glassShine {
    0% { transform: translateX(-100%) rotate(-45deg); }
    20%, 100% { transform: translateX(100%) rotate(-45deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ REVEAL ANIMATIONS ============ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.reveal-stagger {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-active.reveal-stagger > * {
    opacity: 1;
    transform: translateY(0);
}
.reveal-active.reveal-stagger > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-active.reveal-stagger > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-active.reveal-stagger > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-active.reveal-stagger > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-active.reveal-stagger > *:nth-child(5) { transition-delay: 0.5s; }

.gallery-grid.reveal-active .gallery-item {
    opacity: 1;
    transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .nav-toggle { display: flex; }
    .nav-links {
        display: flex; flex-direction: column; gap: 2px;
        position: fixed; top: 64px; left: 0; right: 0; z-index: 999;
        max-height: calc(100vh - 64px); overflow-y: auto;
        padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-radius: 0; border: none; border-bottom: 1px solid var(--glass-border, rgba(0,0,0,0.08));
        transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    }
    .nav-links.mobile-open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
    .nav-indicator { display: none; }
    .nav-links a {
        padding: 12px 10px; min-height: 44px; display: flex; align-items: center;
        border-radius: 8px; font-size: 0.95rem; width: 100%; box-sizing: border-box;
    }
    .nav-links a:hover, .nav-links a.active { background: rgba(var(--accent-rgb), 0.1); }
    .hero-content { padding: 100px 1.5rem 40px; }
    .hero h1 { font-size: 2.2rem; }
    .hero-mascot-badge { display: none; }
    .computer-frame { margin: 0 -1rem; }
    .about-grid { grid-template-columns: 1fr; }
    .tokenomics-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .community-grid { grid-template-columns: repeat(2, 1fr); }
    .floating-cta span { display: none; }
    .floating-cta { padding: 12px; border-radius: 50%; }
    
    /* Touch Target Optimization (Phase X) */
    .window-btn {
        width: 32px;
        height: 28px;
    }
    .sys-tab {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    .btn-sys {
        padding: 10px 24px;
        font-size: 0.95rem;
    }
}

/* ============ TOKENOMICS SPECIFIC BENTO ============ */
.tokenomics-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.tokenomics-hero-card {
    grid-column: span 4;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    padding: 40px;
    background: var(--glass-bg, rgba(255,255,255,0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.5));
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}



.tokenomics-hero-card .card-icon-primary {
    flex-shrink: 0;
}

.tokenomics-hero-card .card-content {
    flex-grow: 1;
}

.roadmap-card {
    grid-column: span 1;
}

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

@media (max-width: 1024px) {
    .tokenomics-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tokenomics-hero-card {
        grid-column: span 2;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .roadmap-card, .governance-card, .span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .tokenomics-bento-grid {
        grid-template-columns: 1fr;
    }
    .tokenomics-hero-card, .roadmap-card {
        grid-column: span 1;
    }
}


/* ============ AERO MODAL SYSTEM ============ */
.aero-modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.aero-modal-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.aero-modal-window {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: 90%;
    max-width: 500px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.5s var(--spring-bouncy);
    pointer-events: none;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden;
}
.aero-modal-window.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.modal-header {
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    color: white;
    position: relative;
}
.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.modal-avatar {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    object-fit: contain;
}

.modal-title h2 {
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.modal-title span {
    opacity: 0.8;
    font-size: 0.9rem;
}

.modal-body {
    padding: 32px;
    background: rgba(255,255,255,0.03);
}

.modal-lore {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 32px;
    opacity: 0.9;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-modal-apply {
    flex: 2;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-modal-apply:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-modal-close {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-close-btn {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.modal-close-btn:hover {
    opacity: 1;
}
