/* TOO LIKE THE LIGHTNING: A Sierra-style adventure game */
/* 18th-century Enlightenment manuscript meets utopian future */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600&family=IM+Fell+English+SC&family=IM+Fell+English:ital@0;1&family=Share+Tech+Mono&display=swap');

:root {
  --bg-dark: #1a1510;
  --bg-panel: #231f18;
  --bg-panel-light: #2e2820;
  --border-gold: #c4a265;
  --border-dim: #4a3f30;
  --text-cream: #e8dcc8;
  --text-gold: #d4a944;
  --text-amber: #c88c32;
  --text-dim: #8a7a60;
  --text-red: #b44444;
  --text-blue: #6688aa;
  --text-rose: #c47070;
  --accent-purple: #7744aa;
  --hover-glow: rgba(196, 162, 101, 0.2);
  --verb-active: #c4a265;
  --verb-bg: #1e1a14;
  --inventory-bg: #161210;
}

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

body {
  background: var(--bg-dark);
  color: var(--text-cream);
  font-family: 'Crimson Text', 'IM Fell English', Georgia, serif;
  font-size: 18px;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  cursor: default;
}

#game-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* === PARCHMENT GRAIN & CANDLELIGHT === */
#scanlines {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Subtle noise-like parchment grain using layered gradients */
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(26, 21, 16, 0.04) 3px,
      rgba(26, 21, 16, 0.04) 6px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 5px,
      rgba(26, 21, 16, 0.02) 5px,
      rgba(26, 21, 16, 0.02) 10px
    );
  pointer-events: none;
  z-index: 1000;
}

#crt-flicker {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 999;
  animation: candlelight 4s ease-in-out infinite;
  opacity: 0;
}

@keyframes candlelight {
  0%   { opacity: 0; }
  15%  { opacity: 0.015; background: rgba(196, 162, 101, 0.02); }
  30%  { opacity: 0; }
  45%  { opacity: 0.01; background: rgba(200, 140, 50, 0.015); }
  60%  { opacity: 0; }
  78%  { opacity: 0.02; background: rgba(196, 162, 101, 0.025); }
  85%  { opacity: 0; }
  100% { opacity: 0; }
}

/* === TITLE SCREEN === */
#title-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title-art {
  text-align: center;
  padding: 40px;
}

.title-text h1 {
  font-family: 'IM Fell English SC', serif;
  font-size: 52px;
  color: var(--text-gold);
  text-shadow:
    0 1px 0 #b8942e,
    0 2px 0 #a07d1e,
    0 3px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(212, 169, 68, 0.3),
    0 0 40px rgba(212, 169, 68, 0.15);
  margin-bottom: 10px;
  letter-spacing: 6px;
  animation: glow-pulse 4s ease-in-out infinite;
}

.title-text h2 {
  font-family: 'IM Fell English', serif;
  font-size: 22px;
  color: var(--text-amber);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-style: italic;
}

.title-epigraph {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text-cream);
  opacity: 0.75;
  max-width: 520px;
  margin: 0 auto 50px auto;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

@keyframes glow-pulse {
  0%, 100% {
    text-shadow:
      0 1px 0 #b8942e,
      0 2px 0 #a07d1e,
      0 3px 4px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(212, 169, 68, 0.3),
      0 0 40px rgba(212, 169, 68, 0.15);
  }
  50% {
    text-shadow:
      0 1px 0 #b8942e,
      0 2px 0 #a07d1e,
      0 3px 4px rgba(0, 0, 0, 0.5),
      0 0 30px rgba(212, 169, 68, 0.5),
      0 0 60px rgba(212, 169, 68, 0.25),
      0 0 80px rgba(196, 162, 101, 0.1);
  }
}

.title-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.title-btn {
  font-family: 'IM Fell English SC', serif;
  font-size: 16px;
  color: var(--text-gold);
  background: transparent;
  border: 1px solid var(--border-gold);
  padding: 12px 40px;
  cursor: pointer;
  letter-spacing: 3px;
  transition: all 0.3s;
  min-width: 240px;
  text-transform: uppercase;
}

.title-btn:hover:not(:disabled) {
  background: var(--hover-glow);
  color: #f0e0b0;
  box-shadow: 0 0 20px rgba(196, 162, 101, 0.25), inset 0 0 20px rgba(196, 162, 101, 0.08);
  border-color: var(--text-gold);
}

.title-btn:disabled {
  color: var(--text-dim);
  border-color: var(--border-dim);
  cursor: not-allowed;
}

/* === CHARACTER CREATION === */
#char-creation {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-panel {
  max-width: 700px;
  padding: 40px;
  text-align: center;
}

.char-panel h2 {
  font-family: 'IM Fell English SC', serif;
  font-size: 22px;
  color: var(--text-gold);
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.char-intro {
  color: var(--text-dim);
  font-family: 'IM Fell English', serif;
  font-size: 19px;
  line-height: 1.6;
  margin-bottom: 30px;
  font-style: italic;
}

.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.skill-option {
  border: 1px solid var(--border-dim);
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  background: rgba(30, 26, 20, 0.5);
}

.skill-option:hover {
  border-color: var(--border-gold);
  background: rgba(196, 162, 101, 0.06);
}

.skill-option.selected {
  border-color: var(--text-gold);
  background: rgba(212, 169, 68, 0.1);
  box-shadow: 0 0 15px rgba(212, 169, 68, 0.15), inset 0 0 15px rgba(212, 169, 68, 0.05);
}

.skill-icon { font-size: 36px; margin-bottom: 8px; }
.skill-name {
  font-family: 'IM Fell English SC', serif;
  font-size: 14px;
  color: var(--text-amber);
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.skill-desc {
  color: var(--text-dim);
  font-family: 'Crimson Text', serif;
  font-size: 15px;
  line-height: 1.5;
}

.char-status {
  color: var(--text-gold);
  font-family: 'IM Fell English', serif;
  font-size: 20px;
  margin-bottom: 20px;
}

/* === MAIN GAME SCREEN === */
#game-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Scene Display */
#scene-container {
  flex: 1;
  position: relative;
  min-height: 0;
  background: #0e0c08;
  display: flex;
  flex-direction: column;
}

#scene-image {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

#scene-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  image-rendering: auto;
}

#hotspot-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

.hotspot-area {
  position: absolute;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.hotspot-area:hover {
  border-color: rgba(196, 162, 101, 0.45);
  background: rgba(196, 162, 101, 0.08);
}

.hotspot-area.exit-hotspot:hover {
  border-color: rgba(200, 140, 50, 0.5);
  background: rgba(200, 140, 50, 0.08);
}

/* Visual indicators for hotspots */
.hotspot-indicator {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  z-index: 5;
}

/* Shared dot indicator */
.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto 4px;
}

/* Shared label style */
.indicator-label {
  font-family: 'IM Fell English', serif;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(10, 8, 5, 0.85);
  display: inline-block;
}

/* NPC: warm gold dot + label */
.indicator-npc {
  bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.dot-npc {
  width: 14px; height: 14px;
  background: #f0c860;
  box-shadow: 0 0 10px 4px rgba(240,200,96,0.6), 0 0 20px 8px rgba(240,200,96,0.3);
  animation: npc-pulse 2.5s ease-in-out infinite;
}

.label-npc {
  color: #ffe8a0;
  border: 1px solid rgba(196, 162, 101, 0.5);
  text-shadow: 0 0 4px rgba(196, 162, 101, 0.4);
}

@keyframes npc-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px 4px rgba(240,200,96,0.6); }
  50% { transform: scale(1.3); box-shadow: 0 0 16px 6px rgba(240,200,96,0.8); }
}

/* Item: bright sparkle dot + label */
.indicator-item {
  bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.dot-item {
  width: 14px; height: 14px;
  background: #ffdd44;
  box-shadow: 0 0 12px 5px rgba(255,221,68,0.7), 0 0 24px 10px rgba(255,200,50,0.4);
  animation: item-sparkle 1.5s ease-in-out infinite;
}

.label-item {
  color: #ffee88;
  border: 1px solid rgba(255, 220, 80, 0.5);
}

@keyframes item-sparkle {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* Exit: dim arrow-like dot + label */
.indicator-exit {
  bottom: 50%;
  transform: translateX(-50%) translateY(50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.dot-exit {
  width: 16px; height: 16px;
  background: transparent;
  border: 3px solid rgba(200,160,50,0.7);
  box-shadow: 0 0 10px 3px rgba(200,160,50,0.4);
  animation: exit-pulse 2s ease-in-out infinite;
}

.label-exit {
  color: #d4b878;
  border: 1px solid rgba(200, 160, 50, 0.4);
  font-size: 11px;
}

@keyframes exit-pulse {
  0%, 100% { opacity: 0.4; border-color: rgba(200,160,50,0.4); }
  50% { opacity: 1; border-color: rgba(200,160,50,0.9); box-shadow: 0 0 14px 5px rgba(200,160,50,0.6); }
}

/* Usable: blue-ish dot + label */
.indicator-usable {
  bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.dot-usable {
  width: 10px; height: 10px;
  background: #88aaff;
  box-shadow: 0 0 8px 3px rgba(136,170,255,0.5);
  animation: usable-glow 3s ease-in-out infinite;
}

.label-usable {
  color: #aabbdd;
  border: 1px solid rgba(136, 170, 255, 0.3);
  font-size: 11px;
}

@keyframes usable-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

/* NPC hotspot subtle glow */
.hotspot-area.npc-hotspot {
  border: 1px solid rgba(196, 162, 101, 0.2);
  border-radius: 4px;
}

/* Item hotspot golden shimmer */
.hotspot-area.item-hotspot {
  border: 1px solid rgba(255, 223, 100, 0.25);
}

#cursor-label {
  position: fixed;
  background: rgba(26, 21, 16, 0.92);
  color: var(--text-gold);
  font-family: 'IM Fell English', serif;
  font-size: 15px;
  padding: 4px 10px;
  border: 1px solid var(--border-gold);
  pointer-events: none;
  display: none;
  z-index: 100;
  white-space: nowrap;
}

#scene-name {
  background: var(--bg-panel);
  color: var(--text-amber);
  font-family: 'IM Fell English SC', serif;
  font-size: 12px;
  text-align: center;
  padding: 6px;
  border-top: 1px solid var(--border-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Verb Bar */
#verb-bar {
  display: flex;
  background: var(--bg-panel);
  border-top: 2px solid var(--border-gold);
  border-bottom: 1px solid var(--border-dim);
  padding: 4px 8px;
  gap: 4px;
  flex-shrink: 0;
}

.verb-btn {
  font-family: 'IM Fell English SC', serif;
  font-size: 13px;
  color: var(--text-gold);
  background: var(--verb-bg);
  border: 1px solid var(--border-dim);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.verb-btn:hover {
  border-color: var(--border-gold);
  color: #f0e0b0;
  background: rgba(196, 162, 101, 0.08);
}

.verb-btn.active {
  background: var(--verb-active);
  color: var(--bg-dark);
  border-color: var(--text-gold);
  box-shadow: 0 0 10px rgba(196, 162, 101, 0.3);
  font-weight: 700;
}

.verb-spacer { flex: 1; }

.verb-system {
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
}

.voice-off {
  opacity: 0.4;
  text-decoration: line-through;
}

/* Inventory Bar */
#inventory-bar {
  display: flex;
  align-items: center;
  background: var(--inventory-bg);
  border-bottom: 1px solid var(--border-dim);
  padding: 4px 8px;
  min-height: 48px;
  flex-shrink: 0;
  gap: 4px;
}

#inventory-label {
  font-family: 'IM Fell English SC', serif;
  font-size: 11px;
  color: var(--text-dim);
  margin-right: 8px;
  white-space: nowrap;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#inventory-slots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.inventory-item {
  background: var(--bg-panel-light);
  border: 1px solid var(--border-dim);
  padding: 4px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.inventory-item:hover {
  border-color: var(--border-gold);
  background: rgba(196, 162, 101, 0.08);
}

.inventory-item.selected {
  border-color: var(--text-gold);
  background: rgba(212, 169, 68, 0.12);
  box-shadow: 0 0 10px rgba(212, 169, 68, 0.2);
}

.inventory-item .item-icon { font-size: 18px; }
.inventory-item .item-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: var(--text-amber);
}

/* Text Output */
#text-output {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-dim);
  padding: 10px 16px;
  min-height: 80px;
  max-height: 120px;
  overflow-y: auto;
  flex-shrink: 0;
}

#text-content {
  font-family: 'Crimson Text', serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-cream);
}

#text-content .text-description { color: var(--text-cream); }
#text-content .text-action { color: var(--text-gold); }
#text-content .text-failure { color: var(--text-red); }
#text-content .text-item { color: var(--text-amber); }
#text-content .text-skill { color: var(--text-gold); }
#text-content .text-analysis { color: var(--text-blue); }
#text-content .text-empathy { color: var(--text-rose); }

#text-content .text-revelation {
  color: #f0d060;
  text-shadow: 0 0 8px rgba(240, 208, 96, 0.4), 0 0 20px rgba(212, 169, 68, 0.2);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Dialogue Overlay */
#dialogue-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(14, 12, 8, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

#dialogue-box {
  background: var(--bg-panel);
  border: 2px solid var(--border-gold);
  border-top: 3px solid var(--text-gold);
  border-bottom: 3px solid var(--text-gold);
  max-width: 600px;
  width: 90%;
  padding: 24px;
  box-shadow:
    0 0 30px rgba(196, 162, 101, 0.12),
    inset 0 1px 0 rgba(196, 162, 101, 0.08),
    inset 0 -1px 0 rgba(196, 162, 101, 0.08);
  position: relative;
}

/* Decorative corner flourishes for the dialogue box */
#dialogue-box::before,
#dialogue-box::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--text-gold);
  border-style: solid;
  opacity: 0.5;
}
#dialogue-box::before {
  top: 6px; left: 6px;
  border-width: 1px 0 0 1px;
}
#dialogue-box::after {
  bottom: 6px; right: 6px;
  border-width: 0 1px 1px 0;
}

#dialogue-speaker {
  font-family: 'IM Fell English SC', serif;
  font-size: 14px;
  color: var(--text-amber);
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#dialogue-text {
  font-family: 'Crimson Text', serif;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-cream);
  margin-bottom: 16px;
}

#dialogue-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialogue-choice {
  font-family: 'Crimson Text', serif;
  font-size: 18px;
  color: var(--text-gold);
  background: transparent;
  border: 1px solid var(--border-dim);
  padding: 8px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.dialogue-choice:hover {
  border-color: var(--border-gold);
  background: var(--hover-glow);
  color: #f0e0b0;
}

.dialogue-choice .choice-skill-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: var(--accent-purple);
  margin-left: 8px;
}

.dialogue-choice:disabled {
  color: var(--text-dim);
  border-color: #2a2418;
  cursor: not-allowed;
}

/* Status Bar */
#status-bar {
  display: flex;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dim);
  padding: 4px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  gap: 20px;
  flex-shrink: 0;
}

#status-skills { color: var(--text-blue); }
#status-cyberware { color: var(--accent-purple); }
#status-credits { color: var(--text-amber); }

/* === END SCREEN === */
#end-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.end-panel {
  max-width: 600px;
  padding: 40px;
  text-align: center;
  border: 1px solid var(--border-gold);
  border-top: 3px solid var(--text-gold);
  border-bottom: 3px solid var(--text-gold);
  background: var(--bg-panel);
  box-shadow: 0 0 40px rgba(196, 162, 101, 0.1);
  position: relative;
}

.end-panel::before,
.end-panel::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--text-gold);
  border-style: solid;
  opacity: 0.4;
}
.end-panel::before {
  top: 8px; left: 8px;
  border-width: 1px 0 0 1px;
}
.end-panel::after {
  bottom: 8px; right: 8px;
  border-width: 0 1px 1px 0;
}

.end-panel h2 {
  font-family: 'IM Fell English SC', serif;
  font-size: 24px;
  color: var(--text-gold);
  margin-bottom: 20px;
  letter-spacing: 4px;
  text-shadow: 0 1px 0 #a07d1e, 0 2px 4px rgba(0, 0, 0, 0.4);
}

.end-panel p {
  font-family: 'Crimson Text', serif;
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-cream);
  margin-bottom: 30px;
}

.end-philosophy {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dim);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* === CURSOR STATES === */
/* Look: magnifying glass in gold/amber */
body.cursor-look { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='10' cy='10' r='7' fill='none' stroke='%23c4a265' stroke-width='2'/%3E%3Cline x1='15' y1='15' x2='22' y2='22' stroke='%23c88c32' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") 10 10, pointer; }

/* Use: compass rose / star in gold */
body.cursor-use { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 1L13.5 9H21L15 13.5L17 21L12 16.5L7 21L9 13.5L3 9H10.5Z' fill='none' stroke='%23c4a265' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%23d4a944'/%3E%3C/svg%3E") 12 12, pointer; }

/* Talk: speech scroll in amber */
body.cursor-talk { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M4 4C4 4 4 2 6 2H18C20 2 20 4 20 4V16C20 16 20 18 18 18H10L5 22V18H6C4 18 4 16 4 16Z' fill='none' stroke='%23c88c32' stroke-width='1.5'/%3E%3Cline x1='8' y1='7' x2='16' y2='7' stroke='%23c88c32' stroke-width='1' opacity='0.6'/%3E%3Cline x1='8' y1='10' x2='14' y2='10' stroke='%23c88c32' stroke-width='1' opacity='0.6'/%3E%3Cline x1='8' y1='13' x2='12' y2='13' stroke='%23c88c32' stroke-width='1' opacity='0.6'/%3E%3C/svg%3E") 6 10, pointer; }

/* Take: open hand in rose */
body.cursor-take { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M6 13C6 13 6 9 7 7C8 5 9 5 9 7V11' fill='none' stroke='%23c47070' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M9 11V5C9 3 11 3 11 5V11' fill='none' stroke='%23c47070' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M11 11V4C11 2 13 2 13 4V11' fill='none' stroke='%23c47070' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M13 11V5C13 3 15 3 15 5V11' fill='none' stroke='%23c47070' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M15 11C15 11 17 11 18 13C19 15 18 18 16 20H8C6 18 5 16 6 13' fill='none' stroke='%23c47070' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer; }

/* Walk: directional compass arrow in cream */
body.cursor-walk { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 2L18 10H14V18H10V10H6Z' fill='none' stroke='%23e8dcc8' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='20' r='2' fill='none' stroke='%23e8dcc8' stroke-width='1'/%3E%3C/svg%3E") 12 12, pointer; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-gold); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .title-text h1 { font-size: 30px; letter-spacing: 3px; }
  .title-text h2 { font-size: 16px; }
  .title-epigraph { font-size: 15px; padding: 0 20px; }
  .skill-grid { grid-template-columns: 1fr; }
  .verb-btn { padding: 8px 10px; font-size: 11px; }
  #text-output { min-height: 60px; }
  #dialogue-box { padding: 16px; }
}

/* === TYPEWRITER EFFECT === */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--text-gold);
  white-space: normal;
  animation: blink-caret 0.9s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--text-gold); }
}

/* === SCENE TRANSITION === */
.scene-fade-out {
  animation: fadeOut 0.5s ease-out forwards;
}
.scene-fade-in {
  animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === ITEM FLASH (gold instead of green) === */
.item-flash {
  animation: itemFlash 0.7s ease-out;
}

@keyframes itemFlash {
  0% { background: rgba(212, 169, 68, 0.4); }
  100% { background: transparent; }
}

/* === SKILL CHECK ANIMATION === */
.skill-check-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'IM Fell English SC', serif;
  font-size: 18px;
  padding: 14px 28px;
  border: 2px solid;
  z-index: 60;
  animation: skillPop 1.5s ease-out forwards;
  letter-spacing: 2px;
}

.skill-check-overlay.success {
  color: var(--text-gold);
  border-color: var(--border-gold);
  background: rgba(30, 26, 20, 0.92);
  box-shadow: 0 0 20px rgba(212, 169, 68, 0.2);
}

.skill-check-overlay.failure {
  color: var(--text-red);
  border-color: var(--text-red);
  background: rgba(30, 16, 12, 0.92);
}

@keyframes skillPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  30% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

/* === UTOPIAN RAINBOW FLASH — for miracles and set-set moments === */
.rainbow-flash {
  animation: utopianRainbow 2s ease-out forwards;
}

@keyframes utopianRainbow {
  0%   { box-shadow: 0 0 30px rgba(180, 60, 60, 0.3); }
  16%  { box-shadow: 0 0 30px rgba(200, 140, 50, 0.3); }
  33%  { box-shadow: 0 0 30px rgba(212, 169, 68, 0.3); }
  50%  { box-shadow: 0 0 30px rgba(80, 160, 80, 0.3); }
  66%  { box-shadow: 0 0 30px rgba(100, 136, 170, 0.3); }
  83%  { box-shadow: 0 0 30px rgba(119, 68, 170, 0.3); }
  100% { box-shadow: 0 0 0 transparent; }
}

/* === HIDDEN STATE UTILITY === */
.hidden { display: none !important; }
