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

html, body {
  height: 100%;
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
  user-select: none;
}

.layout {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.room-panel {
  width: 300px;
  height: 340px;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #1a1a2e;
  transition: background 0.5s ease;
}

.room-scene {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

/* ===== Room theme: Basement/Cave (-5) ===== */
.room-neg5 {
  background: linear-gradient(180deg, #1a0a00 0%, #0d0500 60%, #3a1a00 100%);
}
.room-neg5 .cave-wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 20% 100%, #2a1500 0%, transparent 60%),
    radial-gradient(ellipse 80% 120% at 85% 90%, #1a0a00 0%, transparent 50%);
}
.room-neg5 .stalactite {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 40px solid #3a2510;
  opacity: 0.5;
}
.room-neg5 .stalactite:nth-child(2) { left: 40px; top: 0; border-top-color: #4a3020; }
.room-neg5 .stalactite:nth-child(3) { left: 130px; top: 0; border-top-color: #2a1a0a; height: 30px; }
.room-neg5 .stalactite:nth-child(4) { left: 220px; top: 0; border-top-color: #3a2510; height: 25px; }
.room-neg5 .lava-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(180deg, transparent, #ff4400);
  opacity: 0.4;
  box-shadow: 0 0 40px #ff440033;
  animation: lava-pulse 2s ease-in-out infinite;
}
@keyframes lava-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}
.room-neg5 .floor-label-text {
  color: #ff6633;
  text-shadow: 0 0 20px #ff440066;
}

/* ===== Room theme: Bunker (-4) ===== */
.room-neg4 {
  background: linear-gradient(180deg, #1a1a1a 0%, #222 100%);
}
.room-neg4 .bunker-wall {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 28px, #2a2a2a 28px, #2a2a2a 30px),
    repeating-linear-gradient(0deg, transparent, transparent 28px, #2a2a2a 28px, #2a2a2a 30px);
  opacity: 0.3;
}
.room-neg4 .vent {
  position: absolute;
  width: 40px;
  height: 12px;
  border: 1px solid #444;
  border-radius: 3px;
  background: #111;
  top: 40px;
  left: 40px;
}
.room-neg4 .vent::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: repeating-linear-gradient(90deg, #222 0px, #222 3px, transparent 3px, transparent 5px);
}
.room-neg4 .pipe {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  height: 8px;
  background: #444;
  border-radius: 4px;
}
.room-neg4 .pipe::before {
  content: '';
  position: absolute;
  right: 60px;
  top: -30px;
  width: 8px;
  height: 30px;
  background: #444;
  border-radius: 4px;
}

/* ===== Room theme: Subway (-3) ===== */
.room-neg3 {
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1a 100%);
}
.room-neg3 .track {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, #555 0px, #555 10px, #333 10px, #333 20px);
}
.room-neg3 .track::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: #444;
}
.room-neg3 .track::after {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 6px, rgba(255,200,50,0.08) 6px, rgba(255,200,50,0.08) 7px);
}
.room-neg3 .signal-light {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3333;
  box-shadow: 0 0 10px #ff333366;
  animation: signal-blink 1.5s steps(2) infinite;
}
@keyframes signal-blink {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
}
.room-neg3 .column {
  position: absolute;
  bottom: 36px;
  width: 14px;
  height: 160px;
  background: linear-gradient(180deg, #444, #333);
  border-radius: 3px 3px 0 0;
}
.room-neg3 .column:nth-child(3) { left: 40px; }
.room-neg3 .column:nth-child(4) { right: 40px; }

/* ===== Room theme: Parking (-2) ===== */
.room-neg2 {
  background: linear-gradient(180deg, #1a1a1a 0%, #222 40%, #1a1a1a 100%);
}
.room-neg2 .ceiling-light {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 6px;
  background: #555;
  border-radius: 0 0 4px 4px;
}
.room-neg2 .ceiling-light::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 30px;
  background: linear-gradient(180deg, rgba(255,255,200,0.15), transparent);
}
.room-neg2 .car-outline {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 50px;
  border: 2px solid #444;
  border-radius: 8px 8px 4px 4px;
  background: #2a2a2a;
}
.room-neg2 .car-outline::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 15px;
  right: 15px;
  height: 14px;
  border: 2px solid #444;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: #333;
}
.room-neg2 .car-outline::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 10px;
  right: 10px;
  height: 4px;
  background: #333;
  border-radius: 2px;
}

/* ===== Room theme: Storage (-1) ===== */
.room-neg1 {
  background: linear-gradient(135deg, #2a2a1a 0%, #1a1a0a 100%);
}
.room-neg1 .box {
  position: absolute;
  width: 40px;
  height: 30px;
  background: #3a3a2a;
  border: 1px solid #4a4a3a;
  border-radius: 2px;
}
.room-neg1 .box::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px dashed #4a4a3a;
  opacity: 0.5;
}
.room-neg1 .box:nth-child(2) { bottom: 50px; left: 30px; }
.room-neg1 .box:nth-child(3) { bottom: 90px; left: 80px; height: 40px; }
.room-neg1 .box:nth-child(4) { bottom: 50px; right: 50px; width: 50px; }
.room-neg1 .box:nth-child(5) { bottom: 90px; right: 30px; }
.room-neg1 .shelf {
  position: absolute;
  top: 30px;
  left: 20px;
  right: 20px;
  height: 4px;
  background: #5a4a3a;
  border-radius: 2px;
}
.room-neg1 .shelf::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  background: repeating-linear-gradient(90deg, #4a3a2a 0px, #4a3a2a 30px, transparent 30px, transparent 34px);
  border-radius: 2px;
}

/* ===== Room theme: Living Room (0) ===== */
.room-0 {
  background: linear-gradient(180deg, #2a2018 0%, #3a3028 100%);
}
.room-0 .window {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 70px;
  border: 3px solid #5a4a3a;
  border-radius: 3px;
  background: #1a2a3a;
}
.room-0 .window::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #5a4a3a;
}
.room-0 .window::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #5a4a3a;
}
.room-0 .lamp-shade {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 30px;
  background: #f0d080;
  border-radius: 20px 20px 4px 4px;
  box-shadow: 0 0 20px rgba(240,208,128,0.2), 0 -20px 20px rgba(240,208,128,0.1);
}
.room-0 .lamp-shade::after {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: #555;
}
.room-0 .couch {
  position: absolute;
  bottom: 10px;
  left: 20px;
  right: 20px;
  height: 30px;
  background: #5a4030;
  border-radius: 6px 6px 2px 2px;
}
.room-0 .couch::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 8px;
  right: 8px;
  height: 16px;
  background: #6a5040;
  border-radius: 6px 6px 0 0;
}
.room-0 .couch::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 4px;
  right: 4px;
  height: 8px;
  background: #7a6050;
  border-radius: 6px 6px 0 0;
  opacity: 0.5;
}

/* ===== Room theme: Office (1) ===== */
.room-1 {
  background: linear-gradient(180deg, #1a2230 0%, #222a38 100%);
}
.room-1 .desk {
  position: absolute;
  bottom: 20px;
  left: 30px;
  right: 30px;
  height: 24px;
  background: #3a3028;
  border-radius: 2px;
}
.room-1 .desk::before {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 10px;
  right: 10px;
  height: 16px;
  background: #2a2018;
  border-radius: 0 0 2px 2px;
}
.room-1 .monitor {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 26px;
  background: #0a0a1a;
  border: 2px solid #333;
  border-radius: 2px;
}
.room-1 .monitor::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 6px;
  background: #333;
}
.room-1 .screen-glow {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  background: linear-gradient(135deg, #0a2a0a 0%, #0a1a2a 100%);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.1);
}
.room-1 .chair {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  width: 20px;
  height: 16px;
  background: #1a1a2a;
  border-radius: 4px 4px 0 0;
}

/* ===== Room theme: Library (2) ===== */
.room-2 {
  background: linear-gradient(180deg, #1a1a1a 0%, #2a2018 100%);
}
.room-2 .bookshelf {
  position: absolute;
  top: 10px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border: 2px solid #4a3a2a;
  border-radius: 3px;
  background: #2a1a10;
}
.room-2 .bookshelf-inner {
  position: absolute;
  inset: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.room-2 .shelf-row {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 28px;
}
.room-2 .book {
  height: 100%;
  border-radius: 1px;
  flex-shrink: 0;
}
.room-2 .book:nth-child(1) { width: 8px; background: #8b4513; }
.room-2 .book:nth-child(2) { width: 10px; background: #a0522d; height: 80%; }
.room-2 .book:nth-child(3) { width: 6px; background: #6b3a2a; }
.room-2 .book:nth-child(4) { width: 12px; background: #8b6914; height: 90%; }
.room-2 .book:nth-child(5) { width: 7px; background: #a0522d; }
.room-2 .book:nth-child(6) { width: 9px; background: #5c3a1e; height: 70%; }

/* ===== Room theme: Garden (3) ===== */
.room-3 {
  background: linear-gradient(180deg, #1a2a30 0%, #1a2a1a 50%, #0a1a0a 100%);
}
.room-3 .sky {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(180deg, #2a3a4a 0%, #3a4a5a 100%);
}
.room-3 .plant {
  position: absolute;
  bottom: 10px;
  width: 30px;
  height: 50px;
}
.room-3 .plant::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 40px;
  background: #2a5a2a;
  border-radius: 2px;
}
.room-3 .plant::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #3a8a3a;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(60, 140, 60, 0.3);
}
.room-3 .plant:nth-child(3) { left: 30px; }
.room-3 .plant:nth-child(4) { left: 100px; height: 60px; }
.room-3 .plant:nth-child(4)::after { width: 26px; height: 26px; }
.room-3 .plant:nth-child(5) { right: 40px; height: 40px; }
.room-3 .plant:nth-child(5)::after { width: 16px; height: 16px; }
.room-3 .fence {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  height: 4px;
  background: #5a4a3a;
}
.room-3 .fence::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 10px;
  right: 10px;
  height: 6px;
  border-left: 2px solid #5a4a3a;
  border-right: 2px solid #5a4a3a;
}

/* ===== Room theme: Observatory (4) ===== */
.room-4 {
  background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 60%, #0a0a1a 100%);
}
.room-4 .stars {
  position: absolute;
  inset: 0;
}
.room-4 .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}
.room-4 .star:nth-child(1) { top: 20px; left: 40px; animation-delay: 0s; }
.room-4 .star:nth-child(2) { top: 50px; left: 120px; animation-delay: 0.5s; }
.room-4 .star:nth-child(3) { top: 30px; left: 200px; animation-delay: 1s; }
.room-4 .star:nth-child(4) { top: 70px; left: 60px; animation-delay: 0.3s; }
.room-4 .star:nth-child(5) { top: 80px; left: 180px; animation-delay: 0.8s; }
.room-4 .star:nth-child(6) { top: 15px; left: 150px; animation-delay: 1.5s; }
.room-4 .star:nth-child(7) { top: 60px; left: 260px; animation-delay: 0.2s; }
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.room-4 .telescope {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 60px;
  background: #444;
  border-radius: 4px;
}
.room-4 .telescope::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -8px;
  width: 24px;
  height: 12px;
  background: #555;
  border-radius: 6px;
  border: 1px solid #666;
}
.room-4 .telescope::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: -6px;
  right: -6px;
  height: 6px;
  background: #333;
  border-radius: 0 0 3px 3px;
}
.room-4 .moon {
  position: absolute;
  top: 25px;
  right: 30px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #aaa 0%, #ddd 100%);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(200,200,200,0.2);
}

/* ===== Room theme: Sky/Clouds (5+) ===== */
.room-high {
  background: linear-gradient(180deg, #1a2a4a 0%, #2a3a5a 30%, #3a4a6a 100%);
}
.room-high .cloud {
  position: absolute;
  background: rgba(200, 220, 255, 0.06);
  border-radius: 50%;
}
.room-high .cloud:nth-child(1) {
  width: 60px; height: 20px;
  top: 30px; left: 20px;
}
.room-high .cloud:nth-child(2) {
  width: 80px; height: 24px;
  top: 60px; left: 140px;
}
.room-high .cloud:nth-child(3) {
  width: 50px; height: 16px;
  top: 100px; left: 50px;
}
.room-high .cloud:nth-child(4) {
  width: 70px; height: 22px;
  top: 140px; left: 180px;
}
.room-high .cloud:nth-child(5) {
  width: 90px; height: 26px;
  top: 180px; left: 10px;
}
.room-high .cloud:nth-child(6) {
  width: 60px; height: 18px;
  top: 230px; left: 120px;
}
.room-high .space-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, #ffffff 0%, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 70% 15%, #ffffff 0%, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 40% 70%, #ffffff 0%, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 85% 60%, #ffffff 0%, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 10% 80%, #ffffff 0%, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 55% 45%, #ffffff 0%, #ffffff 1px, transparent 2px),
    radial-gradient(circle at 90% 85%, #ffffff 0%, #ffffff 1px, transparent 2px),
    linear-gradient(180deg, #050510 0%, #0a0a1a 50%, #030308 100%);
}

.room-high .space-earth {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #9cc4ff 0%, #4a8ad0 45%, #1a4a8a 70%, #0a2a5a 100%);
  box-shadow: 0 0 50px rgba(90, 160, 255, 0.5), inset -10px -8px 30px rgba(0,0,0,0.5);
  z-index: 3;
  transition: width 0.5s ease, height 0.5s ease;
}

.room-high .space-earth::before {
  content: '';
  position: absolute;
  left: 15%;
  top: 40%;
  width: 40%;
  height: 30%;
  border-radius: 50%;
  background: rgba(80, 220, 120, 0.5);
  filter: blur(2px);
}

.room-high .space-moon {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eeeeee 0%, #aaaaaa 45%, #777777 70%, #555555 100%);
  box-shadow: 0 0 60px rgba(220, 220, 220, 0.4), inset -10px -8px 30px rgba(0,0,0,0.5);
  z-index: 2;
  transition: width 0.5s ease, height 0.5s ease;
  pointer-events: none;
}

.room-high .space-moon::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 35%, #999 0%, #999 3px, transparent 4px),
    radial-gradient(circle at 60% 60%, #999 0%, #999 4px, transparent 5px),
    radial-gradient(circle at 45% 25%, #999 0%, #999 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, #999 0%, #999 3px, transparent 4px);
}

.room-high .moon-surface {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, #6a6a6a 0%, #6a6a6a 4px, transparent 5px),
    radial-gradient(circle at 70% 20%, #5a5a5a 0%, #5a5a5a 7px, transparent 8px),
    radial-gradient(circle at 40% 60%, #5a5a5a 0%, #5a5a5a 5px, transparent 6px),
    radial-gradient(circle at 80% 70%, #6a6a6a 0%, #6a6a6a 4px, transparent 5px),
    radial-gradient(circle at 15% 75%, #5a5a5a 0%, #5a5a5a 6px, transparent 7px),
    linear-gradient(180deg, #3a3a3a 0%, #555555 60%, #333333 100%);
  z-index: 4;
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
}

.room-high .bird {
  position: absolute;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.08);
}
.room-high .bird:nth-child(7) { top: 50px; left: 60px; }

/* ===== Room theme: Crust ===== */
.room-crust {
  background: linear-gradient(180deg, #2a1a10 0%, #1a0f08 100%);
}
.room-crust .earth-blob {
  background: radial-gradient(circle at 35% 35%, #5a4430 0%, #2a1a0e 70%);
  border-radius: 20% 45% 30% 55%;
  opacity: 0.8;
}
.room-crust .earth-blob:nth-child(2n) { border-radius: 55% 30% 45% 20%; }
.room-crust .earth-blob:nth-child(3n) { border-radius: 40% 40% 25% 50%; }

/* ===== Room theme: Mantle ===== */
.room-mantle {
  background: linear-gradient(180deg, #3a0d00 0%, #6a1a00 55%, #4a0d00 100%);
}
.room-mantle .earth-blob {
  background: radial-gradient(circle at 40% 40%, #ff9a4a 0%, #e05a14 55%, #8a2200 100%);
  border-radius: 45% 40% 30% 50%;
  box-shadow: 0 0 18px rgba(255, 120, 40, 0.45);
  animation: magma-bob 3s ease-in-out infinite;
}
@keyframes magma-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== Room theme: Outer Core ===== */
.room-outer {
  background: linear-gradient(180deg, #7a1600 0%, #e04800 50%, #7a1600 100%);
}
.room-outer .earth-blob {
  background: radial-gradient(circle at 40% 40%, #ffd43b 0%, #ff9a00 55%, #c04000 100%);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 180, 50, 0.6);
  animation: bubble-pulse 1.5s ease-in-out infinite;
}
@keyframes bubble-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* ===== Room theme: Inner Core ===== */
.room-inner {
  background: radial-gradient(circle at 50% 50%, #fff7d0 0%, #ffd84a 32%, #b06000 62%, #5a2000 100%);
}
.room-inner .earth-blob {
  background: radial-gradient(circle at 40% 40%, #ffffff 0%, #ffea7a 55%, #ff9a2a 100%);
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(255, 230, 120, 0.9);
  animation: bubble-pulse 1.2s ease-in-out infinite;
}

/* ===== Room label ===== */
.room-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  font-weight: 700;
  opacity: 0.1;
  color: #fff;
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.room-floor-name {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  font-family: monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 5;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* ===== Elevator section ===== */
.elevator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.shaft {
  position: relative;
  width: 200px;
  height: 340px;
  background: linear-gradient(180deg, #12121f 0%, #0e0e1a 100%);
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  overflow: hidden;
}

.stripe-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.car {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 30px;
  height: 90px;
  background: linear-gradient(135deg, #1e1e35, #2a2a4a);
  border: 2px solid #4a4a7a;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(80, 80, 180, 0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  z-index: 3;
}

.car::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 16px;
  background: #444;
  z-index: 2;
}

.floor-display {
  font-size: 2.8rem;
  font-weight: 700;
  color: #c8d6e5;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  min-width: 60px;
  text-align: center;
  transition: color 0.3s, text-shadow 0.3s;
}

.floor-display.negative {
  color: #ff6b6b;
  text-shadow: 0 0 14px rgba(255, 80, 80, 0.35);
}

.floor-display.ground {
  color: #69db7c;
  text-shadow: 0 0 14px rgba(80, 255, 120, 0.3);
}

.controls {
  display: flex;
  gap: 1rem;
}

.btn {
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}

.btn:active {
  transform: scale(0.88);
}

.btn.up {
  background: #1b5e2a;
  color: #b2f2bb;
  box-shadow: 0 4px 16px rgba(43, 138, 62, 0.3);
}

.btn.up:hover {
  background: #2b8a3e;
  box-shadow: 0 4px 24px rgba(43, 138, 62, 0.5);
}

.btn.down {
  background: #a51e1e;
  color: #ffc9c9;
  box-shadow: 0 4px 16px rgba(201, 42, 42, 0.3);
}

.btn.down:hover {
  background: #c92a2a;
  box-shadow: 0 4px 24px rgba(201, 42, 42, 0.5);
}

.goto {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.height-display {
  font-size: 0.85rem;
  color: rgba(200, 214, 229, 0.6);
  font-family: monospace;
  letter-spacing: 1px;
  text-align: center;
  min-height: 1.2em;
}

.goto input {
  width: 90px;
  padding: 0.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #c8d6e5;
  background: #1a1a2e;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.goto input:focus {
  border-color: #4a4a7a;
}

.goto input::-webkit-outer-spin-button,
.goto input::-webkit-inner-spin-button {
  opacity: 1;
}

.goto .goto-btn {
  width: 150px;
  height: 44px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  background: #3a3a5a;
  color: #e0e0f0;
  box-shadow: 0 4px 16px rgba(80, 80, 180, 0.2);
}

.goto .goto-btn:hover {
  background: #4a4a7a;
}

.floor-lamp {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
  transition: background 0.25s, box-shadow 0.25s;
  z-index: 4;
}

.floor-lamp.moving {
  background: #ffd43b;
  box-shadow: 0 0 14px rgba(255, 212, 59, 0.7);
}

.arrow-indicator {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: #444;
  transition: color 0.25s, opacity 0.25s;
  opacity: 0;
  z-index: 4;
}

.arrow-indicator.visible {
  opacity: 1;
}

.arrow-indicator.up {
  color: #69db7c;
}

.arrow-indicator.down {
  color: #ff6b6b;
}

.floor-stripe {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.05);
}

.floor-label {
  position: absolute;
  right: 6px;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.12);
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
  font-family: monospace;
}

@keyframes cable-sway {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  25% { transform: translateX(-50%) rotate(0.8deg); }
  75% { transform: translateX(-50%) rotate(-0.8deg); }
}

.car.moving::before {
  animation: cable-sway 0.25s ease-in-out infinite;
}

@media (max-width: 640px) {
  .layout {
    flex-direction: column;
    gap: 1rem;
  }
  .room-panel {
    width: 280px;
    height: 200px;
  }
}