/* ==========================================================================
   90s Digital Camera Simulator - Complete Retro Hardware & OS Styling
   ========================================================================== */

:root {
  --camera-body-silver: linear-gradient(145deg, #e4e7eb 0%, #cbd2d9 45%, #9aa5b1 100%);
  --camera-bevel-highlight: #ffffff;
  --camera-bevel-shadow: #616e7c;
  --camera-grip: #2b2d30;
  --lcd-bg-monochrome: #8b9984;
  --lcd-bg-backlight: #44aa55;
  --lcd-text: #1a2218;
  --osd-green: #00ff66;
  --osd-yellow: #ffcc00;
  --osd-amber: #ff7700;
  --osd-red: #ff3333;
  --win98-bg: #008080;
  --win98-window-bg: #c0c0c0;
  --win98-border-light: #ffffff;
  --win98-border-dark: #808080;
  --win98-border-black: #000000;
  --win98-title-blue: linear-gradient(90deg, #000080 0%, #1084d0 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background: #14171a radial-gradient(circle at 50% 30%, #242a33 0%, #0d0f12 100%);
  color: #d1d5db;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* -------------------------------------------------------------
   Top Navigation & Workspace Header
   ------------------------------------------------------------- */
.app-header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #1f242d;
  border-bottom: 2px solid #323946;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  background: #ff6600;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.brand-title h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #f3f4f6;
}

.brand-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-left: 6px;
  font-weight: normal;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hdr-btn {
  background: #2b3240;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.hdr-btn:hover {
  background: #374151;
  border-color: #9ca3af;
  color: #fff;
}

.hdr-btn.active {
  background: #008080;
  border-color: #00cccc;
  color: #fff;
}

.hdr-btn.special {
  background: #ff6600;
  border-color: #ff8833;
  color: #fff;
}

.hdr-btn.special:hover {
  background: #ff7711;
}

/* -------------------------------------------------------------
   Main Simulation Container
   ------------------------------------------------------------- */
.main-stage {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px 40px;
  gap: 20px;
}

/* Quick Bar for Scene Selection & Malfunction */
.quick-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1f242d;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #374151;
  font-size: 13px;
}

.quick-bar-label {
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.scene-select-btn {
  background: #2d3748;
  border: 1px solid #4a5568;
  color: #e2e8f0;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.scene-select-btn.active {
  background: #ff6600;
  border-color: #ff8533;
  color: #ffffff;
}

.scene-select-btn:hover:not(.active) {
  background: #3a4556;
}

.malfunction-btn {
  background: #742a2a;
  border: 1px solid #9b2c2c;
  color: #feb2b2;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.malfunction-btn:hover {
  background: #9b2c2c;
  color: #fff;
}

/* -------------------------------------------------------------
   PHYSICAL CAMERA HARDWARE BODY
   ------------------------------------------------------------- */
.camera-chassis {
  position: relative;
  width: 780px;
  background: var(--camera-body-silver);
  border-radius: 28px 36px 24px 24px;
  padding: 24px 28px 24px 32px;
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.7),
    inset 2px 2px 4px var(--camera-bevel-highlight),
    inset -2px -2px 6px var(--camera-bevel-shadow),
    0 0 0 2px #4b5563;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #8492a6;
}

/* Screws in corners */
.screw {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #b0b8c1 30%, #525a65 90%);
  border-radius: 50%;
  border: 1px solid #374151;
  box-shadow: inset 1px 1px 1px #fff;
}

.screw::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 1px;
  width: 6px;
  height: 1px;
  background: #2d3748;
}

.screw-tl { top: 12px; left: 14px; }
.screw-tr { top: 12px; right: 14px; }
.screw-bl { bottom: 12px; left: 14px; }
.screw-br { bottom: 12px; right: 14px; }

/* Left Rubber Grip Texture */
.camera-grip-strip {
  position: absolute;
  top: 45px;
  left: -12px;
  width: 28px;
  height: calc(100% - 90px);
  background: #1e2022;
  border-radius: 8px 0 0 8px;
  box-shadow:
    inset 2px 0 4px rgba(255, 255, 255, 0.15),
    inset -2px 0 6px rgba(0, 0, 0, 0.8),
    -4px 4px 10px rgba(0, 0, 0, 0.5);
  background-image: radial-gradient(#3a3d42 20%, transparent 20%);
  background-size: 4px 4px;
}

/* -------------------------------------------------------------
   TOP CAMERA SHOULDER / STATUS PANEL
   ------------------------------------------------------------- */
.camera-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #adb5bd;
  border-radius: 14px;
  padding: 10px 18px;
  border: 2px solid #6c757d;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(255, 255, 255, 0.4);
}

.camera-brand-text {
  display: flex;
  flex-direction: column;
}

.cam-brand-main {
  font-family: "Arial Black", Gadget, sans-serif;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #1f2937;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cam-brand-sub {
  font-size: 10px;
  font-weight: 700;
  color: #4b5563;
  letter-spacing: 0.8px;
}

/* MONOCHROME SEGMENTED TOP STATUS LCD */
.top-status-lcd {
  position: relative;
  background: var(--lcd-bg-monochrome);
  border: 3px solid #374151;
  border-radius: 6px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.6),
    0 1px 1px rgba(255, 255, 255, 0.8);
  transition: background 0.3s ease;
}

.top-status-lcd.backlit {
  background: var(--lcd-bg-backlight);
  box-shadow:
    inset 0 0 10px rgba(0, 255, 100, 0.4),
    0 0 8px rgba(0, 255, 100, 0.3);
}

.lcd-segment-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: monospace;
  font-weight: 900;
  color: var(--lcd-text);
  line-height: 1.1;
}

.lcd-label {
  font-size: 8px;
  letter-spacing: 0.5px;
  opacity: 0.75;
}

.lcd-value {
  font-size: 15px;
  letter-spacing: 1px;
}

.shots-lcd {
  border-right: 1px solid rgba(0, 0, 0, 0.25);
  padding-right: 12px;
}

.shots-lcd .lcd-value {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
}

.lcd-backlight-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  opacity: 0.65;
  padding: 2px;
}

.lcd-backlight-toggle:hover {
  opacity: 1;
}

/* TOP RIGHT SHUTTER & POWER CONTROLS */
.top-controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Mode Dial Switch (OFF / REC / PLAY) */
.power-slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.power-labels {
  display: flex;
  gap: 10px;
  font-size: 9px;
  font-weight: 800;
  color: #374151;
}

.power-switch-housing {
  background: #374151;
  border-radius: 12px;
  padding: 2px;
  display: flex;
  border: 1px solid #1f2937;
}

.power-btn {
  background: #4b5563;
  border: none;
  color: #d1d5db;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.power-btn.active {
  background: #f3f4f6;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Big Physical Shutter Button */
.shutter-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shutter-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #d1d5db 50%, #9ca3af 90%, #6b7280 100%);
  border: 3px solid #4b5563;
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px #ffffff,
    inset 0 -3px 6px #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
  position: relative;
}

.shutter-btn::after {
  content: '';
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px dashed #6b7280;
  background: radial-gradient(circle, #e5e7eb 40%, #cbd5e1 100%);
}

.shutter-btn:active, .shutter-btn.pressed {
  transform: translateY(3px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px #ffffff,
    inset 0 -1px 3px #4b5563;
}

.shutter-btn.half-pressed {
  transform: translateY(1.5px);
  border-color: #10b981;
}

.shutter-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #4b5563;
  margin-top: 3px;
}

/* -------------------------------------------------------------
   CAMERA MAIN BODY: REAR VIEW WITH LCD & TACTILE CONTROLS
   ------------------------------------------------------------- */
.camera-body-main {
  display: flex;
  gap: 22px;
  align-items: center;
}

/* Left Optical Viewfinder Window & Flash Indicator */
.viewfinder-eyepiece-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 60px;
}

.optical-viewfinder-window {
  width: 48px;
  height: 36px;
  background: #111827;
  border: 3px solid #4b5563;
  border-radius: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.optical-glass-glare {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 80px;
  height: 25px;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(35deg);
}

.viewfinder-crosshair {
  width: 16px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Status LEDs */
.camera-leds {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

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

.led-lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #374151;
  border: 1px solid #1f2937;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: all 0.15s ease;
}

.led-lamp.green.active {
  background: #00ff66;
  box-shadow: 0 0 8px #00ff66, inset 0 0 3px #ffffff;
}

.led-lamp.red.active {
  background: #ff2222;
  box-shadow: 0 0 8px #ff2222, inset 0 0 3px #ffffff;
}

.led-lamp.orange.active {
  background: #ff8800;
  box-shadow: 0 0 8px #ff8800, inset 0 0 3px #ffffff;
}

.led-label-text {
  font-size: 7px;
  font-weight: 800;
  color: #4b5563;
}

/* -------------------------------------------------------------
   MAIN COLOR TFT LCD SCREEN UNIT
   ------------------------------------------------------------- */
.lcd-screen-housing {
  position: relative;
  width: 480px;
  height: 360px;
  background: #111827;
  border: 8px solid #2d3748;
  border-radius: 12px;
  box-shadow:
    inset 0 4px 12px rgba(0, 0, 0, 0.9),
    0 2px 4px rgba(255, 255, 255, 0.5),
    0 6px 14px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* WebGL Canvas */
#cameraViewfinderCanvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

/* LCD Glass Reflection Glare */
.lcd-glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 30%, transparent 60%);
  pointer-events: none;
  z-index: 10;
}

/* Scanline / Pixel Grid Texture */
.lcd-pixel-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9;
}

/* LCD Off State (Blank screen) */
.lcd-off-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0d0f12;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 15;
}

/* ON-SCREEN DISPLAY (OSD) OVERLAYS */
.lcd-osd-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 12px;
  font-family: monospace;
  font-weight: 900;
  font-size: 13px;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
}

.osd-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.osd-badge {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 3px;
}

.osd-center-brackets {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 40px;
  border: 2px dashed rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.osd-center-brackets.focusing {
  border: 2px solid var(--osd-yellow);
  width: 52px;
  height: 36px;
}

.osd-center-brackets.locked {
  border: 2px solid var(--osd-green);
  width: 48px;
  height: 32px;
  box-shadow: 0 0 8px var(--osd-green);
}

.osd-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.osd-timestamp {
  color: var(--osd-amber);
  font-size: 14px;
  letter-spacing: 1px;
}

/* 3x3 Composition Framing Grid */
.lcd-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  pointer-events: none;
  z-index: 7;
}

.lcd-grid-overlay div {
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* PROCESSING & WRITING DIALOG OVERLAY */
.lcd-processing-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 20, 35, 0.92);
  border: 2px solid #ff6600;
  border-radius: 6px;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-family: monospace;
  font-weight: 900;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.processing-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #4b5563;
  border-top-color: #ff6600;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* CLUNKY 90s ON-SCREEN MENU SYSTEM */
.lcd-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000088;
  color: #ffffff;
  font-family: "Courier New", Courier, monospace;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 25;
  border: 4px ridge #c0c0c0;
}

.menu-header {
  border-bottom: 2px solid #ffffff;
  padding-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
}

.menu-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.menu-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 900;
  border-radius: 2px;
}

.menu-item-row.selected {
  background: #ffff00;
  color: #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.menu-footer-hint {
  border-top: 1px dashed rgba(255, 255, 255, 0.4);
  padding-top: 6px;
  font-size: 11px;
  color: #a0c0ff;
  display: flex;
  justify-content: space-between;
}

/* PLAYBACK / REVIEW MODE LCD VIEW */
.lcd-playback-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 22;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.playback-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  transition: transform 0.1s ease;
}

.playback-osd {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  font-family: monospace;
  font-weight: 900;
  font-size: 13px;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
  pointer-events: none;
}

.playback-bottom-osd {
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  font-family: monospace;
  font-weight: 900;
  font-size: 12px;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
  pointer-events: none;
}

/* 9-Up Thumbnail Contact Sheet */
.lcd-thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 6px;
  width: 100%;
  height: 100%;
  padding: 8px;
  background: #111827;
}

.thumb-cell {
  position: relative;
  background: #1f2937;
  border: 2px solid #374151;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.thumb-cell.selected {
  border-color: #ff6600;
  box-shadow: 0 0 6px #ff6600;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.thumb-idx {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-family: monospace;
  font-size: 10px;
  padding: 1px 3px;
}

/* Delete Confirmation Modal */
.delete-confirm-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #b22222;
  border: 3px ridge #ff9999;
  padding: 14px 20px;
  color: #fff;
  font-family: monospace;
  font-weight: 900;
  text-align: center;
  z-index: 30;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
}

.delete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.del-btn {
  background: #ffffff;
  color: #000000;
  border: 2px solid #333333;
  padding: 4px 14px;
  font-weight: 900;
  font-family: monospace;
  cursor: pointer;
}

.del-btn.danger {
  background: #ffcccc;
}

/* -------------------------------------------------------------
   RIGHT CONTROL CLUSTER (D-PAD & TACTILE BUTTONS)
   ------------------------------------------------------------- */
.camera-controls-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 150px;
}

/* Optical Zoom Rocker (W / T) */
.zoom-rocker-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.zoom-rocker-label {
  font-size: 9px;
  font-weight: 800;
  color: #4b5563;
}

.zoom-rocker {
  display: flex;
  background: #374151;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid #1f2937;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zoom-btn {
  width: 44px;
  height: 32px;
  background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%);
  border: 1px solid #374151;
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.zoom-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.zoom-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.zoom-btn:active {
  background: #374151;
  transform: translateY(1px);
}

/* Tactile 4-Way D-Pad with Center SET Button */
.dpad-container {
  position: relative;
  width: 110px;
  height: 110px;
  background: #2b303a;
  border-radius: 50%;
  border: 2px solid #4a5568;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.8),
    0 2px 4px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dpad-cross {
  position: relative;
  width: 96px;
  height: 96px;
}

.dpad-btn {
  position: absolute;
  background: #4a5568;
  border: 1px solid #2d3748;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
}

.dpad-btn:active {
  background: #2d3748;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.dpad-up {
  top: 2px;
  left: 32px;
  width: 32px;
  height: 28px;
  border-radius: 6px 6px 0 0;
}

.dpad-down {
  bottom: 2px;
  left: 32px;
  width: 32px;
  height: 28px;
  border-radius: 0 0 6px 6px;
}

.dpad-left {
  top: 32px;
  left: 2px;
  width: 28px;
  height: 32px;
  border-radius: 6px 0 0 6px;
}

.dpad-right {
  top: 32px;
  right: 2px;
  width: 28px;
  height: 32px;
  border-radius: 0 6px 6px 0;
}

.dpad-center {
  position: absolute;
  top: 32px;
  left: 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #718096 0%, #4a5568 100%);
  border: 1px solid #2d3748;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.dpad-center:active {
  background: #2d3748;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Push Buttons Cluster: MENU, DISP, PLAY, FLASH, TRASH */
.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px 10px;
  width: 100%;
}

.cam-btn {
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  border: 1px solid #64748b;
  border-radius: 14px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3), inset 0 1px 1px #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.08s ease;
}

.cam-btn:active {
  transform: translateY(1.5px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cam-btn.special-play {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
  color: #ffffff;
  border-color: #1d4ed8;
}

.cam-btn.special-trash {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #b91c1c;
}

/* Lens Details Imprinted on Bottom of Camera */
.camera-bottom-lens-specs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #a0aec0;
  padding-top: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #4a5568;
  letter-spacing: 0.8px;
}

/* -------------------------------------------------------------
   DESKTOP 1998 / WINDOWS 98 CARD READER MODAL
   ------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-backdrop.open {
  display: flex;
}

.win98-window {
  width: 860px;
  max-width: 95vw;
  max-height: 90vh;
  background: var(--win98-window-bg);
  border: 3px solid;
  border-color: var(--win98-border-light) var(--win98-border-black) var(--win98-border-black) var(--win98-border-light);
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  color: #000;
}

.win98-titlebar {
  background: var(--win98-title-blue);
  color: #fff;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.win98-title-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win98-controls {
  display: flex;
  gap: 2px;
}

.win98-btn {
  background: var(--win98-window-bg);
  border: 2px solid;
  border-color: var(--win98-border-light) var(--win98-border-black) var(--win98-border-black) var(--win98-border-light);
  width: 18px;
  height: 16px;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.win98-btn:active {
  border-color: var(--win98-border-black) var(--win98-border-light) var(--win98-border-light) var(--win98-border-black);
}

.win98-menubar {
  display: flex;
  background: var(--win98-window-bg);
  padding: 4px 8px;
  border-bottom: 1px solid var(--win98-border-dark);
  font-size: 12px;
  gap: 14px;
}

.win98-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--win98-window-bg);
  padding: 6px 8px;
  border-bottom: 2px groove #fff;
  flex-wrap: wrap;
}

.win98-action-btn {
  background: var(--win98-window-bg);
  border: 2px solid;
  border-color: var(--win98-border-light) var(--win98-border-black) var(--win98-border-black) var(--win98-border-light);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.win98-action-btn:active {
  border-color: var(--win98-border-black) var(--win98-border-light) var(--win98-border-light) var(--win98-border-black);
}

.win98-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  padding: 8px;
  gap: 10px;
}

.win98-file-list {
  flex: 3;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--win98-border-dark) var(--win98-border-light) var(--win98-border-light) var(--win98-border-dark);
  overflow-y: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  grid-gap: 12px;
  align-content: start;
}

.win98-file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border: 1px dotted transparent;
  cursor: pointer;
  text-align: center;
}

.win98-file-item.selected {
  background: #000080;
  color: #ffffff;
  border-color: #ffff00;
}

.win98-file-thumb {
  width: 90px;
  height: 70px;
  object-fit: contain;
  background: #000;
  border: 1px solid #888;
  image-rendering: pixelated;
}

.win98-file-title {
  font-size: 11px;
  margin-top: 4px;
  word-break: break-all;
}

.win98-file-info {
  font-size: 9px;
  opacity: 0.8;
}

/* Preview Sidebar on Right */
.win98-sidebar {
  flex: 2;
  background: var(--win98-window-bg);
  border: 2px solid;
  border-color: var(--win98-border-dark) var(--win98-border-light) var(--win98-border-light) var(--win98-border-dark);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.preview-box {
  width: 100%;
  height: 180px;
  background: #000;
  border: 1px solid #888;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.win98-meta-table {
  font-size: 11px;
  width: 100%;
  border-collapse: collapse;
}

.win98-meta-table td {
  padding: 2px 4px;
}

.win98-meta-table td:first-child {
  font-weight: bold;
  color: #333;
  width: 40%;
}

.win98-statusbar {
  background: var(--win98-window-bg);
  border-top: 2px groove #fff;
  padding: 3px 8px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

/* -------------------------------------------------------------
   EXIF VIEWER DETAILED MODAL
   ------------------------------------------------------------- */
.exif-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #808080;
  padding: 0 4px;
}

.exif-tab {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 transparent #fff;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.exif-tab.active {
  background: #ffffff;
  border-color: #808080 #808080 #ffffff #808080;
  margin-bottom: -2px;
}

.exif-panel {
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: none;
}

.exif-panel.active {
  display: block;
}

.exif-group {
  margin-bottom: 16px;
}

.exif-group-title {
  font-size: 13px;
  font-weight: bold;
  color: #000080;
  border-bottom: 1px solid #808080;
  padding-bottom: 2px;
  margin-bottom: 6px;
}

.exif-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.exif-table tr:nth-child(even) {
  background: #f4f4f4;
}

.exif-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #e0e0e0;
}

.exif-table td.tag-label {
  font-weight: bold;
  color: #333;
  width: 35%;
}

.exif-hex-view {
  font-family: monospace;
  font-size: 11px;
  white-space: pre;
  background: #000;
  color: #00ff66;
  padding: 10px;
  border-radius: 3px;
  overflow-x: auto;
}

/* -------------------------------------------------------------
   PRINT PHOTO PREVIEW MODAL
   ------------------------------------------------------------- */
.print-paper-sheet {
  background: #ffffff;
  width: 480px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #000;
}

.print-photo-frame {
  width: 100%;
  height: 320px;
  background: #000;
  border: 6px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.print-photo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.print-caption {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

/* -------------------------------------------------------------
   BOTTOM HELP & KEYBOARD SHORTCUTS DOCK
   ------------------------------------------------------------- */
.shortcuts-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 20px;
  background: #1f242d;
  border: 1px solid #374151;
  border-radius: 8px;
  font-size: 12px;
  color: #9ca3af;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.keycap {
  background: #374151;
  color: #ffffff;
  border: 1px solid #4b5563;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  box-shadow: 0 2px 0 #1f2937;
}

/* -------------------------------------------------------------
   RESPONSIVENESS (SCALES SENSIBLY ON MOBILE/TABLET)
   ------------------------------------------------------------- */
@media (max-width: 820px) {
  .camera-chassis {
    width: 95vw;
    padding: 16px 14px;
    border-radius: 20px;
  }

  .camera-body-main {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .lcd-screen-housing {
    width: 100%;
    max-width: 480px;
    height: 320px;
  }

  .camera-controls-right {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
  }

  .viewfinder-eyepiece-column {
    display: none;
  }
}
