/* ==========================================================================
   4. 3D WEBGL STAGE & PHYSICAL PHONE CHASSIS
   ========================================================================== */

/* ================= 3D WEBGL INTERACTIVE K800i STAGE ================= */
.phone3d-stage-wrapper {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-bottom: 12px;
}

/* ================= 8-DEVICE SELECTOR RIBBON ================= */
/* ================= 8-DEVICE SELECTOR DROPDOWN (Y2K MAGAZINE SYSTEM) ================= */
.device-selector-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-cream);
  background-image: var(--paper-grain-img);
  background-repeat: repeat;
  background-size: 512px 512px;
  background-blend-mode: multiply;
  border: 2px solid var(--ink-black);
  border-radius: 4px;
  padding: 5px 8px;
  margin-bottom: 6px;
  box-shadow: var(--shadow-print-sm);
  box-sizing: border-box;
}

.device-selector-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-red);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.device-select-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.device-styled-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #181B22;
  color: #FFFFFF;
  border: 1.5px solid var(--ink-black);
  border-radius: 3px;
  padding: 6px 28px 6px 9px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.device-styled-select:hover {
  background: #242934;
  border-color: var(--ink-red);
}

.device-styled-select:focus {
  outline: none;
  border-color: var(--ink-red);
  box-shadow: 0 0 0 2px var(--ink-yellow);
}

.device-styled-select option {
  background: #181B22;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.82rem;
  padding: 6px;
}

.select-chevron {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: var(--font-tech);
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--ink-yellow);
}

.phone3d-toolbar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  background: var(--paper-cream);
  padding: 4px;
  border-radius: 4px;
  border: 2px solid var(--ink-black);
  box-shadow: var(--shadow-print-sm);
  box-sizing: border-box;
}

.phone3d-presets-group {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

/* Mechanism kinematics bar */
.mechanism-control-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #14171D;
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid #282C34;
  box-sizing: border-box;
}

.btn-mech-toggle {
  background: transparent;
  color: var(--ink-yellow);
  border: none;
  padding: 2px 4px;
  font-family: var(--font-display);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-mech-toggle:hover {
  color: #FFFFFF;
}

.btn-mech-toggle:active {
  transform: scale(0.96);
  color: var(--ink-orange);
}

.mech-slider-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mech-slider-icon {
  font-size: 0.7rem;
}

.mech-range-slider {
  width: 75px;
  height: 5px;
  -webkit-appearance: none;
  background: #2A303D;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.mech-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-yellow);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.btn-3d-preset {
  background: #FFFFFF;
  color: var(--ink-black);
  border: 1px solid var(--ink-black);
  border-radius: 3px;
  padding: 5px 4px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-3d-preset:hover {
  background: var(--paper-bg);
  color: var(--ink-black);
  border-color: var(--ink-black);
}

.btn-3d-preset.active {
  background: var(--ink-black);
  color: #FFFFFF;
  border-color: var(--ink-black);
  box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4);
}

.phone3d-viewport {
  width: 100%;
  height: 560px;
  background: transparent !important;
  border-radius: 0;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  touch-action: none;
}

.phone3d-viewport canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

.phone3d-bottom-controls {
  width: 100%;
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.phone3d-bottom-controls .btn-3d-power {
  flex: 1.6;
}

.phone3d-bottom-controls .btn-3d-sound {
  flex: 0.8;
}

.phone3d-bottom-controls .btn-3d-fullscreen {
  flex: 1.2;
}

.phone3d-hint {
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.62rem;
  color: var(--ink-secondary);
  margin-top: 6px;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

/* The K800i Physical Chassis (Constructed to Exact Proportion) */
.k800i-phone-body {
  width: 320px;
  background: var(--se-body);
  border: 3px solid var(--se-body-dark);
  border-radius: 20px;
  box-shadow: 
    0 0 0 2px var(--se-silver-trim),
    0 12px 28px rgba(0, 0, 0, 0.45),
    var(--shadow-print);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Top Ear Speaker & Landscape Game Keys (A and B) */
.k800i-top-cluster {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.k800i-gamekey {
  background: #25282F;
  color: #8C929D;
  border: 1px solid #444;
  border-radius: 4px;
  width: 22px;
  height: 18px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.k800i-earpiece {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.earpiece-slot {
  width: 50px;
  height: 4px;
  background: #000;
  border-radius: 2px;
  border-bottom: 1px solid #444;
}

.earpiece-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Sony Ericsson Liquid Emblem */
.se-liquid-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF 0%, var(--se-orb-green) 50%, #1A4D00 100%);
  border: 1px solid #000;
  display: inline-block;
}

.se-text-logo {
  font-family: 'Arial', sans-serif;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: #FFFFFF;
}

/* Screen Bezel & QVGA Housing */
.k800i-screen-bezel {
  background: #000000;
  border: 3px solid #2B2F38;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9);
}

.k800i-screen-glass {
  width: 240px;
  height: 320px;
  margin: 0 auto;
  background: #0A0D10;
  position: relative;
  overflow: hidden;
  border: 1px solid #111;
}

/* Phone LCD Top Status Bar */
.k800i-lcd-statusbar {
  width: 240px;
  height: 20px;
  margin: 0 auto 6px auto;
  background: #14171C;
  color: #FFF;
  font-family: var(--font-tech);
  font-size: 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
}

.lcd-stat-mode {
  color: #39FF14;
  font-weight: bold;
}

.lcd-stat-sound {
  color: #00FF66;
  font-weight: bold;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  padding: 1px 4px;
  background: rgba(0, 255, 102, 0.12);
  border-radius: 2px;
}

.lcd-stat-sound.muted {
  color: #FF5555;
  background: rgba(255, 85, 85, 0.15);
}

.k800i-screen-layer {
  width: 240px;
  height: 320px;
  position: absolute;
  inset: 0;
}

.k800i-screen-layer.hidden {
  display: none;
}

.k800i-screen-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000000;
  display: block;
}

/* HTML5 Canvas Inside Phone Screen */
canvas.k800i-pixel-canvas {
  width: 240px;
  height: 320px;
  display: block;
  background: #000;
}

.lcd-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: #FFF;
  padding: 4px 8px;
  font-family: var(--font-tech);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Phone Power & Fullscreen Bar */
.k800i-power-bar {
  margin: 10px 0 8px;
  display: flex;
  gap: 8px;
}

.k800i-power-button {
  flex: 1.3;
  background: #252830;
  color: #FFF;
  border: 1px solid #3F4552;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.k800i-power-button:hover {
  background: #343844;
}

.k800i-power-button.power-on {
  background: #990000;
  border-color: #FF2222;
  color: #FFF;
}

.k800i-sound-toggle-btn {
  flex: 0.8;
  background: #1B1E26;
  color: #00FF66;
  border: 1px solid #3F4552;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.12s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.k800i-sound-toggle-btn:hover {
  background: #282C38;
}

.k800i-sound-toggle-btn.muted {
  color: #8E96A4;
  background: #14161C;
  border-color: #2D313B;
}

/* Authentic 2006 Retro Audio Advice Strip */
.k800i-audio-hint-strip {
  margin: 10px 0 6px;
  background: #FFFBE6;
  border: 1px dashed #D4A017;
  border-left: 4px solid #D9230F;
  padding: 8px 10px;
  border-radius: 2px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.08);
}

.k800i-audio-hint-strip .audio-hint-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.k800i-audio-hint-strip .audio-hint-body {
  font-family: var(--font-tech);
  font-size: 0.72rem;
  line-height: 1.35;
  color: #332A15;
}

.k800i-audio-hint-strip .audio-hint-body strong {
  color: #B31B00;
  font-family: var(--font-sans);
}

.k800i-fullscreen-toggle-btn {
  flex: 1;
  background: var(--ink-yellow);
  color: #000;
  border: 1px solid #000;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s;
  box-shadow: 2px 2px 0px #000;
}

.k800i-fullscreen-toggle-btn:hover {
  background: #FFE033;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

/* K800i Controls Panel (Softkeys + Joystick + Keypad) */
.k800i-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

/* Softkeys Row */
.k800i-softkeys-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.k800i-key {
  background: var(--se-key-bg);
  color: #FFF;
  border: 1px solid var(--se-key-border);
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.08s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 3px rgba(0, 0, 0, 0.6);
}

.k800i-key:active,
.k800i-key.active-press {
  transform: translate(1px, 2px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
  background: var(--ink-orange) !important;
  color: #FFF !important;
}

.k800i-lsk,
.k800i-rsk {
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
}

.k-keyhint {
  font-family: var(--font-tech);
  font-size: 0.55rem;
  color: #8C929D;
}

.k800i-cybershot-badge {
  font-family: 'Arial', sans-serif;
  font-size: 0.65rem;
  font-style: italic;
  font-weight: bold;
  color: var(--se-silver-trim);
}

/* Metal Joystick Cluster */
.k800i-joystick-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2px auto;
}

.k800i-joy-dir {
  background: transparent;
  border: none;
  color: #88909D;
  font-size: 0.7rem;
  padding: 2px 14px;
  cursor: pointer;
}

.k800i-joy-dir:hover {
  color: var(--ink-yellow);
}

.k800i-joy-mid {
  display: flex;
  align-items: center;
  gap: 10px;
}

.k800i-joy-center {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #E6EAF0 0%, #8A92A0 60%, #444A54 100%);
  border: 2px solid #222;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7), inset 0 1px 2px #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.08s;
}

.k800i-joy-center:active,
.k800i-joy-center.active-press {
  transform: translate(1px, 2px);
  background: var(--ink-orange);
}

.joy-metallic-center {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #333;
  border: 1px solid #777;
}

/* Auxiliary Keys Row (Back & Clear) */
.k800i-aux-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.k800i-aux-key {
  flex: 1;
  padding: 3px 6px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  color: #BAC2CE;
}

/* 3x4 Tactile Keypad */
.k800i-numeric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 4px;
}

.num-key {
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.n-val {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: #FFFFFF;
}

.n-txt {
  font-family: var(--font-tech);
  font-size: 0.55rem;
  color: #8C929D;
  margin-top: 1px;
}

.k800i-bottom-label {
  font-family: var(--font-tech);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  color: #727985;
  text-align: center;
  margin-top: 10px;
}

/* Thumbnails Strip Under Phone */
.deck-thumbs-strip {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  width: 100%;
  padding-bottom: 4px;
}

.thumb-item {
  width: 48px;
  height: 64px;
  border: 2px solid var(--ink-black);
  cursor: pointer;
  background: #000;
  flex-shrink: 0;
  transition: all 0.1s;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item:hover,
.thumb-item.active {
  border-color: var(--ink-red);
  transform: translateY(-2px);
  box-shadow: 2px 2px 0px #000;
}

