/* Corridor OS - Modern Operating System Styles */
:root {
    /* CorridorOS Identity — cyan ↔ violet ↔ magenta */
    --primary-orange: #2563eb; /* changed from orange to blue - no minimal mode */
    --primary-purple: #7a5cff; /* brand violet */
    --primary-blue: #1aa8ff;   /* brand blue */
    --primary-green: #00e28f;  /* status/ok */
    --primary-cyan: #00e1ff;   /* brand cyan */
    --primary-teal: #00ffd5;   /* glow accent */
    --primary-pink: #ff4da6;   /* brand magenta */
    --brand-gradient: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple), var(--primary-pink));
    
    /* Enhanced dark glass theme colors with depth */
    --bg-primary: linear-gradient(135deg, #0b1020 0%, #0e1a2b 25%, #13283f 50%, #1e293b 75%, #0b1020 100%);
    --bg-secondary: linear-gradient(135deg, #0e1a2b 0%, #13283f 50%, #1e293b 100%);
    --bg-tertiary: linear-gradient(135deg, #13283f 0%, #1e293b 100%);
    --bg-panel: rgba(12, 26, 44, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.12);
    --bg-glass-hover: rgba(255, 255, 255, 0.20);
    
    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-tertiary: rgba(255, 255, 255, 0.65);
    --text-disabled: rgba(255, 255, 255, 0.4);
    
    /* Border and shadow */
    --border-color: rgba(255, 255, 255, 0.22);
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-large: 0 16px 48px rgba(0, 0, 0, 0.6);
    
    /* Quantum glow effects */
    --glow-cyan: 0 0 24px rgba(0, 200, 255, 0.40);
    --glow-purple: 0 0 24px rgba(110, 74, 255, 0.35);
    --glow-blue: 0 0 24px rgba(37, 99, 235, 0.35);
    
    /* Animations */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Blur effects */
    --blur-small: blur(8px);
    --blur-medium: blur(16px);
    --blur-large: blur(24px);
    
    /* Border radius */
    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 18px;
    --radius-xl: 24px;
    
    /* Z-index layers */
    --z-base: 0;
    --z-sticky: 1000;
    --z-toast: 2000;
    --z-dropdown: 3000;
    --z-drawer: 3000;
    --z-modal: 5000;
    --z-system: 10000;

    /* Window halo (colorized per wallpaper + theme) */
    --window-halo: rgba(0, 225, 255, 0.22);
}

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

html { height: -webkit-fill-available; }

body {
    font-family: 'Ubuntu', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden; /* Only hide horizontal overflow */
    min-height: 100dvh; /* mobile-safe viewport */
    min-height: -webkit-fill-available;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Platform-specific scrolling behavior */
@media (hover: hover) and (pointer: fine) {
    /* Desktop/laptop - enable native scrolling */
    body {
        overflow-y: auto;
        touch-action: pan-y pinch-zoom;
    }
    
    /* Ensure desktop scrolling works smoothly */
    html {
        scroll-behavior: smooth;
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Mobile/touch devices - use mobile-specific handling */
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: manipulation;
    }
}

/* Platform-specific classes for JavaScript control */
body.mobile-platform {
    /* Mobile platform optimizations */
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
    overscroll-behavior: contain;
    user-select: none;
}

body.desktop-platform {
    /* Desktop platform optimizations */
    touch-action: pan-y pinch-zoom;
    overscroll-behavior: auto;
    user-select: text;
}

/* Smooth scrolling states */
body.is-scrolling {
    /* Add any visual feedback during scrolling if needed */
    transition: none;
}

/* Enhanced desktop background with depth */
.desktop-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: -1;
}

/* Add subtle overlay for depth */
.desktop-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 200, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(110, 74, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 226, 143, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Inform the UA about intended color scheme for native widgets */
body[data-theme="dark"], html[data-theme="dark"] { color-scheme: dark; }
body[data-theme="light"], html[data-theme="light"] { color-scheme: light; }

/* Theme overrides */
/* Enhanced Light theme with depth and color */
body[data-theme="light"], html[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 25%, #e2e8f0 50%, #f0f4f8 75%, #f8fafc 100%);
    --bg-secondary: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    --bg-tertiary: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --bg-panel: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-hover: rgba(255, 255, 255, 0.95);

    --text-primary: #0f172a;
    --text-secondary: rgba(15, 23, 42, 0.85);
    --text-tertiary: rgba(15, 23, 42, 0.65);
    --text-disabled: rgba(15, 23, 42, 0.45);
    
    /* Force text visibility in light theme */
    --text-primary: #1e293b !important;
    --text-secondary: #334155 !important;
    --text-tertiary: #64748b !important;

    --border-color: rgba(15, 23, 42, 0.12);
    
    /* Enhanced shadows for depth */
    --shadow-small: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.1);
    --shadow-medium: 0 8px 25px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-large: 0 16px 40px rgba(15, 23, 42, 0.15), 0 8px 20px rgba(15, 23, 42, 0.1);
    
    /* Enhanced glow effects with color */
    --glow-cyan: 0 0 20px rgba(0, 200, 255, 0.25), 0 0 40px rgba(0, 200, 255, 0.1);
    --glow-purple: 0 0 20px rgba(110, 74, 255, 0.2), 0 0 40px rgba(110, 74, 255, 0.08);
    --glow-blue-light: 0 0 20px rgba(37, 99, 235, 0.2), 0 0 40px rgba(37, 99, 235, 0.08);
    --glow-green: 0 0 20px rgba(0, 226, 143, 0.2), 0 0 40px rgba(0, 226, 143, 0.08);
    
    /* Additional color accents */
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
}

/* Auto theme follows system preference with enhanced styling */
@media (prefers-color-scheme: light) {
  body[data-theme="auto"], html[data-theme="auto"] {
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 25%, #e2e8f0 50%, #f0f4f8 75%, #f8fafc 100%);
    --bg-secondary: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    --bg-tertiary: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --bg-panel: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-hover: rgba(255, 255, 255, 0.95);

    --text-primary: #1e293b !important;
    --text-secondary: #334155 !important;
    --text-tertiary: #64748b !important;
    --text-disabled: #94a3b8 !important;

    --border-color: rgba(15, 23, 42, 0.12);
    
    /* Enhanced shadows for depth */
    --shadow-small: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.1);
    --shadow-medium: 0 8px 25px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-large: 0 16px 40px rgba(15, 23, 42, 0.15), 0 8px 20px rgba(15, 23, 42, 0.1);
    
    /* Enhanced glow effects with color */
    --glow-cyan: 0 0 20px rgba(0, 200, 255, 0.25), 0 0 40px rgba(0, 200, 255, 0.1);
    --glow-purple: 0 0 20px rgba(110, 74, 255, 0.2), 0 0 40px rgba(110, 74, 255, 0.08);
    --glow-blue-light: 0 0 20px rgba(37, 99, 235, 0.2), 0 0 40px rgba(37, 99, 235, 0.08);
    --glow-green: 0 0 20px rgba(0, 226, 143, 0.2), 0 0 40px rgba(0, 226, 143, 0.08);
    
    /* Additional color accents */
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
  }
}
/* Dark mode is the default theme, no additional styles needed for auto */

/* Accessibility toggles wired from settings */
body.no-animations * {
  animation: none !important;
  transition: none !important;
}
body[data-font-size="small"] { font-size: 14px; }
body[data-font-size="medium"] { font-size: 16px; }
body[data-font-size="large"] { font-size: 18px; }

/* Global transparency override */
body.no-transparency {
  --blur-small: none;
  --blur-medium: none;
  --blur-large: none;
  --bg-panel: var(--bg-secondary);
  --bg-glass: var(--bg-secondary);
  --bg-glass-hover: var(--bg-tertiary);
}
body.no-transparency .top-panel,
body.no-transparency .dock,
body.no-transparency .notifications-panel,
body.no-transparency .context-menu,
body.no-transparency .user-menu,
body.no-transparency .activities-overview {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--bg-panel) !important;
}

/* Boot Splash Screen */
.boot-splash {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-system);
    opacity: 0;
    animation: bootFadeIn 250ms ease-out forwards;
}

.boot-full-logo {
    position: absolute;
    inset: 0;
    background-color: #000;
    background-image: url('LCC_logo_attempt_2.png'), url('LCC_new_logo.png'), url('LLC_new_logo.png');
    background-position: center center, center center, center center;
    background-size: contain, contain, contain;
    background-repeat: no-repeat, no-repeat, no-repeat;
}

.boot-spinner { width: 96px; height: 96px; border-radius: 50%; border: 6px solid rgba(255,255,255,0.22); border-top-color: rgba(0,200,255,0.9); animation: bootSpin 900ms linear infinite; position: absolute; bottom: 20%; left: 50%; transform: translateX(-50%); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
@keyframes bootSpin { to { transform: translateX(-50%) rotate(360deg); } }

@keyframes bootFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bootFadeOut { from { opacity: 1; } to { opacity: 0; } }
.boot-splash.fade-out { animation: bootFadeOut 320ms ease-in forwards; }

.boot-logo { text-align: center; margin-bottom: 36px; }

/* Circular boot progress ring */
.boot-ring-wrap { position: relative; width: 150px; height: 150px; margin: 0 auto 18px; }
.boot-logo-img { position: absolute; inset: 18px; width: auto; height: auto; max-width: calc(100% - 36px); max-height: calc(100% - 36px); object-fit: contain; filter: drop-shadow(0 4px 16px rgba(0,0,0,.35)); border-radius: 50%; }
.boot-ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.boot-ring .ring-track { fill: none; stroke: rgba(255,255,255,0.18); stroke-width: 8; }
.boot-ring .ring-fill { fill: none; stroke: url(#bootRingGradient); stroke-linecap: round; stroke-width: 8; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset .25s ease; }

/* --- Files app minimal styles (fallback) --- */
.files-app .files-toolbar { display:flex; align-items:center; gap:12px; padding:8px 12px; border-bottom:1px solid var(--border-color); background: var(--bg-tertiary); }
.files-app .toolbar-button { background: var(--bg-glass); border: 1px solid var(--border-color); color: var(--text-primary); padding: 4px 10px; border-radius: 8px; cursor: pointer; }
.files-app .toolbar-button:hover { background: var(--bg-glass-hover); }
.files-app .files-content { display:flex; min-height: 320px; }
.files-app .files-sidebar { width: 220px; border-right:1px solid var(--border-color); padding:10px; background: var(--bg-secondary); }
.files-app .files-main { flex:1; }
.files-app .file-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 12px; }
.files-app .file-item { display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px; border:1px solid var(--border-color); border-radius:12px; background: var(--bg-panel); cursor: default; user-select: none; }
.files-app .file-item .file-icon { font-size: 24px; }
.files-app .file-item .file-name { 
    text-align:center; 
    max-width: 100%; 
    overflow:hidden; 
    text-overflow:ellipsis; 
    white-space:nowrap; 
    color: var(--text-primary) !important;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
    opacity: 1 !important;
    visibility: visible !important;
}
.files-app .file-item.selected { outline: 2px solid var(--primary-cyan); box-shadow: var(--glow-cyan); }
.files-app .files-statusbar { display:flex; justify-content:space-between; padding:8px 12px; border-top:1px solid var(--border-color); background: var(--bg-tertiary); }
.files-app .sidebar-item { display:flex; align-items:center; gap:10px; padding:8px; border-radius:8px; cursor:pointer; }
.files-app .sidebar-item:hover { background: var(--bg-glass); }
.files-app h4 { margin: 6px 0 8px 0; opacity: .85; }

/* --- Trash app minimal styles --- */
.trash-app .trash-button { background: var(--bg-glass); border: 1px solid var(--border-color); color: var(--text-primary); padding: 4px 10px; border-radius: 8px; cursor: pointer; }
.trash-app .trash-button:hover { background: var(--bg-glass-hover); }

.boot-logo h1 {
    font-size: 48px;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.boot-logo p {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 300;
}

.boot-progress { width: 420px; max-width: 90vw; }
.boot-progress label input { width: 16px; height: 16px; }

.boot-status {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 300;
}

/* Desktop */
.desktop {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
}

.desktop-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 20% 10%, rgba(0, 200, 255, 0.20), transparent 60%),
        radial-gradient(900px 500px at 80% 70%, rgba(0, 255, 213, 0.14), transparent 60%),
        radial-gradient(800px 400px at 40% 80%, rgba(110, 74, 255, 0.12), transparent 65%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 55%, var(--bg-tertiary) 100%);
    animation: backgroundFlow 30s ease-in-out infinite;
}

/* Wallpaper variants - Dark Mode */
html[data-wallpaper="quantum-gradient-dark"] .desktop-background,
body[data-wallpaper="quantum-gradient-dark"] .desktop-background {
    background:
        radial-gradient(900px 600px at 30% 20%, rgba(147, 51, 234, 0.28), transparent 65%),
        radial-gradient(800px 500px at 70% 60%, rgba(79, 70, 229, 0.24), transparent 60%),
        radial-gradient(700px 450px at 50% 80%, rgba(236, 72, 153, 0.18), transparent 65%),
        radial-gradient(600px 400px at 20% 70%, rgba(59, 130, 246, 0.16), transparent 70%),
        linear-gradient(135deg, #0a0314 0%, #1a0b2e 35%, #1e1548 70%, #0f0820 100%);
}

html[data-wallpaper="quantum-gradient-light"] .desktop-background,
body[data-wallpaper="quantum-gradient-light"] .desktop-background {
    background:
        radial-gradient(900px 600px at 30% 20%, rgba(147, 51, 234, 0.22), transparent 65%),
        radial-gradient(800px 500px at 70% 60%, rgba(139, 92, 246, 0.20), transparent 60%),
        radial-gradient(700px 450px at 50% 80%, rgba(236, 72, 153, 0.16), transparent 65%),
        radial-gradient(600px 400px at 20% 70%, rgba(96, 165, 250, 0.14), transparent 70%),
        linear-gradient(135deg, #faf5ff 0%, #f3e8ff 35%, #ede9fe 70%, #faf5ff 100%);
}

html[data-wallpaper="photonic-waves-dark"] .desktop-background,
body[data-wallpaper="photonic-waves-dark"] .desktop-background {
    background:
        radial-gradient(1000px 650px at 20% 15%, rgba(6, 182, 212, 0.26), transparent 65%),
        radial-gradient(950px 600px at 80% 25%, rgba(14, 165, 233, 0.22), transparent 60%),
        radial-gradient(800px 500px at 50% 70%, rgba(34, 211, 238, 0.18), transparent 65%),
        radial-gradient(700px 450px at 30% 85%, rgba(103, 232, 249, 0.14), transparent 70%),
        linear-gradient(135deg, #081420 0%, #0a1e2e 35%, #0d2438 70%, #051018 100%);
}

html[data-wallpaper="photonic-waves-light"] .desktop-background,
body[data-wallpaper="photonic-waves-light"] .desktop-background {
    background:
        radial-gradient(1000px 650px at 20% 15%, rgba(6, 182, 212, 0.20), transparent 65%),
        radial-gradient(950px 600px at 80% 25%, rgba(56, 189, 248, 0.18), transparent 60%),
        radial-gradient(800px 500px at 50% 70%, rgba(125, 211, 252, 0.16), transparent 65%),
        radial-gradient(700px 450px at 30% 85%, rgba(165, 243, 252, 0.12), transparent 70%),
        linear-gradient(135deg, #ecfeff 0%, #cffafe 35%, #e0f2fe 70%, #f0f9ff 100%);
}

html[data-wallpaper="corridor-abstract-dark"] .desktop-background,
body[data-wallpaper="corridor-abstract-dark"] .desktop-background {
    background:
        radial-gradient(800px 420px at 20% 70%, rgba(110, 74, 255, 0.16), transparent 60%),
        radial-gradient(780px 420px at 70% 20%, rgba(233, 84, 32, 0.16), transparent 60%),
        radial-gradient(600px 300px at 45% 50%, rgba(0, 226, 143, 0.12), transparent 65%),
        linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 55%, #262626 100%);
}

html[data-wallpaper="corridor-abstract-light"] .desktop-background,
body[data-wallpaper="corridor-abstract-light"] .desktop-background {
    background:
        radial-gradient(800px 420px at 20% 70%, rgba(110, 74, 255, 0.18), transparent 60%),
        radial-gradient(780px 420px at 70% 20%, rgba(255, 120, 80, 0.20), transparent 60%),
        radial-gradient(600px 300px at 45% 50%, rgba(0, 200, 120, 0.15), transparent 65%),
        linear-gradient(135deg, #f0f0f0 0%, #f5f5f5 55%, #fafafa 100%);
}

/* Wallpaper selector in settings */
.wallpaper-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.wallpaper-option {
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-medium);
    padding: 8px;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.wallpaper-option:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.wallpaper-option.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 200, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.3);
}

.wallpaper-preview {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-small);
    margin-bottom: 8px;
}

.wallpaper-preview.quantum-gradient-dark {
    background:
        radial-gradient(circle at 30% 20%, rgba(147, 51, 234, 0.45), transparent 55%),
        radial-gradient(circle at 70% 60%, rgba(79, 70, 229, 0.38), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.28), transparent 55%),
        linear-gradient(135deg, #0a0314 0%, #1a0b2e 50%, #0f0820 100%);
}

.wallpaper-preview.quantum-gradient-light {
    background:
        radial-gradient(circle at 30% 20%, rgba(147, 51, 234, 0.35), transparent 55%),
        radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.32), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.25), transparent 55%),
        linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #faf5ff 100%);
}

.wallpaper-preview.photonic-waves-dark {
    background:
        radial-gradient(circle at 20% 15%, rgba(6, 182, 212, 0.42), transparent 55%),
        radial-gradient(circle at 80% 25%, rgba(14, 165, 233, 0.36), transparent 50%),
        radial-gradient(circle at 50% 70%, rgba(34, 211, 238, 0.28), transparent 55%),
        linear-gradient(135deg, #081420 0%, #0a1e2e 50%, #051018 100%);
}

.wallpaper-preview.photonic-waves-light {
    background:
        radial-gradient(circle at 20% 15%, rgba(6, 182, 212, 0.35), transparent 55%),
        radial-gradient(circle at 80% 25%, rgba(56, 189, 248, 0.30), transparent 50%),
        radial-gradient(circle at 50% 70%, rgba(125, 211, 252, 0.25), transparent 55%),
        linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #f0f9ff 100%);
}

.wallpaper-preview.corridor-abstract-dark {
    background:
        radial-gradient(circle at 20% 70%, rgba(110, 74, 255, 0.32), transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(233, 84, 32, 0.32), transparent 50%),
        radial-gradient(circle at 45% 50%, rgba(0, 226, 143, 0.24), transparent 55%),
        linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 55%, #262626 100%);
}

.wallpaper-preview.corridor-abstract-light {
    background:
        radial-gradient(circle at 20% 70%, rgba(110, 74, 255, 0.35), transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(255, 120, 80, 0.40), transparent 50%),
        radial-gradient(circle at 45% 50%, rgba(0, 200, 120, 0.30), transparent 55%),
        linear-gradient(135deg, #f0f0f0 0%, #f5f5f5 55%, #fafafa 100%);
}

.wallpaper-option span {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

@keyframes backgroundFlow {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    25% { transform: translateX(-20px) translateY(-10px) scale(1.02); }
    50% { transform: translateX(20px) translateY(10px) scale(0.98); }
    75% { transform: translateX(-10px) translateY(20px) scale(1.01); }
}

/* Enhanced Top Panel with depth and color */
.top-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--bg-panel);
    backdrop-filter: saturate(140%) blur(20px);
    -webkit-backdrop-filter: saturate(140%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-medium);
    position: relative;
}

/* Enhanced top panel gradient overlay */
.top-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(0, 200, 255, 0.08) 0%, 
        rgba(110, 74, 255, 0.05) 50%, 
        rgba(0, 226, 143, 0.06) 100%);
    pointer-events: none;
    border-radius: 0 0 12px 12px;
}
.top-panel::after {
    content: '';
    position: absolute; left: 0; right: 0; top: 0; height: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
    pointer-events: none;
}

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

.activities-button {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-medium);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 8px;
}

.activities-button:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(0,200,255,0.25), var(--glow-cyan);
}

.corridor-logo {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    border-radius: 50%;
    display: inline-block;
}

.app-menu {
    display: flex;
    gap: 8px;
}

.menu-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 14px;
}

.menu-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.panel-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.clock {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.panel-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-button:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.panel-button .icon {
    font-size: 16px;
}

/* Enhanced Dock with depth and color */
.dock {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    backdrop-filter: saturate(140%) blur(20px);
    -webkit-backdrop-filter: saturate(140%) blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 12px;
    box-shadow: var(--shadow-large);
    z-index: 1000;
}

/* Enhanced dock gradient overlay */
.dock::before {
    content: '';
    position: absolute; 
    inset: 0; 
    border-radius: inherit; 
    pointer-events: none;
    background: linear-gradient(135deg, 
        rgba(0, 200, 255, 0.1) 0%, 
        rgba(110, 74, 255, 0.08) 50%, 
        rgba(0, 226, 143, 0.1) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.dock-apps {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dock-app {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dock-app:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.1) translateY(-4px);
}

.dock-app .app-icon {
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', sans-serif;
    line-height: 1;
    display: inline-block;
}

.dock-app.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
}

.dock-separator {
    width: 1px;
    height: 32px;
    background: var(--border-color);
    margin: 0 8px;
}

.app-icon {
    font-size: 24px;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', sans-serif;
    line-height: 1;
    display: inline-block;
}

/* Activities Overview */
.activities-overview {
    position: fixed;
    inset: 0;
    background: var(--bg-panel);
    backdrop-filter: var(--blur-large);
    -webkit-backdrop-filter: var(--blur-large);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 80px 40px 40px;
    overflow-y: auto;
    min-height: 100vh;
    color: var(--text-primary);
}

/* Applications overview toolbar */
.overview-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.overview-back {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.overview-back:hover { 
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.95), rgba(102, 126, 234, 0.95));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.overview-search {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.overview-search input {
    width: 600px;
    max-width: 80vw;
    padding: 16px 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    color: var(--text-primary);
    font-size: 18px;
    outline: none;
    transition: var(--transition-medium);
}

.overview-search input::placeholder { color: var(--text-tertiary); }

.overview-search input:focus {
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
}

.overview-workspaces {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}

.workspace {
    width: 200px;
    height: 120px;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.workspace:hover {
    border-color: var(--primary-cyan);
    transform: scale(1.05);
}

.workspace.active {
    border-color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.1);
}

.workspace span {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.overview-apps {
    flex: 1;
    display: flex;
    justify-content: center;
    padding-bottom: 120px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    max-width: 1200px;
    width: 100%;
    min-width: 0; /* allow phones without horizontal scroll */
    align-content: start;
    padding-bottom: 40px;
    padding-left: 10px;
    padding-right: 10px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: var(--transition-medium);
    text-align: center;
}

.app-item:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.app-item .app-icon {
    font-size: 32px;
}

.app-item .app-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Window Management */
.windows-container {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.window {
    position: absolute;
    background: linear-gradient(180deg, rgba(18,30,50,0.72), rgba(15,24,40,0.58));
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-large), 0 0 0 1px var(--border-color), 0 0 24px var(--window-halo);
    min-width: 400px;
    min-height: 300px;
    pointer-events: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Halo color mapping by wallpaper (light) */
body[data-theme="light"][data-wallpaper*="quantum"],
html[data-theme="light"][data-wallpaper*="quantum"] { --window-halo: rgba(255, 77, 166, 0.35); }
body[data-theme="light"][data-wallpaper*="photonic"],
html[data-theme="light"][data-wallpaper*="photonic"] { --window-halo: rgba(0, 255, 213, 0.30); }
body[data-theme="light"][data-wallpaper*="corridor-abstract"],
html[data-theme="light"][data-wallpaper*="corridor-abstract"] { --window-halo: rgba(122, 92, 255, 0.30); }

/* Halo color mapping by wallpaper (dark) — significantly darkened */
body[data-theme="dark"][data-wallpaper*="quantum"],
html[data-theme="dark"][data-wallpaper*="quantum"] { --window-halo: rgba(157, 27, 157, 0.25); }
body[data-theme="dark"][data-wallpaper*="photonic"],
html[data-theme="dark"][data-wallpaper*="photonic"] { --window-halo: rgba(0, 162, 141, 0.26); }
body[data-theme="dark"][data-wallpaper*="corridor-abstract"],
html[data-theme="dark"][data-wallpaper*="corridor-abstract"] { --window-halo: rgba(75, 61, 184, 0.26); }

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0;
}

.window-titlebar {
    height: 40px;
    background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.06));
    border-bottom: 1px solid rgba(255,255,255,0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    cursor: move;
}
.window-titlebar::after{
    content:''; position:absolute; left:0; right:0; top:0; height:20px; pointer-events:none;
    background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
}

.window-title {
    font-weight: 600;
    font-size: 14px;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-control {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.window-control { background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.18)); border:1px solid rgba(255,255,255,0.35);} 
.window-control.close { box-shadow: 0 0 0 2px rgba(255,0,0,0.15) inset; }
.window-control.minimize { box-shadow: 0 0 0 2px rgba(255,200,0,0.15) inset; }
.window-control.maximize { box-shadow: 0 0 0 2px rgba(0,255,120,0.15) inset; }

.window-control:hover {
    transform: scale(1.1);
}

.window-content {
    flex: 1;
    overflow-y: auto !important; /* Force scrollability */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding: 0; /* Remove padding to let apps control their own spacing */
    min-height: 0; /* Important for flex children to enable scrolling */
}

/* User Menu */
.user-menu {
    position: fixed;
    top: 56px;
    right: 16px;
    background: var(--bg-panel);
    backdrop-filter: var(--blur-medium);
    -webkit-backdrop-filter: var(--blur-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-large);
    padding: 8px;
    min-width: 200px;
    z-index: var(--z-dropdown);
}

.user-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.user-menu .menu-item:hover {
    background: var(--bg-glass-hover);
}
.user-menu .menu-item.active {
    background: var(--bg-glass-hover);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.menu-separator {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: var(--bg-panel);
    backdrop-filter: var(--blur-medium);
    -webkit-backdrop-filter: var(--blur-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-large);
    padding: 8px;
    min-width: 180px;
    z-index: var(--z-dropdown);
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 80px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: var(--transition-medium);
    max-width: 80px;
    text-align: center;
}

.desktop-icon:hover {
    background: var(--bg-glass-hover);
}

.desktop-icon .icon {
    font-size: 32px;
}

.desktop-icon .label {
    font-size: 12px;
    font-weight: 500;
    word-wrap: break-word;
}

/* Notifications */
.notifications {
    position: fixed;
    top: 60px;
    right: 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: var(--z-toast);
}

.notification {
    background: var(--bg-panel);
    backdrop-filter: var(--blur-medium);
    -webkit-backdrop-filter: var(--blur-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    padding: 16px;
    max-width: 320px;
    box-shadow: var(--shadow-medium);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-content {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Notification Center (persistent sidebar) */
.notifications-panel {
    position: fixed;
    top: 58px; /* positioned under user profile */
    right: -380px; /* hidden by default */
    width: 360px;
    height: calc(100dvh - 74px);
    background: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-large);
    backdrop-filter: var(--blur-medium);
    -webkit-backdrop-filter: var(--blur-medium);
    border-radius: 12px 0 0 12px;
    z-index: var(--z-drawer);
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}

/* Calculator — modern skinned UI (theme-aware) */
.calculator-app { display: grid; grid-template-rows: auto 1fr; height: 100%; background: var(--bg-secondary); padding-bottom: 12px; }
.calculator-display {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  padding: 16px 20px; 
  border-bottom: 1px solid var(--border-color);
}
.calculator-display { display:flex; align-items:center; gap:12px; }
.calculator-display .display-memory { width:18px; text-align:center; color: var(--text-tertiary); font-weight:700; }
.calculator-display .display-result {
  font-variant-numeric: tabular-nums; 
  font-size: 36px; 
  text-align: right; 
  color: var(--text-primary);
  flex:1;
}
.calculator-body { display:grid; grid-template-columns: 1fr 220px; gap: 0; min-height:0; }
.calculator-left { min-width:0; }
.calculator-buttons { display:grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(48px, 1fr); align-content: stretch; gap:10px; padding:16px 16px 24px; background: var(--bg-secondary); }
.calc-mem-row { display:grid; grid-template-columns: repeat(4,1fr); gap:10px; padding:12px 16px 0 16px; }
.calc-btn { 
  height: 52px; 
  border: 1px solid var(--border-color); 
  background: var(--bg-panel); 
  color: var(--text-primary); 
  border-radius: 12px; 
  font-size: 16px; 
  font-weight: 600; 
  cursor: pointer; 
  transition: transform .1s ease, background .15s ease, box-shadow .15s ease; 
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.calc-btn.mem { height: 40px; font-size: 13px; }
.calc-btn:hover { background: var(--bg-glass-hover); transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }
.calc-btn.operator { background: linear-gradient(180deg, rgba(0,200,255,.12), rgba(0,200,255,.06)); border-color: rgba(0,200,255,.25); }
.calc-btn.equals { background: linear-gradient(135deg, var(--primary-cyan), var(--primary-teal)); color: #001b2e; border: none; box-shadow: 0 6px 18px rgba(0,200,255,.35); }
.calc-btn.clear { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); }
.calc-btn.number.zero { grid-column: span 2; }

/* Ensure calculator adapts for light theme with crisp contrast */
html[data-theme="light"] .calc-btn.equals { color: white; }
html[data-theme="light"] .calc-btn { box-shadow: 0 1px 0 rgba(0,0,0,.05); }

/* History side panel */
.calc-history { border-left:1px solid var(--border-color); background: var(--bg-tertiary); display:flex; flex-direction:column; min-width:0; }
.calc-history-title { font-weight:700; padding:12px 12px; border-bottom:1px solid var(--border-color); color: var(--text-primary); }
.calc-history-list { flex:1; overflow:auto; padding:10px; display:grid; gap:8px; }
.calc-history-item { font-size:13px; color: var(--text-secondary); background: var(--bg-panel); border:1px solid var(--border-color); border-radius:10px; padding:8px; }
.calc-history-clear { margin:8px 10px 12px; height:36px; border-radius:10px; border:1px solid var(--border-color); background: var(--bg-glass); color: var(--text-primary); cursor:pointer; }

@media (max-width: 720px) {
  .calculator-body { grid-template-columns: 1fr; }
  .calc-history { display:none; }
}

.notifications-panel.open {
    right: 0;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header .title {
    font-weight: 600;
}

.notifications-header .actions { display: flex; gap: 8px; align-items: center; }
.notifications-header .clear-all,
.notifications-header .close-panel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}
.notifications-header .close-panel { font-size: 16px; line-height: 1; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.notifications-header .clear-all:hover,
.notifications-header .close-panel:hover {
    background: var(--bg-glass-hover);
}

.notifications-list {
    flex: 1;
    overflow: auto;
    padding: 8px 10px 12px 10px;
}

.notification-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 12px;
    margin: 8px 0;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.notification-item .title { font-weight: 600; }
.notification-item .meta { font-size: 12px; color: var(--text-tertiary); }
.notification-item .body { font-size: 14px; color: var(--text-secondary); grid-column: 1 / -1; }
.notification-item .close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
}
.notification-item .close-btn:hover { color: var(--text-primary); }

.notifications-empty {
    padding: 16px;
    color: var(--text-tertiary);
    text-align: center;
}

/* Notifications badge on top panel button */
.panel-right .panel-button {
    position: relative;
}
.panel-right .panel-button .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 0 6px;
    font-size: 11px;
    line-height: 18px;
    height: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-system);
}

.lock-content {
    text-align: center;
}

.lock-clock {
    font-size: 72px;
    font-weight: 300;
    margin-bottom: 8px;
}

.lock-date {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.lock-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

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

/* Ensure any provided avatar image fits perfectly inside the circular frame */
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.user-name {
    font-size: 18px;
    font-weight: 600;
}

.password-input {
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: var(--transition-medium);
    width: 240px;
}

.password-input:focus {
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
}

.unlock-button {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-medium);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-medium);
}

.unlock-button:hover {
    background: #d14b1f;
    transform: translateY(-1px);
    box-shadow: var(--glow-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-panel {
        padding: 0 12px;
    }
    
    .app-menu {
        display: none;
    }
    
    .dock {
        bottom: 12px;
        padding: 8px;
    }
    
    .dock-app {
        width: 40px;
        height: 40px;
    }
    
    .app-icon {
        font-size: 20px;
    }
    
    .activities-overview {
        padding: 60px 20px 20px;
    }
    
    .overview-search input {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .overview-workspaces {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .workspace {
        width: 100%;
        max-width: 300px;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        gap: 16px;
        max-width: 100%;
        min-width: 0; /* phones as narrow as 320px */
    }
    
    .overview-apps {
        padding-bottom: 80px;
        min-height: 0;
        overflow-y: auto;
        overflow-x: auto;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .app-item {
        padding: 24px 16px;
        gap: 12px;
    }
    
    .app-grid {
        max-width: 100%;
        min-width: 0;
        padding-bottom: 40px;
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .window {
        min-width: 300px;
        min-height: 200px;
    }
}

/* Browser App Styles */
.browser-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.browser-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: #e6fdff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.browser-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.address-bar {
    flex: 1;
    margin: 0 12px;
}

.address-bar input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #e6fdff;
    font-size: 14px;
}

.address-bar input:focus {
    outline: none;
    border-color: #00c8ff;
    background: rgba(255, 255, 255, 0.15);
}

.browser-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.browser-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
html.high-contrast, body.high-contrast {
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.95);
    --text-tertiary: rgba(255,255,255,0.85);
    --border-color: rgba(255,255,255,0.55);
    --bg-panel: rgba(12, 26, 44, 0.92);
    --bg-glass: rgba(255,255,255,0.18);
    --bg-glass-hover: rgba(255,255,255,0.28);
}

/* Large text mode */
html.large-text, body.large-text { font-size: 18px; }

/* Smooth theme transition on key surfaces */
body, .top-panel, .dock, .activities-overview, .notifications-panel, .window, .user-menu, .context-menu {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.3);
        --bg-glass: rgba(255, 255, 255, 0.15);
        --bg-glass-hover: rgba(255, 255, 255, 0.25);
    }
}

/* OS Switcher */
.os-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
}

.os-switch-btn {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.os-switch-btn:hover {
    background: var(--bg-1);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.os-switch-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.os-switch-btn.active:hover {
    background: var(--primary);
    opacity: 0.9;
}

/* Enforce desktop/mobile mode visibility - prevent overlay issues */
body.desktop-mode .mobile-only,
body.desktop-mode .m-dock,
body.desktop-mode .status-bar,
body:not(.mobile-mode) .mobile-only,
body:not(.mobile-mode) .m-dock,
body:not(.mobile-mode) .status-bar {
    display: none !important;
}

body.mobile-mode .desktop-only,
body.mobile-mode .top-panel:not(.mobile-top-panel) {
    display: none !important;
}

/* Print styles */
@media print {
    .desktop, .boot-splash, .lock-screen {
        display: none !important;
    }
}
