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

:root {
  --gb-olive: #8bac0f;
  --gb-dark: #0f380f;
  --gb-mid: #306230;
  --gb-magenta: #9b1c53;
  --gb-navy: #2a347a;
  --bg-panel: rgba(18, 22, 31, 0.94);
  --border-panel: rgba(255, 255, 255, 0.11);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
}

html, body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: #0d1117;
  overflow-x: hidden;
}

/* ==================== BACKGROUND THEMES ==================== */
body.theme-90sdesk {
  background:
    radial-gradient(circle at 50% 15%, rgba(251, 191, 36, 0.14), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 3px, rgba(0, 0, 0, 0.04) 3px 8px),
    linear-gradient(180deg, #2a1c11 0%, #140d08 100%);
}

body.theme-dmg {
  background: radial-gradient(circle at 50% 25%, #384919 0%, #1d260c 60%, #0d1205 100%);
}

body.theme-cybergrid {
  background:
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 25%, #1e1b4b 0%, #0f172a 65%, #020617 100%);
  background-size: 38px 38px, 38px 38px, 100% 100%;
}

body.theme-oled {
  background: radial-gradient(circle at 50% 35%, rgba(139, 172, 15, 0.09), #030508 65%);
}

body.theme-matrix {
  background:
    repeating-linear-gradient(180deg, rgba(34, 197, 94, 0.05) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 30%, #052e16 0%, #02140a 65%, #010804 100%);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== TOPBAR ==================== */
.desk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 16px;
  background: rgba(10, 12, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 172, 15, 0.35);
  flex-wrap: wrap;
  z-index: 50;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gb-olive);
  box-shadow: 0 0 10px var(--gb-olive);
}

.brand-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
}

.brand-title span {
  color: var(--gb-olive);
}

.engine-badge {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(139, 172, 15, 0.16);
  border: 1px solid rgba(139, 172, 15, 0.42);
  color: #d9f99d;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.18s;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.pill-btn.active {
  background: rgba(139, 172, 15, 0.22);
  border-color: rgba(139, 172, 15, 0.6);
  color: #ecfccb;
}

.pill-btn.home-pill {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.38);
  color: #bbf7d0;
}

/* ==================== MAIN BENCH 3-COLUMN STAGE ==================== */
.desk-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 14px;
}

.station-grid {
  width: 100%;
  max-width: 1460px;
  display: grid;
  grid-template-columns: 310px minmax(380px, 1fr) 285px;
  gap: 18px;
  align-items: start;
}

.left-peripherals,
.right-peripherals {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.desk-card {
  background: linear-gradient(180deg, rgba(22, 26, 36, 0.95), rgba(13, 16, 23, 0.97));
  border: 1px solid var(--border-panel);
  border-radius: 14px;
  padding: 12px 13px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  min-width: 0;
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slot-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

.slot-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f3f46;
}

.slot-led.on {
  background: var(--gb-olive);
  box-shadow: 0 0 9px var(--gb-olive);
}

/* ==================== LEFT SLOT MINI GB CARTRIDGE ==================== */
.mini-gb-cart {
  position: relative;
  background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px 14px 6px 6px;
  padding: 7px 9px 8px;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.35),
    inset 0 -3px 5px rgba(0, 0, 0, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.5);
  margin-bottom: 9px;
}

.mini-gb-cart-header {
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}

.mini-gb-sticker {
  border-radius: 5px;
  padding: 7px 10px;
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 5px solid #e11d48;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.22);
}

.mini-cart-name {
  font-weight: 900;
  font-size: 0.8rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cart-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mech-btn {
  background: linear-gradient(180deg, #283040, #1a202c);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.16s;
}

.mech-btn:hover {
  border-color: var(--gb-olive);
  color: #fff;
  transform: translateY(-1px);
}

.mech-btn.primary {
  background: linear-gradient(180deg, #65a30d, #4d7c0f);
  border-color: #84cc16;
  color: #fff;
}

.mech-btn.primary:hover {
  background: linear-gradient(180deg, #84cc16, #65a30d);
}

/* ==================== LEFT GAME BOY CARTRIDGE RACK ==================== */
.rack-search-wrap {
  position: relative;
  margin-bottom: 7px;
}

.rack-search {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0b0e14;
  color: #fff;
  font-size: 0.77rem;
  outline: none;
}

.rack-search:focus {
  border-color: var(--gb-olive);
}

.rack-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.rack-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.rack-pill.active {
  background: rgba(139, 172, 15, 0.22);
  border-color: var(--gb-olive);
  color: #ecfccb;
}

.rack-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.67rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.cartridge-rack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 320px);
  min-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.cartridge-rack::-webkit-scrollbar {
  width: 6px;
}
.cartridge-rack::-webkit-scrollbar-thumb {
  background: rgba(139, 172, 15, 0.4);
  border-radius: 999px;
}

/* Individual Physical Game Boy Cartridge in Rack */
.gb-cart-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px 6px 9px;
  border-radius: 5px 11px 5px 5px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.06) 0 2px,
      transparent 2px 5px
    ),
    linear-gradient(180deg, #4b5563 0%, #374151 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.gb-cart-item:hover {
  transform: translateX(3px);
  border-color: var(--gb-olive);
}

.gb-cart-item.active {
  border: 2px solid #a3e635;
  box-shadow: 0 0 14px rgba(139, 172, 15, 0.45);
}

.gb-cart-label-plate {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 4px;
  border-left: 4px solid rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.gb-cart-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-fav-btn {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-fav-btn.is-fav {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.18);
}

/* ==================== CENTER STATION: THE GAME BOY CONSOLE ==================== */
.center-station {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stage-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 172, 15, 0.22) 0%, transparent 70%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
}

/* Top Physical Switch + Inserted Cartridge Slot */
.gb-top-deck {
  position: relative;
  z-index: 4;
  width: 396px;
  max-width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  margin-bottom: 0;
}

.gb-power-slider {
  background: linear-gradient(180deg, #4b5563, #1f2937);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  line-height: 1.1;
  font-weight: 800;
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.gb-power-slider.on {
  color: #a3e635;
}

.gb-inserted-cart-top {
  width: 196px;
  height: 28px;
  border-radius: 7px 12px 0 0;
  background: linear-gradient(180deg, #9ca3af, #6b7280);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom: none;
  padding: 4px 9px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.gb-inserted-cart-top.inserting {
  transform: translateY(-9px);
}

.gb-inserted-cart-pill {
  width: 100%;
  height: 19px;
  border-radius: 4px;
  font-size: 0.63rem;
  line-height: 1;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 7px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* Main Game Boy Body */
.gameboy {
  position: relative;
  z-index: 3;
  width: 396px;
  max-width: 100%;
  border-radius: 18px 18px 68px 18px;
  padding: 20px 22px 22px;
  box-shadow:
    inset 2px 2px 5px rgba(255, 255, 255, 0.55),
    inset -3px -3px 7px rgba(0, 0, 0, 0.38),
    0 26px 60px rgba(0, 0, 0, 0.78);
  transition: background 0.3s ease, border-color 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
}

/* 6 Authentic Console Shell Skins */
.gameboy.skin-classic {
  background: linear-gradient(145deg, #d8d8d2 0%, #c4c4bc 55%, #aeaead 100%);
  border: 2px solid #a1a19a;
  --logo-color: #263179;
}

.gameboy.skin-atomic-purple {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.86) 0%, rgba(91, 33, 182, 0.9) 60%, rgba(59, 7, 100, 0.94) 100%);
  border: 2px solid rgba(167, 139, 250, 0.55);
  --logo-color: #f3e8ff;
}

.gameboy.skin-red {
  background: linear-gradient(145deg, #ef4444 0%, #dc2626 55%, #991b1b 100%);
  border: 2px solid #f87171;
  --logo-color: #ffffff;
}

.gameboy.skin-yellow {
  background: linear-gradient(145deg, #facc15 0%, #eab308 55%, #ca8a04 100%);
  border: 2px solid #fde047;
  --logo-color: #1e3a8a;
}

.gameboy.skin-black {
  background: linear-gradient(145deg, #3f3f46 0%, #27272a 55%, #18181b 100%);
  border: 2px solid #52525b;
  --logo-color: #e4e4e7;
}

.gameboy.skin-blue {
  background: linear-gradient(145deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%);
  border: 2px solid #38bdf8;
  --logo-color: #ffffff;
}

/* Screen Housing Bezel */
.screen-housing {
  background: linear-gradient(145deg, #626473 0%, #4b4d59 100%);
  border-radius: 12px 12px 36px 12px;
  padding: 10px 16px 14px;
  border: 2px solid #383a44;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    0 3px 6px rgba(0, 0, 0, 0.25);
}

.housing-top-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.stereo-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stereo-line-magenta {
  height: 2px;
  background: var(--gb-magenta);
  border-radius: 2px;
}

.stereo-line-navy {
  height: 2px;
  background: var(--gb-navy);
  border-radius: 2px;
}

.dot-matrix-text {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #e2e8f0;
  white-space: nowrap;
}

.housing-main-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 8px;
}

.battery-led {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.led {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #451a1c;
  border: 1px solid #1f0a0b;
  transition: all 0.2s;
}

.led.on {
  background: #ff2a2a;
  box-shadow: 0 0 12px #ff2a2a, 0 0 4px #fff;
}

.battery-text {
  font-size: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #cbd5e1;
}

/* Authentic 10:9 Game Boy LCD Screen (280 x 252 on Desktop) */
.screen-bezel {
  background: linear-gradient(145deg, #748454, #5e6d41);
  border-radius: 6px;
  padding: 7px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
}

.screen {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 10 / 9;
  background: #8bac0f;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35);
}

.screen.active {
  background: #0f380f;
}

/* 4 Authentic LCD Palette Filters */
.screen.lcd-dmg #emu-iframe {
  filter: sepia(0.38) hue-rotate(38deg) saturate(1.25) contrast(1.06);
}

.screen.lcd-pocket #emu-iframe {
  filter: grayscale(1) contrast(1.15) brightness(1.04);
}

.screen.lcd-light #emu-iframe {
  filter: sepia(0.55) hue-rotate(140deg) saturate(1.6) contrast(1.08) brightness(1.05);
}

.screen.lcd-color #emu-iframe {
  filter: none;
}

/* Optional Dot-Matrix Pixel Grid Overlay */
.screen.lcd-grid-on::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 56, 15, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 56, 15, 0.18) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 5;
}

#emu-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.screen-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #9bbc0f 0%, #8bac0f 100%);
  color: #0f380f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  gap: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.68rem;
  line-height: 1.6;
  z-index: 4;
}

.screen-placeholder.hidden {
  display: none;
}

/* Nintendo GAME BOY Logo Strip */
.logo-area {
  margin: 10px 4px 12px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--logo-color, #263179);
}

.nintendo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 1px 8px;
}

.gameboy-text {
  font-family: 'Orbitron', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.tm {
  font-size: 0.55rem;
  font-weight: 800;
}

/* ==================== PHYSICAL CONTROLS ON CONSOLE ==================== */
.controls-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px 12px;
}

/* Continuous 8-Way Multi-Touch D-Pad */
.dpad-container {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: pointer;
}

.dpad {
  position: relative;
  width: 104px;
  height: 104px;
  touch-action: none;
}

.dpad-arm-v,
.dpad-arm-h {
  position: absolute;
  background: linear-gradient(145deg, #27272a, #111113);
  border: 1px solid #09090b;
  border-radius: 5px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.dpad-arm-v {
  width: 34px;
  height: 104px;
  left: 35px;
  top: 0;
}

.dpad-arm-h {
  width: 104px;
  height: 34px;
  left: 0;
  top: 35px;
}

.dpad-center-circle {
  position: absolute;
  width: 22px;
  height: 22px;
  left: 41px;
  top: 41px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #27272a, #09090b);
  z-index: 3;
  pointer-events: none;
}

.dpad-dir-indicator {
  position: absolute;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  z-index: 4;
  pointer-events: none;
  transition: color 0.08s, background 0.08s;
}

.dpad-dir-indicator.up { left: 35px; top: 0; border-radius: 5px 5px 0 0; }
.dpad-dir-indicator.down { left: 35px; bottom: 0; border-radius: 0 0 5px 5px; }
.dpad-dir-indicator.left { left: 0; top: 35px; border-radius: 5px 0 0 5px; }
.dpad-dir-indicator.right { right: 0; top: 35px; border-radius: 0 5px 5px 0; }

.dpad-dir-indicator.pressed {
  color: #a3e635;
  background: rgba(139, 172, 15, 0.28);
}

/* Iconic Maroon A & B Buttons */
.ab-buttons {
  display: flex;
  gap: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
  transform: rotate(-24deg);
  touch-action: none;
}

.ab-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.ab-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #be185d, #831843 70%, #500724 100%);
  border: 2px solid #3b041a;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.06s, box-shadow 0.06s;
}

.ab-button.pressed,
.ab-button:active {
  transform: translateY(3px) scale(0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 12px rgba(244, 63, 94, 0.6);
}

.ab-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--logo-color, #263179);
}

/* Select & Start Buttons */
.select-start {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 4px;
  padding-bottom: 6px;
}

.ss-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ss-button {
  width: 42px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, #52525b, #27272a);
  border: 1px solid #18181b;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transform: rotate(-24deg);
  cursor: pointer;
  touch-action: none;
  transition: transform 0.06s;
}

.ss-button.pressed,
.ss-button:active {
  transform: rotate(-24deg) scale(0.92);
  background: #84cc16;
}

.ss-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--logo-color, #263179);
}

/* Speaker Vents & Phones Jack */
.gb-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 4px;
}

.phones-jack {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.45);
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.speaker-grille {
  display: flex;
  gap: 6px;
  transform: rotate(-26deg);
  padding-right: 8px;
}

.speaker-slot {
  width: 5px;
  height: 30px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.85), 1px 0 0 rgba(255, 255, 255, 0.25);
}

/* ==================== RIGHT COLUMN CARDS ==================== */
.skin-dots-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.skin-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s;
}

.skin-dot:hover,
.skin-dot.active {
  transform: scale(1.14);
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.palette-grid,
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.mini-opt-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 0.69rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.mini-opt-btn.active {
  background: rgba(139, 172, 15, 0.24);
  border-color: var(--gb-olive);
  color: #ecfccb;
}

.key-help-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.key-help-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.key-help-row kbd {
  background: #0b0e14;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 0.66rem;
  font-weight: 800;
  color: #d9f99d;
}

.manual-book-btn {
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, rgba(139, 172, 15, 0.18), rgba(20, 83, 45, 0.28));
  border: 1px solid rgba(139, 172, 15, 0.45);
  border-radius: 12px;
  padding: 11px 13px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.18s;
}

.manual-book-btn:hover {
  transform: translateY(-2px);
  border-color: #a3e635;
}

.manual-book-kicker {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #bef264;
}

.manual-book-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
}

.manual-book-sub {
  font-size: 0.68rem;
  color: #cbd5e1;
}

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

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

.modal-card {
  width: 100%;
  max-width: 920px;
  max-height: 86vh;
  background: #12161f;
  border: 1px solid rgba(139, 172, 15, 0.4);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.catalog-cart-card {
  background: #1b202c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 14px 8px 8px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.15s, border-color 0.15s;
}

.catalog-cart-card:hover {
  transform: translateY(-2px);
  border-color: var(--gb-olive);
}

.catalog-cart-label {
  min-height: 40px;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.catalog-cart-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== FOOTER ==================== */
.eco-footer {
  margin-top: auto;
  padding: 6px 16px;
  background: rgba(8, 10, 15, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.71rem;
  color: #94a3b8;
}

.eco-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.eco-footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}

.eco-footer-links a:hover {
  color: #a3e635;
}

/* ==================== RESPONSIVE MOBILE & TABLET ==================== */
@media (max-width: 1080px) {
  .station-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .center-station {
    order: 1;
  }
  .left-peripherals {
    order: 2;
  }
  .right-peripherals {
    order: 3;
  }
  .desk-only-card {
    display: none;
  }
  .cartridge-rack {
    max-height: 340px;
  }
}

@media (max-width: 600px) {
  .desk-stage {
    padding: 6px;
  }
  .gameboy {
    width: 100%;
    max-width: 370px;
    padding: 14px 14px 18px;
    border-radius: 14px 14px 52px 14px;
  }
  .screen-housing {
    padding: 8px 10px 10px;
  }
  .housing-main-row {
    grid-template-columns: 28px 1fr;
    gap: 6px;
  }
  .controls-section {
    padding: 4px 4px 8px;
  }
}
