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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a1a;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #ffffff;
}

#game-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a1a;
}

#game-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #0a0a1e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-title {
  font-size: 48px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 30px #6600cc, 0 0 60px #4400aa;
  margin-bottom: 30px;
  letter-spacing: 3px;
}

.loading-bar-container {
  width: 400px;
  height: 20px;
  background: #1a1a3a;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #333366;
  margin-bottom: 15px;
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, #4400aa, #8800ff);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px #6600cc;
}

.loading-text {
  font-size: 14px;
  color: #8888aa;
  letter-spacing: 1px;
}

/* Scrollbar styles */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111133; }
::-webkit-scrollbar-thumb { background: #334488; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4455aa; }

/* Utility classes for potential DOM overlays */
.hud-panel {
  background: rgba(10, 10, 30, 0.93);
  border: 1px solid #333388;
  border-radius: 8px;
  padding: 12px;
  color: #ffffff;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(30, 30, 80, 0.9);
  border: 2px solid #4444aa;
  border-radius: 6px;
  color: #ccccff;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: all 0.15s ease;
  text-align: center;
  user-select: none;
}

.btn:hover {
  background: rgba(60, 60, 160, 0.9);
  border-color: #8888ff;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-success { border-color: #44aa44; color: #88ff88; }
.btn-success:hover { background: rgba(20, 80, 20, 0.9); border-color: #88ff88; }

.btn-danger { border-color: #aa4444; color: #ff8888; }
.btn-danger:hover { background: rgba(80, 20, 20, 0.9); border-color: #ff8888; }

.btn-warning { border-color: #aa8844; color: #ffcc88; }
.btn-warning:hover { background: rgba(80, 60, 20, 0.9); border-color: #ffcc88; }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: rgba(10, 10, 30, 0.98);
  border: 2px solid #4444cc;
  border-radius: 12px;
  padding: 24px;
  min-width: 400px;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
  color: #aaaaff;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333366;
}

/* Toast notifications */
.toast {
  position: fixed;
  right: 16px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 380px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s ease;
  z-index: 2000;
}

.toast-success { background: #003300; border: 1px solid #44cc44; color: #88ff88; }
.toast-error { background: #330000; border: 1px solid #cc4444; color: #ff8888; }
.toast-warning { background: #333300; border: 1px solid #cccc44; color: #ffff88; }
.toast-info { background: #001133; border: 1px solid #4488cc; color: #88aaff; }
.toast-unlock { background: #1a0033; border: 1px solid #aa44cc; color: #cc88ff; }

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #1a1a3a;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4466ff, #88aaff);
  transition: width 0.3s ease;
}

/* Stat bars */
.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stat-label {
  width: 100px;
  font-size: 12px;
  color: #8888aa;
}

.stat-value {
  font-size: 13px;
  font-weight: bold;
  min-width: 30px;
}

.stat-bar {
  flex: 1;
  height: 6px;
  background: #1a1a3a;
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.stat-excitement .stat-bar-fill { background: #4488ff; }
.stat-nausea .stat-bar-fill { background: #ff8844; }
.stat-intensity .stat-bar-fill { background: #ff4488; }

/* Zone indicator badges */
.zone-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.zone-fantasy { background: rgba(106, 27, 154, 0.7); border: 1px solid #ce93d8; color: #e1bee7; }
.zone-scifi { background: rgba(13, 71, 161, 0.7); border: 1px solid #90caf9; color: #bbdefb; }
.zone-western { background: rgba(78, 52, 46, 0.7); border: 1px solid #d7ccc8; color: #efebe9; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.pulse { animation: pulse 1.5s ease infinite; }

/* Responsive adjustments */
@media (max-width: 1280px) {
  #game-container canvas {
    width: 100vw !important;
    height: auto !important;
  }
}

/* Dark scrollable areas */
.dark-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334488 #111133;
}
