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

:root {
  --deep-green-1: #0d1a14;
  --deep-green-2: #1a2f23;
  --deep-green-3: #2d4a3e;
  --atmo-blue-1: #121d26;
  --atmo-blue-2: #1e2d3d;
  --atmo-blue-3: #2a3f54;
  --warm-amber-1: #d4a574;
  --warm-amber-2: #c9956c;
  --warm-amber-3: #b8845a;
  --cream-1: #f5f0e6;
  --cream-2: #ebe5d8;
  --noir-black: #080a09;
}

body {
  font-family: 'Crimson Pro', Georgia, serif;
  background: var(--noir-black);
  color: var(--cream-1);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Watercolour texture overlay */
.watercolour-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(45, 74, 62, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(42, 63, 84, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(212, 165, 116, 0.05) 0%, transparent 60%);
  z-index: 1;
}

/* Animated fog layers */
.fog-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  z-index: 2;
}

.fog-1 {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(30, 45, 61, 0.3) 20%,
    rgba(45, 74, 62, 0.2) 50%,
    rgba(30, 45, 61, 0.3) 80%,
    transparent 100%
  );
  animation: fog-drift-1 25s ease-in-out infinite;
}

.fog-2 {
  background: linear-gradient(270deg, 
    transparent 0%, 
    rgba(45, 74, 62, 0.25) 30%,
    rgba(30, 45, 61, 0.15) 60%,
    transparent 100%
  );
  animation: fog-drift-2 35s ease-in-out infinite;
}

.fog-3 {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(26, 47, 35, 0.2) 40%,
    transparent 70%
  );
  animation: fog-drift-3 20s ease-in-out infinite;
}

@keyframes fog-drift-1 {
  0%, 100% { transform: translateX(-10%) scale(1.1); opacity: 0.3; }
  50% { transform: translateX(10%) scale(1); opacity: 0.5; }
}

@keyframes fog-drift-2 {
  0%, 100% { transform: translateX(15%) translateY(-5%); opacity: 0.4; }
  50% { transform: translateX(-15%) translateY(5%); opacity: 0.25; }
}

@keyframes fog-drift-3 {
  0%, 100% { transform: translateY(-10%); opacity: 0.3; }
  50% { transform: translateY(10%); opacity: 0.2; }
}

/* Vignette effect */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(8, 10, 9, 0.7) 100%);
  z-index: 3;
}

/* Particle container */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.dust-mote {
  position: absolute;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-dust 15s ease-in-out infinite;
}

.smoke-wisp {
  position: absolute;
  width: 60px;
  height: 60px;
  background: radial-gradient(ellipse, rgba(45, 74, 62, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(10px);
  animation: smoke-rise 20s ease-in-out infinite;
}

@keyframes float-dust {
  0%, 100% { 
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  25% { 
    transform: translate(20px, -30px) scale(1.2);
    opacity: 0.7;
  }
  50% { 
    transform: translate(-10px, -60px) scale(0.8);
    opacity: 0.5;
  }
  75% { 
    transform: translate(15px, -40px) scale(1.1);
    opacity: 0.6;
  }
}

@keyframes smoke-rise {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.3;
  }
  50% { 
    transform: translate(-30px, -80px) rotate(180deg) scale(1.5);
    opacity: 0.15;
  }
}

/* Light bokeh effects */
.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(15px);
  animation: bokeh-pulse 8s ease-in-out infinite;
}

@keyframes bokeh-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--warm-amber-1);
  margin-left: 2px;
  animation: cursor-blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Main story container */
.story-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Narrative panel */
.narrative-panel {
  max-width: 700px;
  width: 100%;
  background: linear-gradient(135deg, 
    rgba(13, 26, 20, 0.92) 0%,
    rgba(18, 29, 38, 0.88) 50%,
    rgba(13, 26, 20, 0.92) 100%
  );
  border: 1px solid rgba(212, 165, 116, 0.15);
  border-radius: 4px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 
    0 0 60px rgba(0, 0, 0, 0.5),
    inset 0 0 30px rgba(45, 74, 62, 0.1);
}

.narrative-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  border-radius: 4px;
}

/* Location header */
.location-header {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--warm-amber-1);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(212, 165, 116, 0.2);
  position: relative;
  opacity: 0;
  animation: fade-in-up 0.8s ease forwards;
}

.location-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--warm-amber-1), transparent);
  animation: underline-grow 1s ease 0.5s forwards;
  transform: scaleX(0);
  transform-origin: left;
}

@keyframes underline-grow {
  to { transform: scaleX(1); }
}

@keyframes fade-in-up {
  from { 
    opacity: 0;
    transform: translateY(10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Narrative text */
.narrative-text {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--cream-2);
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

.narrative-text p {
  margin-bottom: 1.2rem;
}

.narrative-text em {
  font-style: italic;
  color: var(--warm-amber-2);
}

/* Choice buttons */
.choices-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.choice-btn {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, 
    rgba(26, 47, 35, 0.8) 0%,
    rgba(30, 45, 61, 0.6) 100%
  );
  border: 1px solid rgba(212, 165, 116, 0.2);
  color: var(--cream-1);
  text-align: left;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(15px);
}

.choice-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
    rgba(212, 165, 116, 0.15) 0%, 
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.choice-btn:hover::before {
  opacity: 1;
}

.choice-btn:hover {
  border-color: rgba(212, 165, 116, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.choice-btn.visible {
  animation: choice-appear 0.5s ease forwards;
}

@keyframes choice-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Click ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.4) 0%, transparent 70%);
  transform: scale(0);
  animation: ripple-expand 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-expand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Scene transition */
.scene-transition {
  position: fixed;
  inset: 0;
  background: var(--noir-black);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
}

.scene-transition.active {
  animation: scene-fade 1.2s ease-in-out;
}

@keyframes scene-fade {
  0% { opacity: 0; }
  40% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0; }
}

/* Settings panel */
.settings-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(26, 47, 35, 0.8);
  border: 1px solid rgba(212, 165, 116, 0.2);
  color: var(--cream-2);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.settings-btn:hover {
  background: rgba(45, 74, 62, 0.9);
  border-color: rgba(212, 165, 116, 0.4);
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, 
    rgba(13, 26, 20, 0.98) 0%,
    rgba(18, 29, 38, 0.98) 100%
  );
  border-left: 1px solid rgba(212, 165, 116, 0.15);
  padding: 2rem;
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.4s ease;
}

.settings-panel.open {
  transform: translateX(0);
}

.settings-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  color: var(--warm-amber-1);
  margin-bottom: 2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.setting-label {
  font-size: 0.85rem;
  color: var(--cream-2);
  margin-bottom: 0.5rem;
  display: block;
}

.setting-slider {
  width: 100%;
  height: 4px;
  background: rgba(45, 74, 62, 0.5);
  border-radius: 2px;
  appearance: none;
  cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--warm-amber-1);
  border-radius: 50%;
  cursor: pointer;
}

/* Restart button */
.restart-btn {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(212, 165, 116, 0.3);
  color: var(--cream-2);
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.restart-btn:hover {
  background: rgba(184, 132, 90, 0.1);
  border-color: rgba(212, 165, 116, 0.5);
}

/* Progress indicator */
.progress-indicator {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  gap: 6px;
  z-index: 20;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(45, 74, 62, 0.5);
  transition: all 0.3s ease;
}

.progress-dot.visited {
  background: rgba(212, 165, 116, 0.6);
}

.progress-dot.current {
  background: var(--warm-amber-1);
  box-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
}

/* Footer */
.game-footer {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 20;
}

.game-footer a {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.75rem;
  color: rgba(235, 229, 216, 0.3);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.game-footer a:hover {
  color: rgba(212, 165, 116, 0.6);
}

/* Skip indicator */
.skip-hint {
  position: absolute;
  bottom: -2rem;
  right: 0;
  font-size: 0.75rem;
  color: rgba(235, 229, 216, 0.3);
  font-style: italic;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.narrative-panel:hover .skip-hint.visible {
  opacity: 1;
}

/* Location-based color themes */
.theme-street {
  --theme-accent: rgba(42, 63, 84, 0.2);
}

.theme-pub {
  --theme-accent: rgba(212, 165, 116, 0.15);
}

.theme-intimate {
  --theme-accent: rgba(184, 132, 90, 0.2);
}

.theme-night {
  --theme-accent: rgba(30, 45, 61, 0.25);
}

/* Rain effect for outdoor scenes */
.rain-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease;
}

.rain-container.active {
  opacity: 0.3;
}

.rain-drop {
  position: absolute;
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, transparent, rgba(200, 200, 220, 0.4));
  animation: rain-fall linear infinite;
}

@keyframes rain-fall {
  0% { transform: translateY(-100vh); }
  100% { transform: translateY(100vh); }
}

/* Light flicker for pub scenes */
.light-flicker {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 30%, rgba(212, 165, 116, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 1s ease;
}

.light-flicker.active {
  animation: flicker 4s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.8; }
  10% { opacity: 0.7; }
  20% { opacity: 0.9; }
  30% { opacity: 0.75; }
  50% { opacity: 0.85; }
  70% { opacity: 0.7; }
  90% { opacity: 0.9; }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .narrative-panel {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .narrative-text {
    font-size: 1.05rem;
    line-height: 1.8;
  }
  
  .location-header {
    font-size: 0.95rem;
  }
  
  .choice-btn {
    padding: 0.9rem 1.2rem;
  }
  
  .settings-panel {
    width: 100%;
  }
  
  .progress-indicator {
    bottom: auto;
    top: 1rem;
    left: 1rem;
  }
  
  .game-footer {
    bottom: 0.5rem;
    right: 0.5rem;
  }
}