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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  user-select: none;
}

/* ============================================================
   DESKTOP
   ============================================================ */
body {
  background-image: url('./assets/bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* ============================================================
   CRT TV EFFECT SYSTEM
   ============================================================ */

/* Barrel distortion — slight curvature like a real CRT screen */
body {
  /* We apply a very subtle perspective warp via the body itself */
}

/* The whole page content gets the CRT warp */
body > *:not(.crt-tv-frame):not(.crt-overlay):not(.crt-vignette):not(.crt-flicker):not(.crt-rgb-shift):not(.subliminal-layer) {
  /* Content sits inside the CRT "glass" */
}

/* CRT TV physical frame/bezel */
.crt-tv-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

.crt-bezel-top, .crt-bezel-bottom, .crt-bezel-left, .crt-bezel-right {
  position: absolute;
  background: #0a0a0a;
}

.crt-bezel-top {
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 60%, transparent 100%);
}

.crt-bezel-bottom {
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(0deg, #1a1a1a 0%, #0a0a0a 60%, transparent 100%);
}

.crt-bezel-left {
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(90deg, #1a1a1a 0%, #0a0a0a 60%, transparent 100%);
}

.crt-bezel-right {
  top: 0; right: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(270deg, #1a1a1a 0%, #0a0a0a 60%, transparent 100%);
}

/* Rounded CRT corners */
.crt-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 10001;
}

.crt-tl {
  top: 0; left: 0;
  background: radial-gradient(circle at 100% 100%, transparent 34px, #0c0c0c 35px);
}

.crt-tr {
  top: 0; right: 0;
  background: radial-gradient(circle at 0% 100%, transparent 34px, #0c0c0c 35px);
}

.crt-bl {
  bottom: 0; left: 0;
  background: radial-gradient(circle at 100% 0%, transparent 34px, #0c0c0c 35px);
}

.crt-br {
  bottom: 0; right: 0;
  background: radial-gradient(circle at 0% 0%, transparent 34px, #0c0c0c 35px);
}

/* Heavy CRT scanlines */
.crt-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(0, 0, 0, 0.08) 1px,
      rgba(0, 0, 0, 0.08) 2px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(0, 0, 0, 0.04) 3px,
      rgba(0, 0, 0, 0.04) 6px
    );
  animation: scanline-scroll 8s linear infinite;
}

@keyframes scanline-scroll {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 0 4px, 0 12px; }
}

/* CRT vignette — dark edges, bright center */
.crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.15) 70%,
    rgba(0, 0, 0, 0.5) 90%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

/* CRT flicker — subtle brightness oscillation */
.crt-flicker {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9996;
  background: transparent;
  animation: crt-flicker-anim 0.08s infinite;
  opacity: 0.015;
}

@keyframes crt-flicker-anim {
  0%   { background: rgba(255, 255, 255, 0.03); }
  25%  { background: transparent; }
  50%  { background: rgba(255, 255, 255, 0.01); }
  75%  { background: transparent; }
  100% { background: rgba(255, 255, 255, 0.02); }
}

/* RGB chromatic aberration — triple-layer color shift */
.crt-rgb-shift {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9995;
  mix-blend-mode: screen;
  opacity: 0.025;
  animation: rgb-shift 4s ease-in-out infinite;
}

@keyframes rgb-shift {
  0%, 100% {
    box-shadow:
      -1px 0 0 rgba(255, 0, 0, 0.3) inset,
       1px 0 0 rgba(0, 0, 255, 0.3) inset;
  }
  50% {
    box-shadow:
      -2px 0 0 rgba(255, 0, 0, 0.4) inset,
       2px 0 0 rgba(0, 0, 255, 0.4) inset,
       0 1px 0 rgba(0, 255, 0, 0.2) inset;
  }
}

/* Phosphor glow on the body */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9994;
  box-shadow:
    inset 0 0 80px rgba(120, 200, 255, 0.04),
    inset 0 0 160px rgba(120, 200, 255, 0.02);
  animation: phosphor-pulse 3s ease-in-out infinite;
}

@keyframes phosphor-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.85; }
}

/* Horizontal CRT beam line — a single bright line that slowly scrolls down */
.crt-overlay::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(180deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    rgba(200, 230, 255, 0.07),
    rgba(255, 255, 255, 0.04),
    transparent
  );
  animation: beam-sweep 6s linear infinite;
}

@keyframes beam-sweep {
  0%   { top: -3px; }
  100% { top: 100%; }
}

/* ============================================================
   SUBLIMINAL TEXT BACKDROP
   ============================================================ */
/* ─── Subliminal Text Wall ─────────────────────────────────────
   Dense scrolling wall of text with color cycling & chromatic aberration.
   Inspired by Layer2-Text effect. */
.subliminal-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

/* Three color-shifted copies for RGB channel split (chromatic aberration) */
.subliminal-col {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.subliminal-col.channel-r {
  color: rgba(255, 50, 80, 0.6);
  transform: translate(-3px, 1px);
}
.subliminal-col.channel-g {
  color: rgba(50, 255, 180, 0.6);
  transform: translate(3px, -1px);
}
.subliminal-col.channel-b {
  color: rgba(140, 80, 255, 0.6);
  transform: translate(0, 0);
}

/* The scrolling text block inside each channel — rotated for diagonal movement */
.subliminal-scroll {
  position: absolute;
  top: -100%;
  left: -50%;
  width: 300%;
  height: 400%;
  display: flex;
  gap: 18px;
  padding: 0 10px;
  box-sizing: border-box;
  transform-origin: center center;
  transform: rotate(-15deg);
  animation: subliminal-scroll-diag var(--scroll-speed, 45s) linear infinite;
  filter: blur(1.4px);
}

@keyframes subliminal-scroll-diag {
  0%   { transform: rotate(-15deg) translate(0, 0); }
  100% { transform: rotate(-15deg) translate(-20%, -50%); }
}

/* Each column of text */
.subliminal-column {
  flex: 1;
  min-width: 0;
  font-family: 'Segoe Script', 'Lucida Handwriting', 'Comic Sans MS', 'VT323', cursive;
  font-size: 22px;
  font-style: italic;
  font-weight: bold;
  line-height: 2;
  word-break: break-word;
  white-space: pre-wrap;
  user-select: none;
  pointer-events: none;
}

/* Color cycling overlay via hue-rotate animation */
.subliminal-layer {
  animation: subliminal-hue-cycle 12s linear infinite;
}

@keyframes subliminal-hue-cycle {
  0%   { filter: hue-rotate(0deg); }
  25%  { filter: hue-rotate(80deg); }
  50%  { filter: hue-rotate(180deg); }
  75%  { filter: hue-rotate(280deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Fast erratic flicker — each RGB channel flickers independently */
.subliminal-col {
  animation:
    subliminal-flicker 0.12s steps(2, jump-none) infinite,
    subliminal-drift 4s ease-in-out infinite;
}
.subliminal-col.channel-r { animation-delay: 0s, 0s; }
.subliminal-col.channel-g { animation-delay: 0.04s, 1.3s; }
.subliminal-col.channel-b { animation-delay: 0.08s, 2.6s; }

/* Rapid on/off strobe — the core flicker */
@keyframes subliminal-flicker {
  0%   { opacity: 0.7; }
  20%  { opacity: 0; }
  30%  { opacity: 0.9; }
  50%  { opacity: 0.15; }
  60%  { opacity: 0.85; }
  75%  { opacity: 0; }
  85%  { opacity: 0.6; }
  100% { opacity: 0.7; }
}

/* Slower drift gives periodic bright/dark phases so it's not constant */
@keyframes subliminal-drift {
  0%   { filter: brightness(1); }
  20%  { filter: brightness(1.4); }
  40%  { filter: brightness(0.3); }
  55%  { filter: brightness(1.2); }
  70%  { filter: brightness(0.1); }
  85%  { filter: brightness(1); }
  100% { filter: brightness(1); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .subliminal-layer {
    display: none;
  }
}

/* ============================================================
   BRANDING
   ============================================================ */
.desktop-brand {
  position: absolute;
  top: 20px;
  right: 260px;
  font-family: 'VT323', serif;
  font-size: 80px;
  color: #fff;
  text-shadow:
    0 0 12px rgba(255,255,255,0.9),
    0 0 30px rgba(255, 50, 200, 0.8),
    0 0 60px rgba(0, 255, 240, 0.5),
    2px 2px 0 rgba(0,0,0,0.5);
  letter-spacing: 4px;
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   DESKTOP ICONS
   ============================================================ */
.desktop-icons {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 2;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  width: 72px;
}

.desktop-icon .icon-img {
  font-size: 28px;
  position: relative;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.8));
}

.desktop-icon .rec-dot {
  position: absolute;
  top: -6px;
  right: -14px;
  font-size: 9px;
  color: #ff2200;
  text-shadow: 0 0 4px #ff2200;
  font-family: 'Press Start 2P', monospace;
  letter-spacing: -0.5px;
  animation: rec-blink 1s steps(1) infinite;
}
@keyframes rec-blink {
  0%, 70% { opacity: 1; }
  71%, 100% { opacity: 0; }
}

.desktop-icon span {
  font-size: 11px;
  color: #fff;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  text-align: center;
  line-height: 1.3;
}

.desktop-icon:hover .icon-img {
  filter: brightness(1.3) drop-shadow(1px 1px 0 rgba(0,0,0,0.8));
}

/* Sound Toggle */
.sound-toggle {
  position: absolute;
  bottom: 40px;
  left: 100px;
  z-index: 10;
  background: #d4d0c8;
  border: none;
  padding: 4px 10px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  cursor: pointer;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
}

.sound-toggle:active {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

/* ============================================================
   WIN98 WINDOW BASE
   ============================================================ */
.win98-window {
  position: absolute;
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.12);
  min-width: 220px;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   WIN98 TITLE BAR
   ============================================================ */
.win98-titlebar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
  flex-shrink: 0;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
}

.win98-titlebar.inactive {
  background: linear-gradient(90deg, #808080 0%, #b0b0b0 100%);
}

.win98-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  letter-spacing: 0;
}

/* Win98 title bar control buttons */
.win98-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 6px;
}

.win98-btn {
  width: 16px;
  height: 14px;
  background: #d4d0c8;
  color: #000;
  border: 1px solid #a0a0a0;
  font-size: 10px;
  font-family: Tahoma, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  border-top-color: #e0e0e0;
  border-left-color: #e0e0e0;
  border-right-color: #808080;
  border-bottom-color: #808080;
}

.win98-btn:active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #e0e0e0;
  border-bottom-color: #e0e0e0;
}

/* ============================================================
   MENU BAR
   ============================================================ */
.win98-menubar {
  background: #d4d0c8;
  padding: 2px 4px;
  display: flex;
  gap: 8px;
  font-size: 11px;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}

.win98-menubar span {
  padding: 1px 4px;
  cursor: default;
}

.win98-menubar span:hover {
  background: #000080;
  color: #fff;
}

/* ============================================================
   WIN98 GENERIC BUTTON
   ============================================================ */
.win98-button {
  background: #d4d0c8;
  color: #000;
  border: none;
  padding: 4px 14px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  cursor: pointer;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  min-width: 70px;
}

.win98-button:active {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

/* ============================================================
   BUDDY LIST WINDOW
   ============================================================ */
.window-buddylist {
  width: 240px;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% - 180px), -50%);
}

/* Player */
.buddy-player {
  background: #000;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 2px solid #404040;
}

.player-art-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}

.player-art {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  cursor: pointer;
  letter-spacing: 1px;
  white-space: nowrap;
}

.play-overlay:hover {
  background: rgba(0, 128, 255, 0.8);
}

.play-overlay.hidden {
  display: none;
}

.player-controls {
  background: #d4d0c8;
  width: 100%;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid #808080;
}

.ctrl-btn {
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  font-family: Tahoma, Arial, sans-serif;
  white-space: nowrap;
}

.ctrl-btn:active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.ctrl-play {
  font-weight: bold;
  min-width: 52px;
}

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.vol-label {
  font-size: 10px;
  color: #333;
}

.vol-slider {
  width: 60px;
  height: 16px;
  cursor: pointer;
  accent-color: #000080;
}

.player-status {
  background: #000;
  color: #00ff00;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 2px 6px;
  width: 100%;
  border-top: 1px solid #333;
}

/* Fullscreen Audio Visualizer */
.viz-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  cursor: pointer;
}

.viz-fullscreen canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viz-track-info {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 18px;
  color: rgba(255, 113, 206, 0.7);
  text-shadow: 0 0 10px rgba(1, 205, 254, 0.5);
  pointer-events: none;
  transition: opacity 0.5s;
}

.viz-exit-hint {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
}

/* Visualizer audio controls bar */
.viz-controls {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 10;
}
.viz-fullscreen:hover .viz-controls {
  opacity: 1;
  pointer-events: auto;
}
.viz-ctrl-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.2s, transform 0.15s;
}
.viz-ctrl-btn:hover { color: #01cdfe; transform: scale(1.15); }
.viz-ctrl-btn:active { transform: scale(0.95); }
.viz-ctrl-play { font-size: 28px; }
.viz-ctrl-vol {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.viz-ctrl-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff71ce;
  cursor: pointer;
}
.viz-ctrl-vol::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff71ce;
  cursor: pointer;
  border: none;
}
.viz-ctrl-src {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 12px;
  color: rgba(255, 113, 206, 0.6);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shader canvas (same fullscreen positioning as Butterchurn canvas) */
#shaderCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Mode toggle buttons */
.viz-mode-toggle {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 12;
}
.viz-fullscreen:hover .viz-mode-toggle {
  opacity: 1;
  pointer-events: auto;
}
.viz-mode-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 17px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.viz-mode-btn:hover { color: rgba(255, 255, 255, 0.8); }
.viz-mode-btn.active {
  background: rgba(255, 113, 206, 0.3);
  color: #ff71ce;
  box-shadow: 0 0 12px rgba(255, 113, 206, 0.2);
}

/* Scene cycle button in controls */
.viz-ctrl-scene {
  font-size: 18px !important;
}

.viz-preset-label {
  position: absolute;
  top: 16px;
  left: 20px;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-shadow: 0 0 8px rgba(1, 205, 254, 0.4);
  pointer-events: none;
  transition: opacity 1.5s ease;
  opacity: 0;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Visualizer mini-notification */
.viz-mini-notif {
  position: fixed;
  bottom: 38px;
  right: 236px;
  width: 220px;
  background: #d4d0c8;
  border: 2px outset #fff;
  box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #fff;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  color: #000;
  z-index: 9500;
  display: none;
}

.viz-launch-btn {
  background: #d4d0c8;
  border: 2px outset #fff;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 10px;
  padding: 2px 10px;
  cursor: pointer;
}
.viz-launch-btn:active { border-style: inset; }

/* Buddy tabs */
.buddy-tabs {
  display: flex;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
  padding-top: 4px;
  padding-left: 4px;
  gap: 1px;
}

.buddy-tab {
  background: #d4d0c8;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #808080;
  border-bottom: none;
  padding: 2px 10px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  margin-bottom: -1px;
  color: #000;
  position: relative;
}

.buddy-tab.active {
  background: #d4d0c8;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 1px solid #808080;
  font-weight: bold;
  z-index: 1;
  padding-bottom: 3px;
}

/* Live indicator on Online tab */
.buddy-tab.live-indicator::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff0000;
  box-shadow: 0 0 4px #ff0000;
  animation: tab-live-pulse 1s ease-in-out infinite;
}

@keyframes tab-live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #ff0000; }
  50% { opacity: 0.3; box-shadow: 0 0 8px #ff0000; }
}

/* Tab content */
.buddy-tab-content {
  background: #fff;
  flex: 1;
  overflow-y: auto;
  padding: 4px;
  border-top: 1px solid #404040;
  min-height: 80px;
}

.buddy-group-header {
  background: #d4d0c8;
  font-weight: bold;
  font-size: 11px;
  padding: 2px 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid #808080;
  cursor: pointer;
}

.buddy-list-items {
  list-style: none;
  padding: 0;
}

.buddy-item {
  padding: 1px 8px;
  font-size: 11px;
  cursor: pointer;
}

.buddy-item:hover {
  background: #000080;
  color: #fff;
}

.buddy-name.blue { color: #0000cc; }
.buddy-name.red { color: #990000; }
.buddy-name.green { color: #006600; }

.buddy-item:hover .buddy-name { color: #fff !important; }

.track-list {
  padding: 2px 4px;
}

.track-item {
  padding: 2px 4px;
  font-size: 11px;
  cursor: pointer;
  color: #333;
}

.track-item:hover {
  background: #000080;
  color: #fff;
}

.track-item.active {
  color: #000080;
  font-weight: bold;
}

.no-requests {
  color: #666;
  font-style: italic;
  font-size: 11px;
  padding: 6px 8px;
  text-align: center;
}

.request-art-wrap {
  display: flex;
  justify-content: center;
  padding: 8px;
}

.request-art {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 2px solid #808080;
}

/* ============================================================
   INSTANT MESSAGE WINDOW
   ============================================================ */
.window-im {
  width: 340px;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + 130px), -50%);
}

/* Info bar */
.im-infobar {
  background: #ffffc0;
  border-bottom: 1px solid #e0e000;
  padding: 3px 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.im-infobar-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  color: #666;
  padding: 0 2px;
  line-height: 1;
}

.im-infobar-close:hover { color: #000; }

/* Chat area */
.im-chat {
  background: #fff;
  height: 200px;
  overflow-y: auto;
  padding: 6px 8px;
  border-top: 1px solid #404040;
  border-bottom: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #ffffff;
  margin: 4px 4px 0;
  font-size: 12px;
  line-height: 1.5;
}

.chat-system {
  color: #666;
  font-style: italic;
  text-align: center;
  margin: 3px 0;
  font-size: 11px;
}

.chat-msg {
  margin: 2px 0;
  word-wrap: break-word;
  font-size: 12px;
  color: #000;
}

.chat-user {
  font-weight: bold;
}

.chat-user.blue { color: #0000cc; }
.chat-user.red { color: #990000; }
.chat-user.purple { color: #660099; }

/* Formatting toolbar */
.im-toolbar {
  background: #d4d0c8;
  padding: 3px 4px;
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #808080;
  margin: 0 4px;
  flex-shrink: 0;
}

.fmt-btn {
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  padding: 1px 5px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  min-width: 20px;
}

.fmt-btn:active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.fmt-btn.active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: #c0c0c0;
}

/* Input area */
.im-input-area {
  margin: 0 4px;
  flex-shrink: 0;
}

.im-input {
  width: 100%;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  padding: 4px 6px;
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  resize: none;
  outline: none;
  background: #fff;
  color: #000;
  line-height: 1.4;
}

.im-send-bar {
  display: flex;
  justify-content: flex-end;
  padding: 4px 6px;
  gap: 4px;
  flex-shrink: 0;
}

/* ============================================================
   TIPS.exe WINDOW
   ============================================================ */
.window-tips {
  width: 240px;
  top: 60px;
  right: 20px;
  left: auto;
}

/* Tips crypto tabs */
.tips-tabs {
  display: flex;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
  padding-top: 4px;
  padding-left: 4px;
  gap: 1px;
}

.tips-tab {
  background: #d4d0c8;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #808080;
  border-bottom: none;
  padding: 3px 8px;
  font-size: 10px;
  font-family: Tahoma, Arial, sans-serif;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: -1px;
  color: #000;
  position: relative;
  white-space: nowrap;
}

.tips-tab.active {
  background: #d4d0c8;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 1px solid #808080;
  z-index: 1;
  padding-bottom: 4px;
}

.tips-tab-content {
  flex: 1;
  overflow-y: auto;
}

.tips-body {
  background: #d4d0c8;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.tips-network-label {
  font-size: 11px;
  font-weight: bold;
  color: #000080;
  text-align: center;
}

.tips-compat-networks {
  background: #fffff0;
  border: 1px solid #e0e0a0;
  padding: 4px 6px;
  font-size: 9px;
  color: #444;
  text-align: center;
  line-height: 1.4;
  border-radius: 0;
}

.tips-compat-networks strong {
  color: #000080;
}

.qr-wrap {
  display: flex;
  justify-content: center;
}

.qr-container {
  position: relative;
  width: 160px;
  height: 160px;
  border: 3px solid #808080;
  border-top: 3px solid #404040;
  border-left: 3px solid #404040;
  background: #fff;
}

.qr-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.crypto-logo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  font-family: Arial, sans-serif;
}

.tips-address {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 13px;
  color: #333;
  text-align: center;
  cursor: default;
  letter-spacing: 0.5px;
}

.tips-copy-btn {
  background: #d4d0c8;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 3px 10px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.tips-copy-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.tips-copy-btn.copied {
  color: #006600;
}

.tips-footer {
  background: #d4d0c8;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #808080;
  flex-shrink: 0;
}

.tips-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  cursor: pointer;
}

/* ============================================================
   PARENTAL ADVISORY
   ============================================================ */
.parental-advisory {
  position: absolute;
  bottom: 48px;
  right: 20px;
  z-index: 5;
}

.pa-inner {
  background: #000;
  color: #fff;
  border: 4px solid #fff;
  outline: 4px solid #000;
  padding: 10px 14px;
  text-align: center;
  width: 160px;
}

.pa-top {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.2;
}

.pa-middle {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.2;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  margin: 4px 0;
  padding: 3px 0;
}

.pa-bottom {
  font-size: 8px;
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 1px;
  line-height: 1.4;
}

/* ============================================================
   TASKBAR
   ============================================================ */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  z-index: 1000;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.15);
}

.start-btn {
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  padding: 2px 8px;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
}

.start-btn:active {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.start-logo {
  font-size: 14px;
}

.taskbar-divider {
  width: 2px;
  height: 24px;
  background: #808080;
  border-right: 1px solid #fff;
  margin: 0 3px;
}

.taskbar-windows {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}

.taskbar-win-btn {
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  padding: 2px 8px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  cursor: pointer;
  height: 24px;
  min-width: 100px;
  max-width: 150px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-win-btn.active {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: #c0c0c0;
}

.taskbar-win-btn.minimized {
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  background: #d4d0c8;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 0 4px;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  height: 24px;
  gap: 8px;
}

.tray-clock {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  white-space: nowrap;
}

/* ============================================================
   START MENU
   ============================================================ */
.start-menu {
  position: fixed;
  bottom: 32px;
  left: 0;
  width: 200px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  z-index: 2000;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.35);
}

.start-menu-header {
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #fff;
  padding: 8px 8px 8px 12px;
  font-weight: bold;
  font-family: 'VT323', monospace;
  font-size: 22px;
  letter-spacing: 2px;
}

.start-menu-items {
  list-style: none;
  padding: 2px 0;
}

.start-menu-items li {
  padding: 4px 12px;
  font-size: 11px;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 8px;
}

.start-menu-items li:hover {
  background: #000080;
  color: #fff;
}

.start-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.start-separator {
  height: 1px;
  background: #808080;
  margin: 2px 4px;
  border-bottom: 1px solid #ffffff;
  padding: 0 !important;
}

.start-separator:hover {
  background: #808080 !important;
}

/* ============================================================
   CASCADING START SUBMENUS
   ============================================================ */
.has-submenu {
  position: relative;
}

.submenu-arrow {
  margin-left: auto;
  font-size: 10px;
}

.start-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  width: 180px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.35);
  list-style: none;
  padding: 2px 0;
  z-index: 2001;
}

.start-submenu li {
  padding: 4px 12px;
  font-size: 11px;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.start-submenu li:hover {
  background: #000080;
  color: #fff;
}

.has-submenu:hover > .start-submenu {
  display: block;
}

/* ============================================================
   GAME WINDOWS
   ============================================================ */
.window-snake {
  width: 332px;
}

.window-breakout {
  width: 372px;
}

.window-minesweeper {
  width: auto;
}

.game-canvas-wrap {
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  line-height: 0;
}

.game-canvas-wrap canvas {
  display: block;
}

.game-statusbar {
  background: #d4d0c8;
  padding: 2px 6px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  border-top: 1px solid #808080;
  min-height: 18px;
}

.game-menubar span {
  cursor: default;
}

/* Snake touch D-pad (hidden on desktop, shown on mobile via media query) */
.snake-touch-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  background: #d4d0c8;
  border-top: 1px solid #fff;
}
.snake-dpad-row {
  display: flex;
  gap: 2px;
}
.snake-dpad-btn {
  width: 44px;
  height: 38px;
  font-size: 16px;
  background: #d4d0c8;
  border: 2px outset #fff;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.snake-dpad-btn:active {
  border-style: inset;
  background: #c0bdb5;
}

/* ============================================================
   MINESWEEPER SPECIFIC
   ============================================================ */
.ms-header {
  background: #d4d0c8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-bottom: 2px solid #808080;
  border-top: 2px solid #404040;
  margin: 4px;
  border-left: 2px solid #404040;
  border-right: 2px solid #808080;
  background: #c0c0c0;
}

.ms-counter {
  background: #000;
  color: #ff0000;
  font-family: 'VT323', monospace;
  font-size: 24px;
  padding: 2px 4px;
  min-width: 42px;
  text-align: center;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  letter-spacing: 2px;
}

.ms-smiley {
  width: 28px;
  height: 28px;
  background: #d4d0c8;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.ms-smiley:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.ms-board {
  display: grid;
  grid-template-columns: repeat(9, 20px);
  grid-template-rows: repeat(9, 20px);
  gap: 0;
  margin: 0 4px 4px 4px;
  padding: 0;
  border-top: 3px solid #808080;
  border-left: 3px solid #808080;
  border-right: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  background: #c0c0c0;
}

.ms-cell {
  width: 20px;
  height: 20px;
  background: #d4d0c8;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  user-select: none;
  padding: 0;
  line-height: 1;
}

.ms-cell.revealed {
  border: 1px solid #808080;
  background: #c0c0c0;
  cursor: default;
}

.ms-cell.mine-exploded {
  background: #ff0000;
  border: 1px solid #808080;
}

.ms-cell .num-1 { color: #0000ff; }
.ms-cell .num-2 { color: #008000; }
.ms-cell .num-3 { color: #ff0000; }
.ms-cell .num-4 { color: #000080; }
.ms-cell .num-5 { color: #800000; }
.ms-cell .num-6 { color: #008080; }
.ms-cell .num-7 { color: #000000; }
.ms-cell .num-8 { color: #808080; }

/* ============================================================
   SCROLLBARS — Win98 style
   ============================================================ */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: #d4d0c8;
}

::-webkit-scrollbar-thumb {
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
}

::-webkit-scrollbar-button {
  background: #d4d0c8;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  height: 16px;
  width: 16px;
}

/* ============================================================
   WINDOW DRAGGING
   ============================================================ */
.win98-window.dragging {
  opacity: 0.9;
  z-index: 500 !important;
}

.win98-window.focused {
  z-index: 200;
}

/* ============================================================
   RESPONSIVE (mobile)
   ============================================================ */
/* ============================================================
   MOBILE RESPONSIVE — max-width: 1024px + .mobile class fallback
   ============================================================ */
@media (max-width: 1024px), (pointer: coarse) {

/* Also triggered by body.mobile class added via JS */

  /* ── Body & Layout ────────────────────────────────────────── */
  body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Desktop Brand ────────────────────────────────────────── */
  .desktop-brand {
    font-size: 28px;
    top: 6px;
    right: 6px;
    opacity: 0.5;
  }

  /* ── Desktop Icons — hide on mobile (use Start menu instead) ─── */
  .desktop-icons {
    display: none;
  }

  /* ── Win98 Windows — full width, stacked ──────────────────── */
  .win98-window {
    position: static !important;
    width: calc(100% - 8px) !important;
    max-width: 100vw !important;
    margin: 4px auto !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
  }

  /* A little top margin for the first window */
  .win98-window:first-of-type {
    margin-top: 8px !important;
  }

  /* ── Buddy List ───────────────────────────────────────────── */
  .window-buddylist {
    width: calc(100% - 8px) !important;
    height: auto !important;
    max-height: 350px;
  }
  .buddy-list-body {
    max-height: 200px;
    overflow-y: auto;
  }

  /* ── IM Window ────────────────────────────────────────────── */
  .window-im {
    width: calc(100% - 8px) !important;
    height: auto !important;
    max-height: 60vh;
  }
  .im-chatlog {
    max-height: 150px;
    min-height: 80px;
  }

  /* ── Tips Window ──────────────────────────────────────────── */
  .window-tips {
    width: calc(100% - 8px) !important;
  }

  /* ── Forum / BBS Window ──────────────────────────────────── */
  .window-forum {
    width: calc(100% - 8px) !important;
    height: auto !important;
    max-height: 70vh;
  }
  .forum-col-replies,
  .forum-col-last {
    display: none;
  }

  /* ── Leaderboard Window ──────────────────────────────────── */
  .window-leaderboard {
    width: calc(100% - 8px) !important;
  }

  /* ── Game Windows ─────────────────────────────────────────── */
  .window-snake,
  .window-breakout,
  .window-minesweeper {
    width: calc(100% - 8px) !important;
  }
  .game-canvas-wrap {
    overflow: hidden;
  }
  .game-canvas-wrap canvas {
    max-width: 100%;
    height: auto;
  }

  /* ── Parental Advisory ───────────────────────────────────── */
  .parental-advisory {
    position: static;
    margin: 4px auto;
    transform: none;
  }

  /* ── Sound Toggle ────────────────────────────────────────── */
  .sound-toggle {
    position: static;
    display: block;
    margin: 4px auto;
    z-index: auto;
  }

  /* ── Taskbar ──────────────────────────────────────────────── */
  .taskbar {
    position: fixed;
    bottom: 0;
    z-index: 9998;
    height: 36px;
  }
  .taskbar-win-btn {
    max-width: 60px;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 4px;
  }
  .taskbar-clock {
    font-size: 10px;
    padding: 0 4px;
    white-space: nowrap;
  }
  .start-btn {
    padding: 2px 6px;
    font-size: 11px;
    min-width: auto;
  }
  /* Hide long taskbar button labels on small screens */
  .taskbar-win-btns {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  /* ── Notifications — stack vertically ─────────────────────── */
  .games-mini-notif,
  .viz-mini-notif {
    position: fixed;
    left: 4px;
    right: 4px;
    width: auto !important;
    max-width: none;
  }
  .games-mini-notif {
    bottom: 40px;
    z-index: 9600;
  }
  .viz-mini-notif {
    bottom: 142px;
    z-index: 9600;
  }

  /* ── Leaderboard Prompt ──────────────────────────────────── */
  .lb-prompt {
    width: 90%;
    max-width: 300px;
  }

  /* ── Visualizer — touch-friendly controls ─────────────────── */
  .viz-controls {
    opacity: 1 !important;
    pointer-events: auto !important;
    bottom: 60px;
    padding: 10px 16px;
    gap: 16px;
  }
  .viz-ctrl-btn {
    font-size: 26px;
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .viz-ctrl-play {
    font-size: 32px;
  }
  .viz-ctrl-vol {
    width: 60px;
  }
  .viz-ctrl-src {
    display: none;
  }

  /* Mode toggle — always visible on mobile */
  .viz-mode-toggle {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .viz-mode-btn {
    padding: 7px 12px;
    font-size: 12px;
    -webkit-tap-highlight-color: transparent;
  }

  .viz-track-info {
    bottom: 110px;
    font-size: 14px;
  }
  .viz-exit-hint {
    font-size: 9px;
    top: auto;
    bottom: 28px;
    right: 0;
    left: 0;
    text-align: center;
    color: rgba(255,255,255,0.25);
  }
  .viz-preset-label {
    top: 48px;
    left: 12px;
    font-size: 11px;
  }

  /* ── Sign-On Overlay ─────────────────────────────────────── */
  .sign-on-overlay {
    padding: 16px;
    align-items: center;
  }

  /* ── AIM Window on mobile ────────────────────────────────── */
  .aim-window {
    width: 92% !important;
    max-width: 280px;
  }

  /* ── Scanner text ────────────────────────────────────────── */
  .scanner-text {
    font-size: 10px;
  }

  /* ── CRT effects — lighten on mobile for performance ─────── */
  .crt-overlay,
  .crt-flicker,
  .crt-rgb-shift {
    display: none;
  }

  /* Ensure windows have padding at bottom for taskbar + quickbar */
  body::after {
    content: '';
    display: block;
    height: 130px;
  }

  /* ── Snake touch controls ────────────────────────────────── */
  .snake-touch-controls {
    display: flex !important;
  }

  /* ── Hide the old floating notifications on mobile ───────── */
  .games-mini-notif,
  .viz-mini-notif {
    display: none !important;
  }

  /* ── Mobile Quick-Access Bar ─────────────────────────────── */
  .mobile-quickbar {
    display: flex !important;
  }
}

/* ── JS-based .mobile class duplicates the same rules ─────── */
body.mobile .win98-window {
  position: static !important;
  width: calc(100% - 8px) !important;
  max-width: 100vw !important;
  margin: 4px auto !important;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
}
body.mobile .desktop-icons { display: none; }
body.mobile .desktop-brand { font-size: 28px; top: 6px; right: 6px; opacity: 0.5; }
body.mobile .games-mini-notif,
body.mobile .viz-mini-notif { display: none !important; }
body.mobile .mobile-quickbar { display: flex !important; }
body.mobile .viz-controls { opacity: 1 !important; pointer-events: auto !important; }
body.mobile .viz-mode-toggle { opacity: 1 !important; pointer-events: auto !important; }
body.mobile .snake-touch-controls { display: flex !important; }
body.mobile .crt-overlay,
body.mobile .crt-flicker,
body.mobile .crt-rgb-shift { display: none; }
body.mobile { overflow-y: auto; overflow-x: hidden; height: auto; }

/* ============================================================
   MOBILE QUICK-ACCESS BAR
   Replaces floating notifications — sits above taskbar
   ============================================================ */
.mobile-quickbar {
  display: none; /* shown via media query or .mobile class */
  position: fixed;
  bottom: 36px;
  left: 0;
  right: 0;
  z-index: 9700;
  background: #d4d0c8;
  border-top: 2px outset #fff;
  padding: 4px 6px;
  gap: 3px;
  align-items: stretch;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
}
.mqb-section {
  flex: 1;
  background: #d4d0c8;
  border: 1px inset #808080;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mqb-section-title {
  font-weight: bold;
  font-size: 10px;
  color: #000080;
  text-align: center;
  border-bottom: 1px solid #808080;
  padding-bottom: 2px;
  margin-bottom: 1px;
}
.mqb-btn {
  background: #d4d0c8;
  border: 2px outset #fff;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 10px;
  padding: 4px 6px;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
  color: #000;
}
.mqb-btn:active {
  border-style: inset;
  background: #c0bdb5;
}
.mqb-btn-viz {
  background: linear-gradient(180deg, #d4d0c8 0%, #c8c0d8 100%);
}
.mqb-games-row {
  display: flex;
  gap: 2px;
}
.mqb-games-row .mqb-btn {
  flex: 1;
  font-size: 9px;
  padding: 4px 2px;
}

/* (quickbar + taskbar bottom padding already in main mobile media query) */
body.mobile::after {
  content: '';
  display: block;
  height: 130px;
}

/* ============================================================
   FORUM / BBS WINDOW
   ============================================================ */
.window-forum {
  width: 500px;
  height: 420px;
}

.forum-body {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  border: 2px inset #808080;
  margin: 2px;
}

/* Thread List View */
.forum-thread-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.forum-header-row {
  display: flex;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.forum-header-row span {
  padding: 3px 6px;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #404040;
  border-top: 1px solid #fff;
  background: #d4d0c8;
}

.forum-col-subject { flex: 2; min-width: 0; }
.forum-col-author { flex: 1; min-width: 0; }
.forum-col-replies { width: 52px; flex-shrink: 0; text-align: center; }
.forum-col-last { flex: 1; min-width: 0; }

.forum-thread-rows {
  flex: 1;
  overflow-y: auto;
}

.forum-thread-row {
  display: flex;
  font-size: 11px;
  cursor: pointer;
  border-bottom: 1px solid #e0e0e0;
}

.forum-thread-row:nth-child(even) {
  background: #f0f0f0;
}

.forum-thread-row:nth-child(odd) {
  background: #fff;
}

.forum-thread-row:hover {
  background: #000080;
  color: #fff;
}

.forum-thread-row span {
  padding: 3px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background: #d4d0c8;
  border-top: 1px solid #808080;
  flex-shrink: 0;
}

.forum-thread-count {
  font-size: 11px;
  color: #444;
}

/* Thread View */
.forum-thread-view {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.forum-back-link {
  padding: 4px 8px;
  font-size: 11px;
  color: #0000cc;
  cursor: pointer;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}

.forum-back-link:hover {
  text-decoration: underline;
}

.forum-thread-title {
  font-size: 12px;
  font-weight: bold;
  padding: 6px 8px 4px;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}

.forum-posts {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.forum-post {
  background: #fff;
  border: 1px solid #808080;
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  margin-bottom: 4px;
  padding: 4px 6px;
}

.forum-post-author {
  font-weight: bold;
  font-size: 11px;
}

.forum-post-time {
  font-size: 10px;
  color: #888;
  margin-left: 8px;
}

.forum-post-text {
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.4;
  color: #000;
  word-wrap: break-word;
}

/* Reply / New Thread Form */
.forum-reply-section {
  background: #d4d0c8;
  border-top: 1px solid #808080;
  padding: 6px;
  flex-shrink: 0;
}

.forum-reply-section label {
  font-size: 11px;
  display: block;
  margin-bottom: 2px;
}

.forum-input {
  width: 100%;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  padding: 2px 4px;
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  background: #fff;
  color: #000;
  outline: none;
  margin-bottom: 4px;
}

.forum-textarea {
  width: 100%;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  padding: 2px 4px;
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  background: #fff;
  color: #000;
  outline: none;
  resize: none;
  margin-bottom: 4px;
  height: 50px;
}

.forum-btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

/* New Thread View */
.forum-new-thread {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.forum-new-thread .forum-reply-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.forum-new-thread .forum-textarea {
  flex: 1;
  height: auto;
  min-height: 60px;
}

/* AIM-era name colors */
.forum-name-blue { color: #0000cc; }
.forum-name-red { color: #990000; }
.forum-name-green { color: #006600; }
.forum-name-purple { color: #660099; }

/* ── Discord OAuth / Auth Bar ─────────────────────────── */
.forum-auth-bar {
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 11px;
}

.forum-auth-bar .auth-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.forum-auth-bar .auth-status .discord-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #808080;
  flex-shrink: 0;
}

.forum-auth-bar .auth-username {
  font-weight: bold;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forum-auth-bar .auth-display-name {
  color: #444;
  font-style: italic;
  white-space: nowrap;
}

.discord-login-btn {
  background: #5865F2;
  color: #fff;
  border: 2px outset #7983f5;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.discord-login-btn:hover {
  background: #4752c4;
}

.discord-login-btn:active {
  border-style: inset;
}

.discord-login-btn .discord-icon {
  width: 14px;
  height: 14px;
}

.forum-auth-logout {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 10px;
  background: #d4d0c8;
  border: 1px outset #fff;
  cursor: pointer;
  padding: 1px 6px;
  color: #444;
  flex-shrink: 0;
}

.forum-auth-logout:hover {
  color: #000;
}

.forum-auth-logout:active {
  border-style: inset;
}

/* ── Login Gate Overlay ─────────────────────────────────── */
.forum-login-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 10px;
  text-align: center;
}

.forum-login-gate .gate-icon {
  font-size: 28px;
  opacity: 0.6;
}

.forum-login-gate .gate-text {
  font-size: 11px;
  color: #444;
  line-height: 1.5;
}

.forum-login-gate .discord-login-btn {
  font-size: 12px;
  padding: 4px 14px;
}

/* ── Display Name Picker ────────────────────────────────── */
.forum-name-picker {
  background: #ece9d8;
  border: 2px outset #fff;
  padding: 8px;
  margin-bottom: 6px;
}

.forum-name-picker .picker-title {
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 6px;
}

.forum-name-picker .picker-options {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}

.forum-name-picker label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.forum-name-picker label input[type="radio"] {
  margin: 0;
}

.forum-name-picker .custom-name-input {
  width: 140px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  padding: 1px 3px;
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  background: #fff;
  margin-left: 2px;
}

.forum-name-picker .custom-name-input:disabled {
  background: #d4d0c8;
  color: #888;
}

.forum-name-picker .picker-save-btn {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  padding: 2px 12px;
}

/* Pinned forum threads */
.forum-thread-pinned {
  background: #ffffdd !important;
  border-left: 3px solid #cc8800 !important;
}
.forum-thread-pinned:hover {
  background: #fff8cc !important;
}

/* ============================================================
   AIM SIGN-ON SCREEN (desktop window, not full overlay)
   ============================================================ */
.sign-on-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg,
      #1a0033 0%,
      #2d1b69 18%,
      #5b2d8e 32%,
      #8b3a9f 45%,
      #c74baf 55%,
      #e06bba 62%,
      #e888c8 70%,
      #c98dd7 78%,
      #7ecde6 88%,
      #3be5f0 100%
    );
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

/* ── AIM Sign-On Window ────────────────────────────────────── */
.aim-window {
  background: #d4d0c8;
  border: 2px outset #d4d0c8;
  box-shadow:
    1px 1px 0 #808080,
    2px 2px 8px rgba(0,0,0,0.55);
  width: 240px;
  display: flex;
  flex-direction: column;
  font-family: Tahoma, Arial, sans-serif;
}

/* Title bar — Windows XP blue gradient like mashpit.live */
.aim-title-bar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 3px;
  height: 18px;
}

.aim-title-text {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  padding-left: 2px;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.aim-title-controls {
  display: flex;
  gap: 1px;
}

.aim-title-btn {
  width: 16px;
  height: 14px;
  background: #d4d0c8;
  border: 1px outset #d4d0c8;
  font-size: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #000;
}
.aim-title-btn:active {
  border-style: inset;
}

/* Banner */
.aim-login-banner {
  border-bottom: 1px solid #808080;
  line-height: 0;
}
.aim-login-banner img {
  width: 100%;
  display: block;
}

/* Form body */
.aim-login-form {
  padding: 10px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.aim-field {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.aim-label {
  font-size: 11px;
  color: #000;
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 2px;
}

.aim-label-icon {
  font-size: 11px;
}

/* Combo input (text + dropdown arrow) */
.aim-combo {
  display: flex;
  align-items: center;
  background: #fff;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #404040;
  height: 20px;
}

.aim-combo-key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 10px;
  flex-shrink: 0;
  padding-left: 2px;
}

.aim-combo-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  padding: 1px 2px;
  background: transparent;
  color: #000;
  height: 100%;
}

.aim-combo-dropdown {
  width: 16px;
  height: 100%;
  background: #d4d0c8;
  border: 1px outset #d4d0c8;
  font-size: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #000;
  flex-shrink: 0;
}
.aim-combo-dropdown:active {
  border-style: inset;
}

/* Password input */
.aim-password-input {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  padding: 1px 4px;
  height: 20px;
  box-sizing: border-box;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #404040;
  background: #fff;
  color: #000;
  outline: none;
}
.aim-password-input:disabled {
  background: #e8e8e8;
  color: #888;
}

/* Plain text links (not styled as hyperlinks — matches reference) */
.aim-text-link {
  font-size: 10px;
  font-family: Tahoma, Arial, sans-serif;
  color: #000;
  cursor: default;
  margin-top: 1px;
}

/* Checkboxes */
.aim-checkboxes {
  display: flex;
  gap: 12px;
  padding: 3px 0 0;
}
.aim-check {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: #000;
  cursor: default;
}

/* Running man sign-on button */
.aim-signon-image-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  transition: filter 0.1s;
}
.aim-signon-image-btn img {
  width: 64px;
  height: auto;
  display: block;
  image-rendering: pixelated;
}
.aim-signon-image-btn:hover {
  filter: brightness(1.15);
}
.aim-signon-image-btn:active {
  filter: brightness(0.9);
}

/* Footer — Help/Setup left, Sign On button right */
.aim-footer {
  background: #d4d0c8;
  border-top: 1px solid #fff;
  padding: 6px 10px 6px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.aim-footer-left {
  display: flex;
  gap: 10px;
}

.aim-footer-right {
  display: flex;
  align-items: flex-end;
}

.aim-footer-icon-btn {
  background: none;
  border: none;
  font-family: Tahoma, Arial, sans-serif;
  color: #000;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 2px 4px;
}
.aim-footer-icon-btn:hover {
  text-decoration: underline;
}
.aim-footer-icon {
  font-size: 20px;
  line-height: 1;
}
.aim-footer-icon-label {
  font-size: 9px;
}

/* Bottom bar — Discord + version */
.aim-bottom-bar {
  background: #d4d0c8;
  border-top: 1px solid #808080;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Discord button — small, subtle */
.aim-discord-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #d4d0c8;
  color: #5865f2;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 6px;
  border: 1px outset #d4d0c8;
  cursor: pointer;
  border-radius: 0;
}
.aim-discord-btn:hover {
  background: #e8e4dc;
  color: #4752c4;
}
.aim-discord-btn:active {
  border-style: inset;
}
.aim-discord-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.aim-version {
  font-size: 9px;
  color: #666;
  font-style: italic;
}

/* During sign-on: hide desktop, show only sign-on overlay */
body.signed-off .desktop-icons,
body.signed-off .desktop-brand,
body.signed-off .sound-toggle,
body.signed-off .win98-window,
body.signed-off .taskbar,
body.signed-off .start-menu,
body.signed-off .parental-advisory,
body.signed-off .games-mini-notif,
body.signed-off .viz-mini-notif {
  display: none;
}
body.signed-off .mobile-quickbar {
  display: none !important;
}

body.signed-off .sign-on-overlay {
  visibility: visible;
}

/* ============================================================
   PLAYLIST NUMBERED LIST (Buddy List Offline/Playlist tab)
   ============================================================ */
.playlist-header {
  background: #d4d0c8;
  font-weight: bold;
  font-size: 11px;
  padding: 2px 6px;
  margin-bottom: 0;
  border-bottom: 1px solid #808080;
  cursor: pointer;
}

.playlist-numbered {
  background: #fff;
  padding: 2px 0;
}

.playlist-entry {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  color: #000;
  line-height: 1.5;
}

.playlist-entry:hover {
  background: #000080;
  color: #fff;
}

.playlist-num {
  width: 26px;
  flex-shrink: 0;
  font-weight: bold;
  color: #666;
  font-size: 10px;
}

.playlist-entry:hover .playlist-num {
  color: #ccc;
}

.playlist-name {
  flex: 1;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-info {
  flex-shrink: 0;
  margin-left: 4px;
  font-size: 12px;
  color: #999;
  cursor: pointer;
}

.playlist-entry:hover .playlist-info {
  color: #fff;
}

/* Live stream status indicator */
.live-stream-status {
  padding: 6px 8px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
}
.live-stream-status:hover {
  background: #e0e0f0;
}
.live-dot {
  font-size: 10px;
  color: #999;
}
.live-dot.live-active {
  color: #ff0000;
  animation: live-pulse 1s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.live-dot.live-offline {
  color: #999;
}

/* Active/playing track in playlist */
.playlist-entry.playlist-active {
  background: #000080;
  color: #fff;
}
.playlist-entry.playlist-active .playlist-num {
  color: #aac;
}
.playlist-entry.playlist-active .playlist-info {
  color: #7f7;
}

/* Shuffle button */
.ctrl-shuffle {
  font-size: 12px !important;
  padding: 0 4px !important;
}
.ctrl-shuffle.shuffle-active {
  background: #000080 !important;
  color: #fff !important;
  border-style: inset !important;
}

/* ============================================================
   PERSISTENT GAMES MINI-NOTIFICATION (bottom-right)
   ============================================================ */
.games-mini-notif {
  position: fixed;
  bottom: 38px;
  right: 8px;
  width: 220px;
  background: #d4d0c8;
  border: 2px outset #fff;
  box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #fff;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  color: #000;
  z-index: 9500;
  display: none;
}

.gmn-titlebar {
  background: linear-gradient(90deg, #0a246a, #3a6ea5);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 2px 4px 2px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gmn-close {
  background: #d4d0c8;
  border: 2px outset #fff;
  color: #000;
  font-size: 9px;
  width: 16px;
  height: 16px;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.gmn-close:active { border-style: inset; }

.gmn-body {
  padding: 8px 10px;
  text-align: center;
}

.gmn-text {
  font-size: 10px;
  margin-bottom: 4px;
}

.gmn-sub {
  font-size: 9px;
  color: #666;
  margin-bottom: 6px;
}

.gmn-leaderboard-btn {
  background: #d4d0c8;
  border: 2px outset #fff;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 10px;
  padding: 2px 10px;
  cursor: pointer;
}
.gmn-leaderboard-btn:active { border-style: inset; }

/* ============================================================
   LEADERBOARD WINDOW
   ============================================================ */
.window-leaderboard {
  width: 320px;
}

.lb-tabs {
  display: flex;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  padding: 2px 4px 0;
  gap: 1px;
}

.lb-tab {
  background: #d4d0c8;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #808080;
  border-bottom: none;
  padding: 2px 8px;
  font-size: 10px;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  margin-bottom: -1px;
  color: #000;
}

.lb-tab.active {
  background: #d4d0c8;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 1px solid #808080;
  font-weight: bold;
  z-index: 1;
  padding-bottom: 3px;
}

.lb-body {
  background: #fff;
  max-height: 260px;
  overflow-y: auto;
  border: 1px inset #808080;
  margin: 4px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
}

.lb-table th {
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  padding: 3px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: bold;
  position: sticky;
  top: 0;
}

.lb-table th:first-child {
  width: 28px;
  text-align: center;
}

.lb-table th:last-child {
  width: 60px;
  text-align: right;
}

.lb-table td {
  padding: 3px 8px;
  border-bottom: 1px solid #e0e0e0;
}

.lb-table td:first-child {
  text-align: center;
  font-weight: bold;
  color: #808080;
}

.lb-table td:last-child {
  text-align: right;
  font-family: 'VT323', 'Courier New', monospace;
}

.lb-table tr:nth-child(1) td:first-child { color: #ffd700; }
.lb-table tr:nth-child(2) td:first-child { color: #c0c0c0; }
.lb-table tr:nth-child(3) td:first-child { color: #cd7f32; }

.lb-table tr:hover td {
  background: #e8e8ff;
}

.lb-empty {
  text-align: center !important;
  color: #808080;
  font-style: italic;
  padding: 20px 8px !important;
}

.lb-footer {
  background: #d4d0c8;
  padding: 4px 8px;
  text-align: right;
}

.lb-refresh-btn {
  font-size: 10px;
  padding: 2px 10px;
}

/* ── Leaderboard prompt (game over dialog) ── */
.lb-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-prompt {
  background: #d4d0c8;
  border: 2px outset #fff;
  box-shadow: 3px 3px 0 #000, inset 1px 1px 0 #fff;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  width: 280px;
}

.lb-prompt-title {
  background: linear-gradient(90deg, #0a246a, #3a6ea5);
  color: #fff;
  font-weight: bold;
  padding: 3px 6px;
}

.lb-prompt-body {
  padding: 14px 16px 10px;
  text-align: center;
}

.lb-prompt-body p {
  margin: 0 0 8px;
}

.lb-prompt-body input {
  width: 100%;
  padding: 3px 4px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  border: 2px inset #808080;
  box-sizing: border-box;
}

.lb-prompt-footer {
  padding: 6px 16px 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.lb-prompt-footer button {
  background: #d4d0c8;
  border: 2px outset #fff;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  padding: 3px 20px;
  cursor: pointer;
  min-width: 70px;
}

.lb-prompt-footer button:active {
  border-style: inset;
}

/* ============================================================
   SIGN-ON SCREEN RESPONSIVE
   ============================================================ */
/* (mobile aim-window styles merged into main responsive block above) */
