/* ═══════════════════════════════════════════════
   Study OS — Complete Stylesheet v2.0
   ═══════════════════════════════════════════════ */

:root {
  --bg:       #0a0e27;
  --surface:  #141828;
  --surface2: #1e2440;
  --accent:   #00d4ff;
  --accent2:  #0099bb;
  --text:     #e2e8f0;
  --muted:    #7889a8;
  --border:   rgba(0,212,255,0.14);
  --shadow:   rgba(0,0,0,0.55);
  --glow:     rgba(0,212,255,0.28);
  --glass:    rgba(14,18,40,0.78);
  --radius:   10px;
  --font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; width: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: var(--font); cursor: pointer; }
input  { font-family: var(--font); }

/* ── Shared utilities ── */
.os-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.os-input::placeholder { color: rgba(255,255,255,0.28); }
.os-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}

.os-btn {
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.os-btn:hover  { opacity: .92; transform: translateY(-1px); }
.os-btn:active { opacity: 1;   transform: translateY(0); }
.os-btn.ghost  {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
}
.os-btn.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

.w-full   { width: 100%; }
.form-error {
  font-size: 12px; color: #f87171;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px; padding: 6px 10px;
  text-align: center;
}
.text-link {
  font-size: 12px; color: var(--muted);
  cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; transition: color .2s;
  display: block; text-align: center;
}
.text-link:hover { color: var(--accent); }


/* ═══════════════════════════════════════════════
   BOOT SCREEN
   ═══════════════════════════════════════════════ */
.boot-screen {
  position: fixed; inset: 0; z-index: 99999;
  background: radial-gradient(ellipse at center, #0d1433 0%, #050810 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  transition: opacity .5s ease;
}
.boot-logo {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: boot-rise .7s cubic-bezier(.34,1.56,.64,1);
}
.boot-icon {
  font-size: 72px;
  filter: drop-shadow(0 0 28px rgba(0,212,255,.65));
}
.boot-wordmark {
  font-size: 38px; font-weight: 700; letter-spacing: 5px;
  color: #fff; text-transform: uppercase;
}
.boot-wordmark span { color: var(--accent); }
.boot-tagline { font-size: 13px; color: var(--muted); letter-spacing: 2px; }
.boot-progress-wrap { width: 180px; }
.boot-progress-bar  { height: 3px; background: rgba(0,212,255,.12); border-radius: 2px; overflow: hidden; }
.boot-progress-fill {
  height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: boot-load 1.85s ease-in-out forwards;
}
.boot-version { font-size: 11px; color: rgba(255,255,255,.2); position: absolute; bottom: 20px; }

@keyframes boot-rise  { from { opacity:0; transform: scale(.85) translateY(20px); } to { opacity:1; transform: scale(1) translateY(0); } }
@keyframes boot-load  { 0%{width:0} 60%{width:72%} 90%{width:93%} 100%{width:100%} }


/* ═══════════════════════════════════════════════
   SETUP WIZARD
   ═══════════════════════════════════════════════ */
.wizard-screen {
  position: fixed; inset: 0; z-index: 99998;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.wizard-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, #0d2040, transparent 60%),
              radial-gradient(ellipse at 70% 80%, #0a1528, transparent 60%),
              #060a1a;
}
.wizard-card {
  position: relative; z-index: 1;
  background: rgba(10,14,32,.88);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px 28px;
  width: 100%; max-width: 460px;
  backdrop-filter: blur(20px);
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03);
  max-height: 92vh; overflow-y: auto;
}
.wizard-dots {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 28px;
}
.wizard-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.15); transition: all .3s;
}
.wizard-dot.active   { background: var(--accent); box-shadow: 0 0 8px var(--accent); width: 22px; border-radius: 4px; }
.wizard-dot.done     { background: rgba(0,212,255,.4); }
.wizard-content      { transition: opacity .25s, transform .25s; }

/* Wizard step elements */
.wz-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.wz-sub   { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }
.wz-label { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px; }
.wz-actions { display: flex; gap: 10px; margin-top: 24px; }
.wz-actions .os-btn { flex: 1; }

/* Avatar picker */
.avatar-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px;
}
.avatar-opt {
  aspect-ratio: 1; background: rgba(255,255,255,.05);
  border: 2px solid transparent; border-radius: 10px;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; padding: 4px;
}
.avatar-opt:hover { background: rgba(0,212,255,.1); border-color: rgba(0,212,255,.3); transform: scale(1.08); }
.avatar-opt.sel   { border-color: var(--accent); background: rgba(0,212,255,.15); box-shadow: 0 0 12px rgba(0,212,255,.3); }

.avatar-upload-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border: 1px dashed rgba(255,255,255,.2); border-radius: 8px;
  background: rgba(255,255,255,.03); color: var(--muted); font-size: 13px;
  cursor: pointer; transition: all .15s; margin-bottom: 10px;
}
.avatar-upload-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,.05); }
.avatar-preview-photo {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--accent);
  display: block; margin: 0 auto 10px; box-shadow: 0 0 16px rgba(0,212,255,.4);
}

/* Wallpaper picker */
.wallpaper-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
.wp-opt {
  aspect-ratio: 16/10; border-radius: 8px; border: 2px solid transparent;
  cursor: pointer; transition: all .2s; overflow: hidden; position: relative;
}
.wp-opt:hover { transform: scale(1.04); border-color: rgba(0,212,255,.5); }
.wp-opt.sel   { border-color: var(--accent); box-shadow: 0 0 14px rgba(0,212,255,.4); }
.wp-opt-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 6px; background: rgba(0,0,0,.55);
  font-size: 10px; text-align: center; color: rgba(255,255,255,.8);
}
.wp-upload-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border: 1px dashed rgba(255,255,255,.2); border-radius: 8px;
  background: rgba(255,255,255,.03); color: var(--muted); font-size: 13px;
  cursor: pointer; transition: all .15s; width: 100%;
}
.wp-upload-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Password strength */
.pass-strength { height: 3px; border-radius: 2px; margin-top: 6px; transition: all .3s; }


/* ═══════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0; z-index: 99997;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 28px;
  transition: opacity .4s;
}
.login-blur {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55); backdrop-filter: blur(12px);
}
.login-clock-wrap {
  position: relative; z-index: 1; text-align: center;
  animation: fade-up .5s ease-out;
}
.login-clock { font-size: 80px; font-weight: 200; color: #fff; letter-spacing: -3px; line-height: 1; }
.login-date  { font-size: 16px; color: rgba(255,255,255,.55); margin-top: 6px; letter-spacing: .3px; }
.login-card {
  position: relative; z-index: 1;
  background: rgba(8,12,28,.8); border: 1px solid rgba(0,212,255,.2);
  border-radius: 18px; padding: 28px 26px;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  width: 290px; backdrop-filter: blur(22px);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 48px rgba(0,212,255,.06);
  animation: card-rise .4s cubic-bezier(.34,1.3,.64,1);
}
.login-avatar-display {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; border: 2px solid rgba(0,212,255,.3);
  background: rgba(0,212,255,.06); overflow: hidden;
  box-shadow: 0 0 20px rgba(0,212,255,.2);
}
.login-avatar-display img { width: 100%; height: 100%; object-fit: cover; }
.login-uname { font-size: 18px; font-weight: 600; color: #fff; }

@keyframes fade-up  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes card-rise{ from { opacity:0; transform:translateY(14px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }


/* ═══════════════════════════════════════════════
   DESKTOP
   ═══════════════════════════════════════════════ */
.desktop {
  position: fixed; top: 0; left: 0; right: 0; bottom: 54px;
  overflow: hidden; z-index: 1;
}


/* ═══════════════════════════════════════════════
   WINDOWS
   ═══════════════════════════════════════════════ */
.window {
  position: absolute;
  width: 720px; height: 480px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 48px var(--shadow), 0 0 28px var(--glow);
  display: flex; flex-direction: column;
  z-index: 100; overflow: hidden;
  backdrop-filter: blur(16px);
  animation: win-pop .18s cubic-bezier(.34,1.3,.64,1);
}
.win-header {
  height: 38px; flex-shrink: 0;
  background: linear-gradient(90deg, rgba(0,212,255,.15), transparent 70%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px; cursor: grab; user-select: none;
}
.win-header:active { cursor: grabbing; }
.win-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.win-title-icon { font-size: 16px; }
.win-controls { display: flex; gap: 3px; }
.win-btn {
  width: 26px; height: 26px; border: none;
  background: transparent; color: var(--muted);
  border-radius: 5px; font-size: 13px; transition: all .15s;
}
.win-btn:hover { background: rgba(0,212,255,.1); color: var(--text); }
.win-btn.close:hover { background: rgba(239,68,68,.2); color: #f87171; }
.win-content { flex: 1; overflow: auto; padding: 14px; }

.window.minimized { display: none; }
.window.maximized {
  left: 0 !important; top: 0 !important;
  width: 100% !important; height: calc(100% ) !important;
  border-radius: 0;
}

@keyframes win-pop { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:scale(1); } }


/* ═══════════════════════════════════════════════
   TASKBAR
   ═══════════════════════════════════════════════ */
.taskbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 54px;
  background: rgba(6,9,24,.9); border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 0; z-index: 9000;
  backdrop-filter: blur(16px); padding: 0 8px;
}
.tb-start {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 8px;
  cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.tb-start:hover { background: rgba(0,212,255,.1); }
.tb-logo      { font-size: 22px; }
.tb-logo-label{ font-size: 13px; font-weight: 600; color: var(--text); }
.tb-sep       { width: 1px; height: 28px; background: var(--border); margin: 0 8px; flex-shrink: 0; }
.task-icons   { display: flex; gap: 4px; flex: 1; overflow-x: auto; overflow-y: hidden; align-items: center; scrollbar-width: none; }
.task-icons::-webkit-scrollbar { display: none; }
.task-icon    {
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; transition: all .15s; position: relative;
}
.task-icon:hover { background: rgba(0,212,255,.12); transform: translateY(-2px); }
.task-icon.running::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.task-tray { display: flex; align-items: center; gap: 4px; padding-left: 8px; flex-shrink: 0; }
.user-chip {
  font-size: 12px; color: var(--text); padding: 4px 9px; border-radius: 20px;
  background: rgba(0,212,255,.08); border: 1px solid var(--border);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tray-clock { font-size: 12px; color: var(--muted); min-width: 38px; text-align: right; }
.tray-btn {
  background: none; border: none; color: var(--muted);
  font-size: 15px; padding: 5px 6px; border-radius: 6px; transition: all .15s;
}
.tray-btn:hover { color: var(--accent); background: rgba(0,212,255,.08); }


/* ═══════════════════════════════════════════════
   START MENU
   ═══════════════════════════════════════════════ */
.start-menu {
  position: fixed; bottom: 62px; left: 10px;
  width: min(420px, calc(100vw - 20px));
  max-height: 72vh;
  background: rgba(8,12,28,.9); border: 1px solid rgba(0,212,255,.18);
  border-radius: 16px; z-index: 9001;
  display: flex; flex-direction: column;
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 48px rgba(0,0,0,.6), 0 0 20px var(--glow);
  animation: sm-rise .2s cubic-bezier(.34,1.3,.64,1);
  overflow: hidden;
}
.sm-top { padding: 14px 14px 0; }
.sm-search {
  width: 100%; padding: 9px 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s;
}
.sm-search::placeholder { color: var(--muted); }
.sm-search:focus { border-color: var(--accent); }
.sm-tabs { display: flex; gap: 8px; padding: 10px 14px 0; }
.sm-tab {
  flex: 1; padding: 7px; background: transparent;
  border: 1px solid rgba(255,255,255,.08); color: var(--muted);
  border-radius: 7px; font-size: 13px; transition: all .15s;
}
.sm-tab.active { background: rgba(0,212,255,.16); color: var(--accent); border-color: rgba(0,212,255,.3); }
.sm-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 6px;
  padding: 10px 14px; overflow-y: auto; flex: 1;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sm-app-item {
  padding: 10px 8px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06); border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; transition: all .15s; text-align: center; position: relative;
}
.sm-app-item:hover { background: rgba(0,212,255,.1); border-color: rgba(0,212,255,.25); }
.sm-app-icon { font-size: 26px; }
.sm-app-label { font-size: 11px; color: var(--text); line-height: 1.2; }
.sm-app-pin {
  position: absolute; top: 4px; right: 4px; opacity: 0;
  font-size: 11px; background: rgba(0,0,0,.4); border: none;
  border-radius: 4px; color: var(--muted); padding: 2px 4px; transition: opacity .15s;
}
.sm-app-item:hover .sm-app-pin { opacity: 1; }
.sm-footer {
  padding: 10px 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.sm-user-info { display: flex; align-items: center; gap: 8px; }
.sm-user-avatar { font-size: 28px; }
.sm-user-name { font-size: 14px; font-weight: 600; }
.sm-user-sub  { font-size: 11px; color: var(--muted); }

@keyframes sm-rise { from { opacity:0; transform:translateY(8px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }


/* ═══════════════════════════════════════════════
   BUILT-IN APPS
   ═══════════════════════════════════════════════ */

/* — Notepad — */
.app-notepad { display: flex; flex-direction: column; height: 100%; gap: 8px; }
.app-notepad textarea {
  flex: 1; background: rgba(0,212,255,.03); border: 1px solid var(--border);
  color: var(--text); padding: 12px; border-radius: 7px; resize: none; font-size: 14px;
  font-family: 'Courier New', monospace; outline: none; line-height: 1.6;
  transition: border-color .2s;
}
.app-notepad textarea:focus { border-color: rgba(0,212,255,.3); }
.app-notepad .np-controls { display: flex; gap: 8px; justify-content: flex-end; }

/* — Link/Browser — */
.app-browser { display: flex; flex-direction: column; height: 100%; }
.app-browser-bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: rgba(0,212,255,.06); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.app-browser-url { flex: 1; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-browser iframe { flex: 1; border: none; width: 100%; }
.app-browser-fallback {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px; text-align: center;
}

/* — Timer — */
.app-timer  { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; height: 100%; }
.timer-display { font-size: 56px; font-weight: 200; font-family: monospace; color: var(--accent); letter-spacing: 2px; }
.timer-controls { display: flex; gap: 10px; }

/* — Todo — */
.app-todo { display: flex; flex-direction: column; height: 100%; gap: 10px; }
.todo-input-wrap { display: flex; gap: 8px; }
.todo-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.todo-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 7px; transition: background .15s;
}
.todo-item:hover { background: rgba(255,255,255,.05); }
.todo-item.done span { text-decoration: line-through; opacity: .45; }
.todo-item input[type=checkbox] { flex-shrink: 0; accent-color: var(--accent); width: 16px; height: 16px; }
.todo-item span { flex: 1; font-size: 14px; }
.todo-del { background: none; border: none; color: var(--muted); font-size: 14px; padding: 2px 6px; border-radius: 4px; transition: all .15s; }
.todo-del:hover { color: #f87171; background: rgba(239,68,68,.1); }

/* — Journal — */
.app-journal { display: flex; flex-direction: column; height: 100%; gap: 8px; }
.journal-date { font-size: 12px; color: var(--muted); }
.app-journal textarea {
  flex: 1; background: rgba(0,212,255,.03); border: 1px solid var(--border);
  color: var(--text); padding: 12px; border-radius: 7px; resize: none; font-size: 14px;
  line-height: 1.7; font-family: var(--font); outline: none; transition: border-color .2s;
}
.app-journal textarea:focus { border-color: rgba(0,212,255,.3); }
.journal-saved { font-size: 11px; color: var(--muted); text-align: right; }

/* ═══════════════════════════════════════════════
   DISCOVER (FILE EXPLORER)
   ═══════════════════════════════════════════════ */
.app-discover { display: flex; height: 100%; overflow: hidden; }
.discover-sidebar {
  width: 160px; flex-shrink: 0; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 8px;
  background: rgba(0,0,0,.15);
}
.discover-sidebar-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; padding: 6px 8px 10px; }
.discover-cat {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 7px; font-size: 13px; cursor: pointer; transition: all .15s; color: var(--muted);
}
.discover-cat:hover  { background: rgba(255,255,255,.05); color: var(--text); }
.discover-cat.active { background: rgba(0,212,255,.12); color: var(--accent); }
.discover-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.discover-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.discover-title { font-size: 16px; font-weight: 600; }
.discover-count { font-size: 12px; color: var(--muted); }
.discover-files { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.discover-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; color: var(--muted); font-size: 14px; }
.discover-empty .de-icon { font-size: 40px; opacity: .4; }
.file-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px; cursor: pointer; transition: all .15s;
}
.file-card:hover { background: rgba(0,212,255,.07); border-color: rgba(0,212,255,.2); }
.file-icon { font-size: 24px; flex-shrink: 0; }
.file-info { flex: 1; overflow: hidden; }
.file-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.file-preview { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-del { background: none; border: none; color: var(--muted); font-size: 14px; padding: 4px 7px; border-radius: 5px; flex-shrink: 0; transition: all .15s; }
.file-del:hover { color: #f87171; background: rgba(239,68,68,.1); }


/* ═══════════════════════════════════════════════
   SETTINGS APP
   ═══════════════════════════════════════════════ */
.app-settings { display: flex; height: 100%; overflow: hidden; }
.settings-sidebar {
  width: 170px; flex-shrink: 0; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 8px;
  background: rgba(0,0,0,.15);
}
.settings-nav-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border-radius: 7px; font-size: 13px; cursor: pointer; transition: all .15s; color: var(--muted);
}
.settings-nav-item:hover  { background: rgba(255,255,255,.05); color: var(--text); }
.settings-nav-item.active { background: rgba(0,212,255,.12); color: var(--accent); }
.settings-panel { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.settings-section-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; padding: 11px 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px; gap: 12px;
}
.settings-row-label { font-size: 13px; flex: 1; }
.settings-row-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* toggle switch */
.toggle-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: rgba(255,255,255,.12);
  border-radius: 11px; cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* color/accent pickers */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all .15s;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.sel   { border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,.4); }

/* wallpaper picker (in settings panel) */
.wp-grid-sm { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.wp-thumb {
  aspect-ratio: 16/9; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; transition: all .2s; overflow: hidden; position: relative;
}
.wp-thumb:hover { border-color: rgba(0,212,255,.4); transform: scale(1.04); }
.wp-thumb.sel   { border-color: var(--accent); box-shadow: 0 0 12px rgba(0,212,255,.4); }

/* profile section */
.profile-avatar-big {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; background: rgba(0,212,255,.1);
  border: 3px solid rgba(0,212,255,.3); flex-shrink: 0;
}
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; }
.profile-name-display { font-size: 18px; font-weight: 700; }
.profile-sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* about section */
.about-logo { font-size: 48px; }
.about-name { font-size: 22px; font-weight: 700; }
.about-ver  { font-size: 12px; color: var(--muted); }
.about-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }


/* ═══════════════════════════════════════════════
   DESKTOP ICONS
   ═══════════════════════════════════════════════ */
.desktop-icon {
  position: absolute; width: 78px;
  display: flex; flex-direction: column; align-items: center;
  cursor: grab; user-select: none; padding: 8px;
  border-radius: 10px; transition: background .15s; z-index: 10;
}
.desktop-icon:hover   { background: rgba(255,255,255,.07); }
.desktop-icon:active  { cursor: grabbing; }
.di-icon  { font-size: 46px; margin-bottom: 4px; }
.di-label {
  font-size: 11px; text-align: center; color: #fff; line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,.7); word-break: break-word;
}

/* ── Context menus ── */
.ctx-menu {
  position: fixed; background: var(--surface2);
  border: 1px solid rgba(0,212,255,.15); border-radius: 9px;
  box-shadow: 0 10px 36px rgba(0,0,0,.55);
  z-index: 99000; overflow: hidden; min-width: 150px;
}
.ctx-item {
  padding: 9px 14px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background .12s;
}
.ctx-item:hover { background: rgba(0,212,255,.08); color: var(--accent); }
.ctx-item.danger:hover { background: rgba(239,68,68,.1); color: #f87171; }
.ctx-sep { height: 1px; background: var(--border); margin: 3px 0; }


/* ═══════════════════════════════════════════════
   TASK PREVIEW TOOLTIP
   ═══════════════════════════════════════════════ */
.task-preview {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 7px; padding: 5px 10px;
  font-size: 12px; white-space: nowrap; display: none; z-index: 9100;
  box-shadow: 0 4px 16px rgba(0,0,0,.4); margin-bottom: 6px;
  pointer-events: none;
}


/* ═══════════════════════════════════════════════
   OVERLAY
   ═══════════════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 8000;
}


/* ═══════════════════════════════════════════════
   PERFORMANCE CLASSES
   ═══════════════════════════════════════════════ */
body.no-animations * { animation: none !important; transition: none !important; }
body.no-glass .window, body.no-glass .start-menu, body.no-glass .taskbar { backdrop-filter: none; background: var(--surface); }
body.no-glow   .window { box-shadow: 0 10px 30px var(--shadow); }
body.light-theme {
  --bg: #eef2f7; --surface: #ffffff; --surface2: #f1f5fb;
  --text: #1a1f3a; --muted: #5a6480; --border: rgba(0,100,180,.12);
  --glass: rgba(255,255,255,.85);
}
body.light-theme .taskbar { background: rgba(240,244,252,.92); }
body.light-theme .start-menu { background: rgba(245,248,255,.92); }


/* ═══════════════════════════════════════════════
   MOBILE — ≤ 768px
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Boot */
  .boot-icon     { font-size: 56px; }
  .boot-wordmark { font-size: 28px; }

  /* Wizard */
  .wizard-card { padding: 28px 20px 22px; border-radius: 16px; }
  .avatar-grid { grid-template-columns: repeat(5,1fr); }
  .wallpaper-grid { grid-template-columns: repeat(2,1fr); }

  /* Login */
  .login-clock { font-size: 58px; }
  .login-card  { width: calc(100vw - 40px); }

  /* Desktop */
  .desktop { bottom: 56px; }

  /* Windows — always full screen on mobile */
  .window {
    left: 0 !important; top: 0 !important;
    width: 100% !important; height: calc(100% + 0px) !important;
    border-radius: 0; border: none;
  }

  /* Taskbar */
  .taskbar { height: 56px; padding: 0 6px; flex-wrap: nowrap; }
  .tb-logo-label { display: none; }
  .tb-sep   { display: none; }
  .task-icons { gap: 3px; }
  .task-icon  { width: 34px; height: 34px; font-size: 16px; }
  .user-chip  { display: none !important; }
  .tray-clock { font-size: 11px; min-width: 32px; }
  .tray-btn   { font-size: 14px; padding: 4px 5px; }

  /* Start menu — bottom sheet on mobile */
  .start-menu {
    left: 0; right: 0; bottom: 56px;
    width: 100%; border-radius: 18px 18px 0 0;
    max-height: 80vh; border-left: none; border-right: none; border-bottom: none;
  }
  .sm-grid { grid-template-columns: repeat(3,1fr); }

  /* Settings/Discover sidebar collapses */
  .discover-sidebar, .settings-sidebar { width: 50px; }
  .discover-sidebar-title, .discover-cat span,
  .settings-nav-item span { display: none; }
  .discover-cat, .settings-nav-item { justify-content: center; padding: 9px 0; }
  .wp-grid-sm { grid-template-columns: repeat(3,1fr); }

  /* Desktop icons */
  .desktop-icon { width: 66px; padding: 6px; }
  .di-icon  { font-size: 38px; }
  .di-label { font-size: 10px; }
}

@media (max-width: 380px) {
  .sm-grid { grid-template-columns: repeat(2,1fr); }
  .avatar-grid { grid-template-columns: repeat(4,1fr); }
}
