/* ===========================================================
   snarsnat OS v2.0 — XP Luna + poolsuite + Mac OS 9/Aqua
   =========================================================== */

:root {
  /* --- XP Blue gradients --- */
  --xp-title-start: #0054e3;
  --xp-title-mid-1: #3388ff;
  --xp-title-mid-2: #4ea0ff;
  --xp-title-end: #0054e3;

  --xp-frame: #0054e3;
  --xp-frame-inner: #0831d9;

  --xp-taskbar-start: #235cd9;
  --xp-taskbar-mid: #2e71e6;
  --xp-taskbar-end: #235cd9;

  --xp-taskbar-highlight: #3a8eff;
  --xp-taskbar-shadow: #1941a6;

  --xp-btn-top: #4a8df8;
  --xp-btn-mid: #2c6fd6;
  --xp-btn-bot: #1a4ea0;

  --xp-selected: #2c6fd6;

  /* --- Window control dots --- */
  --close-red: #e81123;
  --close-red-hover: #ff3b4a;
  --close-red-glow: rgba(232, 17, 35, 0.55);

  --maximize-green: #10893e;
  --maximize-green-hover: #1ec35a;
  --maximize-green-glow: rgba(16, 137, 62, 0.55);

  --minimize-amber: #ff9c00;
  --minimize-amber-hover: #ffc14a;
  --minimize-amber-glow: rgba(255, 156, 0, 0.55);

  /* --- Poolsuite accents --- */
  --pool-cream: #f9f0e9;
  --pool-pink: #f6d5d5;
  --pool-pink-strong: #ffb8c0;
  --pool-yellow: #fcf4c5;
  --pool-teal: #afe2e5;
  --pool-mint: #c7ecdd;
  --pool-black: #000000;

  /* --- Window chrome --- */
  --window-bg: #ece9d8;
  --window-highlight: #ffffff;
  --window-shadow: #7f9db9;
  --window-dark-shadow: #404040;
  --body-bg: #ffffff;

  /* --- Inactive title bar --- */
  --inactive-start: #7a96c7;
  --inactive-mid: #aebcd6;
  --inactive-end: #7a96c7;

  /* --- Fonts --- */
  --font-ui: 'Tahoma', 'Geneva', 'Segoe UI', sans-serif;
  --font-pixel: 'VT323', 'Courier New', monospace;
  --font-body: 'Space Mono', 'Courier New', monospace;
}

/* =========================
   RESET
   ========================= */

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  color: #111;
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

a {
  color: #0054e3;
  text-decoration: underline;
}

a:hover {
  color: var(--pool-pink-strong);
}

/* =========================
   BOOT SCREEN
   ========================= */

.boot-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--font-pixel);
  transition: opacity 0.6s ease;
}

.boot-overlay.fading {
  opacity: 0;
  pointer-events: none;
}

.boot-title {
  font-size: 56px;
  color: #fff;
  letter-spacing: 4px;
  text-shadow:
    0 0 8px rgba(175, 226, 229, 0.6),
    0 0 24px rgba(175, 226, 229, 0.3);
}

.boot-version {
  font-size: 32px;
  color: var(--pool-pink-strong);
  letter-spacing: 2px;
}

.boot-bar {
  width: 320px;
  height: 20px;
  border: 2px solid #fff;
  padding: 2px;
  background: #000;
}

.boot-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pool-pink) 0%, var(--pool-cream) 50%, var(--pool-teal) 100%);
  width: 0%;
  transition: width 0.12s linear;
  box-shadow: 0 0 8px rgba(175, 226, 229, 0.7);
}

.boot-status {
  font-size: 22px;
  color: #ccc;
  letter-spacing: 1px;
  min-height: 28px;
}

.boot-cursor {
  display: inline-block;
  width: 14px;
  height: 22px;
  background: #fff;
  animation: blink 0.6s steps(2) infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* =========================
   TOP MENU BAR (Mac-style)
   ========================= */

.menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(180deg, #fdf6ee 0%, #f1e3d2 100%);
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 16px;
  z-index: 99999;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.menu-logo {
  font-size: 18px;
  padding: 0 4px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6));
}

.menu-item {
  padding: 2px 10px;
  font-size: 13px;
  color: #000;
  border-radius: 3px;
  cursor: pointer;
}

.menu-item:hover,
.menu-item.open {
  background: linear-gradient(180deg, #4a8df8 0%, #2c6fd6 100%);
  color: #fff;
}

.menu-clock {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  font-size: 13px;
}

.menu-dropdown {
  position: fixed;
  top: 28px;
  min-width: 200px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  font-family: var(--font-ui);
  font-size: 13px;
  z-index: 99998;
  padding: 4px 0;
}

.menu-dropdown.hidden {
  display: none;
}

.menu-dropdown button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 4px 16px;
  font-size: 13px;
  color: #000;
  border: none;
  background: transparent;
  cursor: pointer;
}

.menu-dropdown button:hover {
  background: linear-gradient(180deg, #4a8df8 0%, #2c6fd6 100%);
  color: #fff;
}

.menu-dropdown .menu-divider {
  height: 1px;
  background: #999;
  margin: 4px 4px;
}

/* =========================
   DESKTOP
   ========================= */

.desktop {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  bottom: 42px;
  background-color: #008080;
  background-image: url('assets/wallpaper.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.desktop-icons {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 5;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px dotted transparent;
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 13px;
  text-align: center;
  text-shadow:
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    0 2px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 4px 6px;
  width: 86px;
  border-radius: 2px;
}

.icon img {
  width: 48px;
  height: 48px;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.5));
}

.icon span {
  line-height: 1.15;
  word-break: break-word;
}

.icon:hover,
.icon:focus-visible {
  outline: none;
}

.icon.selected {
  border: 1px dotted #ffffff;
  background: rgba(44, 111, 214, 0.30);
}

/* =========================
   SELECTION MARQUEE
   ========================= */

.selection-marquee {
  position: absolute;
  border: 1px dotted #ffffff;
  background: rgba(60, 130, 240, 0.20);
  pointer-events: none;
  z-index: 50;
}

.selection-marquee.hidden {
  display: none;
}

/* =========================
   CONTEXT MENU
   ========================= */

.context-menu {
  position: fixed;
  background: #fff;
  border: 1px solid #555;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--font-ui);
  font-size: 13px;
  z-index: 200000;
  min-width: 180px;
  padding: 4px 0;
}

.context-menu.hidden {
  display: none;
}

.context-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 5px 24px 5px 28px;
  font-size: 13px;
  color: #000;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.context-menu button:hover {
  background: linear-gradient(180deg, #4a8df8 0%, #2c6fd6 100%);
  color: #fff;
}

.context-menu .ctx-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
}

.context-menu .ctx-divider {
  height: 1px;
  background: #c0c0c0;
  margin: 4px 2px;
}

/* =========================
   TOOLTIPS
   ========================= */

.tooltip {
  position: fixed;
  background: linear-gradient(180deg, #ffffe1 0%, #f4f0c8 100%);
  color: #000;
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  z-index: 300000;
  pointer-events: none;
  white-space: nowrap;
  max-width: 280px;
}

.tooltip.hidden {
  display: none;
}

/* =========================
   WINDOWS — XP Luna style
   ========================= */

.windows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.window {
  position: absolute;
  min-width: 280px;
  min-height: 180px;
  background: var(--body-bg);
  border: 1px solid var(--xp-frame);
  border-radius: 8px 8px 4px 4px;
  box-shadow:
    4px 4px 12px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  overflow: hidden;
  animation: winOpen 0.16s ease-out;
}

@keyframes winOpen {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.window.closing {
  animation: winClose 0.14s ease-in forwards;
}

@keyframes winClose {
  to { transform: scale(0.9); opacity: 0; }
}

.window.minimizing {
  animation: winMinimize 0.22s ease-in forwards;
}

@keyframes winMinimize {
  to {
    transform: translateY(40vh) scale(0.05);
    opacity: 0;
  }
}

.window.hidden {
  display: none;
}

.window.maximized {
  border-radius: 0;
  border: 1px solid var(--xp-frame);
}

.window.inactive .title-bar {
  background: linear-gradient(180deg, var(--inactive-start) 0%, var(--inactive-mid) 100%);
  color: #e8e8e8;
}

.window.inactive .title-bar::after {
  /* subtle gray sheen across inactive title */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 50%);
}

/* --- Title bar (XP Luna horizontal gradient) --- */
.title-bar {
  position: relative;
  height: 28px;
  padding: 0 4px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: default;
  user-select: none;
  background: linear-gradient(90deg,
    var(--xp-title-start) 0%,
    var(--xp-title-mid-1) 45%,
    var(--xp-title-mid-2) 55%,
    var(--xp-title-end) 100%);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.window:not(.maximized) .title-bar {
  border-radius: 7px 7px 0 0;
}

.title-bar img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.title-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 2px;
}

/* --- Window controls (XP colored dots) --- */
.window-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  padding-right: 4px;
}

.ctrl-btn {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.35);
  cursor: pointer;
  position: relative;
  transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.ctrl-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 50%);
  pointer-events: none;
}

.ctrl-btn .glyph {
  position: relative;
  z-index: 1;
  display: block;
  pointer-events: none;
}

.ctrl-close {
  background: radial-gradient(circle at 35% 30%, #ff5e6c 0%, var(--close-red) 70%);
}

.ctrl-close:hover {
  background: radial-gradient(circle at 35% 30%, #ff8a93 0%, var(--close-red-hover) 70%);
  box-shadow: 0 0 8px var(--close-red-glow);
  filter: brightness(1.05);
}

.ctrl-minimize {
  background: radial-gradient(circle at 35% 30%, #ffd57a 0%, var(--minimize-amber) 70%);
}

.ctrl-minimize:hover {
  background: radial-gradient(circle at 35% 30%, #ffe5a8 0%, var(--minimize-amber-hover) 70%);
  box-shadow: 0 0 8px var(--minimize-amber-glow);
  filter: brightness(1.05);
}

.ctrl-maximize {
  background: radial-gradient(circle at 35% 30%, #3ec770 0%, var(--maximize-green) 70%);
}

.ctrl-maximize:hover {
  background: radial-gradient(circle at 35% 30%, #6ee294 0%, var(--maximize-green-hover) 70%);
  box-shadow: 0 0 8px var(--maximize-green-glow);
  filter: brightness(1.05);
}

.ctrl-btn:active {
  transform: scale(0.92);
  filter: brightness(0.92);
}

.window.inactive .ctrl-btn {
  background: radial-gradient(circle at 35% 30%, #b8c0d0 0%, #8896aa 70%);
  filter: grayscale(0.6) brightness(0.95);
  box-shadow: none;
}

.window.inactive .ctrl-btn:hover {
  background: radial-gradient(circle at 35% 30%, #c8d0e0 0%, #98a6ba 70%);
  filter: grayscale(0.4);
}

/* --- Window body --- */
.window-body {
  flex: 1;
  padding: 14px 18px;
  overflow: auto;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  background: var(--body-bg);
  color: #111;
  border-top: 1px solid #b8c8e0;
  position: relative;
}

.window-body h1 {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--xp-frame);
  letter-spacing: 0.2px;
}

.window-body h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 14px 0 8px;
  color: var(--xp-frame);
}

.window-body h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 10px 0 4px;
  color: var(--xp-frame);
}

.window-body p {
  margin-bottom: 8px;
}

.window-body ul {
  margin: 6px 0 10px 22px;
}

.window-body li {
  margin-bottom: 3px;
}

.window-body pre {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  background: #fff;
  color: #000;
  padding: 0;
}

.window-body .accent-pink { color: #ff5e8a; font-weight: 700; }
.window-body .accent-gold { color: #b8860b; font-weight: 700; }
.window-body .accent-teal { color: #1f8e8e; font-weight: 700; }

.window-body strong {
  color: var(--xp-frame);
}

/* Project cards inside windows */
.project-card {
  background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
  border: 1px solid #c5d4ec;
  border-radius: 4px;
  padding: 12px 14px;
  margin: 8px 0;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
}

.project-icon {
  width: 56px;
  height: 56px;
}

.project-info h2 {
  margin-top: 0;
}

.project-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 9px;
  background: var(--pool-teal);
  color: #134e5e;
  border: 1px solid #6cb6bb;
  font-weight: 700;
}

.tag.tag-pink {
  background: var(--pool-pink);
  color: #8a2a4a;
  border-color: #d99aac;
}

.tag.tag-yellow {
  background: var(--pool-yellow);
  color: #6a5300;
  border-color: #c9b65e;
}

.tag.tag-mint {
  background: var(--pool-mint);
  color: #1d5e3a;
  border-color: #84c8a8;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  margin-bottom: 6px;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.status-badge.live {
  background: #e8f8ee;
  color: #1f7a3a;
  border-color: #9ad5ad;
}

.status-badge.wip {
  background: #fff5e0;
  color: #8a5a00;
  border-color: #e0c481;
}

.status-badge.archived {
  background: #f0f0f0;
  color: #555;
  border-color: #c0c0c0;
}

.project-link {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: linear-gradient(180deg, #f9f0e9 0%, #ead9c4 100%);
  border: 1px solid #000;
  border-bottom-width: 2px;
  color: #000;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  border-radius: 2px;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.project-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 1px 1px 0 #000;
}

.project-link:active {
  transform: translate(1px, 1px);
  box-shadow: none;
  border-bottom-width: 1px;
}

/* Aqua-style buttons */
.aqua-btn {
  display: inline-block;
  padding: 5px 18px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  background: linear-gradient(180deg, #ffffff 0%, #d6e8fb 45%, #b8d3f5 55%, #e6f0fc 100%);
  border: 1px solid #2c6fd6;
  border-radius: 14px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(0, 0, 0, 0.15);
  transition: filter 0.1s ease;
}

.aqua-btn:hover { filter: brightness(1.05); }
.aqua-btn:active {
  background: linear-gradient(180deg, #b8d3f5 0%, #d6e8fb 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* XP-style status bar inside windows */
.window-statusbar {
  height: 22px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--pool-cream) 0%, #e0d3bf 100%);
  border-top: 1px solid #000;
  font-size: 11px;
  color: #333;
  flex-shrink: 0;
}

.window-statusbar .field {
  padding: 1px 10px;
  background: #fff;
  border: 1px solid #888;
  border-radius: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Custom scrollbar (XP-style) inside window-body */
.window-body::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

.window-body::-webkit-scrollbar-track {
  background: #ece9d8;
  background-image:
    linear-gradient(90deg, transparent 50%, rgba(0, 0, 0, 0.08) 50%);
  background-size: 8px 8px;
}

.window-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f4f0d8 0%, #c8c0a8 100%);
  border: 1px solid #716f64;
  border-radius: 2px;
}

.window-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fff7d8 0%, #d8d0b8 100%);
}

.window-body::-webkit-scrollbar-button:vertical:start:decrement,
.window-body::-webkit-scrollbar-button:vertical:end:increment {
  display: block;
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, #f4f0d8 0%, #c8c0a8 100%);
  border: 1px solid #716f64;
}

.window-body::-webkit-scrollbar-button:vertical:start:decrement {
  background:
    linear-gradient(180deg, #f4f0d8 0%, #c8c0a8 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><polygon points='8,5 13,11 3,11' fill='%23333'/></svg>");
}

/* Resize handle */
.resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
  z-index: 10;
  background:
    linear-gradient(135deg, transparent 50%, #777 50%, #777 60%, transparent 60%,
                    transparent 70%, #777 70%, #777 80%, transparent 80%);
}

/* =========================
   TASKBAR
   ========================= */

.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 42px;
  background: linear-gradient(180deg,
    var(--xp-taskbar-start) 0%,
    var(--xp-taskbar-mid) 8%,
    var(--xp-taskbar-mid) 92%,
    var(--xp-taskbar-end) 100%);
  border-top: 1px solid var(--xp-taskbar-highlight);
  display: flex;
  align-items: center;
  padding: 4px 6px;
  gap: 6px;
  z-index: 9999;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.start-orb {
  position: relative;
  width: 42px;
  height: 36px;
  border-radius: 50% / 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, #7ed957 0%, #2c8c2a 75%, #1a5e1a 100%);
  border: 1px solid #0a3a0a;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 rgba(46, 204, 113, 0);
}

.start-orb::after {
  content: 'start';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-style: italic;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.4px;
}

.start-orb:hover {
  filter: brightness(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 12px rgba(120, 230, 100, 0.7);
}

.start-orb:active,
.start-orb.open {
  transform: scale(0.95);
  filter: brightness(0.95);
}

.start-orb img {
  width: 24px;
  height: 24px;
}

.taskbar-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 4px;
  flex-shrink: 0;
}

.open-apps {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
  height: 100%;
}

.open-apps::-webkit-scrollbar {
  display: none;
}

.taskbar-app {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 32px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg,
    var(--xp-btn-top) 0%,
    var(--xp-btn-mid) 45%,
    var(--xp-btn-bot) 100%);
  border: 1px solid var(--xp-frame-inner);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  transition: filter 0.1s ease;
}

.taskbar-app img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.taskbar-app:hover {
  filter: brightness(1.12);
}

.taskbar-app.active {
  background: linear-gradient(180deg,
    var(--xp-btn-bot) 0%,
    var(--xp-btn-mid) 50%,
    var(--xp-btn-top) 100%);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.taskbar-app.minimized {
  opacity: 0.65;
}

.tray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 32px;
  background: linear-gradient(180deg, #1a5ad9 0%, #2c6fd6 50%, #1a4ea0 100%);
  border: 1px solid var(--xp-frame-inner);
  border-radius: 3px;
  font-size: 12px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
  flex-shrink: 0;
}

.tray-icon {
  font-size: 13px;
}

/* =========================
   START MENU (XP two-column)
   ========================= */

.start-menu {
  position: fixed;
  bottom: 46px;
  left: 4px;
  width: 320px;
  height: 380px;
  background: var(--window-bg);
  border: 2px solid #0054e3;
  border-radius: 6px 6px 0 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  z-index: 10000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.40);
  overflow: hidden;
  animation: startOpen 0.14s ease-out;
}

@keyframes startOpen {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.start-menu.hidden {
  display: none;
}

.start-sidebar {
  background: linear-gradient(180deg, #1a4ea0 0%, #2c6fd6 50%, #4a8df8 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 4px 16px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.3px;
}

.start-sidebar .start-logo {
  font-size: 22px;
  margin-bottom: 4px;
}

.start-content {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fff 0%, #f3f6fa 100%);
  overflow: hidden;
}

.start-pane {
  flex: 1;
  overflow-y: auto;
  padding: 6px 4px;
}

.start-pane::-webkit-scrollbar { width: 16px; }
.start-pane::-webkit-scrollbar-track {
  background: #ece9d8;
  background-image:
    linear-gradient(90deg, transparent 50%, rgba(0, 0, 0, 0.08) 50%);
  background-size: 8px 8px;
}
.start-pane::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f4f0d8 0%, #c8c0a8 100%);
  border: 1px solid #716f64;
}

.start-header {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: var(--xp-frame);
  padding: 8px 12px 4px;
  letter-spacing: 0.4px;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 5px 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #000;
  background: transparent;
  border: none;
  cursor: pointer;
}

.start-item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.start-item .start-item-label {
  flex: 1;
}

.start-item .start-item-arrow {
  font-size: 12px;
  color: #555;
}

.start-item:hover {
  background: linear-gradient(180deg, #4a8df8 0%, #2c6fd6 100%);
  color: #fff;
}

.start-item:hover .start-item-arrow {
  color: #fff;
}

.start-divider {
  height: 1px;
  background: #c0c0c0;
  margin: 4px 14px;
}

.start-footer {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 8px;
  background: linear-gradient(180deg, #1a4ea0 0%, #2c6fd6 50%, #4a8df8 100%);
  border-top: 1px solid #000;
}

.start-footer button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(0,0,0,0.10) 100%);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 2px;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.start-footer button:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(0,0,0,0.10) 100%);
}

.start-footer button span {
  font-size: 13px;
}

/* =========================
   HIDDEN UTILITY
   ========================= */

.hidden {
  display: none !important;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 720px) {
  .menu-bar { font-size: 12px; gap: 10px; }
  .menu-item { padding: 2px 6px; }
  .desktop-icons { width: 76px; gap: 10px; top: 10px; left: 10px; }
  .icon { width: 76px; font-size: 11px; }
  .icon img { width: 40px; height: 40px; }
  .start-menu { width: 280px; height: 320px; }
  .window { min-width: 240px; }
  .tray { padding: 0 6px; }
}
