:root {
  --accent: #66c0f4;
  --accent-dim: #417a9b;
  --desktop-bg: #000000;
  --bg-0: #0e141b;
  --bg-1: #171a21;
  --bg-3: #2a475e;
  --text-0: #ffffff;
  --text-2: #8f98a0;
  --gold: #cd9834;
  --font: "Motiva Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-2);
  -webkit-user-select: none;
  user-select: none;
}

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 1;
  transition: opacity .8s ease;
  background: var(--bg-0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
#boot-screen.boot-done {
  opacity: 0;
  pointer-events: none;
}
#boot-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 2px, transparent 2px 4px);
  pointer-events: none;
}

.boot-logo { position: relative; width: 64px; height: 64px; z-index: 1; }
.boot-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 5px solid var(--bg-3);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

.boot-dot {
  position: absolute; inset: 22px;
  border-radius: 50%;
  background: var(--accent);
}

.boot-text {
  position: relative;
  z-index: 1;
  font-family: var(--font);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text-0);
  text-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.boot-text .accent { color: var(--accent); }

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

.band {
  position: absolute;
  left: 0;
  right: 0;
  height: 20%;
  transition: top .18s ease;
}

#desktop {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background-color: var(--desktop-bg);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.18) 0 1px, transparent 1px 60px);
  background-position: 18px 18px;
}

.swatches { display: flex; gap: 8px; }
.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}
.swatch.active { border-color: #fff; }

.desktop-icon {
  position: absolute;
  width: 64px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: grab;
  user-select: none;
  border-radius: 2px;
  background: transparent;
  outline: 1px solid transparent;
}
.desktop-icon.dragging { cursor: grabbing; opacity: .85; z-index: 5; }
.desktop-icon.selected {
  background: rgba(102, 192, 244, .30);
  outline: 1px solid rgba(102, 192, 244, .8);
}
.desktop-icon.floating {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  opacity: .9;
}
.desktop-icon.in-dock {
  position: static;
  width: auto;
}
.desktop-icon.in-dock .label { display: none; }
.desktop-icon .glyph {
  width: 42px;
  height: 42px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #0e141b;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.desktop-icon .label {
  font-size: 11px;
  color: var(--text-0);
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  text-align: center;
  line-height: 1.2;
}

#windows-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.window {
  position: absolute;
  width: 360px;
  height: 320px;
  display: flex;
  flex-direction: column;
  background: #000;
  border: 1px solid #000;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  overflow: hidden;
  pointer-events: auto;
}
.window.minimized { display: none; }
.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.window-titlebar {
  flex: 0 0 12.5%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--accent);
  border-bottom: 1px solid #000;
  cursor: grab;
}
.window-titlebar.dragging { cursor: grabbing; }

.win-btn {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: none;
  border-radius: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 11px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.win-btn:hover { background: var(--accent-dim); color: #fff; }
.win-btn.win-close:hover { background: #a53232; color: #fff; }

.win-title {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #0e141b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-body {
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: #000;
  color: var(--text-1);
  font-size: 12.5px;
  line-height: 1.6;
}
.window-body h3 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-0);
  font-weight: 700;
}

.draw-app {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}
.draw-canvas {
  flex: 1;
  width: 100%;
  background: #fff;
  border: 1px solid #000;
  cursor: crosshair;
}
.draw-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.draw-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  flex: 0 0 auto;
}
.draw-swatch.active { border-color: #fff; }
.draw-clear {
  margin-left: auto;
  padding: 5px 10px;
  border: none;
  border-radius: 0;
  background: var(--accent);
  color: #0e141b;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.notes-area {
  width: 100%;
  height: 100%;
  min-height: 180px;
  resize: none;
  background: var(--bg-0);
  border: 1px solid #000;
  color: var(--text-1);
  font-family: var(--font);
  font-size: 12.5px;
  padding: 10px;
}

#hud-clock {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 999;
  text-align: right;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s ease;
}
#hud-clock.visible { opacity: 1; }

#dock {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  min-width: 56px;
  min-height: 42px;
  background: rgba(20, 26, 33, .65);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  z-index: 40;
}
#dock.drag-over {
  background: rgba(102, 192, 244, .25);
  border-color: var(--accent);
}
.hud-time {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-0);
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.hud-date {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-2);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mini-card {
  background: #111;
  border: 1px solid #000;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
}
.mini-card:hover { outline: 1px solid var(--accent); }
.mini-art {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.85);
}
.mini-title { font-size: 10.5px; font-weight: 700; color: var(--text-0); padding: 6px 6px 0; }
.mini-price { font-size: 10.5px; color: #90ba3c; padding: 2px 6px 6px; }

.yt-frame {
  width: 100%;
  height: 150px;
  display: block;
  border: 1px solid #000;
  background: #000;
}
.yt-vtitle { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--text-0); }
.yt-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }