/* -------------------------------------------------------------
 * Cartoon Desert Island Escape Room - style.css
 * ----------------------------------------------------------- */

:root {
  --sky-blue: #80deea;
  --sky-blue-dark: #4dd0e1;
  --sea-blue: #4fc3f7;
  --deep-sea: #0288d1;
  --sand-yellow: #fff59d;
  --sand-dark: #fbc02d;
  --grass-green: #a5d6a7;
  --jungle-dark: #2e7d32;
  --camp-dirt: #d7ccc8;
  --camp-dirt-dark: #8d6e63;
  --cliff-grey: #cfd8dc;
  --cliff-dark: #546e7a;
  
  --cartoon-black: #1a1a1a;
  --card-bg: #ffffff;
  --accent-orange: #ff7043;
  --accent-yellow: #ffd54f;
  
  --font-title: 'Fredoka', 'Playpen Sans', sans-serif;
  --font-main: 'Outfit', 'Playpen Sans', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: #ffe0b2;
  color: var(--cartoon-black);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 10px;
  overflow: hidden;
}

/* App Container (Responsive) */
.app-container {
  width: 100%;
  max-width: 900px;
  height: 95vh;
  max-height: 600px;
  background-color: var(--sky-blue);
  border: 4px solid var(--cartoon-black);
  border-radius: 24px;
  box-shadow: 8px 8px 0px var(--cartoon-black);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Common Screen Styles */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  z-index: 10;
}

.screen.active {
  display: flex;
}

/* --- 1. HOME SCREEN --- */
#home-screen {
  background: linear-gradient(to bottom, #80deea 0%, #e0f7fa 60%, #fff59d 100%);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

/* Moving clouds background */
.cloud-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.cloud {
  position: absolute;
  background: white;
  border: 3px solid var(--cartoon-black);
  border-radius: 50px;
  height: 35px;
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: white;
  border: 3px solid var(--cartoon-black);
  border-bottom: none;
  border-radius: 50%;
}
.cloud::before {
  width: 40px;
  height: 40px;
  top: -20px;
  left: 10px;
}
.cloud::after {
  width: 30px;
  height: 30px;
  top: -15px;
  right: 10px;
}

.cloud.c1 {
  width: 100px;
  top: 15%;
  left: 10%;
  animation: floatCloud 25s linear infinite;
}
.cloud.c2 {
  width: 120px;
  top: 30%;
  right: -10%;
  animation: floatCloud 35s linear infinite reverse;
}

@keyframes floatCloud {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(900px); }
}

.title-container {
  z-index: 2;
  margin-bottom: 25px;
}

.cartoon-island-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px auto;
  filter: drop-shadow(4px 4px 0px var(--cartoon-black));
  animation: logoWobble 4s ease-in-out infinite;
}

@keyframes logoWobble {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  50% { transform: rotate(5deg) scale(1.05); }
}

.game-title {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 800;
  color: #ff7043;
  text-shadow: 4px 4px 0px var(--cartoon-black);
  -webkit-text-stroke: 1.5px var(--cartoon-black);
  letter-spacing: -1px;
  line-height: 1.2;
}

.game-subtitle {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a237e;
  margin-top: 5px;
  letter-spacing: 1px;
}

/* Cartoon Buttons */
.btn {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 28px;
  border: 3px solid var(--cartoon-black);
  border-radius: 16px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 4px 4px 0px var(--cartoon-black);
  display: inline-block;
  margin: 8px;
  text-decoration: none;
  color: var(--cartoon-black);
}

.btn-primary {
  background-color: var(--accent-orange);
  color: white;
  text-shadow: 1px 1px 0px var(--cartoon-black);
}
.btn-primary:hover {
  background-color: #ff8a65;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--cartoon-black);
}
.btn-primary:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--cartoon-black);
}

.btn-secondary {
  background-color: var(--accent-yellow);
}
.btn-secondary:hover {
  background-color: #ffe082;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--cartoon-black);
}
.btn-secondary:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--cartoon-black);
}

.menu-container {
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 240px;
}

.home-footer {
  margin-top: 25px;
  z-index: 2;
}

.best-score-badge {
  background-color: white;
  border: 3px solid var(--cartoon-black);
  border-radius: 12px;
  padding: 6px 15px;
  display: inline-flex;
  gap: 6px;
  font-family: var(--font-title);
  box-shadow: 3px 3px 0px var(--cartoon-black);
}

/* --- 2. GAME PLAY SCREEN --- */

/* HUD Header */
.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #fff9c4;
  border-bottom: 4px solid var(--cartoon-black);
  z-index: 20;
  height: 60px;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--cartoon-black);
  background-color: white;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--cartoon-black);
  transition: all 0.1s ease;
}

.hud-btn:hover {
  background-color: #eeeeee;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--cartoon-black);
}

.hud-btn:active {
  transform: translateY(2px);
  box-shadow: 0px 0px 0 var(--cartoon-black);
}

.location-badge {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  background-color: #80deea;
  border: 3px solid var(--cartoon-black);
  border-radius: 12px;
  padding: 4px 12px;
  box-shadow: 2px 2px 0px var(--cartoon-black);
}

.hud-timer {
  display: flex;
  align-items: center;
  background-color: white;
  border: 3px solid var(--cartoon-black);
  border-radius: 12px;
  padding: 4px 10px;
  font-weight: 800;
  gap: 4px;
}

.timer-text {
  font-family: monospace;
  font-size: 1.1rem;
}

/* Viewport and Scenes Container */
.game-viewport-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.game-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.scenes-container {
  display: flex;
  width: 400%; /* 4 scenes total */
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1.1); /* Bounce animation */
}

/* Individual Scene */
.scene {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.scene-sky {
  height: 50%;
  background: linear-gradient(to bottom, #4dd0e1 0%, #b2ebf2 100%);
  position: relative;
}

.scene-sea {
  height: 20%;
  background-color: var(--sea-blue);
  position: relative;
  overflow: hidden;
}

.scene-ground {
  height: 30%;
  position: relative;
  border-top: 4px solid var(--cartoon-black);
}

/* Scene specific colors */
.beach-sand {
  background-color: var(--sand-yellow);
}

.jungle-grass {
  background-color: var(--grass-green);
}
.jungle-sky {
  background: linear-gradient(to bottom, #80deea, #e0f2f1);
}

.cliff-ground {
  background-color: #8d6e63;
}
.cliff-sky {
  background: linear-gradient(to bottom, #00acc1, #80deea);
  height: 60%;
}
.cliff-wall {
  position: absolute;
  right: 0;
  top: 0;
  width: 40%;
  height: 70%;
  background-color: var(--cliff-grey);
  border-left: 4px solid var(--cartoon-black);
  border-bottom: 4px solid var(--cartoon-black);
  border-bottom-left-radius: 30px;
  z-index: 5;
}

.camp-dirt {
  background-color: var(--camp-dirt);
}
.camp-sky {
  background: linear-gradient(to bottom, #4dd0e1, #fff9c4);
}

/* Sea wave animation */
.wave-bg {
  position: absolute;
  width: 200%;
  height: 100%;
  top: 0;
  left: 0;
  background-repeat: repeat-x;
  background-position: 0 bottom;
  transform-origin: center bottom;
}

.wave-bg.w1 {
  background-image: radial-gradient(circle at 50% 120%, transparent 24%, #0288d1 25%, #0288d1 30%, transparent 31%);
  background-size: 60px 40px;
  opacity: 0.8;
  animation: waveMotion 6s linear infinite;
}
.wave-bg.w2 {
  background-image: radial-gradient(circle at 50% 120%, transparent 24%, #0091ea 25%, #0091ea 30%, transparent 31%);
  background-size: 90px 50px;
  top: 5px;
  animation: waveMotion 9s linear infinite reverse;
}

@keyframes waveMotion {
  0% { transform: translateX(0) scaleY(1); }
  50% { transform: translateX(-25%) scaleY(1.1); }
  100% { transform: translateX(-50%) scaleY(1); }
}

/* Navigation arrows on sides */
.nav-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--cartoon-black);
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 30;
  box-shadow: 3px 3px 0 var(--cartoon-black);
  color: var(--cartoon-black);
  transition: all 0.1s ease;
}

.nav-arrow.left { left: 10px; }
.nav-arrow.right { right: 10px; }

.nav-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 4px 4px 0 var(--cartoon-black);
}
.nav-arrow:active {
  transform: translateY(-50%) scale(0.95);
  box-shadow: 0px 0px 0 var(--cartoon-black);
}

/* Hotspots (Interactive Objects) */
.hotspot {
  position: absolute;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

.hotspot:hover {
  transform: scale(1.08);
}

.hotspot:active {
  transform: scale(0.95);
}

/* Hotspot placements and aesthetics */

/* BEACH Hotspots */
.motorboat-hotspot {
  bottom: 22%;
  left: 10%;
  width: 160px;
  height: 96px;
  z-index: 12;
}

.engine-panel-indicator {
  position: absolute;
  top: -15px;
  right: 5px;
  background-color: #ffd54f;
  border: 2px solid var(--cartoon-black);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 6px;
  box-shadow: 2px 2px 0 var(--cartoon-black);
}

.coco-tree-hotspot {
  bottom: 25%;
  right: 8%;
  width: 110px;
  height: 180px;
  z-index: 9;
}

.coconut-item {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #5d4037;
  border: 2px solid var(--cartoon-black);
  cursor: pointer;
  box-shadow: 1px 1px 0 var(--cartoon-black);
  transition: top 0.6s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

.coconut-item.fallen {
  transition: transform 0.1s ease;
}

.sand-mound-hotspot {
  bottom: 5%;
  left: 45%;
  width: 70px;
  height: 42px;
}

.mound-buried-marker {
  position: absolute;
  top: 5px;
  left: 28px;
  font-size: 1.1rem;
  animation: markerBounce 1.5s infinite alternate;
}

@keyframes markerBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.driftwood-hotspot {
  bottom: 8%;
  left: 30%;
  font-size: 1.8rem;
}

/* JUNGLE Hotspots */
.chest-hotspot {
  bottom: 12%;
  left: 18%;
  width: 75px;
  height: 60px;
}

.chest-lock-hint-icon {
  position: absolute;
  top: -15px;
  left: 24px;
  font-size: 1.1rem;
}

.altar-hotspot {
  bottom: 15%;
  right: 18%;
  width: 120px;
  height: 100px;
}

.altar-runes-container {
  position: absolute;
  top: 48px;
  left: 32px;
  display: flex;
  gap: 8px;
}

.rune-btn {
  width: 18px;
  height: 22px;
  font-size: 0.65rem;
  font-weight: bold;
  border: 2px solid var(--cartoon-black);
  background-color: #e0e0e0;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.rune-btn.active {
  background-color: #00e5ff;
  box-shadow: 0 0 8px #00e5ff;
  border-color: #006064;
}

.altar-glow-effect {
  position: absolute;
  top: 35px;
  left: 20px;
  width: 80px;
  height: 15px;
  border-radius: 50%;
  background-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 15px 5px rgba(0, 229, 255, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.altar-glow-effect.activated {
  opacity: 1;
}

.jungle-bush {
  position: absolute;
  bottom: 0;
  width: 150px;
  height: 90px;
  background-color: var(--jungle-dark);
  border: 4px solid var(--cartoon-black);
  z-index: 15;
}

.bush-left {
  left: -20px;
  border-top-right-radius: 80px;
  border-bottom-right-radius: 20px;
}

.bush-right {
  right: -20px;
  border-top-left-radius: 80px;
  border-bottom-left-radius: 20px;
}

/* CLIFFS Hotspots */
.boulder-hotspot {
  bottom: 12%;
  left: 22%;
  width: 96px;
  height: 96px;
  z-index: 6;
}

.boulder-status {
  position: absolute;
  top: -15px;
  left: 15px;
  background-color: #ff8a65;
  border: 2px solid var(--cartoon-black);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 1px 4px;
}

.cave-entrance-hotspot {
  bottom: 12%;
  left: 24%;
  width: 80px;
  height: 90px;
  z-index: 4;
}

.cave-black-hole {
  width: 100%;
  height: 100%;
  background-color: #1a1a1a;
  border: 4px solid var(--cartoon-black);
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  position: relative;
}

.cave-text {
  position: absolute;
  color: white;
  font-size: 0.7rem;
  width: 100%;
  text-align: center;
  top: 15px;
}

.carved-clue {
  position: absolute;
  top: 30px;
  left: 25px;
  background-color: rgba(255, 255, 255, 0.4);
  border: 2px dashed var(--cartoon-black);
  border-radius: 8px;
  padding: 4px 8px;
  transform: rotate(-5deg);
  cursor: pointer;
}

.rune-clue-symbols {
  font-size: 0.75rem;
  font-weight: bold;
}

.starfish {
  position: absolute;
  font-size: 1.1rem;
  z-index: 7;
}

.sf1 { top: 60px; right: 18%; }
.sf2 { top: 120px; right: 8%; }
.sf3 { bottom: 35%; right: 28%; }
.sf4 { bottom: 42%; right: 12%; }
.sf5 { top: 80px; right: 30%; }

/* CAMP Hotspots */
.campfire-hotspot {
  bottom: 10%;
  left: 22%;
  width: 80px;
  height: 70px;
}

.fire-flames {
  position: absolute;
  bottom: 15px;
  left: 20px;
  width: 40px;
  height: 40px;
}

.flame {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  border-radius: 50% 0 50% 50%;
  transform: rotate(-45deg);
  animation: flameFlicker 0.6s infinite alternate;
}

.flame.red { background-color: #ff3d00; z-index: 1; }
.flame.orange { background-color: #ff9100; transform: scale(0.8) rotate(-45deg); z-index: 2; }
.flame.yellow { background-color: #ffea00; transform: scale(0.6) rotate(-45deg); z-index: 3; }

@keyframes flameFlicker {
  0% { transform: rotate(-45deg) scale(0.9) skewY(5deg); }
  100% { transform: rotate(-45deg) scale(1.1) skewY(-5deg); }
}

.fire-logs {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 25px;
}

.log {
  position: absolute;
  font-size: 0.9rem;
}
.log1 { bottom: 0; left: 0; transform: rotate(-20deg); }
.log2 { bottom: 0; right: 0; transform: rotate(20deg); }
.log3 { bottom: -5px; left: 20px; transform: rotate(90deg); }
.log4 { top: 5px; left: 15px; transform: rotate(10deg); }

.ash-pile {
  position: absolute;
  bottom: 5px;
  left: 10px;
  font-size: 1.1rem;
}

.workbench-hotspot {
  bottom: 10%;
  right: 20%;
  width: 110px;
  height: 80px;
}

.vine-box {
  position: absolute;
  top: 15px;
  left: 35px;
  width: 40px;
  height: 35px;
  background-color: #d84315;
  border: 3px solid var(--cartoon-black);
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--cartoon-black);
}

.box-lock-symbols {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 0.8rem;
}

.vines-overlay {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 50px;
  height: 45px;
  pointer-events: none;
}

.ground-stone-hotspot {
  bottom: 5%;
  left: 45%;
  font-size: 1.5rem;
}

/* Quick Dots Navigation */
.scene-nav-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
  background-color: #fff9c4;
  border-top: 4px solid var(--cartoon-black);
}

.nav-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--cartoon-black);
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--cartoon-black);
  font-size: 1rem;
  transition: all 0.1s ease;
}

.nav-dot.active {
  background-color: #80e5ff;
  transform: scale(1.1);
  box-shadow: 3px 3px 0 var(--cartoon-black);
}

/* Feedback & Inventory Footer Panel */
.game-hud-footer {
  background-color: #fff9c4;
  border-top: 4px solid var(--cartoon-black);
  display: flex;
  flex-direction: column;
  padding: 10px 15px;
}

.hud-feedback-panel {
  background-color: white;
  border: 3px solid var(--cartoon-black);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inventory-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #795548;
}

.inventory-slots {
  display: flex;
  gap: 8px;
  justify-content: space-around;
}

.inv-slot {
  width: 50px;
  height: 50px;
  border: 3px solid var(--cartoon-black);
  border-radius: 12px;
  background-color: #ffe0b2;
  box-shadow: inset 2px 2px 4px rgba(0,0,0,0.1), 2px 2px 0px var(--cartoon-black);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  position: relative;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.inv-slot.occupied {
  background-color: white;
}

.inv-slot.selected {
  border: 3px dashed #ff3d00;
  animation: dashMarch 1s linear infinite, wiggleItem 0.5s ease-in-out infinite alternate;
}

@keyframes dashMarch {
  to { border-style: dashed; }
}

@keyframes wiggleItem {
  0% { transform: rotate(-5deg) scale(1.05); }
  100% { transform: rotate(5deg) scale(1.05); }
}

/* Modals Overlay */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 26, 26, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background-color: white;
  border: 4px solid var(--cartoon-black);
  border-radius: 20px;
  box-shadow: 6px 6px 0px var(--cartoon-black);
  padding: 16px;
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--cartoon-black);
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-family: var(--font-title);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--cartoon-black);
  background: #ffab91;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 2px 2px 0 var(--cartoon-black);
}

.modal-close:hover { background-color: #ff8a65; }

.modal-hint-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  text-align: center;
  margin-bottom: 12px;
}

/* Digital Numpad for Chest */
.digital-lock-display {
  background-color: var(--cartoon-black);
  color: #00e5ff;
  font-family: monospace;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 6px;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 8px rgba(0,229,255,0.4);
}

.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.num-btn {
  padding: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 10px;
  border: 3px solid var(--cartoon-black);
  background-color: #eeeeee;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--cartoon-black);
}
.num-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0;
}
.num-btn.clear-btn { background-color: #ffe082; }
.num-btn.enter-btn { background-color: #a5d6a7; }

/* Symbol Lock matching Wheels */
.symbol-lock-wheels {
  display: flex;
  justify-content: space-around;
  margin: 15px 0;
}

.symbol-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wheel-arrow {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--cartoon-black);
}
.wheel-arrow:hover { transform: scale(1.2); }

.symbol-display {
  width: 46px;
  height: 46px;
  border: 3px solid var(--cartoon-black);
  border-radius: 10px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--cartoon-black);
}

/* Boat Engine Panel elements */
.engine-diagram {
  background-color: #37474f;
  border: 3px solid var(--cartoon-black);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.engine-component {
  background-color: #263238;
  border: 2px solid var(--cartoon-black);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
}

.comp-status {
  font-size: 0.85rem;
  font-weight: 700;
}

.status-missing { color: #ff8a80; }
.status-installed { color: #b9f6ca; }

.engine-instruction-text {
  font-size: 0.8rem;
  text-align: center;
  color: #555;
}

/* --- 3. VICTORY SCREEN --- */
#victory-screen {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  justify-content: center;
  align-items: center;
}

.victory-card {
  background-color: white;
  border: 5px solid var(--cartoon-black);
  border-radius: 24px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  text-align: center;
  box-shadow: 10px 10px 0px var(--cartoon-black);
  position: relative;
  overflow: hidden;
}

.victory-banner {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  color: #d84315;
  margin-bottom: 10px;
  text-shadow: 2px 2px 0px #ffe082;
  animation: bannerPulse 1.5s ease-in-out infinite alternate;
}

@keyframes bannerPulse {
  0% { transform: scale(0.95) rotate(-3deg); }
  100% { transform: scale(1.05) rotate(3deg); }
}

.victory-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.victory-subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 20px;
}

.stats-box {
  background-color: #fbe9e7;
  border: 3px solid var(--cartoon-black);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.rainbow-text {
  background-image: linear-gradient(to right, violet, indigo, blue, green, yellow, orange, red);
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
  width: 100%;
}

.victory-menu {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* Records List styles */
.records-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 5px;
}

.record-row {
  display: flex;
  justify-content: space-between;
  background-color: #f5f5f5;
  border: 2px solid var(--cartoon-black);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
}

.record-row.rank-1 {
  background-color: #fffde7;
  border-color: #ffd54f;
}

/* Helper utility fonts */
.font-cartoon {
  font-family: var(--font-title);
}

.hidden {
  display: none !important;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 600px) {
  .app-container {
    height: 100vh;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
  
  .game-title {
    font-size: 2.2rem;
  }
  
  .motorboat-hotspot {
    width: 120px;
    height: 72px;
  }
  
  .coco-tree-hotspot {
    width: 80px;
    height: 140px;
  }
  
  .altar-hotspot {
    width: 90px;
    height: 80px;
  }
  
  .altar-runes-container {
    top: 38px;
    left: 20px;
    gap: 4px;
  }
  
  .boulder-hotspot {
    width: 72px;
    height: 72px;
  }
  
  .cave-entrance-hotspot {
    width: 60px;
    height: 70px;
  }
  
  .workbench-hotspot {
    width: 90px;
    height: 70px;
  }
  
  .vine-box {
    top: 10px;
    left: 25px;
  }
  
  .inv-slot {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}
