:root {
    --background: #05080c;
    --surface: rgba(13, 17, 23, 0.90);
    --outline: transparent;
    --glow: rgba(0, 0, 0, 0.5);
    --on-surface: #b9c1c9;
    --accent-primary: #4790e6;
    --accent-secondary: #6e7681;
    --error: #e64540;
    --success: #32a144;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body.theme-amoled {
    --background: #000000;
    --surface: #000000;
    --outline: #333333;
    --glow: rgba(255, 255, 255, 0.1);
    --on-surface: #ffffff;
    --accent-primary: #ffffff;
    --accent-secondary: #a0a0a0;
    --error: #ff3333;
    --success: #33ff33;
}

body.theme-amoled .highlight,
body.theme-amoled .highlight-secondary,
body.theme-amoled #prompt,
body.theme-amoled .output,
body.theme-amoled .output * {
    color: #ffffff;
}

body.theme-amoled #status-bar,
body.theme-amoled #status-bar::before {
    background-color: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.theme-amoled .terminal-header,
body.theme-amoled .command {
    background-color: #000000;
}

body.theme-solar-flare {
    --background: #fdf6e3; --surface: rgba(253, 246, 227, 0.85); --outline: #93a1a1;
    --glow: rgba(0, 0, 0, 0.1); --on-surface: #586e75; --accent-primary: #268bd2;
    --accent-secondary: #859900; --error: #dc322f; --success: #859900;
}

body.theme-nebula {
    --background: #241b2f; --surface: rgba(23, 17, 35, 0.85); --outline: #4a3b5a;
    --glow: rgba(255, 107, 222, 0.15); --on-surface: #e0dce5; --accent-primary: #ff6bde;
    --accent-secondary: #a992e5; --error: #ff476c; --success: #62e08c;
}

body.theme-matrix {
    --background: #000000; --surface: rgba(10, 10, 10, 0.85); --outline: #003B00;
    --glow: rgba(0, 255, 0, 0.15); --on-surface: #00ff00; --accent-primary: #33ff33;
    --accent-secondary: #00cc00; --error: #990000; --success: #00ff00;
}

body.theme-arctic {
    --background: #f0f4f8; --surface: rgba(255, 255, 255, 0.85); --outline: #d3dde6;
    --glow: rgba(74, 144, 226, 0.1); --on-surface: #243b53; --accent-primary: #4a90e2;
    --accent-secondary: #3b71b1; --error: #d0021b; --success: #1e9a51;
}

body.theme-cyberpunk {
    --background: #0a041a; --surface: rgba(10, 4, 26, 0.85); --outline: #2a1a4a;
    --glow: rgba(255, 0, 255, 0.2); --on-surface: #ebe0ff; --accent-primary: #ff00ff;
    --accent-secondary: #00ffff; --error: #ff3333; --success: #33ff33;
}

body.theme-oceanic {
    --background: #0b2d48; --surface: rgba(11, 45, 72, 0.85); --outline: #1a5078;
    --glow: rgba(67, 188, 205, 0.2); --on-surface: #c4dce9; --accent-primary: #43bccd;
    --accent-secondary: #f0e6d2; --error: #e57373; --success: #81c784;
}

body.theme-forest {
    --background: #1e2d2b; --surface: rgba(30, 45, 43, 0.85); --outline: #38514e;
    --glow: rgba(121, 186, 156, 0.15); --on-surface: #c2d1ce; --accent-primary: #79ba9c;
    --accent-secondary: #a88d78; --error: #c97b7b; --success: #a3c293;
}

body.theme-sunset {
    --background: #2c1338; --surface: rgba(44, 19, 56, 0.85); --outline: #5a2a72;
    --glow: rgba(255, 118, 99, 0.2); --on-surface: #f5e4f9; --accent-primary: #ff7663;
    --accent-secondary: #d664be; --error: #ff4a4a; --success: #a0ff99;
}

body.theme-monokai {
    --background: #272822; --surface: rgba(39, 40, 34, 0.85); --outline: #49483e;
    --glow: rgba(249, 38, 114, 0.15); --on-surface: #f8f8f2; --accent-primary: #f92672;
    --accent-secondary: #a6e22e; --error: #f92672; --success: #a6e22e;
}

body.theme-dracula {
    --background: #282a36; --surface: rgba(40, 42, 54, 0.85); --outline: #44475a;
    --glow: rgba(189, 147, 249, 0.15); --on-surface: #f8f8f2; --accent-primary: #bd93f9;
    --accent-secondary: #50fa7b; --error: #ff5555; --success: #50fa7b;
}

body.theme-nord {
    --background: #2e3440; --surface: rgba(46, 52, 64, 0.85); --outline: #4c566a;
    --glow: rgba(129, 161, 193, 0.1); --on-surface: #d8dee9; --accent-primary: #81a1c1;
    --accent-secondary: #88c0d0; --error: #bf616a; --success: #a3be8c;
}

body.theme-gruvbox {
    --background: #282828; --surface: rgba(40, 40, 40, 0.85); --outline: #504945;
    --glow: rgba(254, 128, 25, 0.1); --on-surface: #ebdbb2; --accent-primary: #fe8019;
    --accent-secondary: #b8bb26; --error: #cc241d; --success: #98971a;
}

body.theme-crimson {
    --background: #1a0000; --surface: rgba(26, 0, 0, 0.85); --outline: #5c0000;
    --glow: rgba(255, 20, 20, 0.2); --on-surface: #f2dcdc; --accent-primary: #ff1414;
    --accent-secondary: #a0a0a0; --error: #ff5050; --success: #cccccc;
}

body.theme-gold {
    --background: #14120E; --surface: rgba(20, 18, 14, 0.85); --outline: #4d4432;
    --glow: rgba(212, 175, 55, 0.15); --on-surface: #fff8e1; --accent-primary: #d4af37;
    --accent-secondary: #ffffff; --error: #e68e8e; --success: #b0e0b0;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--on-surface);
    display: flex; justify-content: center; align-items: flex-start;
    background-image: radial-gradient(ellipse at top, color-mix(in srgb, var(--background) 80%, black), var(--background));
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    overscroll-behavior-y: contain;
    transition: background-color 0.2s ease;
}













@media (max-width: 600px) {


}











body.new-design #status-bar {
    border-radius: 50px;
    width: 100%;
    left: 0;
    top: 0;
    background: var(--surface);
}

body.new-design #status-bar::before {
    background-color: var(--surface);
    border-radius: 50px;
}

body.new-design .os-container {
    padding: 40px 0 0 0;
}

body.new-design .terminal {
    height: calc(100vh - 40px);
}

body.new-design .terminal-header {
    border-radius: 12px;
    width: calc(100% - 20px);
    margin: 10px auto 0 auto;
}

body.new-design .command {
    border-radius: 50px;
    width: calc(100% - 20px);
    margin: 0 auto 10px auto;
}

body.new-design .input-field {
    border-radius: 50px;
    font-size: 1rem;
}

body.remove-header .terminal-header {
    display: none !important;
}

body.no-animations * {
    transition: none !important;
    animation: none !important;
}

body.no-animations #status-bar,
body.no-animations .terminal {
    opacity: 1 !important;
    transform: none !important;
}

button, input, a, .recovery-button, .close-fullscreen, .modal-button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button:focus, button:focus-visible, input:focus, input:focus-visible {
    outline: none;
}

input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

#lock-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    background: color-mix(in srgb, var(--background), transparent 20%); z-index: 10000;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    opacity: 1; transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--on-surface);
}
#lock-screen.hidden { opacity: 0; pointer-events: none; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); transform: scale(1.05); }

#lock-content {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
}

#lock-content.sliding {
    transform: translateY(-100vh);
    opacity: 0;
}

#lock-time { font-size: 6rem; font-weight: 300; letter-spacing: -2px; animation: fadeIn 0.3s ease-out; color: var(--on-surface); }
#lock-date { font-size: 1.2rem; margin-top: -0.5rem; opacity: 0.7; font-weight: 400; animation: fadeIn 0.3s 0.1s ease-out both; }
#lock-weather { font-size: 1rem; margin-top: 1rem; opacity: 0.6; animation: fadeIn 0.3s 0.2s ease-out both; }

#lock-mini-clock {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    color: var(--on-surface);
}

#lock-welcome {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 2rem;
    color: var(--on-surface);
}

#lock-interactive {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#lock-interactive.visible {
    opacity: 1;
    pointer-events: all;
}

#lock-slide-hint {
    position: absolute;
    bottom: 2rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(-5px); }
    100% { opacity: 0.3; transform: translateY(0); }
}

#password-container {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}

#password-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

#password-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--on-surface);
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    width: 320px;
    max-width: 85vw;
    text-align: center;
    font-family: var(--font-main);
    letter-spacing: 4px;
    transition: all 0.3s ease;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}
#password-input::placeholder { color: var(--accent-secondary); opacity: 0.7; letter-spacing: normal; font-size: 1rem; font-weight: 400; }
#password-input:focus { border-color: var(--accent-primary); background: rgba(0, 0, 0, 0.4); box-shadow: 0 0 15px rgba(255,255,255,0.05); }

#password-error {
    color: var(--error);
    height: 1.2em;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

#forgot-password {
    font-size: 0.9rem;
    color: var(--accent-secondary);
    cursor: pointer;
    margin-top: 1.5rem;
    transition: color 0.2s ease;
    opacity: 0.8;
}
#forgot-password:hover { color: var(--on-surface); opacity: 1; }

#unlock-button {
    background: var(--accent-primary);
    border: none;
    color: var(--background);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
#unlock-button:hover { filter: brightness(1.1); transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
#unlock-button:active { transform: translateY(-1px) scale(0.98); }

#reset-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--background);
    display: flex; justify-content: center; align-items: center;
    z-index: 10001; animation: fadeIn 0.3s ease;
}

.modal-content {
    background: transparent;
    padding: 2rem; border-radius: 0;
    border: none;
    text-align: center; max-width: 400px;
    box-shadow: none;
}
.modal-content h3 { font-family: var(--font-main); color: var(--on-surface); margin-bottom: 1rem; }
.modal-content p { color: var(--accent-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }
.modal-buttons { display: flex; gap: 1rem; justify-content: center; }
.modal-button {
    padding: 0.6rem 1.2rem; font-family: var(--font-mono); border-radius: 50px;
    cursor: pointer; transition: all 0.2s ease; border: 1px solid rgba(255,255,255,0.1);
}
.modal-button.confirm { background-color: var(--error); color: white; border-color: var(--error); }
.modal-button.confirm:hover { filter: brightness(1.2); }
.modal-button.cancel { background-color: transparent; color: var(--on-surface); }
.modal-button.cancel:hover { background-color: var(--outline); }

#status-bar {
    position: fixed; top: 0; left: 0; width: 100%; padding: 8px 16px; height: 40px; box-sizing: border-box;
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem; font-family: var(--font-mono); z-index: 100;
    opacity: 0; animation: slideDown 0.3s 0.1s ease-out forwards;
    border-bottom: none;
    background-size: cover;
    background-position: center top;
    transition: backdrop-filter 0.2s ease;
}

#status-bar.has-wallpaper {
    background: transparent;
}

#status-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1;
    transition: backdrop-filter 0.2s ease, background-color 0.2s ease;
}

#status-bar.has-wallpaper::before {
    background-image: var(--wallpaper-image);
    background-size: cover;
    background-position: center top;
    background-color: transparent;
}

#status-time { display: flex; align-items: center; gap: 8px; }

.os-container { width: 100%; height: 100%; padding: 40px 0 0 0; display: flex; justify-content: center; align-items: flex-start; }
.terminal {
    width: 100%; max-width: none; height: calc(100vh - 40px);
    background-color: var(--surface);
    border-radius: 0;
    box-shadow: none;
    border: none; font-family: var(--font-mono);
    display: flex; flex-direction: column; opacity: 0; transform: translateY(20px);
    animation: fadeIn 0.3s 0.2s ease-out forwards;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
    overflow: hidden;
    position: relative;
}

.terminal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-image: var(--wallpaper-image);
    z-index: 0;
}

.terminal.has-wallpaper {
    --surface: rgba(0, 0, 0, 0);
}

.terminal.has-wallpaper .command {
    background-color: rgba(0, 0, 0, 0.6);
}

.terminal.has-wallpaper .terminal-header {
    background-color: transparent;
}

.terminal.has-wallpaper .output p,
.terminal.has-wallpaper .output div,
.terminal.has-wallpaper .output pre {
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.terminal-header {
    background-color: transparent;
    padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); flex-shrink: 0;
    transition: background-color 0.2s ease;
    position: relative; z-index: 2;
    min-height: 40px;
}

.terminal-title { color: var(--on-surface); font-size: 0.9rem; font-weight: 500; opacity: 0.9; }

.output { padding: 1.5rem; flex-grow: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; line-height: 1.7; font-size: 0.9rem; user-select: none; position: relative; z-index: 2; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.output > * { animation: textFadeIn 0.4s ease-out forwards; }
.output p, .output div { margin-bottom: 0.5rem; color: var(--on-surface); word-break: break-word; white-space: normal; }
.output pre { margin-bottom: 0.5rem; color: var(--on-surface); word-break: break-word; white-space: pre-wrap; }
.highlight { color: var(--accent-primary); }
.highlight-secondary { color: var(--accent-secondary); }
.error-message { color: var(--error); }

.command { display: flex; align-items: center; padding: 1rem 1.5rem; background-color: rgba(30, 35, 42, 0.7); border-top: none; flex-shrink: 0; transition: background-color 0.2s ease; position: relative; z-index: 2;}
#prompt { margin-right: 0.5rem; }
.input-field { background-color: transparent; border: none; color: var(--on-surface); font-size: 1rem; width: 100%; outline: none; font-family: inherit; }
.input-field:focus { caret-color: var(--accent-primary); }
.input-field::placeholder { color: var(--accent-secondary); opacity: 0.7; }

.player-minimized {
    transform: none !important;
    width: 320px !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    bottom: 20px;
    right: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
    animation: fadeIn 0.3s ease;
}

.overlay-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--background);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-mono);
    animation: fadeIn 0.2s ease;
}

.bsod-container, .recovery-container {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

.bsod-container h1 {
    font-size: 5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-family: var(--font-main);
    font-weight: 700;
}

.bsod-container p {
    font-size: 1.1rem;
    line-height: 1.6;
}

#bsod-error-code {
    margin-top: 2rem;
    color: var(--accent-secondary);
    font-size: 0.9rem;
}







.output::-webkit-scrollbar { width: 8px; }
.output::-webkit-scrollbar-track { background: transparent; }
.output::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.shake { animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(10px); } }
@keyframes fadeInCenter { from { opacity: 0; transform: translate(-50%, calc(-50% + 15px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
/* typePulse removed */
@keyframes textFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

@media (max-width: 600px) {
    .os-container { padding: 40px 0 0 0; height: 100dvh; align-items: flex-start; }
    .terminal { width: 100%; height: calc(var(--real-height, 100dvh) - 40px); max-height: none; border-radius: 0; }
    body.new-design .os-container { padding: 40px 0 0 0; }
    body.new-design .terminal { height: calc(var(--real-height, 100dvh) - 40px); }
    #lock-time { font-size: 5rem; } #lock-date { font-size: 1.2rem; }
    .player-minimized {
         width: calc(100% - 20px) !important;
         bottom: 10px;
         right: 10px;
    }
}


#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20001;
    opacity: 1;
    transition: opacity 0.3s ease;
}
#boot-screen.hidden { opacity: 0; pointer-events: none; }
#boot-screen .boot-title {
    font-family: var(--font-main);
    color: var(--on-surface);
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}
#boot-screen .boot-subtitle {
    display: none;
}
#boot-screen .boot-footer {
    position: absolute;
    bottom: 4rem;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    font-size: 0.8rem;
    opacity: 0.5;
}

.fullscreen-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 100;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.fullscreen-app-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fullscreen-app-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fullscreen-app-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.close-fullscreen {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--on-surface);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.close-fullscreen:hover {
    background: var(--error);
    color: white;
}

/* Modern Boot Spinner */
.boot-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Storage/Software UI */
.modern-card {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.modern-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.settings-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    font-weight: 700;
    opacity: 0.9;
}

.modern-progress-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.modern-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

.modern-list-item:last-child {
    border-bottom: none;
}

.toggle-button {
    min-width: 100px;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toggle-button.enabled {
    background: var(--accent-primary);
    color: var(--background);
    transform: scale(1.02);
}

.toggle-button.enabled:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.toggle-button.disabled {
    background: rgba(255,255,255,0.08);
    color: var(--on-surface);
    opacity: 0.6;
}

.toggle-button.disabled:hover {
    background: rgba(255,255,255,0.12);
    opacity: 0.8;
}

.settings-footer {
    position: sticky;
    bottom: 0;
    background: var(--background);
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    z-index: 10;
}

.btn-save {
    background: var(--accent-primary);
    color: var(--background);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    filter: brightness(1.1);
}

.btn-discard {
    background: transparent;
    color: var(--on-surface);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-discard:hover {
    background: var(--error);
    color: white;
}

.changelog-v42 {
    font-size: 0.9rem;
    line-height: 1.5;
}

.changelog-v42 h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--on-surface);
}

.changelog-v42 li {
    margin-bottom: 0.75rem;
            }

#lock-interactive {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#lock-interactive.visible {
    opacity: 1;
    pointer-events: all;
}

#lock-slide-hint {
    position: absolute;
    bottom: 2rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(-5px); }
    100% { opacity: 0.3; transform: translateY(0); }
}

#password-container {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}


#reset-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--background);
    display: flex; justify-content: center; align-items: center;
    z-index: 10001; animation: fadeIn 0.4s ease-out;
}

.modal-content {
    background: transparent;
    padding: 2rem; border-radius: 0;
    border: none;
    text-align: center; max-width: 400px;
    box-shadow: none;
}
.modal-content h3 { font-family: var(--font-main); color: var(--on-surface); margin-bottom: 1rem; }
.modal-content p { color: var(--accent-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }
.modal-buttons { display: flex; gap: 1rem; justify-content: center; }
.modal-button {
    padding: 0.6rem 1.2rem; font-family: var(--font-mono); border-radius: 50px;
    cursor: pointer; transition: all 0.2s ease; border: 1px solid rgba(255,255,255,0.1);
}
.modal-button.confirm { background-color: var(--error); color: white; border-color: var(--error); }
.modal-button.confirm:hover { filter: brightness(1.2); }
.modal-button.cancel { background-color: transparent; color: var(--on-surface); }
.modal-button.cancel:hover { background-color: var(--outline); }

#status-bar {
    position: fixed; top: 0; left: 0; width: 100%; padding: 8px 16px;
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem; font-family: var(--font-mono); z-index: 100;
    opacity: 0; animation: slideDown 0.3s 0.1s ease-out forwards;
    border-bottom: none;
    background-size: cover;
    background-position: center top;
    transition: backdrop-filter 0.2s ease;
}

#status-bar.has-wallpaper {
    background: transparent;
}

#status-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(var(--wallpaper-blur)) blur(5px);
    -webkit-backdrop-filter: blur(var(--wallpaper-blur)) blur(5px);
    z-index: -1;
    transition: backdrop-filter 0.2s ease;
}

#status-bar.has-wallpaper::before {
    background-image: var(--wallpaper-image);
    background-size: cover;
    background-position: center top;
}

#status-time { display: flex; align-items: center; gap: 8px; }

.os-container { width: 100%; height: 100%; padding: 40px 0 0 0; display: flex; justify-content: center; align-items: flex-start; }
.terminal {
    width: 100%; max-width: none; height: calc(100vh - 40px);
    background-color: var(--surface);
    border-radius: 0;
    box-shadow: none;
    border: none; font-family: var(--font-mono);
    display: flex; flex-direction: column; opacity: 0; transform: translateY(20px);
    animation: fadeIn 0.3s 0.2s ease-out forwards;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
    overflow: hidden;
    position: relative;
}

.terminal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-image: var(--wallpaper-image);
    filter: blur(var(--wallpaper-blur));
    z-index: 0;
    transition: filter 0.2s ease;
}

.terminal.has-wallpaper {
    --surface: rgba(22, 27, 34, 0.7);
}

.terminal.has-wallpaper .output p,
.terminal.has-wallpaper .output div,
.terminal.has-wallpaper .output pre {
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.terminal-header {
    background-color: rgba(30, 35, 42, 0.7);
    padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: flex-start;
    border-bottom: none; flex-shrink: 0;
    transition: background-color 0.2s ease;
    position: relative; z-index: 2;
    min-height: 40px;
}

.terminal-title { color: var(--on-surface); font-size: 0.9rem; font-weight: 500; opacity: 0.9; }

.output { padding: 1.5rem; flex-grow: 1; overflow-y: auto; line-height: 1.7; font-size: 0.9rem; user-select: none; position: relative; z-index: 2; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.output > * { animation: textFadeIn 0.2s ease; }
.output p, .output div, .output pre { margin-bottom: 0.5rem; color: var(--on-surface); }
.highlight { color: var(--accent-primary); }
.highlight-secondary { color: var(--accent-secondary); }
.error-message { color: var(--error); }

.command { display: flex; align-items: center; padding: 1rem 1.5rem; background-color: rgba(30, 35, 42, 0.7); border-top: none; flex-shrink: 0; transition: background-color 0.2s ease; position: relative; z-index: 2;}
#prompt { margin-right: 0.5rem; }
.input-field { background-color: transparent; border: none; color: var(--on-surface); font-size: 1rem; width: 100%; outline: none; font-family: inherit; user-select: none; }
.input-field:focus { caret-color: var(--accent-primary); }
.input-field::placeholder { color: var(--accent-secondary); opacity: 0.7; }

.player-minimized {
    transform: none !important;
    width: 320px !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    bottom: 20px;
    right: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
    animation: fadeIn 0.3s ease;
}

.overlay-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--background);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-mono);
    animation: fadeIn 0.4s ease-out;
}

.bsod-container, .recovery-container {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

.bsod-container h1 {
    font-size: 5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-family: var(--font-main);
    font-weight: 700;
}

.bsod-container p {
    font-size: 1.1rem;
    line-height: 1.6;
}

#bsod-error-code {
    margin-top: 2rem;
    color: var(--accent-secondary);
    font-size: 0.9rem;
}








.output::-webkit-scrollbar { width: 8px; }
.output::-webkit-scrollbar-track { background: transparent; }
.output::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.shake { animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(10px); } }
@keyframes fadeInCenter { from { opacity: 0; transform: translate(-50%, calc(-50% + 15px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes textFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

@media (max-width: 600px) {
    .os-container { padding: 40px 0 0 0; height: 100dvh; align-items: flex-start; }
    .terminal { width: 100%; height: calc(var(--real-height, 100dvh) - 40px); max-height: none; border-radius: 0; }
    body.new-design .os-container { padding: 40px 0 0 0; }
    body.new-design .terminal { height: calc(var(--real-height, 100dvh) - 40px); }
    #lock-time { font-size: 5rem; } #lock-date { font-size: 1.2rem; }
    .player-minimized {
         width: calc(100% - 20px) !important;
         bottom: 10px;
         right: 10px;
    }
}


#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20001;
    opacity: 1;
    transition: opacity 0.3s ease;
}
#boot-screen.hidden { opacity: 0; pointer-events: none; }
#boot-screen .boot-title {
    font-family: var(--font-main);
    color: var(--on-surface);
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}
#boot-screen .boot-subtitle {
    display: none;
}
#boot-screen .boot-footer {
    position: absolute;
    bottom: 4rem;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    font-size: 0.8rem;
    opacity: 0.5;
}

.fullscreen-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 100;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

.fullscreen-app-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fullscreen-app-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fullscreen-app-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.close-fullscreen {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--on-surface);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.close-fullscreen:hover {
    background: var(--error);
    color: white;
}

/* Modern Boot Spinner */
.boot-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Storage/Software UI */
.modern-card {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.modern-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.settings-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    font-weight: 700;
    opacity: 0.9;
}

.modern-progress-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.modern-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

.modern-list-item:last-child {
    border-bottom: none;
}

.toggle-button {
    min-width: 100px;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toggle-button.enabled {
    background: var(--accent-primary);
    color: var(--background);
    transform: scale(1.02);
}

.toggle-button.enabled:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.toggle-button.disabled {
    background: rgba(255,255,255,0.08);
    color: var(--on-surface);
    opacity: 0.6;
}

.toggle-button.disabled:hover {
    background: rgba(255,255,255,0.12);
    opacity: 0.8;
}

.settings-footer {
    position: sticky;
    bottom: 0;
    background: var(--background);
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    z-index: 10;
}

.btn-save {
    background: var(--accent-primary);
    color: var(--background);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    filter: brightness(1.1);
}

.btn-discard {
    background: transparent;
    color: var(--on-surface);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-discard:hover {
    background: var(--error);
    color: white;
}

.changelog-v42 {
    font-size: 0.9rem;
    line-height: 1.5;
}

.changelog-v42 h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--on-surface);
}

.changelog-v42 li {
    margin-bottom: 0.75rem;
}








.recovery-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.recovery-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--on-surface);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    width: 300px;
    text-align: center;
    transition: all 0.2s ease;
}

.recovery-button:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--background);
    transform: translateY(-2px);
}
.recovery-button.danger:hover {
    background: var(--error);
    border-color: var(--error);
    color: #fff;
    transform: translateY(-2px);
}

.modal-btn-cancel {
    transition: all 0.2s ease;
}
.modal-btn-cancel:hover {
    background: var(--error) !important;
    border-color: var(--error) !important;
    color: white !important;
}
