/* ===== ROOT VARIABLES ===== */
:root {
  --bg-dark: #1a0f08;
  --bg-darker: #2a1a0e;
  --text-primary: #d4883a;
  --text-secondary: #b8944f;
  --text-danger: #c44536;
  --text-safe: #4a7c3f;
  --text-night: #6b8cae;
  --text-gold: #d4a574;
  --border-color: #4a3526;
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* Savannah texture background (day — always present) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    /* Subtle noise grain */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    /* Warm gradient base */
    linear-gradient(175deg, #2e1c10 0%, #1a0f08 40%, #1c1209 70%, #2a1a0e 100%);
}

/* Savannah grass-like texture overlay (day — always present) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(180, 140, 60, 0.015) 3px,
      rgba(180, 140, 60, 0.015) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 8px,
      rgba(120, 80, 30, 0.02) 8px,
      rgba(120, 80, 30, 0.02) 9px
    );
  pointer-events: none;
}

/* Night overlay — fades in/out via opacity */
.night-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    /* Star-like dots */
    radial-gradient(1px 1px at 20% 30%, rgba(200, 220, 255, 0.4), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(200, 220, 255, 0.3), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(200, 220, 255, 0.5), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(200, 220, 255, 0.3), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(200, 220, 255, 0.4), transparent),
    radial-gradient(1px 1px at 70% 90%, rgba(200, 220, 255, 0.3), transparent),
    radial-gradient(1px 1px at 90% 10%, rgba(200, 220, 255, 0.5), transparent),
    radial-gradient(1px 1px at 50% 40%, rgba(200, 220, 255, 0.3), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(200, 220, 255, 0.4), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(200, 220, 255, 0.3), transparent),
    linear-gradient(175deg, #0d1420 0%, #0a0e18 40%, #0c1220 70%, #101828 100%);
}

body.night-mode .night-bg {
  opacity: 1;
}

/* ===== SCREEN SYSTEM ===== */
.screen {
  display: none;
  min-height: 100vh;
  padding: 20px 40px;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ===== TYPEWRITER CINEMATIC INTRO ===== */
.typewriter-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  padding: 2rem;
}

.typewriter-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.typewriter-overlay.fading {
  opacity: 0;
  transition: opacity 1.5s ease;
}

.typewriter-content {
  max-width: 700px;
  width: 100%;
  text-align: center;
}

.typewriter-content p {
  font-family: Georgia, serif;
  font-size: 1.15em;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.2em;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.typewriter-content p.visible {
  opacity: 1;
}

.typewriter-content p em {
  font-style: italic;
  color: var(--text-primary);
}

.typewriter-skip {
  position: absolute;
  bottom: 2rem;
  color: rgba(184, 148, 79, 0.4);
  font-family: Georgia, serif;
  font-size: 0.85em;
  letter-spacing: 1px;
  animation: fade-in 1s ease 2s forwards;
  opacity: 0;
}

/* ===== TITLE SCREEN ===== */
.title-container {
  max-width: 900px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.logo {
  max-width: 70%;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(212, 136, 58, 0.4));
  opacity: 0;
  animation: fade-in 1s ease 0.2s forwards;
}

@keyframes fade-in {
  to { opacity: 1; }
}

.title-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  opacity: 0;
  animation: fade-in 0.8s ease 0.8s forwards;
}

.title-btn {
  background: rgba(26, 15, 8, 0.85);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  padding: 1rem 1.8rem;
  font-size: 1em;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 48px;
  min-width: 240px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  position: relative;
  letter-spacing: 0.5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.title-btn:hover {
  background: rgba(74, 53, 38, 0.95);
  border-color: var(--text-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 6px 16px rgba(0, 0, 0, 0.6);
}

.title-btn:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.4);
}

.title-btn-primary {
  color: var(--text-primary);
  border-color: var(--text-primary);
  font-size: 1.15em;
  font-weight: bold;
  padding: 1.1rem 2.2rem;
  background: rgba(42, 26, 14, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 0 15px rgba(212, 136, 58, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.5);
  animation: fade-in 0.8s ease 0.8s forwards, btn-glow 3s ease-in-out 2s infinite alternate;
}

@keyframes btn-glow {
  0% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.3), 0 0 15px rgba(212,136,58,0.15), 0 2px 8px rgba(0,0,0,0.5); }
  100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.3), 0 0 25px rgba(212,136,58,0.3), 0 2px 12px rgba(0,0,0,0.5); }
}

.title-btn-primary:hover {
  background: rgba(74, 53, 38, 1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 0 30px rgba(212, 136, 58, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.6);
}

/* ===== CREATOR CREDIT ===== */
.creator-credit {
  font-family: Georgia, serif;
  font-size: 0.8em;
  color: rgba(184, 148, 79, 0.35);
  margin-top: 1.5rem;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: fade-in 1s ease 1.5s forwards;
}

.creator-credit a {
  color: rgba(184, 148, 79, 0.5);
  text-decoration: none;
  transition: color 0.3s ease;
}

.creator-credit a:hover {
  color: var(--text-primary);
}

.death-container .creator-credit {
  margin-top: 1.2rem;
  animation-delay: 0s;
  opacity: 0;
}

.death-results-visible .creator-credit {
  animation: death-fade-in 1s ease 0.5s forwards;
}

/* ===== GAME SCREEN ===== */
#screen-game.active {
  justify-content: flex-start;
  align-items: center;
  padding-top: 20px;
}

.game-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  background: rgba(10, 6, 3, 0.8);
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
}

.game-header {
  text-align: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 2px solid var(--border-color);
  flex-shrink: 0;
}

.phase-indicator {
  font-size: 2.2em;
  font-weight: bold;
  letter-spacing: 3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.phase-indicator.day {
  color: var(--text-primary);
}

.phase-indicator.night {
  color: var(--text-night);
}

.day-text {
  color: var(--text-primary);
}

.night-text {
  color: var(--text-night);
}

/* ===== GAME TOP: VITALS + SIDEBAR ===== */
.game-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  flex-shrink: 0;
}

.vitals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  padding: 1.2rem 1.5rem;
  border-right: 1px solid var(--border-color);
}

/* ===== STATUS BARS ===== */
.status-bar-container {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.status-label {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  color: var(--text-secondary);
  font-size: 0.95em;
  display: flex;
  justify-content: space-between;
}

.status-value {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 0.95em;
}

.status-bar-track {
  height: 18px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.status-bar-fill {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.status-bar-fill.transitioning {
  transition: width 1.5s ease-in-out, background-color 1.5s ease-in-out;
}

/* ===== GAME SIDEBAR ===== */
.game-sidebar {
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* ===== HUNT INFO ===== */
.hunt-info {
  font-family: 'Courier New', monospace;
  font-size: 1em;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(74, 53, 38, 0.4);
  border-radius: 2px;
  padding: 1rem 1.2rem;
}

.hunt-distance {
  font-weight: bold;
  color: var(--text-danger);
  margin-bottom: 0.5rem;
  font-size: 1.1em;
}

.hunt-flavor {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.95em;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.distance-covered {
  color: var(--text-safe);
  font-size: 1em;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(74, 53, 38, 0.3);
}

/* ===== SITUATION & MONOLOGUE (SCROLLABLE) ===== */
.situation-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 1.5rem 3rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.situation-scroll::-webkit-scrollbar {
  display: none;
}

.situation-text {
  font-size: 1.2em;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  text-align: center;
}

.situation-text p {
  margin-bottom: 1em;
}

.outcome-text {
  color: var(--text-primary);
  font-weight: bold;
  margin-bottom: 1em;
}

.monologue {
  font-style: italic;
  color: var(--text-gold);
  font-size: 1.15em;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  text-align: center;
}

.monologue-label {
  display: block;
  font-style: normal;
  font-size: 0.75em;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(212, 165, 116, 0.5);
  margin-bottom: 0.3rem;
  text-align: center;
}

/* ===== ACTION BUTTONS (ALWAYS VISIBLE) ===== */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 2rem 1.2rem;
  border-top: 2px solid var(--border-color);
  background: rgba(10, 6, 3, 0.9);
  flex-shrink: 0;
}

/* 2x2 grid for 4+ actions on desktop */
.action-buttons.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* 5th button: centered, spanning full width */
.action-buttons.grid-layout .action-btn:nth-child(5) {
  grid-column: 1 / -1;
  max-width: 50%;
  justify-self: center;
}

.action-btn {
  background: rgba(42, 26, 14, 0.9);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 0.8rem 1.2rem;
  font-size: 1.05em;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.action-btn:hover {
  background: rgba(74, 53, 38, 1);
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

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

.action-btn.disabled {
  color: var(--text-secondary);
  border-color: rgba(74, 53, 38, 0.4);
  background: rgba(26, 15, 8, 0.7);
  pointer-events: none;
  cursor: not-allowed;
}

.action-name {
  font-weight: bold;
  font-size: 1.05em;
}

.action-key {
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  line-height: 1.4em;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  margin-right: 0.4em;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  vertical-align: middle;
}

.action-description {
  font-size: 0.85em;
  color: var(--text-secondary);
  font-style: italic;
}

.action-details {
  font-size: 0.8em;
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
}

.action-cost {
  color: var(--text-danger);
}

.action-gain {
  color: var(--text-safe);
}

/* ===== DEATH SCREEN ===== */
.death-container {
  max-width: 700px;
  width: 100%;
  text-align: center;
  background: rgba(10, 6, 3, 0.85);
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  opacity: 0;
  animation: death-fade-in 2s ease 0.5s forwards;
}

@keyframes death-fade-in {
  to { opacity: 1; }
}

.death-narrative {
  font-size: 1.15em;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
}

.tw-hidden {
  color: transparent;
}

.death-narrative p {
  margin-bottom: 1em;
}

.score-summary {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--border-color);
  opacity: 0;
}

.score-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 0.8rem;
  font-family: 'Courier New', monospace;
  font-size: 1em;
  color: var(--text-secondary);
}

.score-number {
  color: var(--text-primary);
  font-weight: bold;
}

/* Percentile stats */
.percentile-stats {
  margin-bottom: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.percentile-stat {
  color: var(--text-gold);
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.achievements-list {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.achievements-list h3 {
  color: var(--text-gold);
  font-size: 1em;
  margin-bottom: 0.4rem;
}

.achievements-list ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 1rem;
}

.achievements-list li {
  color: var(--text-secondary);
  font-size: 0.9em;
}

.death-buttons-row {
  display: flex;
  gap: 0.8rem;
}

.death-buttons-row .death-btn {
  flex: 1;
}

.death-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  opacity: 0;
}

.death-results-visible .score-summary,
.death-results-visible .death-buttons {
  animation: death-fade-in 1s ease forwards;
}

.death-btn {
  background: rgba(42, 26, 14, 0.8);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 0.9rem 1.5rem;
  font-size: 1em;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.death-btn:hover {
  background: rgba(74, 53, 38, 0.9);
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.death-btn.primary {
  background: rgba(74, 53, 38, 1);
  border-color: var(--text-primary);
  font-weight: bold;
  font-size: 1.1em;
}

.death-btn.primary:hover {
  background: var(--text-primary);
  color: var(--bg-darker);
}

/* ===== LEADERBOARD SCREEN ===== */
.leaderboard-container {
  max-width: 900px;
  width: 100%;
  background: rgba(10, 6, 3, 0.85);
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 2px;
}

.leaderboard-title {
  text-align: center;
  font-size: 2.2em;
  margin-bottom: 2rem;
  color: var(--text-primary);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

.leaderboard-table {
  margin-bottom: 2rem;
  overflow-x: auto;
}

.leaderboard-table table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(26, 15, 8, 0.7);
  border: 2px solid var(--border-color);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Courier New', monospace;
}

.leaderboard-table th {
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-weight: bold;
  font-size: 1.05em;
}

.leaderboard-table td {
  color: var(--text-secondary);
}

.leaderboard-table tr:hover {
  background: rgba(74, 53, 38, 0.3);
}

/* ===== HOW TO PLAY SCREEN ===== */
.howto-container {
  max-width: 900px;
  width: 100%;
  background: rgba(10, 6, 3, 0.85);
  padding: 1.5rem 2rem;
  border: 1px solid var(--border-color);
  border-radius: 2px;
}

.howto-container h1 {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.howto-content {
  background: rgba(26, 15, 8, 0.7);
  border: 2px solid var(--border-color);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.2rem;
}

.howto-intro {
  color: var(--text-secondary);
  text-align: center;
  font-size: 1.05em;
  line-height: 1.6;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.howto-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1.5rem;
}

.howto-content section {
  margin-bottom: 0;
}

.howto-content h2 {
  color: var(--text-primary);
  font-size: 1.15em;
  margin-bottom: 0.4rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.howto-content p {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.92em;
}

.howto-content ul {
  list-style: none;
  padding-left: 0;
}

.howto-content li {
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-size: 0.92em;
  line-height: 1.5;
}

.howto-content strong {
  color: var(--text-primary);
}

.howto-achievements li {
  margin-bottom: 0.15rem;
  font-size: 0.88em;
}

/* ===== BACK BUTTON ===== */
.back-btn {
  background: rgba(42, 26, 14, 0.8);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 1rem 2rem;
  font-size: 1.1em;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  display: block;
  margin: 0 auto;
}

.back-btn:hover {
  background: rgba(74, 53, 38, 0.9);
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

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


/* ===== OPTIONS SCREEN ===== */
.options-container {
  max-width: 600px;
  width: 100%;
  background: rgba(10, 6, 3, 0.85);
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 2px;
}

.options-container h1 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 2rem;
  color: var(--text-primary);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.options-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
}

.option-label {
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
  font-size: 1em;
}

.option-control {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.difficulty-control {
  gap: 0;
}

.option-btn {
  background: rgba(42, 26, 14, 0.6);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.4rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 5rem;
  text-align: center;
}

.option-btn.active {
  background: rgba(74, 53, 38, 0.9);
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.option-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.option-toggle {
  background: rgba(74, 53, 38, 0.9);
  color: var(--text-safe);
  border: 1px solid var(--text-safe);
  padding: 0.5rem 1.2rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 3.5rem;
  text-align: center;
}

.option-toggle.off {
  color: var(--text-danger);
  border-color: var(--text-danger);
  background: rgba(42, 26, 14, 0.6);
}

/* Typewriter speed slider row */
.speed-row {
  padding-top: 0;
  border-bottom: none;
}

.speed-row .option-label {
  font-size: 0.85em;
  opacity: 0.7;
}

.speed-control {
  flex: 1;
  margin-left: 1rem;
}

.slider-label {
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
  font-size: 0.75em;
  opacity: 0.7;
  flex-shrink: 0;
}

.option-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 80px;
  height: 6px;
  background: rgba(42, 26, 14, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.option-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.option-slider::-webkit-slider-thumb:hover {
  background: var(--text-gold);
}

.option-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .game-container {
    height: auto;
    min-height: calc(100vh - 20px);
  }

  /* Stack vitals and sidebar vertically on tablet */
  .game-top {
    grid-template-columns: 1fr;
  }

  .vitals-grid {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .situation-scroll {
    overflow-y: visible;
  }

  .logo {
    max-width: 70%;
  }

  .phase-indicator {
    font-size: 1.4em;
  }

  .howto-columns {
    grid-template-columns: 1fr;
  }

  .howto-content {
    padding: 1rem;
  }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 480px) {
  .screen {
    padding: 10px;
  }

  .logo {
    max-width: 85%;
  }

  .title-btn,
  .death-btn,
  .back-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1em;
  }

  .phase-indicator {
    font-size: 1.2em;
  }

  .vitals-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    padding: 0.6rem;
  }

  .status-label {
    font-size: 0.75em;
  }

  .status-value {
    font-size: 0.75em;
  }

  .status-bar-track {
    height: 10px;
  }

  .game-sidebar {
    padding: 0.6rem;
  }

  .hunt-info {
    font-size: 0.8em;
  }

  .situation-scroll {
    padding: 0.8rem;
  }

  .situation-text,
  .monologue {
    font-size: 0.95em;
  }

  .action-buttons {
    padding: 0.6rem;
    gap: 0.4rem;
  }

  .action-buttons.grid-layout {
    display: flex;
    flex-direction: column;
  }

  .action-buttons.grid-layout .action-btn:nth-child(5) {
    max-width: none;
  }

  .action-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.95em;
  }

  .howto-content {
    padding: 0.8rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.7rem 0.5rem;
    font-size: 0.85em;
  }
}

/* ===== VERSION BADGE ===== */
#version-badge {
  position: fixed;
  bottom: 6px;
  right: 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.7em;
  color: var(--text-secondary);
  opacity: 0.3;
  z-index: 50;
  pointer-events: none;
}

/* ===== FEEDBACK LINK ===== */
.feedback-link {
  font-family: Georgia, serif;
  font-size: 0.8em;
  color: rgba(184, 148, 79, 0.35);
  margin-top: 1rem;
  opacity: 0;
}

.feedback-link a {
  color: var(--text-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.feedback-link a:hover {
  color: var(--text-primary);
}

.death-results-visible .feedback-link {
  animation: death-fade-in 1s ease 0.3s forwards;
}

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

