/* ============================================================
   ROOT VARIABLES — NEON THEME
============================================================ */
:root {
  --neon-blue: #00eaff;
  --neon-pink: #ff4fd8;
  --text-main: #eafff7;
  --bg-dark: #050509;
  --panel-dark: rgba(0,0,0,0.55);
  --border-glow: rgba(0,255,180,0.4);
}

/* ============================================================
   GLOBAL BASE
============================================================ */
body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: "Consolas", monospace;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* ============================================================
   GAME LAYOUT
============================================================ */
.game-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 240px;
  background: rgba(0,0,0,0.35);
  padding: 20px;
  border-right: 2px solid var(--neon-blue);
  box-shadow: 0 0 12px var(--neon-blue);
  overflow-y: auto;
}

.level-btn,
.side-game {
  display: block;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border-glow);
  border-radius: 6px;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
}

.level-btn:hover,
.side-game:hover {
  background: rgba(0,255,180,0.15);
  border-color: rgba(0,255,180,0.8);
}

.game-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

/* ============================================================
   GAME FRAME
============================================================ */
.game-frame {
  position: relative;
  width: 800px;
  height: 600px;
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 16px var(--neon-blue);
  background: #000;
  overflow: hidden;
}

/* ============================================================
   ROOM SYSTEM (NEW CORE)
============================================================ */
#room-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  object-fit: cover;
  z-index: 1;
}

#objects {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  z-index: 5;
}

.object {
  position: absolute;
  cursor: pointer;
}

/* subtle debug hover */
.object:hover {
  outline: 2px solid rgba(0,255,255,0.35);
}

/* ============================================================
   GRAIN OVERLAY
============================================================ */
#grainOverlay {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.15;
  z-index: 2;
}

/* ============================================================
   TOP BAR (TIMER)
============================================================ */
#top-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-glow);
  z-index: 9000;
  text-shadow: 0 0 4px var(--neon-blue);
}

/* ============================================================
   STATIC CHECKLIST
============================================================ */
#mission-checklist {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 220px;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 10px;
  z-index: 9000;
}

#mission-checklist h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  color: var(--neon-blue);
  text-shadow: 0 0 6px var(--neon-blue);
}

#checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#checklist-list li {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

/* ============================================================
   DIALOGUE SYSTEM
============================================================ */
#dialogue-box {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  background: var(--panel-dark);
  border: 2px solid var(--border-glow);
  border-radius: 10px;
  padding: 16px 20px;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

#dialogue-text {
  font-size: 18px;
  margin-bottom: 10px;
  text-shadow: 0 0 4px var(--neon-blue);
}

#dialogue-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dialogue-option {
  background: var(--panel-dark);
  border: 1px solid var(--border-glow);
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}

.dialogue-option:hover {
  background: rgba(0,255,180,0.15);
}

/* ============================================================
   MESSAGE POPUP
============================================================ */
#message {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-glow);
  font-size: 14px;
  z-index: 9000;
}

/* ============================================================
   FULLSCREEN BUTTON
============================================================ */
.fullscreen-btn {
  margin-top: 12px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border-glow);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
}

.fullscreen-btn:hover {
  background: rgba(0,255,180,0.15);
}

/* ============================================================
   GAME DESCRIPTION
============================================================ */
.game-description {
  margin-top: 20px;
  width: 800px;
  background: rgba(0,0,0,0.35);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 10px var(--neon-blue);
}

/* ============================================================
   OVERLAYS (QUIZ + TIMELINE + MAP)
============================================================ */
#quizScreen,
#timelineScreen,
#bigMap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
}

#quizScreen,
#timelineScreen {
  background: rgba(0,0,0,0.9);
  color: white;
  padding: 40px;
  font-family: "Georgia", serif;
  overflow-y: auto;
}

.quiz-option {
  margin: 10px 0;
  padding: 10px;
  background: #333;
  cursor: pointer;
  border-radius: 6px;
}

.quiz-option:hover {
  background: #555;
}

#timelineContent {
  max-width: 800px;
  margin: auto;
  line-height: 1.6;
  font-size: 18px;
}

/* ============================================================
   MAP
============================================================ */
#bigMap {
  background: rgba(0,0,0,0.85);
}

#bigMap img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
}

/* ============================================================
   ROOM SWITCH UI
============================================================ */
.room-switch-ui {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.room-btn {
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.4);
  font-family: monospace;
}

.room-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* ============================================================
   DEBUG OVERLAY
============================================================ */
.debug-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 240px;
  background: rgba(0,0,0,0.55);
  padding: 10px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  z-index: 99999;
  max-height: 300px;
  overflow-y: auto;
}