/* ============================================================
   WINDOWS 95 — PIXEL-PERFECT REPLICA STYLESHEET
   ============================================================ */

/* ---------- IMPORTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=JetBrains+Mono:wght@400;700&display=swap');

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
  /* Desktop */
  --desktop-bg: #008080;

  /* Surface / chrome */
  --surface: #c0c0c0;
  --window-body: #ffffff;

  /* 3-D bevel palette */
  --bevel-light: #ffffff;
  --bevel-highlight: #dfdfdf;
  --bevel-shadow: #808080;
  --bevel-dark: #000000;

  /* Title bars */
  --titlebar-active: linear-gradient(90deg, #000080, #1084d0);
  --titlebar-inactive: linear-gradient(90deg, #808080, #b0b0b0);
  --titlebar-text: #ffffff;

  /* Selection */
  --select-bg: #000080;
  --select-fg: #ffffff;

  /* Text */
  --text: #000000;

  /* Font stack */
  --font-main: 'MS Sans Serif', Arial, Helvetica, sans-serif;
  --font-terminal: 'VT323', monospace;
  --font-mono: 'JetBrains Mono', monospace;

  /* Boot palette */
  --boot-bg: #050510;
  --boot-green: #50fa7b;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  font-size: 11px;
  color: var(--text);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

/* Disable text anti-aliasing for that chunky Win95 feel */
* {
  text-rendering: optimizeSpeed;
}

/* ============================================================
   REUSABLE 3-D BEVEL MIXINS  (via classes)
   ============================================================ */

/* --- Raised (buttons, taskbar, window frame) --- */
.raised,
.win95-window,
.taskbar,
.taskbar-app-btn,
.win-ctrl,
.win95-btn,
.mp-ctrl-btn {
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: inset 1px 1px 0 var(--bevel-highlight), inset -1px -1px 0 var(--bevel-shadow);
}

/* --- Sunken (inputs, content wells, tray) --- */
.sunken,
.tray,
.win-body,
.ie-address-input,
.email-input,
.email-textarea,
.notepad-area,
.paint-canvas-area,
.mp-display,
.dos-body,
.win-status-section,
.file-explorer-body {
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
}

/* --- Pressed / Active button --- */
.pressed,
.win-ctrl:active,
.taskbar-app-btn:active,
.win95-btn:active,
.mp-ctrl-btn:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-shadow);
  padding-top: 1px;
  padding-left: 1px;
}

/* ============================================================
   BOOT SCREEN
   ============================================================ */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--boot-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10vh 8vw;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.boot-screen.boot-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
}

/* Fade-out — transitions opacity before the screen is removed */
.boot-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Scanline overlay */
.boot-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.boot-screen * {
  position: relative;
  z-index: 2;
}

.boot-terminal {
  width: 100%;
  max-width: 720px;
  max-height: 78vh;
  overflow: hidden;
  font-family: var(--font-terminal);
  font-size: 18px;
  color: var(--boot-green);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.boot-lines {
  display: flex;
  flex-direction: column;
}

.boot-terminal .line {
  opacity: 0;
  min-height: 1.5em;
  animation: bootFadeIn 0.08s forwards;
}

@keyframes bootFadeIn {
  to { opacity: 1; }
}

/* Boot log colour coding */
.boot-terminal .line.cyan    { color: #8be9fd; }
.boot-terminal .line.white   { color: #f8f8f2; }
.boot-terminal .line.dim     { color: #6272a4; }
.boot-terminal .line.success { color: #50fa7b; }
.boot-terminal .line.yellow  { color: #f1fa8c; }
.boot-terminal .line.pink    { color: #ff79c6; }

/* Blinking cursor */
.boot-cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: var(--boot-green);
  vertical-align: text-bottom;
  animation: cursorBlink 0.6s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Progress bar */
.boot-progress-wrap {
  width: 100%;
  max-width: 400px;
  margin-top: 32px;
}

.boot-progress-track {
  width: 100%;
  height: 18px;
  background: #0a0a1a;
  border: 1px solid #333;
  border-radius: 0;
  overflow: hidden;
}

.boot-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--boot-green);
  transition: width 0.3s linear;
  box-shadow: 0 0 8px var(--boot-green);
}

.boot-progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--boot-green);
  margin-top: 6px;
  text-align: center;
}

/* ============================================================
   DESKTOP
   ============================================================ */
.desktop {
  position: fixed;
  inset: 0;
  background: var(--desktop-bg);
  overflow: hidden;
}

/* Desktop icon layer — icons are freely positioned & draggable */
.desktop-icons {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 36px; /* above taskbar */
}

/* ---------- Desktop Icon ---------- */
.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 106px;
  padding: 8px 5px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  user-select: none;
}

.desktop-icon.dragging {
  opacity: 0.72;
  z-index: 120;
}

.desktop-icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: pixelated;
  margin-bottom: 6px;
  pointer-events: none;
}

.desktop-icon span,
.desktop-icon .icon-label {
  font-size: 13px;
  color: #ffffff;
  text-align: center;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.85);
  line-height: 1.25;
  word-wrap: break-word;
  max-width: 98px;
  padding: 1px 3px;
}

/* Selected icon — only via an explicit single click, never plain focus */
.desktop-icon.selected {
  outline: none;
  border: 1px dotted #ffffff;
}

.desktop-icon.selected span,
.desktop-icon.selected .icon-label {
  background: var(--select-bg);
  color: var(--select-fg);
  text-shadow: none;
}

/* Keyboard focus ring only (not shown for mouse clicks) */
.desktop-icon:focus { outline: none; }
.desktop-icon:focus-visible {
  outline: 1px dotted #ffffff;
  outline-offset: -1px;
}

/* ============================================================
   TASKBAR
   ============================================================ */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--surface);
  border-top: 2px solid var(--bevel-light);
  border-left: none;
  border-right: none;
  border-bottom: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 2px 2px;
  z-index: 9990;
  box-shadow: none;
}

/* ---------- Start Button ----------
   start-button.png is a 55x66 sprite: three stacked 55x22 states
   (normal / hover / pressed). Show one slice at a time. */
.start-btn {
  width: 75px;
  height: 30px;
  padding: 0;
  margin-right: 4px;
  border: 0;
  background: url('icons/start-button.png') no-repeat 0 0;
  background-size: 75px 90px;
  image-rendering: pixelated;
  cursor: pointer;
  flex-shrink: 0;
}

.start-btn:hover {
  background-position: 0 -30px;
}

.start-btn:active,
.start-btn.active {
  background-position: 0 -60px;
}

/* ---------- Taskbar separator ---------- */
.taskbar-sep {
  width: 2px;
  height: 30px;
  border-left: 1px solid var(--bevel-shadow);
  border-right: 1px solid var(--bevel-light);
  margin: 0 2px;
  flex-shrink: 0;
}

/* ---------- Taskbar App Buttons Area ---------- */
.taskbar-apps {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow: hidden;
  padding: 0 2px;
}

/* ---------- Taskbar App Button ---------- */
.taskbar-app-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 2px 8px;
  background: var(--surface);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  max-width: 168px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.taskbar-app-btn img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.taskbar-app-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Active / pressed taskbar button */
.taskbar-app-btn.active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-shadow);
  background: repeating-conic-gradient(var(--surface) 0% 25%, #ffffff 0% 50%) 50% / 2px 2px;
}

/* ---------- System Tray ---------- */
.tray {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 2px 11px;
  margin-left: auto;
  flex-shrink: 0;
  background: var(--surface);
}

.tray img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.tray-clock,
.tray span {
  font-family: var(--font-main);
  font-size: 13px;
  white-space: nowrap;
}

/* ============================================================
   START MENU
   ============================================================ */
.start-menu,
.sm-menu {
  position: fixed;
  bottom: 36px;
  left: 2px;
  background: var(--surface);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: inset 1px 1px 0 var(--bevel-highlight), inset -1px -1px 0 var(--bevel-shadow), 2px 2px 0 rgba(0, 0, 0, 0.3);
  z-index: 9995;
  display: flex;
  flex-direction: row;
  min-width: 244px;
}

/* Sidebar gradient strip */
.sm-sidebar {
  width: 34px;
  background: linear-gradient(0deg, #000080, #1084d0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.sm-sidebar-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--bevel-light);
  font-family: var(--font-main);
  font-size: 21px;
  font-weight: bold;
  letter-spacing: 2px;
  white-space: nowrap;
}

/* Menu items wrapper */
.sm-items {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 4px 0;
}

/* Individual menu item */
.sm-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 22px 0 8px;
  font-family: var(--font-main);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.sm-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.sm-item .sm-icon-sm {
  width: 16px;
  height: 16px;
}

.sm-item:hover {
  background: var(--select-bg);
  color: var(--select-fg);
}

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

/* Separator */
.sm-separator {
  height: 0;
  margin: 5px 8px;
  border-top: 1px solid var(--bevel-shadow);
  border-bottom: 1px solid var(--bevel-light);
}

/* Hidden start menu */
.start-menu.hidden,
.sm-menu.hidden {
  display: none;
}

/* ============================================================
   WINDOWS
   ============================================================ */
.win95-window {
  position: absolute;
  background: var(--surface);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  min-width: 200px;
  min-height: 100px;
  z-index: 100;
  transform-origin: center center;
  animation: winOpen 0.19s cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

/* Smooth maximize / restore — only while toggling, not while dragging */
.win95-window.win-animating {
  transition: left 0.22s cubic-bezier(0.2, 0.7, 0.3, 1),
              top 0.22s cubic-bezier(0.2, 0.7, 0.3, 1),
              width 0.22s cubic-bezier(0.2, 0.7, 0.3, 1),
              height 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Closing animation */
.win95-window.closing {
  animation: winClose 0.14s ease-in forwards;
  pointer-events: none;
}

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

.win95-window.hidden {
  display: none;
}

/* ---------- Titlebar ---------- */
.win-titlebar {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 24px;
  padding: 2px 4px;
  background: var(--titlebar-active);
  gap: 4px;
  flex-shrink: 0;
  user-select: none;
  cursor: default;
}

.win95-window.inactive .win-titlebar {
  background: var(--titlebar-inactive);
}

.win-titlebar-icon {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.win-title {
  flex: 1;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: bold;
  color: var(--titlebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 24px;
}

/* ---------- Window Control Buttons ---------- */
.win-controls {
  display: flex;
  flex-direction: row;
  gap: 2px;
  flex-shrink: 0;
}

.win-ctrl {
  width: 21px;
  height: 19px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  font-family: var(--font-main);
  line-height: 1;
  cursor: pointer;
  padding: 0;
  color: var(--text);
}

.win-ctrl:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-shadow);
}

/* ---------- Menu Bar ---------- */
.win-menubar {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 22px;
  padding: 0;
  border-bottom: 1px solid var(--bevel-shadow);
  background: var(--surface);
  flex-shrink: 0;
}

.win-menubar-item {
  padding: 3px 8px;
  font-family: var(--font-main);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.win-menubar-item:hover {
  background: var(--select-bg);
  color: var(--select-fg);
}

/* ---------- Window Body ---------- */
.win-body {
  margin: 2px;
  background: var(--window-body);
  padding: 4px;
  font-size: 12px;
  line-height: 1.5;
  flex: 1;
  overflow: auto;
}

/* Win95-style scrollbars */
.win-body::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

.win-body::-webkit-scrollbar-track {
  background: repeating-conic-gradient(var(--surface) 0% 25%, #ffffff 0% 50%) 50% / 2px 2px;
}

.win-body::-webkit-scrollbar-thumb {
  background: var(--surface);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: inset 1px 1px 0 var(--bevel-highlight), inset -1px -1px 0 var(--bevel-shadow);
}

.win-body::-webkit-scrollbar-button {
  display: block;
  width: 16px;
  height: 16px;
  background: var(--surface);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
}

/* ---------- Status Bar ---------- */
.win-status {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 18px;
  padding: 0 2px;
  background: var(--surface);
  flex-shrink: 0;
  gap: 2px;
}

.win-status-section {
  height: 14px;
  padding: 0 4px;
  font-family: var(--font-main);
  font-size: 10px;
  line-height: 14px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface);
}

/* ============================================================
   GENERIC WIN95 BUTTON
   ============================================================ */
.win95-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 2px 12px;
  background: var(--surface);
  font-family: var(--font-main);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.win95-btn:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-shadow);
}

/* ============================================================
   APP: INTERNET EXPLORER
   ============================================================ */
.ie-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--bevel-shadow);
  flex-shrink: 0;
}

.ie-toolbar .win95-btn {
  height: 20px;
  padding: 1px 6px;
  font-size: 10px;
}

.ie-addressbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--bevel-shadow);
  flex-shrink: 0;
}

.ie-address-label {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
}

.ie-address-input {
  flex: 1;
  height: 20px;
  padding: 1px 4px;
  font-family: var(--font-main);
  font-size: 11px;
  background: var(--window-body);
  outline: none;
}

/* ============================================================
   APP: PAINT
   ============================================================ */
.paint-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.paint-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--surface);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.paint-color {
  width: 14px;
  height: 14px;
  border: 1px solid #000000;
  cursor: pointer;
  flex-shrink: 0;
}

.paint-color.active {
  border: 2px solid #000000;
  outline: 1px solid #ffffff;
  outline-offset: -3px;
}

.paint-canvas-area {
  flex: 1;
  margin: 2px;
  background: var(--surface);
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.paint-canvas {
  background: #ffffff;
  cursor: crosshair;
  image-rendering: pixelated;
  display: block;
}

/* ============================================================
   APP: MS-DOS PROMPT (TERMINAL)
   ============================================================ */
.dos-body {
  background: #000000 !important;
  color: #c0c0c0;
  font-family: var(--font-terminal);
  font-size: 16px;
  line-height: 1.4;
  padding: 4px;
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.dos-body::-webkit-scrollbar {
  width: 16px;
}

.dos-body::-webkit-scrollbar-track {
  background: #222;
}

.dos-body::-webkit-scrollbar-thumb {
  background: #555;
}

.dos-input {
  background: transparent;
  color: #c0c0c0;
  font-family: var(--font-terminal);
  font-size: 16px;
  border: none;
  outline: none;
  caret-color: #c0c0c0;
  width: 100%;
}

/* ============================================================
   APP: NOTEPAD
   ============================================================ */
.notepad-area {
  width: 100%;
  height: 100%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  border: none !important;
  background: var(--window-body);
  resize: none;
  outline: none;
  padding: 4px;
  overflow: auto;
  box-shadow: none !important;
}

/* ============================================================
   APP: MEDIA PLAYER
   ============================================================ */
.mp-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mp-display {
  background: #000000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 12px 8px 8px;
  min-height: 80px;
  flex: 1;
}

.mp-eq-bar {
  width: 8px;
  background: #00ff00;
  border-radius: 0;
  animation: eqBounce 0.6s ease-in-out infinite alternate;
}

@keyframes eqBounce {
  0%   { height: 8px; }
  100% { height: 48px; }
}

.mp-eq-bar:nth-child(2) { animation-delay: 0.1s; }
.mp-eq-bar:nth-child(3) { animation-delay: 0.2s; }
.mp-eq-bar:nth-child(4) { animation-delay: 0.05s; }
.mp-eq-bar:nth-child(5) { animation-delay: 0.15s; }
.mp-eq-bar:nth-child(6) { animation-delay: 0.25s; }
.mp-eq-bar:nth-child(7) { animation-delay: 0.08s; }
.mp-eq-bar:nth-child(8) { animation-delay: 0.18s; }

.mp-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--surface);
  flex-shrink: 0;
}

.mp-ctrl-btn {
  width: 24px;
  height: 22px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  flex-shrink: 0;
}

.mp-ctrl-btn:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-shadow);
}

/* ---------- Media Player position slider ---------- */
.mp-slider {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 6px;
}

.mp-slider-track {
  flex: 1;
  height: 4px;
  position: relative;
  background: #808080;
  border: 1px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
}

.mp-slider-thumb {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 16px;
  background: var(--surface);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: inset 1px 1px 0 var(--bevel-highlight), inset -1px -1px 0 var(--bevel-shadow);
}

/* ============================================================
   APP: EMAIL (OUTLOOK)
   ============================================================ */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.email-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.email-label {
  width: 50px;
  text-align: right;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.email-input {
  flex: 1;
  height: 20px;
  padding: 1px 4px;
  font-family: var(--font-main);
  font-size: 11px;
  background: var(--window-body);
  outline: none;
}

.email-textarea {
  width: 100%;
  min-height: 120px;
  padding: 4px;
  font-family: var(--font-main);
  font-size: 11px;
  background: var(--window-body);
  outline: none;
  resize: vertical;
}

/* Read-only field (the "To:" address) */
.email-field {
  flex: 1;
  display: flex;
  align-items: center;
  height: 20px;
  padding: 1px 4px;
  font-family: var(--font-main);
  font-size: 11px;
  background: var(--window-body);
  overflow: hidden;
  white-space: nowrap;
}

.email-actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
  margin-top: 6px;
}

/* ============================================================
   APP: ABOUT / WORDPAD
   ============================================================ */
.doc-content {
  font-family: 'Times New Roman', Times, serif;
  font-size: 12pt;
  line-height: 1.6;
  color: var(--text);
}

.doc-content h1 {
  font-size: 20pt;
  margin-bottom: 8px;
  font-weight: bold;
}

.doc-content h2 {
  font-size: 16pt;
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: bold;
}

.doc-content h3 {
  font-size: 13pt;
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: bold;
}

.doc-content p {
  margin-bottom: 8px;
}

.doc-content ul, .doc-content ol {
  margin-left: 24px;
  margin-bottom: 8px;
}

.doc-content li {
  margin-bottom: 2px;
}

.doc-content a {
  color: #0000ff;
  text-decoration: underline;
}

.doc-content a:visited {
  color: #800080;
}

/* ============================================================
   APP: FILE EXPLORER (PROJECTS)
   ============================================================ */
.file-explorer-body {
  background: var(--window-body);
  margin: 2px;
  padding: 4px;
  flex: 1;
  overflow: auto;
}

.file-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-content: flex-start;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 70px;
  padding: 4px 2px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  text-align: center;
}

.file-item img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  margin-bottom: 2px;
}

/* Emoji stand-in for missing 32px icons */
.file-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 2px;
}

/* Empty-folder message (e.g. Recycle Bin) */
.empty-msg {
  padding: 12px;
  font-family: var(--font-main);
  font-size: 11px;
  color: #404040;
}

.file-item span,
.file-item .file-label {
  font-family: var(--font-main);
  font-size: 11px;
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
  max-width: 66px;
}

.file-item:hover {
  border: 1px dotted var(--text);
}

.file-item:focus,
.file-item.selected {
  outline: none;
  border: 1px dotted var(--text);
}

.file-item:focus img,
.file-item.selected img {
  filter: brightness(0.7) sepia(1) saturate(5) hue-rotate(200deg);
}

.file-item:focus span,
.file-item:focus .file-label,
.file-item.selected span,
.file-item.selected .file-label {
  background: var(--select-bg);
  color: var(--select-fg);
}

/* ============================================================
   DRAG SUPPORT (windows)
   ============================================================ */
.win95-window.dragging {
  opacity: 0.85;
  cursor: move;
}

/* ============================================================
   UTILITY / MISC
   ============================================================ */
.hidden {
  display: none !important;
}

/* Selection colours everywhere */
::selection {
  background: var(--select-bg);
  color: var(--select-fg);
}

/* Links inside windows */
.win-body a {
  color: #0000ff;
  text-decoration: underline;
}
.win-body a:hover {
  color: #ff0000;
}

/* Keep non-square brand icons (e.g. Gmail) from distorting */
.di-img,
.sm-item img,
.win-titlebar-icon,
.tb-icon,
.file-item img {
  object-fit: contain;
}

/* ---------- Desktop drag-select marquee ---------- */
.selection-box {
  position: fixed;
  z-index: 150;
  border: 1px dotted #ffffff;
  background: rgba(0, 0, 60, 0.18);
  pointer-events: none;
}

/* ---------- System-tray mute button ---------- */
.tray-mute {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.tray-mute:hover {
  background: rgba(0, 0, 0, 0.08);
}

.tray-mute.muted .tray-icon {
  opacity: 0.5;
}

/* Red slash when click sounds are muted */
.tray-mute.muted::after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  top: 50%;
  height: 2px;
  background: #d40000;
  transform: rotate(-45deg);
  pointer-events: none;
}

/* ============================================================
   APP: ADOBE PREMIERE PRO  (mock editing timeline)
   ============================================================ */
.pr-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 2px;
  padding: 0;
  background: #232328;
  overflow: hidden;
}

.pr-monitor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 110px;
  background: #18181c;
  padding: 6px;
  gap: 6px;
}

.pr-screen {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 50% 38%, #2b2440, #0d0d12 78%);
  border: 1px solid #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pr-screen-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(153, 153, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153, 153, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
}

.pr-screen-title {
  position: relative;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #efeefc;
}

.pr-screen-sub {
  position: relative;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: #9999ff;
  margin-top: 4px;
}

.pr-screen-bars {
  position: relative;
  display: flex;
  gap: 4px;
  margin-top: 14px;
  height: 22px;
  align-items: flex-end;
}

.pr-screen-bars i {
  display: block;
  width: 5px;
  height: 5px;
  background: #9999ff;
}

.pr-screen.playing .pr-screen-bars i {
  animation: prBars 0.5s ease-in-out infinite alternate;
}
.pr-screen-bars i:nth-child(2) { animation-delay: 0.10s; }
.pr-screen-bars i:nth-child(3) { animation-delay: 0.20s; }
.pr-screen-bars i:nth-child(4) { animation-delay: 0.05s; }
.pr-screen-bars i:nth-child(5) { animation-delay: 0.15s; }

@keyframes prBars { to { height: 22px; } }

.pr-transport {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pr-btn {
  width: 28px;
  height: 21px;
  background: #3a3a44;
  color: #e0e0e8;
  border: 1px solid #555;
  cursor: pointer;
  font-size: 10px;
}
.pr-btn:hover  { background: #45454f; }
.pr-btn:active { background: #2a2a32; }

.pr-timecode {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #9999ff;
  background: #0d0d12;
  border: 1px solid #000;
  padding: 2px 8px;
}

.pr-timeline {
  display: flex;
  flex-direction: row;
  height: 172px;
  flex-shrink: 0;
  background: #2b2b32;
  border-top: 1px solid #000;
}

.pr-labels {
  width: 38px;
  flex-shrink: 0;
  background: #1f1f24;
  border-right: 1px solid #000;
}

.pr-ruler-spacer {
  height: 16px;
  border-bottom: 1px solid #000;
}

.pr-labels .pr-track-label {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #c0c0c8;
  border-bottom: 1px solid #000;
}

.pr-tracks {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: text;
}

.pr-ruler {
  height: 16px;
  border-bottom: 1px solid #000;
  background:
    repeating-linear-gradient(90deg, #555 0 1px, transparent 1px 11px),
    #15151a;
}

.pr-track {
  position: relative;
  height: 46px;
  border-bottom: 1px solid #000;
  background: #232328;
}

.pr-clip {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(0, 0, 0, 0.78);
  padding: 3px 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.pr-clip-video { background: #6f8fd6; }
.pr-clip-title { background: #c9a4e6; }
.pr-clip-fx    { background: #e6c79a; }
.pr-clip-audio { background: #6dc48f; }

.pr-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: #ff3b3b;
  pointer-events: none;
  z-index: 5;
}
.pr-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #ff3b3b;
}

/* ============================================================
   APP: SPOTIFY  (music player)
   ============================================================ */
.sp-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 2px;
  padding: 12px;
  gap: 12px;
  background: linear-gradient(180deg, #2a2a2a, #121212);
  overflow: auto;
}

.sp-now {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-art {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  background: linear-gradient(135deg, hsl(145, 60%, 46%), hsl(145, 55%, 22%));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.sp-art-eq {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 26px;
}
.sp-art-eq i {
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(0, 0, 0, 0.55);
}
.sp-art.playing .sp-art-eq i {
  animation: spEq 0.65s ease-in-out infinite alternate;
}
.sp-art-eq i:nth-child(2) { animation-delay: 0.15s; }
.sp-art-eq i:nth-child(3) { animation-delay: 0.30s; }
.sp-art-eq i:nth-child(4) { animation-delay: 0.08s; }

@keyframes spEq { to { height: 26px; } }

.sp-meta { min-width: 0; }

.sp-track {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-artist {
  font-family: var(--font-main);
  font-size: 11px;
  color: #b3b3b3;
  margin-top: 3px;
}

.sp-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-bar {
  height: 5px;
  background: #4d4d4d;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.sp-fill {
  height: 100%;
  width: 0%;
  background: #1ed760;
}

.sp-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #b3b3b3;
}

.sp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.sp-btn {
  background: none;
  border: none;
  color: #b3b3b3;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}
.sp-btn:hover { color: #fff; }

.sp-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1ed760;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.sp-play:hover {
  color: #000;
  transform: scale(1.06);
}

.sp-list-title {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  padding-bottom: 2px;
}

/* Embedded Spotify track players */
.sp-embed {
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
  flex-shrink: 0;
}

.sp-playlist {
  display: flex;
  flex-direction: column;
}

.sp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 12px;
  color: #b3b3b3;
}
.sp-row:hover { background: #1a1a1a; }
.sp-row.active { color: #1ed760; }

.sp-row-num {
  width: 14px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
}

.sp-row-title {
  flex: 1;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-row.active .sp-row-title { color: #1ed760; }

.sp-row-dur {
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ============================================================
   APP: GMAIL  (contact)
   ============================================================ */
.gm-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 2px;
  padding: 0;
  background: #fff;
  overflow: auto;
}

.gm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #f2f2f2;
  border-bottom: 1px solid #ddd;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  color: #202124;
}

.gm-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.gm-form {
  display: flex;
  flex-direction: column;
  padding: 4px 14px 14px;
}

.gm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eee;
  padding: 7px 0;
}

.gm-row label {
  width: 54px;
  flex-shrink: 0;
  font-family: var(--font-main);
  font-size: 11px;
  color: #5f6368;
}

.gm-static {
  font-family: var(--font-main);
  font-size: 12px;
  color: #202124;
}

.gm-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 12px;
  color: #202124;
  padding: 2px 0;
}

.gm-body {
  margin-top: 10px;
  min-height: 110px;
  border: none;
  outline: none;
  resize: vertical;
  font-family: var(--font-main);
  font-size: 12px;
  color: #202124;
}

.gm-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.gm-send {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 8px 24px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.gm-send:hover { background: #1666cf; }

.gm-note {
  font-family: var(--font-main);
  font-size: 10px;
  color: #5f6368;
}

.gm-sent {
  display: none;
  margin: 28px 16px;
  padding: 16px;
  background: #e6f4ea;
  border: 1px solid #b7e1c5;
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 12px;
  line-height: 1.6;
  color: #1e8e3e;
  text-align: center;
}

.gm-embed {
  flex: 1;
  width: 100%;
  border: none;
}

.gm-wrap.sent .gm-form { display: none; }
.gm-wrap.sent .gm-sent { display: block; }

/* ============================================================
   APP: SPOTIFY — Win95 Media Player
   ============================================================ */
.mp95-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 2px;
  padding: 6px;
  gap: 6px;
  background: var(--surface);
}

.mp95-display {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  flex-shrink: 0;
  background: #06140a;
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
  overflow: hidden;
}

.mp95-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #28e028;
  box-shadow: 0 0 6px #28e028;
  flex-shrink: 0;
  animation: mp95Blink 1.4s step-end infinite;
}
@keyframes mp95Blink { 50% { opacity: 0.3; } }

.mp95-now {
  font-family: var(--font-terminal);
  font-size: 18px;
  color: #34e034;
  text-shadow: 0 0 5px rgba(52, 224, 52, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp95-screen {
  flex-shrink: 0;
  padding: 3px;
  background: #000000;
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
}

.mp95-embed {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
}

.mp95-listlabel {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.mp95-tracklist {
  flex: 1;
  overflow-y: auto;
  background: var(--window-body);
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
}

.mp95-track {
  display: flex;
  gap: 8px;
  padding: 4px 8px;
  font-family: var(--font-main);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.mp95-track:hover { background: #d6d6d6; }
.mp95-track.active {
  background: var(--select-bg);
  color: var(--select-fg);
}

.mp95-track-num {
  width: 18px;
  text-align: right;
  flex-shrink: 0;
}
.mp95-track-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   APP: GMAIL — Win95 Mail Client
   ============================================================ */
.gm95-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 2px;
  padding: 0;
  background: var(--surface);
}

.gm95-toolbar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 3px 4px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--bevel-shadow);
}

.gm95-tbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 48px;
  height: 40px;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid transparent;
  font-family: var(--font-main);
  font-size: 10px;
  cursor: pointer;
}
.gm95-tbtn:hover {
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
}
.gm95-tbtn:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
}
.gm95-tbic {
  font-size: 17px;
  line-height: 1;
}

.gm95-tsep {
  width: 2px;
  height: 34px;
  margin: 0 3px;
  border-left: 1px solid var(--bevel-shadow);
  border-right: 1px solid var(--bevel-light);
}

.gm95-main {
  display: flex;
  flex: 1;
  gap: 3px;
  padding: 3px;
  overflow: hidden;
}

.gm95-folders {
  width: 156px;
  flex-shrink: 0;
  padding: 4px;
  background: var(--window-body);
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
}

.gm95-folder {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  font-family: var(--font-main);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.gm95-folder:hover { background: #d6d6d6; }
.gm95-folder-active {
  background: var(--select-bg);
  color: var(--select-fg);
}
.gm95-fic { font-size: 14px; }

.gm95-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--window-body);
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
}

.gm95-msgbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: bold;
}
.gm95-msgicon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.gm95-embed {
  flex: 1;
  width: 100%;
  border: 0;
  background: #ffffff;
}

/* ---------- Paint toolbar groups ---------- */
.paint-palette {
  display: flex;
  gap: 2px;
}
.paint-tools {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

/* ============================================================
   APP: ADOBE PHOTOSHOP — interactive project gallery
   ============================================================ */
.ps-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 2px;
  padding: 0;
  background: #535353;
  overflow: hidden;
}

/* Photoshop startup splash — modern Adobe-style card overlay */
.ps-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  animation: psSplashIn 0.2s ease-in;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.ps-splash.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@keyframes psSplashIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ps-splash-card {
  width: 600px;
  max-width: 92vw;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

.ps-splash-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #cccccc;
}
.ps-splash-logo {
  width: 52px;
  height: 52px;
  display: block;
}
.ps-splash-license {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
  color: #000000;
}

.ps-splash-hero {
  height: 134px;
  background:
    radial-gradient(circle at 18% 26%, #59c8ff 0%, transparent 46%),
    radial-gradient(circle at 80% 20%, #b06bff 0%, transparent 46%),
    radial-gradient(circle at 60% 86%, #ff6ec7 0%, transparent 48%),
    radial-gradient(circle at 94% 74%, #ffd166 0%, transparent 42%),
    linear-gradient(135deg, #1a1040, #0a1a3a);
}

.ps-splash-loading {
  display: flex;
  align-items: center;
  min-height: 26px;
  padding: 9px 18px 4px;
}
.ps-splash-status {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: #000000;
}

.ps-splash-titlesec {
  display: flex;
  align-items: baseline;
  padding: 0 18px 14px;
}
.ps-splash-product {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  color: #000000;
}
.ps-splash-ver {
  font-size: 16px;
  font-weight: 700;
  color: #2d6cdf;
  margin-left: 8px;
}

.ps-splash-credits {
  border-top: 1px solid #cccccc;
  padding: 12px 18px 16px;
}
.ps-splash-creditstext {
  font-size: 9px;
  line-height: 1.5;
  color: #000000;
  margin: 0 0 8px;
}
.ps-splash-copy {
  font-size: 8px;
  color: #333333;
  margin: 2px 0;
}
.ps-splash-tm {
  font-size: 7px;
  font-style: italic;
  color: #666666;
  margin: 4px 0 0;
}

/* README — photo card */
.rm-body {
  background: var(--window-body);
  padding: 16px 18px;
  overflow: auto;
}
.rm-card {
  text-align: center;
  margin-bottom: 14px;
}
.rm-photo {
  width: 280px;
  display: block;
  margin: 0 auto;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px #808080, 3px 3px 7px rgba(0, 0, 0, 0.35);
}
.rm-caption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #666666;
  margin-top: 10px;
  letter-spacing: 1px;
}
.rm-text {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  line-height: 1.6;
  color: #000000;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ps-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.ps-tools {
  width: 36px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  background: #3a3a3a;
}
.ps-tool {
  width: 26px;
  height: 26px;
  background: #5a5a5a;
  border: 1px solid #2a2a2a;
  color: #e6e6e6;
  font-size: 13px;
  cursor: pointer;
}
.ps-tool:hover { background: #6a6a6a; }
.ps-tool.active {
  background: #1473e6;
  border-color: #1473e6;
  color: #ffffff;
}

.ps-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ps-tabs {
  display: flex;
  background: #3a3a3a;
  flex-shrink: 0;
}
.ps-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  font-family: var(--font-main);
  font-size: 11px;
  color: #cfcfcf;
  background: #2d2d2d;
  cursor: pointer;
  white-space: nowrap;
}
.ps-tab.active {
  background: #535353;
  color: #ffffff;
}
.ps-tab-doc {
  display: none;
}
.ps-tab-close {
  background: none;
  border: 0;
  color: inherit;
  font-size: 10px;
  line-height: 1;
  padding: 2px 3px;
  cursor: pointer;
}
.ps-tab-close:hover {
  color: #ff6b6b;
}

.ps-canvas {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  background: repeating-conic-gradient(#5e5e5e 0% 25%, #686868 0% 50%) 50% / 22px 22px;
}

/* Embedded project viewer — fills the Photoshop canvas */
.ps-viewer {
  display: none;
  position: absolute;
  inset: 0;
  background: #ffffff;
  transition: opacity 0.28s ease;
}
.ps-viewer-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}
.ps-doc {
  transition: opacity 0.28s ease;
}

/* Loading veil — covers the iframe until the project has loaded */
.ps-viewer-load {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e1e22;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ps-viewer-load.show {
  opacity: 1;
  visibility: visible;
}
.ps-viewer-load-txt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #9aa3b2;
  animation: psLoadPulse 1.1s ease-in-out infinite;
}
@keyframes psLoadPulse {
  50% { opacity: 0.4; }
}

/* ============================================================
   APP: DOCUMENTS — written project notes
   ============================================================ */
.docs-body {
  background: var(--window-body);
  padding: 0;
  overflow: auto;
}
.docs-intro {
  padding: 22px 26px 10px;
}
.docs-intro h2 {
  font-family: var(--font-main);
  font-size: 19px;
  margin-bottom: 8px;
  color: #111111;
}
.docs-intro p {
  font-family: var(--font-main);
  font-size: 12px;
  line-height: 1.65;
  color: #444444;
}
.docs-entry {
  display: flex;
  gap: 14px;
  padding: 18px 26px;
  border-top: 1px solid #e2e2e2;
}
.docs-accent {
  width: 6px;
  flex-shrink: 0;
  border-radius: 3px;
}
.docs-text {
  flex: 1;
  min-width: 0;
}
.docs-no {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9a9a9a;
  margin-bottom: 5px;
}
.docs-name {
  font-family: var(--font-main);
  font-size: 15px;
  margin-bottom: 3px;
  color: #111111;
}
.docs-cat {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: bold;
  color: #1473e6;
  margin-bottom: 9px;
}
.docs-detail {
  font-family: var(--font-main);
  font-size: 12px;
  line-height: 1.7;
  color: #333333;
}
.ps-doc {
  width: 320px;
  flex-shrink: 0;
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
}
.ps-doc-art {
  height: 178px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ps-doc-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 7px;
}
.ps-doc-big {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: bold;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.ps-doc-info { padding: 12px 14px 16px; }
.ps-doc-title {
  font-family: var(--font-main);
  font-size: 14px;
  margin-bottom: 6px;
}
.ps-doc-desc {
  font-family: var(--font-main);
  font-size: 11px;
  line-height: 1.55;
  color: #444444;
}

.ps-doc-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 18px;
  background: #1473e6;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.ps-doc-link:hover { background: #2d83f0; }
.ps-doc-link:active { background: #0f5fc4; }

/* ---------- Embedded project viewer ---------- */
.viewer-body {
  margin: 2px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}
.viewer-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.ps-panels {
  width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 3px;
  background: #3a3a3a;
}
.ps-panel {
  background: #454545;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ps-panel:first-child {
  flex: 1;
  min-height: 0;
}
.ps-panel-head {
  padding: 5px 8px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: bold;
  color: #ececec;
  background: #2d2d2d;
  flex-shrink: 0;
}
.ps-projlist {
  overflow-y: auto;
  flex: 1;
}
.ps-proj {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  font-family: var(--font-main);
  font-size: 11px;
  color: #d8d8d8;
  cursor: pointer;
}
.ps-proj:hover { background: #525252; }
.ps-proj.active {
  background: #1473e6;
  color: #ffffff;
}
.ps-proj-sw {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.45);
}
.ps-proj-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-layers { padding: 3px 0; }
.ps-layer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-family: var(--font-main);
  font-size: 11px;
  color: #d8d8d8;
  border-bottom: 1px solid #3a3a3a;
}
.ps-eye {
  font-size: 9px;
  color: #99bbdd;
}
.ps-layer-bg { color: #9a9a9a; }

/* ============================================================
   SPOTIFY media player — transport + visualiser
   ============================================================ */
.mp95-screen {
  height: 84px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
}
.mp95-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
}
.mp95-eq i {
  width: 7px;
  height: 9px;
  display: block;
  background: #1ed760;
  box-shadow: 0 0 4px rgba(30, 215, 96, 0.6);
}
.mp95-screen.playing .mp95-eq i {
  animation: mp95Eq 0.7s ease-in-out infinite alternate;
}
.mp95-eq i:nth-child(odd) { animation-delay: 0.18s; }
.mp95-eq i:nth-child(3n) { animation-delay: 0.34s; }
.mp95-eq i:nth-child(4n) { animation-delay: 0.09s; }
@keyframes mp95Eq { to { height: 100%; } }

.mp95-transport {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.mp95-btn {
  width: 32px;
  height: 24px;
  background: var(--surface);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: inset 1px 1px 0 var(--bevel-highlight), inset -1px -1px 0 var(--bevel-shadow);
  cursor: pointer;
  font-size: 11px;
}
.mp95-btn:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-shadow);
}
.mp95-progress {
  flex: 1;
  height: 14px;
  position: relative;
  cursor: pointer;
  background: var(--window-body);
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
}
.mp95-progress-fill {
  height: 100%;
  width: 0%;
  background: #1ed760;
}
.mp95-time {
  font-family: var(--font-mono);
  font-size: 11px;
  min-width: 34px;
  text-align: right;
}
.mp95-audio { display: none; }

/* ============================================================
   GMAIL — native Win95 compose form
   ============================================================ */
.gm95-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 10px 14px;
  overflow: auto;
}
.gm95-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.gm95-field label {
  width: 56px;
  flex-shrink: 0;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: bold;
}
.gm95-static {
  font-family: var(--font-main);
  font-size: 12px;
  color: #333333;
}
.gm95-input {
  flex: 1;
  height: 23px;
  padding: 2px 6px;
  font-family: var(--font-main);
  font-size: 12px;
  background: var(--window-body);
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
  outline: none;
}
.gm95-textarea {
  flex: 1;
  min-height: 110px;
  padding: 5px 6px;
  font-family: var(--font-main);
  font-size: 12px;
  background: var(--window-body);
  border: 2px solid;
  border-color: var(--bevel-shadow) var(--bevel-light) var(--bevel-light) var(--bevel-shadow);
  box-shadow: inset 1px 1px 0 var(--bevel-dark);
  outline: none;
  resize: none;
}
.gm95-formbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.gm95-send { min-width: 92px; }
.gm95-hint {
  font-family: var(--font-main);
  font-size: 10px;
  color: #666666;
}
.gm95-sink {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
}
.gm95-sent {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  padding: 24px;
  text-align: center;
  font-family: var(--font-main);
  font-size: 12px;
  color: #333333;
}
.gm95-sent-big {
  font-size: 18px;
  font-weight: bold;
  color: #1e7a34;
}
.gm95-content.sent .gm95-form { display: none; }
.gm95-content.sent .gm95-sent { display: flex; }

/* ============================================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .desktop-icons {
    flex-direction: row;
    flex-wrap: wrap;
    bottom: 36px;
    right: 8px;
    align-content: flex-start;
  }

  .win95-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 36px) !important;
    max-width: 100% !important;
    max-height: calc(100% - 36px) !important;
  }

  .taskbar-app-btn {
    max-width: 100px;
    font-size: 10px;
    padding: 2px 3px;
  }

  .start-menu,
  .sm-menu {
    left: 0;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
}

/* ============================================================
   MINECRAFT — embedded mcraft.fun
   ============================================================ */
.mc-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #0a0a0a;
  overflow: hidden;
}
.mc-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #0a0a0a;
  display: block;
}
.mc-body .win-status {
  flex-shrink: 0;
}
.mc-status {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
}

/* Loading veil — pixel grass block + retro text, fades when frame loads */
.mc-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    repeating-linear-gradient(
      45deg,
      #1d3a14 0px,
      #1d3a14 12px,
      #214415 12px,
      #214415 24px
    );
  color: #e6f5d8;
  font-family: 'Courier New', Courier, monospace;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.mc-loading.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.mc-loading-block {
  width: 56px;
  height: 56px;
  background:
    /* grass blade strip */
    linear-gradient(#5BA831, #5BA831) 0 0 / 100% 28% no-repeat,
    /* dirt body */
    linear-gradient(#8B5A2B, #8B5A2B);
  image-rendering: pixelated;
  box-shadow:
    inset 0 0 0 2px #2c2c2c,
    0 0 0 2px #2c2c2c,
    4px 4px 0 rgba(0, 0, 0, 0.55);
  animation: mcBlockBob 1.4s ease-in-out infinite;
}
@keyframes mcBlockBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.mc-loading-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #1a1a1a;
}
.mc-loading-sub {
  font-size: 11px;
  opacity: 0.85;
  letter-spacing: 0.3px;
}

/* ============================================================
   FLAPPY BIRD — embedded flappybird.io
   ============================================================ */
.fb-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #70c5ce;
  overflow: hidden;
}
.fb-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #70c5ce;
  display: block;
}
.fb-body .win-status { flex-shrink: 0; }
.fb-status {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
}

/* Loading veil — bobbing pixel bird over the sky */
.fb-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(#4ec0ca 0%, #70c5ce 60%, #ded895 100%);
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.fb-loading.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.fb-loading-bird {
  width: 48px;
  height: 36px;
  background:
    /* eye dot */
    radial-gradient(circle at 70% 30%, #000 0 4%, transparent 5%),
    /* wing */
    linear-gradient(#fff, #fff) 25% 60% / 38% 24% no-repeat,
    /* body fill */
    linear-gradient(#fada4a, #f1c40f);
  image-rendering: pixelated;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  animation: fbBirdBob 0.9s ease-in-out infinite;
}
@keyframes fbBirdBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-10px) rotate(4deg); }
}
.fb-loading-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #2a6f76;
}
.fb-loading-sub {
  font-size: 11px;
  opacity: 0.95;
  letter-spacing: 0.3px;
  text-shadow: 1px 1px 0 #2a6f76;
}

/* ============================================================
   TUTORIAL — small pink pill, top-right, opens tutorial app
   ============================================================ */
.tutorial-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  /* Sit above the desktop / icons but BELOW open windows (z-index 200+)
     so any opened app naturally covers the pill when overlapping. */
  z-index: 50;
  padding: 5px 14px;
  background: #ff69b4;
  color: #ffffff;
  font-family: var(--font-main, 'MS Sans Serif', Arial, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  /* Classic Win95 raised bevel */
  border-style: solid;
  border-width: 2px;
  border-color: #fafafa #5a5a5a #5a5a5a #fafafa;
  box-shadow: 1px 1px 0 #000000;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.tutorial-btn:hover { opacity: 1; }
.tutorial-btn:active {
  border-color: #5a5a5a #fafafa #fafafa #5a5a5a;
  box-shadow: none;
  padding: 6px 13px 4px 15px; /* press-in feel */
}
.tutorial-btn-blink { animation: tutorialBlink 4s steps(1) 1 forwards; }
.tutorial-btn-settled { opacity: 0.75; }
.tutorial-btn-settled:hover { opacity: 1; }
@keyframes tutorialBlink {
  0%   { opacity: 1;   }
  20%  { opacity: 0.2; }
  40%  { opacity: 1;   }
  60%  { opacity: 0.2; }
  80%  { opacity: 1;   }
  100% { opacity: 0.75; }
}
@media (max-width: 768px) {
  .tutorial-btn {
    font-size: 10px;
    padding: 4px 10px;
    top: 8px;
    right: 8px;
  }
}

/* Tutorial window card — friendly, readable */
.tut-body {
  background: var(--window-body, #c3c3c3);
  padding: 14px 14px 12px;
  overflow: auto;
}
.tut-card {
  background: #ffffff;
  border: 1px solid #808080;
  padding: 14px 14px 12px;
  box-shadow: inset 1px 1px 0 #ffffff, 1px 1px 0 rgba(0, 0, 0, 0.15);
}
.tut-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.tut-bang {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ff69b4;
  color: #ffffff;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.2),
              inset  2px  2px 0 rgba(255, 255, 255, 0.4);
}
.tut-title {
  font-family: var(--font-main, 'MS Sans Serif', Arial, sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: #000000;
}
.tut-sub {
  font-family: var(--font-main, 'MS Sans Serif', Arial, sans-serif);
  font-size: 11px;
  color: #555555;
  margin-top: 2px;
}
.tut-steps {
  margin: 4px 0 12px;
  padding-left: 22px;
  font-family: var(--font-main, 'MS Sans Serif', Arial, sans-serif);
  font-size: 12px;
  line-height: 1.55;
  color: #1a1a1a;
}
.tut-steps li { margin-bottom: 6px; }
.tut-steps li b { color: #000000; }
.tut-foot {
  text-align: right;
  margin-top: 4px;
}
.tut-close {
  min-width: 96px;
}
