/* =========================================================
   Anton Vasiliev — desktop OS parody. Luna-blue XP theme.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Trebuchet+MS&display=swap');

:root {
  --xp-blue-dark: #0a246a;
  --xp-blue: #235ded;
  --xp-blue-light: #4d9bf5;
  --xp-titlebar-1: #0058ee;
  --xp-titlebar-2: #3a93ff;
  --xp-titlebar-3: #0b47c2;
  --xp-taskbar-1: #1e5bb8;
  --xp-taskbar-2: #2586e8;
  --xp-taskbar-3: #0f3f96;
  --xp-start-1: #4fc24f;
  --xp-start-2: #1f7a20;
  --xp-window-bg: #ece9d8;
  --xp-panel: #f4f2ea;
  --xp-border: #0831d9;
  --xp-text: #10131a;
  --xp-text-dim: #4b5265;
  --xp-accent: #2563e0;
  --xp-accent-2: #d9740b;
  --xp-danger: #d13438;
  --xp-ok: #1a9b4c;
  --font-ui: 'Trebuchet MS', 'Segoe UI', Tahoma, Verdana, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 8px;
  --taskbar-h: 38px;
  --overlay-bottom-offset: calc(var(--taskbar-h) + 16px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  color: var(--xp-text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--xp-accent); }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--xp-blue-light); color: #fff; }

/* =========================================================
   Boot screen
   ========================================================= */
#boot {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.5s ease;
}
#boot.fade-out { opacity: 0; pointer-events: none; }
.boot-logo { font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 700; letter-spacing: 0.02em; }
.boot-logo .flag { display: inline-grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 22px; height: 22px; gap: 2px; margin-right: 10px; vertical-align: -4px; }
.boot-logo .flag span { display: block; }
.boot-logo .flag span:nth-child(1) { background: #ff5f5f; }
.boot-logo .flag span:nth-child(2) { background: #6ee06e; }
.boot-logo .flag span:nth-child(3) { background: #5fa8ff; }
.boot-logo .flag span:nth-child(4) { background: #ffd25f; }
.boot-bar { width: 220px; height: 14px; border: 1px solid #4a4a4a; border-radius: 3px; overflow: hidden; background: #111; }
.boot-bar-fill { height: 100%; width: 0%; background: repeating-linear-gradient(90deg, #2f6fed 0 10px, #4d9bf5 10px 20px); animation: boot-fill 1.6s ease forwards; }
@keyframes boot-fill { to { width: 100%; } }
.boot-caption { font-size: 0.85rem; color: #9aa3b5; }

/* =========================================================
   Desktop
   ========================================================= */
#desktop { position: fixed; inset: 0; overflow: hidden; }

/* A dusk skyline, not a Bliss knockoff — drawn as one inline SVG so it stays
   crisp at any resolution and needs no separate image asset. */
#wallpaper {
  position: absolute;
  inset: 0;
  background-color: #101c3f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMax slice'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23101c3f'/%3E%3Cstop offset='45%25' stop-color='%232a3f7a'/%3E%3Cstop offset='72%25' stop-color='%23e0703f'/%3E%3Cstop offset='89%25' stop-color='%23ffcf6b'/%3E%3Cstop offset='100%25' stop-color='%23ffe9a8'/%3E%3C/linearGradient%3E%3CradialGradient id='sun' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23fff3c4'/%3E%3Cstop offset='40%25' stop-color='%23ffd25f'/%3E%3Cstop offset='100%25' stop-color='%23ffd25f' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='1600' height='900' fill='url(%23sky)'/%3E%3Ccircle cx='1180' cy='620' r='260' fill='url(%23sun)'/%3E%3Ccircle cx='1180' cy='620' r='68' fill='%23fff6da'/%3E%3Cg fill='%230c1430'%3E%3Crect x='0' y='760' width='1600' height='140'/%3E%3Crect x='40' y='640' width='70' height='260'/%3E%3Crect x='130' y='700' width='50' height='200'/%3E%3Crect x='210' y='600' width='90' height='300'/%3E%3Crect x='330' y='680' width='60' height='220'/%3E%3Crect x='420' y='640' width='40' height='260'/%3E%3Crect x='500' y='710' width='80' height='190'/%3E%3Crect x='620' y='590' width='55' height='310'/%3E%3Crect x='710' y='660' width='45' height='240'/%3E%3Crect x='790' y='630' width='75' height='270'/%3E%3Crect x='900' y='700' width='60' height='200'/%3E%3Crect x='990' y='650' width='40' height='250'/%3E%3Crect x='1060' y='690' width='90' height='210'/%3E%3Crect x='1330' y='670' width='55' height='230'/%3E%3Crect x='1410' y='620' width='70' height='280'/%3E%3Crect x='1500' y='700' width='60' height='200'/%3E%3C/g%3E%3Cg fill='%23ffd25f' opacity='0.85'%3E%3Crect x='55' y='670' width='8' height='8'/%3E%3Crect x='55' y='700' width='8' height='8'/%3E%3Crect x='75' y='690' width='8' height='8'/%3E%3Crect x='225' y='630' width='8' height='8'/%3E%3Crect x='225' y='670' width='8' height='8'/%3E%3Crect x='260' y='650' width='8' height='8'/%3E%3Crect x='635' y='620' width='8' height='8'/%3E%3Crect x='635' y='660' width='8' height='8'/%3E%3Crect x='655' y='700' width='8' height='8'/%3E%3Crect x='805' y='660' width='8' height='8'/%3E%3Crect x='830' y='690' width='8' height='8'/%3E%3Crect x='1075' y='720' width='8' height='8'/%3E%3Crect x='1100' y='750' width='8' height='8'/%3E%3Crect x='1425' y='650' width='8' height='8'/%3E%3Crect x='1450' y='690' width='8' height='8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: bottom center;
}

#icons {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.desktop-icon {
  position: absolute;
  width: 84px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 4px;
  text-align: center;
  touch-action: none;
}
.desktop-icon.dragging { background: rgba(255, 255, 255, 0.16); z-index: 6; }
.desktop-icon:hover { background: rgba(255, 255, 255, 0.12); }
.desktop-icon.selected { background: rgba(60, 120, 220, 0.35); outline: 1px dotted rgba(255, 255, 255, 0.6); }
.desktop-icon .icon-glyph { font-size: 34px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.desktop-icon .icon-label {
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* =========================================================
   Windows
   ========================================================= */
#windows-layer { position: absolute; inset: 0; z-index: 10; pointer-events: none; }

.xp-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 560px;
  max-width: calc(100vw - 24px);
  height: 440px;
  max-height: calc(100vh - var(--taskbar-h) - 24px);
  background: var(--xp-window-bg);
  border: 1px solid var(--xp-border);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 4px 6px 22px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  overflow: hidden;
}
.xp-window.minimized { display: none; }
.xp-window.focused { z-index: 20; }

.xp-titlebar {
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 8px;
  background: linear-gradient(180deg, var(--xp-titlebar-2), var(--xp-titlebar-1) 55%, var(--xp-titlebar-3));
  color: #fff;
  cursor: default;
  user-select: none;
}
.xp-window:not(.focused) .xp-titlebar { background: linear-gradient(180deg, #90a8c9, #7690b8 55%, #5c74a0); }
.xp-titlebar .t-icon { font-size: 15px; }
.xp-titlebar .t-title { flex: 1; font-size: 13px; font-weight: 700; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-titlebar .t-btn {
  width: 21px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: linear-gradient(180deg, #4f8ff2, #1b56c9);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.xp-titlebar .t-btn:hover { filter: brightness(1.15); }
.xp-titlebar .t-btn.close { background: linear-gradient(180deg, #f37b6f, #d13438); }

.xp-menubar { display: flex; gap: 14px; padding: 3px 10px; font-size: 12px; background: var(--xp-panel); border-bottom: 1px solid #b9b6a5; color: var(--xp-text-dim); }

.xp-tabs { display: flex; gap: 2px; padding: 6px 8px 0; background: var(--xp-window-bg); }
.xp-tab { padding: 6px 14px; font-size: 12px; border: 1px solid #a8a48f; border-bottom: none; border-radius: 4px 4px 0 0; background: #ddd9c6; color: var(--xp-text-dim); }
.xp-tab.active { background: var(--xp-panel); color: var(--xp-text); font-weight: 700; }

.xp-shell { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--xp-panel); }
.xp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; font-size: 13px; line-height: 1.55; }
.xp-body.no-pad { padding: 0; }
.xp-statusbar { flex-shrink: 0; padding: 3px 10px; font-size: 11px; color: var(--xp-text-dim); background: var(--xp-window-bg); border-top: 1px solid #cfcab6; }

.xp-fieldset { border: 1px solid #a8a48f; border-radius: 4px; padding: 10px 12px; margin-bottom: 12px; }
.xp-fieldset legend { padding: 0 6px; font-size: 11px; font-weight: 700; color: var(--xp-text-dim); }
.kv-row { display: flex; gap: 8px; padding: 3px 0; font-size: 12.5px; }
.kv-row .k { width: 130px; flex-shrink: 0; color: var(--xp-text-dim); }
.kv-row .v { font-weight: 600; }

.xp-btn {
  padding: 5px 16px;
  font-size: 12px;
  border-radius: 3px;
  border: 1px solid #8a8a8a;
  background: linear-gradient(180deg, #fdfdfd, #e2e2e2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.xp-btn:hover { border-color: var(--xp-accent); }
.xp-btn:active { background: #d8d8d8; }
.xp-btn-row { display: flex; gap: 8px; margin-top: 12px; }

.hw-list { display: flex; flex-direction: column; gap: 10px; }
.hw-group-title { font-size: 12px; font-weight: 700; color: var(--xp-accent); margin: 10px 0 4px; }
.hw-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.hw-row .name { width: 170px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.hw-row .bar-track { flex: 1; height: 10px; background: #d6d2c0; border: 1px solid #a8a48f; border-radius: 2px; overflow: hidden; }
.hw-row .bar-fill { height: 100%; background: linear-gradient(90deg, #3f9bff, #2563e0); width: 0; transition: width 0.9s ease; }
.hw-row .pct { width: 34px; text-align: right; color: var(--xp-text-dim); font-family: var(--font-mono); font-size: 11px; }

/* explorer (projects) */
.explorer { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.explorer-side { width: 130px; flex-shrink: 0; background: var(--xp-window-bg); border-right: 1px solid #b9b6a5; padding: 10px 6px; font-size: 11.5px; color: var(--xp-text-dim); }
.explorer-side .side-item { padding: 4px 6px; border-radius: 3px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.explorer-side .side-item.active, .explorer-side .side-item:hover { background: #d3e4fb; }
.explorer-main { flex: 1; padding: 10px; overflow-y: auto; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.file-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 4px; text-align: center; font-size: 11.5px; }
.file-item:hover { background: #d3e4fb; }
.file-item.selected { background: #b6d3f7; outline: 1px dotted #6a9edb; }
.file-item .f-icon { font-size: 30px; }
.file-detail { flex-shrink: 0; max-height: 40%; overflow-y: auto; border-top: 1px solid #b9b6a5; padding: 10px 12px; font-size: 12px; background: var(--xp-window-bg); min-height: 70px; }
.file-detail .f-name { font-weight: 700; margin-bottom: 4px; }
.file-detail .f-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.file-detail .f-tag { font-family: var(--font-mono); font-size: 10.5px; padding: 2px 7px; background: #dde6f7; border-radius: 3px; }
.file-detail .f-links a { margin-right: 12px; font-size: 12px; }
.file-detail .f-note { color: var(--xp-accent-2); font-size: 11.5px; margin-top: 6px; }

/* document (resume) */
.doc-page { background: #fff; border: 1px solid #c9c5b2; padding: 20px 24px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
.doc-h1 { font-size: 1.15rem; font-weight: 700; }
.doc-h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--xp-accent); margin: 16px 0 8px; border-bottom: 1px solid #e0ddd0; padding-bottom: 4px; }
.doc-job { margin-bottom: 14px; }
.doc-job-head { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; font-weight: 700; }
.doc-period { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--xp-text-dim); font-weight: 400; }
.doc-job p { font-size: 12.5px; color: var(--xp-text-dim); margin: 4px 0; }
.doc-job .highlight { color: var(--xp-accent-2); font-size: 12px; }
.doc-job ul { margin: 4px 0 0 16px; list-style: disc; }
.doc-job li { font-size: 12px; color: var(--xp-text-dim); }
.doc-task-group-title { font-size: 12.5px; font-weight: 700; margin: 8px 0 2px; }

/* contacts (address book) */
.addr-list { display: flex; flex-direction: column; gap: 2px; }
.addr-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 4px; border-bottom: 1px solid #e2ded0; }
.addr-row:hover { background: #d3e4fb; }
.addr-row .a-ic { font-size: 20px; width: 26px; text-align: center; }
.addr-row .a-label { font-size: 10.5px; color: var(--xp-text-dim); text-transform: uppercase; }
.addr-row .a-value { font-weight: 700; font-size: 13px; }

/* recycle bin */
.bin-empty-note { font-size: 12px; color: var(--xp-text-dim); margin-bottom: 10px; }
.bin-item { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid #e2ded0; font-size: 12px; }
.bin-item .b-ic { font-size: 18px; }
.bin-item .b-name { flex: 1; }
.bin-item .b-note { color: var(--xp-text-dim); font-size: 11px; }

/* games folder + games */
.games-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; padding: 6px; }
.game-shortcut { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 6px; text-align: center; }
.game-shortcut:hover { background: #d3e4fb; }
.game-shortcut .g-ic { font-size: 34px; }
.game-shortcut .g-name { font-size: 12px; font-weight: 700; }
.game-shortcut .g-best { font-size: 10.5px; color: var(--xp-text-dim); font-family: var(--font-mono); }

.game-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.game-stats { font-family: var(--font-mono); font-size: 11.5px; color: var(--xp-text-dim); display: flex; gap: 14px; }
.game-stats b { color: var(--xp-accent); }

#bughunt-field { position: relative; height: 220px; border: 1px inset #a8a48f; background: #fff; overflow: hidden; font-family: var(--font-mono); }
.bug { position: absolute; font-size: 22px; cursor: crosshair; background: none; }
#bughunt-code { position: absolute; inset: 0; padding: 10px; color: #c8c4b4; font-size: 11px; opacity: 0.7; pointer-events: none; }

.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 320px; margin: 0 auto; }
.memory-card { aspect-ratio: 1; border: 1px outset #a8a48f; background: #d6d2c0; display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer; }
.memory-card.flipped, .memory-card.matched { background: #cfe6ff; border-style: inset; }

#snake-canvas { background: #06210f; border: 2px inset #a8a48f; display: block; margin: 0 auto; max-width: 100%; }

.mines-grid { display: grid; gap: 2px; max-width: 320px; margin: 0 auto; }
.mines-cell { aspect-ratio: 1; border: 1px outset #a8a48f; background: #c8c4b0; font-family: var(--font-mono); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.mines-cell.revealed { border: 1px solid #a8a48f; background: #ece8da; cursor: default; }
.mines-cell.revealed.mine { background: #e88; }
.mines-cell.revealed.hit { background: #ff5f5f; }
.mines-cell.flagged { background: #ffe6a8; }
.mines-cell[data-n="1"] { color: #1565c0; }
.mines-cell[data-n="2"] { color: #2e7d32; }
.mines-cell[data-n="3"] { color: #c62828; }
.mines-cell[data-n="4"] { color: #6a1b9a; }
.mines-cell[data-n="5"] { color: #8d4b00; }
.mines-cell[data-n="6"] { color: #00838f; }
.mines-cell[data-n="7"] { color: #212121; }
.mines-cell[data-n="8"] { color: #757575; }

.slots-machine { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px; }
.slots-reels { display: flex; gap: 10px; background: #1a1a1a; border: 2px inset #a8a48f; padding: 14px 18px; border-radius: 4px; }
.slots-reel { font-size: 36px; width: 48px; text-align: center; }
.slots-spin-btn { font-weight: 700; }
.slots-msg { font-family: var(--font-mono); font-size: 12px; color: var(--xp-text-dim); min-height: 16px; }

#tetris-canvas { background: #06210f; border: 2px inset #a8a48f; display: block; margin: 0 auto; max-width: 100%; }
.tetris-layout { display: flex; gap: 10px; justify-content: center; align-items: flex-start; }
.tetris-side { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.tetris-next-label { font-family: var(--font-mono); font-size: 10px; color: var(--xp-text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
#tetris-next { background: #06210f; border: 2px inset #a8a48f; display: block; }

/* command prompt */
.cmd-window .xp-shell { background: #000c00; }
.cmd-window .xp-titlebar { background: linear-gradient(180deg, #4c4c4c, #262626 55%, #101010); }
.cmd-window .xp-titlebar .t-btn { background: linear-gradient(180deg, #6a6a6a, #3a3a3a); }
#term-output { flex: 1; min-height: 0; font-family: var(--font-mono); font-size: 12.5px; color: #d4d4d4; padding: 10px 12px; overflow-y: auto; white-space: pre-wrap; }
#term-output .cmd-line { color: #7fe07f; }
.term-input-row { flex-shrink: 0; display: flex; align-items: center; padding: 8px 12px; font-family: var(--font-mono); font-size: 12.5px; border-top: 1px solid #1c2e1c; }
.term-input-row .prompt { color: #cfd6cf; margin-right: 4px; white-space: nowrap; }
#term-input { flex: 1; background: transparent; border: none; outline: none; color: #d4d4d4; font-family: var(--font-mono); font-size: 12.5px; }

/* =========================================================
   Start menu
   ========================================================= */
#start-menu {
  position: fixed;
  left: 4px;
  bottom: calc(var(--taskbar-h) + 4px);
  width: 300px;
  z-index: 60;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  box-shadow: 3px 3px 16px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--xp-border);
}
#start-menu[hidden] { display: none; }
.sm-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(180deg, var(--xp-titlebar-2), var(--xp-titlebar-1)); color: #fff; font-weight: 700; font-size: 14px; }
.sm-header .sm-avatar { width: 34px; height: 34px; border-radius: 4px; background: #fff3; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 1px solid rgba(255, 255, 255, 0.6); }
.sm-body { display: flex; background: #fff; }
.sm-col-left { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sm-col-right { width: 118px; background: #d3e0f5; padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.sm-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 3px; font-size: 12.5px; text-align: left; }
.sm-item:hover { background: var(--xp-blue-light); color: #fff; }
.sm-item .sm-ic { font-size: 18px; width: 22px; text-align: center; }
.sm-footer { background: linear-gradient(180deg, var(--xp-titlebar-1), var(--xp-titlebar-3)); padding: 6px 10px; }
.sm-footer .sm-item { color: #fff; }
.sm-footer .sm-item:hover { background: rgba(255, 255, 255, 0.18); }

/* =========================================================
   Taskbar
   ========================================================= */
#taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  background: linear-gradient(180deg, var(--xp-taskbar-2), var(--xp-taskbar-1) 60%, var(--xp-taskbar-3));
  border-top: 1px solid #6fb6ff;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.25);
}
#start-btn {
  height: 30px;
  padding: 0 16px 0 10px;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(180deg, #6bdc6b, var(--xp-start-1) 45%, var(--xp-start-2));
  color: #fff;
  font-weight: 700;
  font-style: italic;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 0 1px #1a5c1a inset;
  flex-shrink: 0;
}
#start-btn:hover { filter: brightness(1.08); }
#start-btn.active { background: linear-gradient(180deg, #2f8f3e, #1a5c1a); }
.start-logo { font-size: 16px; }

#taskbar-open { flex: 1; display: flex; gap: 3px; overflow: hidden; height: 28px; }
.taskbar-app {
  min-width: 130px;
  max-width: 190px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 3px;
  background: linear-gradient(180deg, #3f7fe0, #1e5bb8);
  color: #fff;
  font-size: 11.5px;
  box-shadow: 0 0 0 1px #0b3d8c inset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.taskbar-app.active { background: linear-gradient(180deg, #163f8f, #0c2c66); box-shadow: 0 0 0 1px #06214e inset, inset 0 1px 3px rgba(0,0,0,0.5); }

#tray {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  background: linear-gradient(180deg, #1a4faa, #123a80);
  border-radius: 4px;
  flex-shrink: 0;
}
.tray-btn { font-size: 11px; font-weight: 700; color: #dce8ff; padding: 2px 7px; border-radius: 3px; font-family: var(--font-mono); }
.tray-btn:hover { background: rgba(255, 255, 255, 0.15); }
.tray-clock { font-size: 11.5px; color: #fff; font-family: var(--font-mono); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px) {
  #icons { grid-template-rows: repeat(7, 76px); }
  .desktop-icon { width: 74px; }
  .xp-window {
    position: fixed !important;
    left: 6px !important;
    top: 6px !important;
    right: 6px;
    bottom: calc(var(--taskbar-h) + 6px);
    width: auto !important;
    height: auto !important;
    max-width: none;
    max-height: none;
  }
  .explorer-side { display: none; }
  #start-menu { width: calc(100vw - 20px); }
  .taskbar-app { min-width: 90px; }
}

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