/* ==========================================================================
   ARRON XP · Windows XP Luna Blue × Millennium NetCafé 3D Workspace
   Authentic Bliss Wallpaper, Luna Glossy Blue Bars, Explorer Task Sidebar
   ========================================================================== */

:root {
  /* Windows XP Luna Classic Blue Palette */
  --xp-blue-border: #0054e3;
  --xp-blue-dark: #003c9d;
  --xp-blue-mid: #245edc;
  --xp-blue-sky: #7ba2e7;
  --xp-blue-violet: #6375d6;
  --xp-surface: #ece9d8;
  --xp-surface-alt: #f4f2e8;
  --xp-paper: #ffffff;
  --xp-ink: #111622;
  --xp-ink-2: #3a4559;
  --xp-ink-3: #647188;
  --xp-line: #aca899;
  --xp-line-soft: #d6d2c2;
  --xp-link: #215dc6;
  --xp-accent: #e84a1a;

  /* Map shared vars for cad-viewport.js */
  --ink: #111622;
  --ink-3: #5b677c;
  --line: #b9c5dc;
  --accent: #e84a1a;

  --font-ui: 'Tahoma', 'PingFang SC', 'Microsoft YaHei UI', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;
  --font-display: 'Tahoma', 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #141822;
  color: var(--xp-ink);
  font-family: var(--font-ui);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Windows XP Classic Glossy Buttons
   ========================================================================== */
.xp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #111622;
  background: linear-gradient(180deg, #ffffff 0%, #f5f3ea 48%, #e4e0d2 100%);
  border: 1px solid #003c74;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 1px rgba(0, 60, 116, 0.14);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

.xp-btn:hover {
  box-shadow: inset 0 0 0 1.5px #f5b942, inset 0 1px 0 #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 50%, #ece6d4 100%);
}

.xp-btn:active,
.xp-btn.pressed {
  background: linear-gradient(180deg, #dcd8c8 0%, #ece9dc 100%);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.22);
}

.xp-btn.primary {
  color: #ffffff;
  border-color: #003087;
  background: linear-gradient(180deg, #4b94ff 0%, #245edc 48%, #1947b8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  text-shadow: 0 1px 1px rgba(0, 20, 70, 0.55);
}

.xp-btn.primary:hover {
  filter: brightness(1.08);
  box-shadow: inset 0 0 0 1px #a6d0ff;
}

.xp-btn.green {
  color: #ffffff;
  border-color: #1f641b;
  background: linear-gradient(180deg, #62c45a 0%, #3b9d35 50%, #2b8325 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 1px rgba(0, 45, 0, 0.5);
}

.xp-btn.green:hover {
  filter: brightness(1.07);
}

/* ==========================================================================
   STAGE 1: MILLENNIUM BIOS BOOT SCREEN
   ========================================================================== */
.bios-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at center, #0e1420 0%, #05070b 78%);
  color: #e4f0e8;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

.bios-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bios-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0px,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 3px
  );
}

.bios-top,
.bios-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.bios-corner-btn {
  border: 1px solid rgba(186, 224, 255, 0.4);
  background: rgba(10, 18, 30, 0.85);
  color: #e6f2ff;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bios-corner-btn:hover {
  background: #e6f2ff;
  color: #080d16;
}

.bios-center {
  position: relative;
  z-index: 2;
  width: min(650px, 100%);
  margin: 0 auto;
  border: 2px solid #93c5fd;
  background: rgba(7, 11, 20, 0.94);
  box-shadow: 6px 6px 0 rgba(59, 130, 246, 0.25);
  padding: 26px 28px;
}

.bios-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(147, 197, 253, 0.35);
  margin-bottom: 16px;
}

.bios-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.bios-xp-flag {
  display: inline-grid;
  grid-template-columns: 9px 9px;
  gap: 2px;
}

.bios-xp-flag span {
  width: 9px;
  height: 9px;
  display: block;
}

.bios-year {
  font-size: 11px;
  color: #93c5fd;
}

.bios-log {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #c7d9f0;
  min-height: 116px;
}

.bios-log li {
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bios-log li.show {
  opacity: 1;
  transform: translateY(0);
}

.bios-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 12px;
}

.bios-bar {
  flex: 1;
  height: 14px;
  border: 1px solid #93c5fd;
  padding: 2px;
  background: #060912;
}

.bios-bar-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    #3b82f6 0px,
    #60a5fa 9px,
    #060912 9px,
    #060912 12px
  );
  transition: width 0.28s ease;
}

.bios-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.bios-start-btn {
  border: 2px solid #ffffff;
  background: linear-gradient(180deg, #5eb757 0%, #3b9d35 50%, #2a7f25 100%);
  color: #ffffff;
  padding: 9px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 4px 4px 0 #2563eb;
}

.bios-start-btn:hover {
  filter: brightness(1.08);
}

.bios-hint {
  font-size: 11.5px;
  color: #8da6c6;
}

/* ==========================================================================
   STAGE 2: 3D MILLENNIUM NETCAFÉ + ANTI-CLIPPING SPATIAL HUD
   ========================================================================== */
.desk-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #181c26;
}

#desk-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Robust Top-Left HUD (Zero clipping across all DPI & screen sizes) */
.desk-hud {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 30;
  max-width: calc(100vw - 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--font-mono);
  overflow: visible;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.desk-hud.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  overflow: visible;
}

.hud-block {
  background: rgba(10, 14, 22, 0.9);
  color: #f0f6ff;
  border: 1px solid rgba(125, 195, 255, 0.32);
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.hud-brand {
  font-weight: 700;
  font-size: 13px;
}

.hud-seat-tag {
  background: #dc2626;
  color: #fef08a;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
}

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.hud-btn {
  background: rgba(10, 14, 22, 0.9);
  color: #f0f6ff;
  border: 1px solid rgba(125, 195, 255, 0.35);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hud-btn:hover,
.hud-btn.active {
  background: #e0f2fe;
  color: #081224;
  border-color: #e0f2fe;
}

.hud-btn.enter-btn {
  background: linear-gradient(180deg, #5eb757 0%, #379732 100%);
  border-color: #86efac;
  color: #ffffff;
  font-weight: 700;
}

.hud-btn.enter-btn:hover {
  filter: brightness(1.08);
  color: #ffffff;
}

/* Bottom Interactive Props Bar in 3D NetCafé */
.desk-props-dock {
  position: fixed;
  left: 20px;
  bottom: 18px;
  z-index: 30;
  max-width: calc(100vw - 40px);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  transition: opacity 0.35s ease;
}

.desk-props-dock.hidden {
  opacity: 0;
  pointer-events: none;
}

.prop-chip {
  background: rgba(10, 14, 22, 0.88);
  color: #e2ecf8;
  border: 1px solid rgba(125, 195, 255, 0.3);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.prop-chip:hover {
  background: #245edc;
  border-color: #93c5fd;
  color: #ffffff;
}

.desk-credit {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(226, 236, 248, 0.55);
  pointer-events: none;
}

.desk-hover-tag {
  position: fixed;
  z-index: 35;
  pointer-events: none;
  background: #0a1426;
  color: #f0f9ff;
  border: 1.5px solid #38bdf8;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: opacity 0.14s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.desk-hover-tag.show {
  opacity: 1;
}

/* ==========================================================================
   STAGE 3: WINDOWS XP LUNA DESKTOP (BLISS BLUE SKY WALLPAPER!)
   ========================================================================== */
.os-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background-color: #2478d6;
  background-image: url('../assets/wallpaper-bliss.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.os-layer.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Gentle vintage 2002 photo warmth & nostalgia vignette on Bliss wallpaper */
.os-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at center, rgba(255, 246, 224, 0.04) 45%, rgba(6, 22, 52, 0.24) 100%),
    linear-gradient(180deg, rgba(255, 248, 225, 0.05) 0%, rgba(0, 0, 0, 0.06) 100%);
}

[data-wallpaper='teal'] .os-layer {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  background-color: #1c6668;
}

[data-wallpaper='cobalt'] .os-layer {
  background-image:
    linear-gradient(rgba(164, 206, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 206, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  background-color: #1b3662;
}

.os-layer.crt-on::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 95;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.038) 0px,
    rgba(0, 0, 0, 0.038) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* Slim XP Top Utility Ribbon (Return to 3D Café / Switch Lang / Web Edition) */
.os-topbar {
  position: relative;
  z-index: 80;
  height: 30px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, rgba(20, 62, 146, 0.88) 0%, rgba(13, 45, 114, 0.92) 100%);
  border-bottom: 1px solid rgba(153, 204, 255, 0.45);
  color: #ffffff;
  user-select: none;
  flex-shrink: 0;
}

.os-topbar-left,
.os-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.os-top-brand {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.os-top-pill {
  padding: 2px 9px;
  font-size: 11.5px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.os-top-pill:hover {
  background: rgba(255, 255, 255, 0.28);
}

.os-top-pill.accent {
  background: linear-gradient(180deg, #5eb757 0%, #379732 100%);
  border-color: #9ae6b4;
}

/* Desktop Canvas Area */
.os-desktop {
  position: relative;
  z-index: 5;
  flex: 1;
  overflow: hidden;
  padding: 16px;
}

.os-watermark {
  position: absolute;
  right: 22px;
  bottom: 16px;
  text-align: right;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 4px rgba(0, 20, 50, 0.65);
}

.os-watermark-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.os-watermark-sub {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* XP Desktop Icons (Crisp drop-shadow labels over Bliss sky/grass) */
.desktop-icons {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 14px;
  max-height: 100%;
  width: fit-content;
}

.desktop-icon {
  width: 86px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-align: center;
  user-select: none;
}

.desktop-icon:hover {
  background: rgba(49, 106, 197, 0.42);
  border-color: rgba(186, 224, 255, 0.75);
}

.desktop-icon-glyph {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.desktop-icon-label {
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92), 0 0 6px rgba(0, 0, 0, 0.65);
  word-break: break-word;
}

/* ==========================================================================
   WINDOWS XP LUNA WINDOW SHELL
   ========================================================================== */
.os-windows-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.os-window {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 240px;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  background: var(--xp-surface);
  border: 3px solid #7a96df;
  border-radius: 8px 8px 2px 2px;
  box-shadow: 0 12px 34px rgba(0, 16, 56, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.os-window.active {
  border-color: var(--xp-blue-border);
  box-shadow: 0 16px 42px rgba(0, 18, 66, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.os-window.hidden-min {
  display: none;
}

.os-window.maximized {
  left: 4px !important;
  top: 4px !important;
  width: calc(100% - 8px) !important;
  height: calc(100% - 8px) !important;
  border-radius: 4px 4px 0 0;
}

/* Iconic Glossy Windows XP Luna Titlebar */
.win-titlebar {
  height: 30px;
  padding: 0 6px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, #9db9f0 0%, #7b99df 45%, #7593d9 100%);
  color: #e6eefc;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.os-window.active .win-titlebar {
  background: linear-gradient(
    180deg,
    #3d95ff 0%,
    #0058ee 12%,
    #0053e5 50%,
    #0046c7 86%,
    #005ceb 100%
  );
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 22, 84, 0.8);
}

.win-title-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.win-title-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.win-ctrl {
  width: 21px;
  height: 21px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 3px;
  background: linear-gradient(180deg, #62a5ff 0%, #2468e6 48%, #1651cc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.win-ctrl:hover {
  filter: brightness(1.14);
}

.win-ctrl.close-btn {
  background: linear-gradient(180deg, #f3836c 0%, #df4122 48%, #b8230e 100%);
}

/* XP Classic Menu & Address Bar */
.win-addressbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  background: linear-gradient(180deg, #f8f6ee 0%, #ece9d8 100%);
  border-bottom: 1px solid #c9c5b4;
  font-size: 11.5px;
  color: #555a64;
  flex-shrink: 0;
}

.win-url-box {
  flex: 1;
  padding: 3px 8px;
  background: #ffffff;
  color: #111622;
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.win-go-pill {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(180deg, #64c45c 0%, #379932 100%);
  border: 1px solid #22661d;
}

/* Main Window Body */
.win-content {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
}

.win-statusbar {
  height: 23px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #4a5160;
  background: linear-gradient(180deg, #f1efe2 0%, #e4e1d0 100%);
  border-top: 1px solid #c9c5b4;
  flex-shrink: 0;
}

/* ==========================================================================
   ICONIC WINDOWS XP EXPLORER LAYOUT (LEFT BLUE TASK SIDEBAR + RIGHT CANVAS)
   ========================================================================== */
.xp-explorer-layout {
  display: grid;
  grid-template-columns: 204px 1fr;
  min-height: 100%;
}

.xp-task-sidebar {
  background: linear-gradient(180deg, #7ba2e7 0%, #6375d6 100%);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid #5972c4;
}

.xp-side-card {
  border-radius: 4px 4px 2px 2px;
  overflow: hidden;
  border: 1px solid #ffffff;
  background: #d6dff7;
  box-shadow: 0 2px 6px rgba(15, 36, 98, 0.16);
}

.xp-side-card-head {
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #215dc6;
  background: linear-gradient(90deg, #ffffff 0%, #c6d3f7 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.xp-side-card-head.featured {
  color: #ffffff;
  background: linear-gradient(90deg, #215dc6 0%, #2667d8 100%);
}

.xp-side-card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: #1c3a78;
}

.xp-side-link {
  background: none;
  border: none;
  padding: 2px 0;
  text-align: left;
  font-size: 11.5px;
  color: #215dc6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.xp-side-link:hover {
  color: #428eff;
  text-decoration: underline;
}

.xp-canvas-main {
  padding: 18px 22px;
  background: #ffffff;
}

/* Signature XP Group Header with Fading Blue Underline */
.xp-group-title {
  margin: 0 0 12px;
  padding-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #003399;
  position: relative;
}

.xp-group-title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #3b77bc 0%, rgba(59, 119, 188, 0.08) 100%);
}

.xp-hero-h2 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 700;
  color: #0f2557;
  line-height: 1.3;
}

.xp-lead {
  margin: 0 0 11px;
  font-size: 13.5px;
  line-height: 1.72;
  color: #364154;
}

.xp-spec-table {
  display: grid;
  gap: 5px;
  font-size: 11px;
}

.xp-spec-line {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px dotted #9eb4e4;
  padding-bottom: 4px;
}

.xp-spec-line:last-child {
  border-bottom: none;
}

/* XP Project Cards */
.proj-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.proj-card-xp {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
  border: 1px solid #b8c9e8;
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.proj-card-xp:hover {
  border-color: #3b77bc;
  box-shadow: 0 4px 14px rgba(33, 93, 198, 0.16);
  background: #f2f7ff;
}

.proj-card-xp.full-row {
  grid-column: span 2;
}

.proj-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #556480;
}

.proj-pill {
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid #9ab6e6;
  background: #e8f0fe;
  color: #1947b8;
  font-weight: 700;
}

.proj-pill.hot {
  background: #fff1eb;
  border-color: #f9a585;
  color: #d03b0f;
}

.proj-card-title {
  margin: 4px 0 2px;
  font-size: 16px;
  font-weight: 700;
  color: #0f2557;
}

.proj-card-sub {
  margin: 0;
  font-size: 12px;
  color: #3a4a66;
  font-weight: 600;
}

.proj-card-desc {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.62;
  color: #46536b;
}

.proj-thumb {
  border: 1px solid #9ab6e6;
  border-radius: 3px;
  background: #0d1016;
  padding: 6px;
  overflow: hidden;
}

.proj-thumb img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  display: block;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.proj-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  background: #eef3fc;
  border: 1px solid #c3d4f0;
  border-radius: 2px;
  color: #29457a;
}

.proj-detail-pipe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 16px;
}

.pipe-box {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  background: #f2f7ff;
  border: 1px solid #7ba2e7;
  border-radius: 3px;
  color: #0f2557;
  font-weight: 600;
}

.pipe-arr {
  color: #245edc;
  font-weight: 700;
  font-family: var(--font-mono);
}

.detail-highlights {
  margin: 8px 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.detail-highlights li {
  background: #f8faff;
  border: 1px solid #c9d9f3;
  border-left: 3px solid #245edc;
  border-radius: 2px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.64;
}

/* CAD_Viewer.exe */
.cad-app-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
  padding: 12px;
  background: var(--xp-surface);
}

.cad-app-stage {
  position: relative;
  flex: 1;
  min-height: 250px;
  background: #f4f7fc;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  cursor: grab;
  touch-action: none;
}

.cad-app-stage:active {
  cursor: grabbing;
}

.cad-app-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.cad-app-overlay-tl {
  position: absolute;
  right: 10px;
  top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #566785;
  pointer-events: none;
}

.cad-app-overlay-bl {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #1e3a8a;
  background: rgba(244, 247, 252, 0.92);
  padding: 2px 7px;
  border: 1px solid #b5c8e8;
  pointer-events: none;
}

/* Display.cpl Wallpapers */
.wall-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}

.wall-card {
  border: 2px solid #c3c9d6;
  border-radius: 4px;
  background: #ffffff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.wall-card.active {
  border-color: #245edc;
  background: #eff5ff;
  box-shadow: 0 0 0 1px #245edc;
}

.wall-preview {
  height: 54px;
  margin-bottom: 6px;
  border-radius: 2px;
  border: 1px solid #7f9db9;
  background-size: cover;
  background-position: center;
}

.cpl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8faff;
  border: 1px solid #cbd7ed;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* ==========================================================================
   CLASSIC 2003 TTPLAYER (千千静听) RETRO MUSIC PLAYER SKIN
   ========================================================================== */
.ttplayer-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(180deg, #dde6f5 0%, #c8d5ea 100%);
}

.ttp-lcd {
  background: linear-gradient(180deg, #0b1629 0%, #102442 100%);
  border: 2px inset #6f88b0;
  border-radius: 4px;
  padding: 12px 14px;
  color: #67f89c;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ttp-lcd-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ttp-track-title {
  font-size: 14px;
  font-weight: 700;
  color: #86efac;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ttp-track-sub {
  font-size: 11px;
  color: #7dd3fc;
  margin-top: 2px;
}

.ttp-time {
  font-size: 12.5px;
  font-weight: 700;
  color: #fde047;
  flex-shrink: 0;
}

.ttp-eq-bars {
  height: 44px;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  align-items: end;
  gap: 3px;
  padding-top: 4px;
  border-top: 1px dashed rgba(125, 211, 252, 0.25);
}

.ttp-eq-bar {
  background: linear-gradient(180deg, #facc15 0%, #4ade80 48%, #0ea5e9 100%);
  border-radius: 1px 1px 0 0;
  min-height: 3px;
  transition: height 0.08s linear;
}

.ttp-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ttp-range {
  flex: 1;
  accent-color: #245edc;
  cursor: pointer;
}

.ttp-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ttp-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ttp-vol-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #1e3a6e;
}

.ttp-playlist {
  flex: 1;
  min-height: 110px;
  overflow-y: auto;
  background: #0d182b;
  border: 2px inset #6f88b0;
  border-radius: 4px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ttp-song-row {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.ttp-song-row:hover {
  background: rgba(56, 189, 248, 0.16);
  color: #ffffff;
}

.ttp-song-row.active {
  background: rgba(36, 94, 220, 0.45);
  border-color: #38bdf8;
  color: #86efac;
  font-weight: 700;
}

/* ==========================================================================
   ICONIC WINDOWS XP LUNA TASKBAR & GREEN ROUNDED START BUTTON
   ========================================================================== */
.os-taskbar {
  position: relative;
  z-index: 85;
  height: 36px;
  background: linear-gradient(
    180deg,
    #3168d5 0%,
    #245edc 10%,
    #1f57d6 84%,
    #1941a5 100%
  );
  border-top: 1px solid #6396ff;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
  flex-shrink: 0;
}

.taskbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

/* Iconic Green Rounded Italic XP Start Button */
.xp-start-btn {
  height: 100%;
  padding: 0 18px 0 13px;
  border: none;
  border-right: 1px solid #185816;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(
    180deg,
    #6bc964 0%,
    #46ab3f 14%,
    #389932 52%,
    #2e8628 88%,
    #48ad42 100%
  );
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.45), 2px 0 6px rgba(0, 20, 60, 0.35);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0, 48, 0, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  flex-shrink: 0;
}

.xp-start-btn:hover {
  filter: brightness(1.08);
}

.xp-start-btn.pressed {
  background: linear-gradient(180deg, #277322 0%, #348d2f 100%);
  box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.38);
}

.task-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
}

.xp-task-tab {
  height: 26px;
  min-width: 100px;
  max-width: 168px;
  padding: 0 10px;
  border-radius: 3px;
  border: 1px solid #1e4eb8;
  background: linear-gradient(180deg, #4b8bf5 0%, #3474e6 50%, #2663d4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xp-task-tab:hover {
  filter: brightness(1.09);
}

.xp-task-tab.active {
  background: linear-gradient(180deg, #174099 0%, #1d4db6 100%);
  border-color: #0e2c73;
  box-shadow: inset 1px 1px 3px rgba(0, 12, 48, 0.55);
}

/* Iconic Light-Blue Glossy XP System Tray */
.taskbar-tray {
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #ffffff;
  background: linear-gradient(180deg, #1ba3f4 0%, #0f84e3 50%, #0c6ec7 100%);
  border-left: 1px solid #5ac6ff;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.32);
  flex-shrink: 0;
}

.tray-mini-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 10.5px;
  cursor: pointer;
}

.tray-mini-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   CLASSIC WINDOWS XP TWO-COLUMN START MENU
   ========================================================================== */
.start-menu {
  position: fixed;
  left: 4px;
  bottom: 38px;
  z-index: 96;
  width: min(358px, calc(100vw - 12px));
  display: none;
  border: 2px solid #0054e3;
  border-radius: 7px 7px 2px 2px;
  overflow: hidden;
  box-shadow: 4px 8px 28px rgba(0, 18, 66, 0.52);
  background: #ffffff;
}

.start-menu.open {
  display: flex;
  flex-direction: column;
}

.xp-start-header {
  padding: 10px 12px;
  background: linear-gradient(180deg, #3c8df7 0%, #1b5ed9 55%, #1651c2 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #e68a2e;
}

.xp-avatar-box {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 2px solid #e6f2ff;
  background: #0d1b36;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.xp-start-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.xp-start-left {
  background: #ffffff;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid #9dbce9;
}

.xp-start-right {
  background: #d3e5fa;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.start-item {
  width: 100%;
  border: none;
  border-radius: 3px;
  background: transparent;
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #14223d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
}

.start-item:hover {
  background: #316ac5;
  color: #ffffff;
}

.xp-start-footer {
  padding: 7px 10px;
  background: linear-gradient(180deg, #3a83ed 0%, #1a56cc 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast Notification */
.y2k-toast {
  position: fixed;
  right: 16px;
  bottom: 48px;
  z-index: 260;
  background: #ffffe1;
  color: #111622;
  border: 1.5px solid #245edc;
  border-radius: 5px;
  box-shadow: 0 6px 20px rgba(0, 20, 65, 0.35);
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s ease;
}

.y2k-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   MOBILE & NARROW SCREEN ADAPTATION
   ========================================================================== */
@media (max-width: 780px) {
  .desk-hud {
    top: 10px;
    left: 10px;
    max-width: calc(100vw - 20px);
  }

  .desk-props-dock {
    left: 10px;
    bottom: 12px;
    max-width: calc(100vw - 20px);
  }

  .desk-credit {
    display: none;
  }

  .os-topbar {
    height: 34px;
    padding: 0 6px;
  }

  #os-brand {
    display: none;
  }

  .os-top-pill {
    padding: 2px 6px;
    font-size: 10.5px;
  }

  .os-desktop {
    padding: 8px;
  }

  .desktop-icons {
    flex-direction: row;
    width: 100%;
    gap: 4px;
  }

  .desktop-icon {
    width: 70px;
    padding: 4px 2px;
  }

  .os-window {
    left: 6px !important;
    top: 6px !important;
    width: calc(100% - 12px) !important;
    height: calc(100% - 12px) !important;
  }

  .xp-explorer-layout {
    grid-template-columns: 1fr;
  }

  .xp-canvas-main {
    order: -1;
    padding: 14px 14px 18px;
  }

  .xp-task-sidebar {
    border-right: none;
    border-top: 1px solid #5972c4;
  }

  .proj-list-grid,
  .wall-swatches {
    grid-template-columns: 1fr;
  }

  .proj-card-xp.full-row {
    grid-column: span 1;
  }

  .win-statusbar span:last-child {
    display: none;
  }

  .bios-center {
    padding: 18px 16px;
  }
}
