/* ========================================================
   COMMODORE 1084S // RAI PHOTOS RETRO DECK STYLESHEET
   Authentic MS-DOS & Commodore 64 / Amiga CRT Monitor Theme
   Curator & Visionary: Salih BAŞER & RAI Sovereign Intelligence
   ======================================================== */

:root {
  --amiga-red: #dc2626;
  --amiga-red-glow: rgba(220, 38, 38, 0.4);
  --amiga-blue: #1e40af;
  --amiga-cyan: #38bdf8;
  --amiga-cyan-glow: rgba(56, 189, 248, 0.35);
  --amiga-gold: #f59e0b;
  --amiga-gold-glow: rgba(245, 158, 11, 0.35);
  --led-green: #22c55e;
  --led-green-glow: rgba(34, 197, 94, 0.6);
  --bg-dark: #0a0b0e;
  --panel-bg: #14161d;
  --panel-border: #232733;
  --monitor-chassis: #20222b;
  --monitor-bezel: #111217;
  --text-main: #f1f5f9;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --font-mono: 'Share Tech Mono', 'Courier New', Courier, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Custom Clean Scrollbars */
body::-webkit-scrollbar,
.games-list-scroll::-webkit-scrollbar,
.crt-info-scroll::-webkit-scrollbar {
  width: 8px;
}
body::-webkit-scrollbar-track,
.games-list-scroll::-webkit-scrollbar-track,
.crt-info-scroll::-webkit-scrollbar-track {
  background: #0a0b0e;
}
body::-webkit-scrollbar-thumb,
.games-list-scroll::-webkit-scrollbar-thumb,
.crt-info-scroll::-webkit-scrollbar-thumb {
  background: #2a2f40;
  border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover,
.games-list-scroll::-webkit-scrollbar-thumb:hover,
.crt-info-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--amiga-red);
}

/* Yatay scrollbar kesinlikle gosterilmez */
*::-webkit-scrollbar:horizontal {
  display: none !important;
  height: 0 !important;
}

/* ========================================================
   TOP AMIGA HEADER
   ======================================================== */
#amiga-header {
  height: 56px;
  min-height: 56px;
  background: #101217;
  border-bottom: 2px solid #232733;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.boing-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--amiga-red) 65%, #7f1d1d 100%);
  box-shadow: 0 0 12px var(--amiga-red-glow);
  animation: spin-boing 8s linear infinite;
}

@keyframes spin-boing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title span {
  background: var(--amiga-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.header-indicators {
  display: flex;
  align-items: center;
  gap: 16px;
}

.active-user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1c202d;
  border: 1px solid #30374a;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: #fbbf24;
  font-weight: 600;
}

.hw-led {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-dim);
}

.led-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.led-power {
  background: var(--led-green);
  box-shadow: 0 0 8px var(--led-green-glow);
}
.led-drive {
  background: var(--amiga-gold);
  box-shadow: 0 0 8px var(--amiga-gold-glow);
  animation: drive-blink 1.8s ease-in-out infinite;
}

@keyframes drive-blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.nav-btn {
  background: #1e222d;
  border: 1px solid #333a4d;
  color: #e2e8f0;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.nav-btn:hover {
  background: var(--amiga-red);
  border-color: var(--amiga-red);
  color: #fff;
  box-shadow: 0 0 12px var(--amiga-red-glow);
}

/* ========================================================
   2-COLUMN MAIN LAYOUT (SOLDA GALERİ KARTLARI, ORTADA 1084S MONİTÖR & DECK)
   ======================================================== */
#main-layout {
  flex: 1;
  height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 395px 1fr;
  gap: 16px;
  padding: 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.col-panel {
  height: 100%;
  min-height: 0;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.panel-header {
  padding: 12px 16px;
  background: #101217;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.total-badge {
  background: #1e2433;
  border: 1px solid #323b54;
  color: var(--amiga-cyan);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ========================================================
   COLUMN 1: SOLDA KARTLAR GALERİSİ (ARCHIVE CARDS LIST)
   ======================================================== */
#gallery-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.games-search-box {
  padding: 10px 14px;
  background: #181a24;
  border-bottom: 1px solid var(--panel-border);
}

.search-input {
  width: 100%;
  background: #0f1015;
  border: 1px solid #2a2f40;
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: border 0.2s;
  font-family: inherit;
}
.search-input:focus {
  border-color: var(--amiga-gold);
}

.games-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  background: #14161e;
  border-bottom: 1px solid var(--panel-border);
  overflow-x: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.games-filter-pills::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.filter-pill {
  background: #1e222f;
  border: 1px solid #2e3447;
  color: var(--text-dim);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: var(--font-mono);
}
.filter-pill.active, .filter-pill:hover {
  background: var(--amiga-red);
  color: #fff;
  border-color: var(--amiga-red);
  box-shadow: 0 0 8px var(--amiga-red-glow);
}

.games-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

/* WIDE RETRO CARD */
.game-card {
  background: #181b25;
  border: 1px solid #272d3f;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.game-card:hover {
  background: #202433;
  border-color: var(--amiga-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.game-card.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.14) 0%, #1c202d 100%);
  border-color: var(--amiga-red);
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.28);
}

.game-card.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--amiga-red);
  border-radius: 10px 0 0 10px;
  box-shadow: 0 0 8px var(--amiga-red);
}

.game-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-thumb-box {
  width: 54px;
  height: 54px;
  background: #0d0e13;
  border: 1px solid #2b3042;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

.game-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.game-card:hover .game-thumb-img {
  transform: scale(1.08);
}

.game-info {
  flex: 1;
  min-width: 0;
}

.card-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.card-id-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--amiga-gold);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.fav-indicator {
  color: #ef4444;
  font-size: 11px;
}

.game-title {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-dim);
}

.genre-badge {
  background: #282f42;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  color: var(--amiga-cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

/* ========================================================
   COLUMN 2: ORTADA COMMODORE 1084S MONITOR & CONTROL TRAY
   ======================================================== */
#monitor-column {
  display: flex;
  flex-direction: column;
  background: #121319;
  border: 1px solid #282b37;
  overflow: hidden;
}

.crt-outer-case {
  flex: 1;
  min-height: 0;
  background: var(--monitor-chassis);
  border-radius: 8px;
  margin: 8px;
  display: flex;
  flex-direction: column;
  border: 4px solid #323542;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

/* Top Bezel of 1084S */
.crt-top-bezel {
  height: 32px;
  background: linear-gradient(180deg, #2b2e3a 0%, #20222a 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 2px solid #15161c;
  flex-shrink: 0;
}

.cbm-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #cbd5e1;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cbm-badge span {
  color: var(--amiga-red);
}

.crt-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cbm-switch-btn {
  background: #14161e;
  border: 1px solid #343a4e;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.cbm-switch-btn:hover {
  background: #252b3d;
  color: #fff;
  border-color: var(--amiga-gold);
}
.cbm-switch-btn.active {
  background: var(--amiga-red);
  border-color: var(--amiga-red);
  color: #fff;
  box-shadow: 0 0 8px var(--amiga-red-glow);
}

/* CRT Screen Housing */
.crt-screen-housing {
  flex: 1;
  min-height: 0;
  background: #000;
  margin: 8px 12px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  border: 3px solid #14151a;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.95), 0 0 3px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.crt-photo-screen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  filter: contrast(1.06) brightness(0.98);
  transition: opacity 0.2s ease, transform 0.3s ease;
  user-select: none;
}

/* CRT Scanlines Overlay */
.crt-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.3) 50%
  );
  background-size: 100% 4px;
  z-index: 20;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.crt-scanlines.disabled {
  opacity: 0;
}

/* CRT Screen OSD Banner */
.crt-osd-banner {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  background: rgba(10, 11, 16, 0.82);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 25;
  pointer-events: none;
}
.osd-id {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--amiga-gold);
  font-weight: 700;
}
.osd-title {
  font-size: 11px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
  text-align: right;
}

/* CRT Navigation Arrows */
.crt-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 48px;
  background: rgba(16, 18, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  border-radius: 6px;
  transition: all 0.15s;
  outline: none;
}
.crt-nav-btn:hover {
  background: var(--amiga-red);
  border-color: var(--amiga-red);
  box-shadow: 0 0 12px var(--amiga-red-glow);
  transform: translateY(-50%) scale(1.08);
}
.crt-nav-prev {
  left: 10px;
}
.crt-nav-next {
  right: 10px;
}

/* Progress bar inside screen */
.crt-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 25;
}
.crt-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--amiga-red);
  box-shadow: 0 0 6px var(--amiga-red-glow);
  transition: width 0.1s linear;
}

/* Bottom Bezel of 1084S */
.crt-bottom-bezel {
  height: 36px;
  background: linear-gradient(180deg, #22242d 0%, #1a1b22 100%);
  border-top: 2px solid #14151a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.crt-knobs {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crt-led-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #94a3b8;
}

.crt-index-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--amiga-cyan);
  font-weight: 700;
  background: #11131a;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #232736;
}

/* ========================================================
   BOTTOM CONTROL & INFO TRAY (ORTADA RESIMLERIN ALTINDA)
   INFO - DOWNLOAD - DELETE - COPY - FAVORITE
   ======================================================== */
#crt-control-tray {
  background: #101218;
  border-top: 1px solid var(--panel-border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  max-height: 220px;
}

.crt-info-scroll {
  overflow-y: auto;
  max-height: 125px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 6px;
}

.info-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.active-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.info-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.info-pill {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.pill-id {
  background: #2a2010;
  border: 1px solid #78350f;
  color: #fbbf24;
}
.pill-cat {
  background: #172554;
  border: 1px solid #1e40af;
  color: #60a5fa;
}
.pill-engine {
  background: #132219;
  border: 1px solid #15803d;
  color: #4ade80;
}

.active-card-scene {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.active-card-prompt-box {
  background: #0a0c12;
  border: 1px solid #1e2230;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #94a3b8;
  line-height: 1.4;
  word-break: break-word;
}
.prompt-label {
  color: var(--amiga-cyan);
  font-weight: 700;
  margin-right: 6px;
}

/* ACTION BUTTONS ROW (DOWNLOAD - DELETE - COPY - FAV) */
.crt-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px dashed #232839;
}

.retro-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  outline: none;
  user-select: none;
}

.btn-download {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
}
.btn-download:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
  transform: translateY(-1px);
}

.btn-delete {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #f87171;
}
.btn-delete:hover {
  background: var(--amiga-red);
  border-color: var(--amiga-red);
  color: #fff;
  box-shadow: 0 0 12px var(--amiga-red-glow);
  transform: translateY(-1px);
}

.btn-copy {
  background: #1e2230;
  border: 1px solid #333a4f;
  color: #cbd5e1;
}
.btn-copy:hover {
  background: #2b3248;
  border-color: var(--amiga-cyan);
  color: #fff;
  box-shadow: 0 0 10px var(--amiga-cyan-glow);
  transform: translateY(-1px);
}

.btn-fav {
  background: #1e2230;
  border: 1px solid #333a4f;
  color: #cbd5e1;
}
.btn-fav:hover {
  background: #2b3248;
  border-color: #ec4899;
  color: #fff;
  transform: translateY(-1px);
}
.btn-fav.active {
  background: rgba(236, 72, 153, 0.2);
  border-color: #ec4899;
  color: #f472b6;
}

/* ========================================================
   MODALS: SİLME ONAYI & 8K LIGHTBOX & TOAST
   ======================================================== */
.retro-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.delete-modal-card {
  background: #14161f;
  border: 2px solid var(--amiga-red);
  box-shadow: 0 0 25px rgba(220, 38, 38, 0.4);
  border-radius: 10px;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.delete-modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f87171;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.delete-modal-title {
  font-size: 16px;
  color: #fff;
  font-weight: 700;
}

.delete-modal-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

.delete-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* Lightbox Modal */
.lightbox-card {
  background: #0d0f15;
  border: 2px solid #333a4e;
  border-radius: 12px;
  width: 95vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-header {
  height: 44px;
  background: #141620;
  border-bottom: 1px solid #232736;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.lightbox-close-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close-btn:hover {
  color: var(--amiga-red);
}

.lightbox-body {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Toast */
.retro-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #161a24;
  border: 1px solid var(--amiga-cyan);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 12px var(--amiga-cyan-glow);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
}
.retro-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  #main-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
  #gallery-column {
    height: 380px;
  }
  #monitor-column {
    height: 580px;
  }
}

/* Responsive gallery repair: existing palette and CRT shell retained. */
body { width:100%; height:auto; min-height:100dvh; overflow:auto; }
#amiga-header { height:auto; min-height:64px; flex-wrap:wrap; gap:14px; padding:14px 20px; }
.brand-section,.brand-title,.header-indicators { flex-wrap:wrap; min-width:0; }
#main-layout { height:auto; min-height:calc(100dvh - 80px); overflow:visible; grid-template-columns:minmax(300px,360px) minmax(0,1fr); align-items:start; max-width:1680px; width:100%; margin:0 auto; }
#gallery-column { height:calc(100dvh - 112px); min-height:500px; position:sticky; top:16px; }
#monitor-column { height:auto; overflow:visible; min-width:0; }
.crt-outer-case { flex:none; }
.crt-screen-housing { flex:none; aspect-ratio:16 / 10; min-height:0; }
.crt-photo-screen { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.crt-top-bezel,.crt-bottom-bezel { height:auto; min-height:44px; flex-wrap:wrap; gap:10px; padding:12px; }
.crt-top-controls,.crt-actions-row { flex-wrap:wrap; }
#crt-control-tray { max-height:none; flex:none; }
.crt-info-scroll { max-height:none; overflow:visible; }
.active-card-prompt-box { max-height:150px; overflow:auto; }
.game-card { min-width:0; }
.game-title { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.game-thumb-box { width:88px; height:64px; flex-shrink:0; }
.game-thumb-img { object-fit:contain; background:var(--bg-dark); }
button:focus-visible,a:focus-visible,.game-card:focus-visible,input:focus-visible { outline:2px solid var(--amiga-cyan); outline-offset:3px; }
button:disabled { opacity:.45; cursor:default; }
.lightbox-body { min-height:0; }
.lightbox-img { width:100%; height:100%; }
@media(max-width:1000px) { #main-layout { grid-template-columns:minmax(260px,310px) minmax(0,1fr); gap:12px; padding:12px; } .hw-led { display:none; } }
@media(max-width:760px) { #main-layout { display:flex; flex-direction:column; } #monitor-column { order:0; width:100%; height:auto; } #gallery-column { order:1; position:static; width:100%; height:auto; min-height:0; } .games-list-scroll { max-height:60dvh; } .brand-title { font-size:12px; } .header-indicators { gap:8px; } .crt-screen-housing { aspect-ratio:4/3; } .crt-actions-row .retro-btn { flex:1 1 140px; min-height:44px; } .crt-top-controls { gap:6px; } .cbm-switch-btn { min-height:40px; } .lightbox-card { height:90dvh; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; scroll-behavior:auto!important; transition:none!important; } }

.osd-id { flex-shrink:0; white-space:nowrap; }
.osd-title { min-width:0; }
