/* Atari 2600 VCS — Mesa Retrô 4u-Labs (Estilo Bancada Realista) */
:root {
  --wood-1: #5a3820;
  --wood-2: #3b2211;
  --rosewood-1: #6b3519;
  --rosewood-2: #3b1a09;
  --wall-1: #3b3022;
  --wall-2: #1f1911;
  --console-black-1: #23252a;
  --console-black-2: #121417;
  --tv-bezel-1: #50321d;
  --tv-bezel-2: #2d190c;
  --atari-orange: #f97316;
  --atari-amber: #f59e0b;
  --led-red: #ef4444;
  --led-green: #22c55e;
}

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

html, body {
  min-height: 100vh;
  background: #14100c;
  color: #f4efe6;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  user-select: none;
}

/* Fundo de quarto + luminária */
.room-backdrop {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 22% 10%, rgba(255, 200, 105, 0.2), transparent 48%),
    linear-gradient(180deg, var(--wall-1) 0%, var(--wall-2) 64%, #140d07 100%);
}

/* Topbar 4u-Labs */
.desk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 12, 9, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 60;
  flex-wrap: wrap;
}

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

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

.topbar-atari-logo {
  height: 17px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  color: #f8f2e7;
}

.engine-badge {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.38);
  font-weight: 700;
  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 {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #e5dfd5;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

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

.pill-btn.active {
  background: rgba(249, 115, 22, 0.22);
  border-color: rgba(249, 115, 22, 0.55);
  color: #ffedd5;
}

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

/* Mesa de Madeira */
.desk-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 12px 6px;
}

.wood-desk {
  position: relative;
  width: 100%;
  max-width: min(1760px, 98vw);
  border-radius: 18px;
  padding: 10px 14px 10px;
  background:
    repeating-linear-gradient(
      92deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 3px,
      rgba(0, 0, 0, 0.04) 3px,
      rgba(0, 0, 0, 0.04) 8px
    ),
    linear-gradient(180deg, var(--wood-1) 0%, var(--wood-2) 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 235, 200, 0.22),
    inset 0 -10px 26px rgba(0, 0, 0, 0.55),
    0 24px 60px rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 210, 150, 0.14);
}

/* Iluminação ambiente fixa da bancada */
.desk-lamp-glow {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 18%, rgba(255, 224, 155, 0.18), transparent 62%);
}

/* Layout 3 colunas */
.station-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 274px minmax(520px, 1fr) 232px;
  gap: 16px;
  align-items: start;
}

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

.desk-card {
  background: linear-gradient(180deg, rgba(24, 25, 30, 0.94), rgba(14, 15, 19, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 11px 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.52);
  min-width: 0;
}

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

.slot-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

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

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

.mini-cart-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.mini-cart-shell {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #2d3039 0%, #191b21 55%, #111317 100%);
  border: 1px solid #454957;
  border-top-color: #62687b;
  padding: 5px 9px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.16),
    inset 0 -3px 6px rgba(0, 0, 0, 0.78),
    0 5px 12px rgba(0, 0, 0, 0.65);
}

.mini-cart-grip {
  width: 100%;
  height: 6px;
  border-radius: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.14) 0 5px,
    rgba(0, 0, 0, 0.6) 5px 9px
  );
}

.mini-cart-sticker {
  width: 100%;
  border-radius: 4px;
  background-color: #ea580c;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(0, 0, 0, 0.18) 100%);
  border: 1px solid rgba(0, 0, 0, 0.48);
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    0 1px 3px rgba(0, 0, 0, 0.75);
}

.mini-cart-name {
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cart-sub {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
  margin-top: 1px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.mech-btn {
  background: linear-gradient(180deg, #343741, #1e2027);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s;
}

.mech-btn:hover {
  background: linear-gradient(180deg, #3f4350, #272933);
  border-color: rgba(249, 115, 22, 0.5);
}

.mech-btn.primary {
  background: linear-gradient(180deg, #ea580c, #c2410c);
  color: #fff;
  border-color: rgba(255, 190, 120, 0.4);
}

/* Estante de Cartuchos */
.rack-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rack-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.rack-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fdba74;
}

.rack-catalog-btn {
  background: rgba(249, 115, 22, 0.18);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.42);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.rack-catalog-btn:hover {
  background: rgba(249, 115, 22, 0.3);
}

.rack-search-input {
  width: 100%;
  background: #0d0e12;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 0.76rem;
  outline: none;
  user-select: text;
}

.rack-search-input:focus {
  border-color: var(--atari-orange);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

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

.rack-pill {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
}

.rack-pill.active {
  background: rgba(249, 115, 22, 0.25);
  color: #ffedd5;
  border-color: rgba(249, 115, 22, 0.6);
}

.rack-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: #94a3b8;
  padding: 2px 2px;
}

.rack-stats-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--led-green);
  margin-right: 5px;
}

.cartridge-rack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: clamp(210px, calc(100vh - 375px), 520px);
  overflow-y: auto;
  padding-right: 4px;
}

.cartridge-rack::-webkit-scrollbar {
  width: 6px;
}
.cartridge-rack::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
}

/* Cartucho Atari 2600 realista na estante esquerda */
.cart-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, #2d3039 0%, #1a1c22 52%, #111317 100%);
  border: 1px solid #3f4350;
  border-top-color: #555a69;
  border-radius: 6px 6px 3px 3px;
  padding: 8px 7px 6px;
  cursor: pointer;
  color: #e2e8f0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 4px rgba(0, 0, 0, 0.75),
    0 3px 6px rgba(0, 0, 0, 0.55);
  transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Sulcos texturizados no topo do cartucho */
.cart-item::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12) 0 4px,
    rgba(0, 0, 0, 0.55) 4px 7px
  );
  pointer-events: none;
}

.cart-item:hover {
  border-color: rgba(249, 115, 22, 0.7);
  transform: translateX(3px);
}

.cart-item.active {
  background: linear-gradient(180deg, #3a2a1e 0%, #231912 65%, #16100c 100%);
  border-color: var(--atari-orange);
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 140, 0.22),
    0 0 14px rgba(249, 115, 22, 0.38);
}

.cart-label-plate {
  flex: 1;
  min-width: 0;
  height: 26px;
  border-radius: 3px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(0, 0, 0, 0.16) 100%);
  border: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.7);
}

.cart-item-title {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-fav-btn {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s, transform 0.1s;
}

.cart-fav-btn:hover {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.18);
  transform: scale(1.08);
}

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

/* ==================== COLUNA CENTRAL: TV CRT + CONSOLE ATARI 2600 ==================== */
.center-station {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* TV CRT Madeira Anos 80 */
.tv-cabinet {
  width: 100%;
  max-width: min(980px, calc((100vh - 285px) * 1.3333 + 136px));
  padding: 10px 12px 10px;
  border-radius: 16px;
  background:
    repeating-linear-gradient(
      3deg,
      rgba(255, 255, 255, 0.02) 0 2px,
      rgba(0, 0, 0, 0.07) 2px 6px
    ),
    linear-gradient(180deg, var(--tv-bezel-1) 0%, var(--tv-bezel-2) 100%);
  border: 2px solid #241308;
  box-shadow:
    inset 0 2px 4px rgba(255, 220, 175, 0.22),
    inset 0 -4px 8px rgba(0, 0, 0, 0.6),
    0 20px 44px rgba(0, 0, 0, 0.68);
}

.tv-inner-layout {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 10px;
  align-items: stretch;
}

.tv-tube-frame {
  background: #0a0b0d;
  border-radius: 14px;
  padding: 10px;
  border: 3px solid #1d1f24;
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.95),
    0 0 2px rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

html:not(.jt-full-screen) #javatari-screen {
  width: 100% !important;
  max-width: 100% !important;
  max-height: clamp(240px, calc(100vh - 285px), 620px) !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  background: #000 !important;
  border: none !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

html:not(.jt-full-screen) #jt-screen-fs,
html:not(.jt-full-screen) #jt-screen-fs-center,
html:not(.jt-full-screen) #jt-screen-canvas-outer {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000 !important;
}

html:not(.jt-full-screen) #jt-screen-canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: fill !important;
  border-radius: 8px !important;
}

html:not(.jt-full-screen) #jt-logo {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

html:not(.jt-full-screen) #jt-logo-center {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  transform: translate(-50%, -50%) !important;
}

html:not(.jt-full-screen) #jt-logo-image {
  width: 56% !important;
  max-width: 260px !important;
  height: auto !important;
}

html:not(.jt-full-screen) #jt-bar {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 40 !important;
}

/* Painel lateral direito da TV (Dials VHF/UHF + Speaker + Power) */
.tv-control-strip {
  background: linear-gradient(180deg, #1d1f24 0%, #111216 100%);
  border: 1px solid #353841;
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tv-brand-badge {
  width: 100%;
  background: linear-gradient(180deg, #101216 0%, #060709 100%);
  padding: 5px 5px 4px;
  border-radius: 4px;
  border: 1px solid #3c4250;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tv-brand-logo {
  width: 74px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9));
}

.tv-brand-sub {
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #94a3b8;
}

.tv-dial-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.tv-dial {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #64748b, #1e293b 70%);
  border: 2px solid #0f172a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tv-dial::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 3px;
  height: 14px;
  background: #f97316;
  border-radius: 2px;
  transform: translateX(-50%);
}

.tv-dial-label {
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.tv-speaker-grille {
  width: 54px;
  height: 46px;
  border-radius: 5px;
  background:
    repeating-linear-gradient(
      180deg,
      #060708 0 2px,
      #252830 2px 5px
    );
  border: 1px solid #2e323c;
}

.tv-power-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.54rem;
  font-weight: 800;
  color: #cbd5e1;
}

.tv-power-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #450a0a;
  transition: all 0.2s;
}

.tv-power-led.on {
  background: var(--led-red);
  box-shadow: 0 0 10px var(--led-red);
}

/* Console Atari 2600 "Woody" CX2600 realista (4 chaves clássicas) */
.atari-console {
  width: 100%;
  max-width: min(980px, calc((100vh - 285px) * 1.3333 + 136px));
  border-radius: 14px;
  background: linear-gradient(180deg, #272930 0%, #141519 100%);
  border: 2px solid #090a0c;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.14),
    0 20px 38px rgba(0, 0, 0, 0.65);
  padding: 7px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.console-upper-deck {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.console-ribs {
  height: 22px;
  border-radius: 5px;
  background: repeating-linear-gradient(
    180deg,
    #111317 0 2px,
    #2b2e36 2px 5px
  );
  border: 1px solid #0b0c0e;
}

/* Slot físico de Cartucho no console */
.console-cart-well {
  background: #08090b;
  border: 2px solid #30333c;
  border-radius: 8px;
  padding: 4px 12px;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.9);
}

.console-cartridge-3d {
  width: 158px;
  height: 30px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #2b2e35 0%, #14161a 100%);
  border: 1px solid #4b4f5b;
  padding: 3px 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.console-cartridge-3d.inserting {
  transform: translateY(-10px) scale(1.03);
}

.cart3d-end-label {
  width: 100%;
  height: 20px;
  border-radius: 3px;
  background: var(--atari-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 0.64rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Painel Frontal Jacarandá + Laranja + 4 Chaves Prateadas */
.console-wood-fascia {
  border-radius: 10px;
  padding: 7px 14px 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0 4px,
      rgba(0, 0, 0, 0.08) 4px 10px
    ),
    linear-gradient(180deg, var(--rosewood-1) 0%, var(--rosewood-2) 100%);
  border: 2px solid #f97316;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.5);
  position: relative;
}

.console-switches-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 520px;
  margin: 0 auto;
  gap: 12px;
  align-items: end;
}

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

.switch-top-label {
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffedd5;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.switch-sub-state {
  font-size: 0.52rem;
  font-weight: 800;
  color: #fed7aa;
  background: rgba(0, 0, 0, 0.52);
  padding: 1px 5px;
  border-radius: 3px;
}

.silver-lever-btn {
  width: 30px;
  height: 38px;
  border-radius: 6px;
  background: #0d0e11;
  border: 1px solid #3f434e;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9);
  position: relative;
}

.silver-lever-stick {
  width: 14px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(90deg, #9ca3af 0%, #f8fafc 45%, #6b7280 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.8), inset 0 1px 1px #fff;
  transition: transform 0.12s ease;
  transform: translateY(-2px);
}

.silver-lever-btn.up .silver-lever-stick,
.silver-lever-btn:active .silver-lever-stick {
  transform: translateY(-13px);
}

.console-logo-strip {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.console-atari-logo {
  height: 17px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}

/* ==================== COLUNA DIREITA: JOYSTICK CX40 + ATALHOS ==================== */
.cx40-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cx40-stage {
  position: relative;
  width: 158px;
  height: 158px;
  background: linear-gradient(145deg, #23252c, #111317);
  border: 2px solid #353844;
  border-radius: 16px;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.08),
    0 10px 20px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.cx40-orange-ring {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  border: 3px solid var(--atari-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #181a1f 0%, #090a0c 100%);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.9);
  position: relative;
}

.cx40-boot-rings {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    #1c1e24 0 5px,
    #0c0d10 5px 9px
  );
  border: 1px solid #32353f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cx40-stick {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4b5563, #111827 75%);
  border: 2px solid #030712;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.85), inset 0 2px 3px rgba(255, 255, 255, 0.25);
  transition: transform 0.07s ease-out;
}

.cx40-fire-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #f87171, #dc2626 65%, #7f1d1d 100%);
  border: 2px solid #090a0c;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.75);
  cursor: pointer;
  transition: transform 0.06s, box-shadow 0.06s;
}

.cx40-fire-btn.pressed,
.cx40-fire-btn:active {
  transform: scale(0.92);
  box-shadow: 0 0 16px #ef4444, inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.cx40-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

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

.key-help-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.71rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 3px;
}

.key-help-row kbd {
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.66rem;
  font-weight: 700;
}

.key-help-row span {
  color: #cbd5e1;
  text-align: right;
}

/* Manual card */
.manual-book-btn {
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, #271a12, #17100c);
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.manual-book-btn:hover {
  border-color: var(--atari-orange);
}

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

.manual-book-title {
  font-size: 0.8rem;
  font-weight: 800;
}

.manual-book-sub {
  font-size: 0.67rem;
  color: #94a3b8;
}

/* Botão de download do Manual Original (padrão K7 & Floppy) */
.desk-pack-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #574c34;
  border-left: 3px solid #eab308;
  background: linear-gradient(180deg, #24211a 0%, #171511 100%);
  color: #f8fafc;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, filter 0.15s ease;
}

.desk-pack-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  border-color: #ca8a04;
}

.pack-glyph {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: rgba(245, 240, 225, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.34);
}

.pack-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.pack-meta strong {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-meta small {
  font-size: 0.6rem;
  color: #e7dec8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-dl-pill {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  background: linear-gradient(180deg, #f5f0e1, #e5dcc5);
  border: 1px solid #d6c9a9;
  color: #1c1917;
}

/* Mobile Touch Controls Realistas (Joystick Atari CX40 + Botão Fire) */
.mobile-touch-pad {
  display: none;
  width: 100%;
  max-width: 590px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(22, 24, 30, 0.96), rgba(12, 13, 17, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.58);
  user-select: none;
  -webkit-user-select: none;
}

.mobile-cx40-wrap,
.mobile-fire-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.mobile-cx40-stage {
  width: 126px;
  height: 126px;
  border-radius: 16px;
  touch-action: none;
}

.mobile-cx40-ring {
  width: 96px;
  height: 96px;
}

.mobile-cx40-boot {
  width: 66px;
  height: 66px;
}

.mobile-cx40-stick {
  width: 28px;
  height: 28px;
}

.mobile-mid-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 78px;
}

.mobile-mid-actions .mech-btn {
  padding: 8px 9px;
  font-size: 0.72rem;
  touch-action: manipulation;
}

.mobile-pad-sub {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.touch-fire-big {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f87171, #dc2626 65%, #7f1d1d 100%);
  border: 3px solid #090a0c;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.78),
    inset 0 2px 3px rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.06s, box-shadow 0.06s;
}

.touch-fire-big.pressed,
.touch-fire-big:active {
  transform: scale(0.92);
  box-shadow: 0 0 18px #ef4444, inset 0 3px 6px rgba(0, 0, 0, 0.65);
}

/* Modal Catálogo Visual + Manual */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

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

.modal-card {
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  background: #14161b;
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #1c1f26;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.modal-header h2 {
  font-size: 0.96rem;
  font-weight: 800;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 800;
}

.modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  user-select: text;
}

.catalog-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

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

.catalog-cart-card {
  background: linear-gradient(180deg, #21232b, #14161b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

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

.catalog-cart-sub {
  font-size: 0.66rem;
  color: #94a3b8;
}

/* Rodapé Ecossistema 4u-Labs */
.eco-footer {
  margin-top: auto;
  padding: 6px 16px;
  background: rgba(11, 9, 7, 0.94);
  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: #fdba74;
}

@media (max-width: 1080px) {
  .station-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tv-cabinet,
  .atari-console {
    max-width: 100%;
  }
  .cartridge-rack {
    max-height: 360px;
  }
  .left-peripherals {
    order: 2;
  }
  .center-station {
    order: 1;
  }
  .right-peripherals {
    order: 3;
  }
  .cx40-card,
  .desk-only-card {
    display: none;
  }
  .mobile-touch-pad {
    display: flex;
  }
  html:not(.jt-full-screen) #jt-bar {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .desk-stage {
    padding: 4px;
  }
  .wood-desk {
    max-width: 100%;
    padding: 8px 6px;
    border-radius: 12px;
  }
  .tv-cabinet {
    padding: 8px;
    border-radius: 12px;
  }
  .tv-tube-frame {
    padding: 6px;
    border-radius: 10px;
  }
  .tv-inner-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .tv-control-strip {
    flex-direction: row;
    padding: 6px 8px;
    gap: 8px;
  }
  .tv-brand-badge {
    width: auto;
    flex: 1;
    min-width: 0;
    padding: 4px 8px;
  }
  .tv-brand-logo {
    width: 64px;
  }
  .tv-dial {
    width: 32px;
    height: 32px;
  }
  .tv-speaker-grille {
    display: none;
  }
  .atari-console {
    padding: 6px 8px 7px;
    border-radius: 12px;
  }
  .console-upper-deck {
    gap: 6px;
  }
  .console-cart-well {
    min-width: 0;
    padding: 3px 6px;
  }
  .console-cartridge-3d {
    width: 126px;
    height: 24px;
  }
  .console-wood-fascia {
    padding: 6px 8px;
  }
  .console-switches-row {
    gap: 6px;
  }
  .switch-top-label {
    font-size: 0.48rem;
  }
  .silver-lever-btn {
    width: 26px;
    height: 38px;
  }
  .mobile-touch-pad {
    padding: 8px 10px;
    gap: 8px;
  }
  .mobile-cx40-stage {
    width: 114px;
    height: 114px;
  }
  .mobile-cx40-ring {
    width: 88px;
    height: 88px;
  }
  .mobile-cx40-boot {
    width: 60px;
    height: 60px;
  }
  .mobile-cx40-stick {
    width: 26px;
    height: 26px;
  }
  .touch-fire-big {
    width: 72px;
    height: 72px;
    font-size: 0.78rem;
  }
}
