:root {
  --primary-color: #ff6b35; /* Energetic Orange */
  --secondary-color: #00b4d8; /* Electric Cyan */
  --accent-color: #7209b7; /* Royal Purple */
  --bg-dark: #0a0b10; /* Very Dark Purple-Blue */
  --text-light: #f4f6fc;
  --text-dark: #12131a;
  --glass-bg: rgba(15, 18, 36, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-glow: rgba(0, 180, 216, 0.35);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-speed: 0.3s;
}

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

button,
.btn,
.menu-btn,
.choice-btn,
.ctrl-btn,
.icon-btn,
.close-btn,
.slot-actions button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  touch-action: manipulation;
  overscroll-behavior: none;
  min-height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  background-color: #030408;
  color: var(--text-light);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* 16:9 Game Container Box-fitting Engine */
#game-wrapper {
  width: 100vw;
  max-width: 100vw;
  height: 56.25vw; /* 16:9 ratio */
  max-height: 100vh;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 100px rgba(114, 9, 183, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: var(--bg-dark);
}

#game-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Screens Setup */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Generic Glassmorphism Card Style */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 1. Disclaimer Screen */
#disclaimer-screen {
  background: radial-gradient(circle at center, #1a153b 0%, #060514 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5%;
}

.disclaimer-content {
  max-width: 600px;
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 0 50px rgba(255, 107, 53, 0.15);
}

.disclaimer-content h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  letter-spacing: 2px;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.4);
}

.disclaimer-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(244, 246, 252, 0.85);
}

/* 2. Main Menu Screen */
#main-menu-screen {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 8%;
}

.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(10, 11, 16, 0.85) 0%, rgba(10, 11, 16, 0.4) 50%, rgba(10, 11, 16, 0.8) 100%);
  z-index: 1;
}

.menu-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 480px;
}

.title-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-title {
  font-family: var(--font-title);
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.0;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
  background: linear-gradient(135deg, #ffffff 40%, #ff8c42 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-title .sub-title {
  color: var(--primary-color);
  -webkit-text-fill-color: var(--primary-color);
  text-shadow: 0 0 25px rgba(255, 107, 53, 0.5);
}

.game-tagline {
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 280px;
}

.menu-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 14px 24px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  backdrop-filter: blur(8px);
}

.menu-btn:hover {
  background: linear-gradient(90deg, rgba(0, 180, 216, 0.25) 0%, rgba(114, 9, 183, 0.2) 100%);
  border-color: var(--secondary-color);
  transform: translateX(10px);
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.4);
}

/* 3. Gameplay Screen */
#game-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transition: all 0.5s ease-in-out;
}

/* Premium anime-styled gradient backdrops */
.bg-container.bg-title {
  background: radial-gradient(circle at 70% 20%, rgba(255, 160, 0, 0.4) 0%, rgba(3, 4, 8, 0) 60%),
              linear-gradient(180deg, #1f2041 0%, #4b3f72 40%, #ffc857 100%);
}

.bg-container.bg-canteen {
  background: radial-gradient(circle at 20% 30%, rgba(0, 180, 216, 0.2) 0%, rgba(3, 4, 8, 0) 50%),
              linear-gradient(135deg, #1a1b2f 0%, #162a45 50%, #4facfe 100%);
}

.bg-container.bg-warkop {
  background: radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.25) 0%, rgba(0,0,0,0) 60%),
              linear-gradient(210deg, #0f0c20 0%, #15102a 50%, #030008 100%);
  box-shadow: inset 0 0 100px rgba(114, 9, 183, 0.3);
}

.bg-container.bg-debate {
  background: radial-gradient(circle at 30% 10%, rgba(0, 180, 216, 0.3) 0%, rgba(0,0,0,0) 40%),
              radial-gradient(circle at 70% 10%, rgba(114, 9, 183, 0.3) 0%, rgba(0,0,0,0) 40%),
              linear-gradient(180deg, #090a0f 0%, #12131c 60%, #040508 100%);
}

.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Stats Header */
.glass-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  height: 52px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-right: 16px; /* Prevent items from colliding */
}

.stat-label {
  color: rgba(255, 255, 255, 0.65);
  margin-right: 4px;
}

.stat-bar-container {
  width: 100px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.stat-progress {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.pop-fill {
  background: linear-gradient(90deg, #ff8c42, var(--primary-color));
  box-shadow: 0 0 8px var(--primary-color);
}

.morale-fill {
  background: linear-gradient(90deg, #00f5d4, var(--secondary-color));
  box-shadow: 0 0 8px var(--secondary-color);
}

.stat-value {
  color: #fff;
  min-width: 42px; /* Fixed width to prevent labels overlap */
  margin-left: 8px;
  text-align: right;
}

.intel-badge {
  background: var(--accent-color);
  color: #fff;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  box-shadow: 0 0 8px var(--accent-color);
  margin-left: 4px;
}

.game-quick-controls {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: scale(1.1);
}

/* Character Sprites Area */
#sprites-container {
  position: absolute;
  top: 52px;
  bottom: 160px; /* Dialogue box heights */
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  pointer-events: none;
  z-index: 2;
  padding: 0 10%;
}

.character-sprite {
  height: 100%;
  width: 25%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
  opacity: 0;
  transform: translateY(50px);
}

.character-sprite.active {
  opacity: 1;
  transform: translateY(0);
}

.character-sprite.speaking {
  transform: scale(1.05) translateY(0);
  filter: brightness(1);
  z-index: 5;
}

.character-sprite.dimmed {
  filter: brightness(0.6);
  transform: scale(0.95) translateY(0);
}

/* Avatar container with Anime styled Cel-shaded placeholder avatars */
.sprite-avatar {
  width: 100%;
  height: 85%;
  background-size: contain;
  background-position: bottom center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.6));
  position: relative;
}

/* Dynamic placeholder stylings for anime style without images */
.sprite-avatar.placeholder-avatar {
  border-radius: 120px 120px 0 0;
  background: linear-gradient(180deg, var(--accent-color) 0%, rgba(10, 11, 16, 0.4) 100%);
  border: 4px solid var(--secondary-color);
  width: 180px;
  height: 240px;
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.4);
}

/* Custom visual sprites overrides for Juni and Mahesa */
.sprite-avatar[data-character="Juni"],
.sprite-avatar[data-character="Mahesa"] {
  border-radius: 0 !important;
  border: none !important;
  background-color: transparent !important;
  background-size: contain !important;
  box-shadow: none !important;
  width: 220px !important;
  height: 280px !important;
}

.sprite-avatar[data-character="Juni"] {
  background-image: url('juni.svg') !important;
}

.sprite-avatar[data-character="Mahesa"] {
  background-image: url('mahesa.svg') !important;
}

.sprite-avatar[data-character="Juni"]::after,
.sprite-avatar[data-character="Mahesa"]::after {
  display: none !important;
}

/* Add stylish hair/outfit hints inside avatar placeholders */
.sprite-avatar.placeholder-avatar::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.sprite-name-tag {
  background: var(--bg-dark);
  border: 1px solid var(--secondary-color);
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* Dialogue Box Container */
#dialogue-box-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 24px 16px 24px;
  z-index: 10;
  pointer-events: none;
}

/* Dialogue Timer bar */
#timer-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
  pointer-events: auto;
}

#timer-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  box-shadow: 0 0 10px var(--primary-color);
  width: 100%;
  transition: width 0.1s linear;
}

#dialogue-panel {
  width: 100%;
  height: 130px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: auto;
  cursor: pointer;
  position: relative;
}

.dialogue-header {
  margin-bottom: 6px;
}

.speaker-tag {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 1px;
  padding: 3px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  box-shadow: 0 2px 8px rgba(114, 9, 183, 0.4);
}

.dialogue-body {
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

#dialogue-text {
  white-space: pre-wrap; /* Solves word spacing collapse on character-by-character updates */
}

#click-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: var(--secondary-color);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  animation: bounce 1s infinite alternate;
}

.dialogue-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ctrl-btn:hover {
  color: var(--secondary-color);
}

.ctrl-btn.active {
  color: var(--primary-color);
  text-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
}

/* Choices Grid overlay */
.choice-grid {
  position: absolute;
  bottom: 145px; /* Sits exactly above dialogue text box */
  left: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 15;
  pointer-events: auto;
}

.choice-btn {
  background: rgba(15, 18, 36, 0.95);
  backdrop-filter: blur(12px);
  border: 2px solid var(--secondary-color);
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 16px 24px;
  min-height: 48px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  width: 100%;
}

.choice-btn:active {
  transform: scale(0.98);
}

.btn:active,
.menu-btn:active,
.icon-btn:active,
.close-btn:active,
.slot-actions button:active,
.ctrl-btn:active {
  transform: scale(0.98);
}

.choice-btn:hover {
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.25) 0%, rgba(255, 107, 53, 0.2) 100%);
  border-color: var(--primary-color);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

/* Modals & Dialogs Style */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  width: 500px;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-card.wide-card {
  width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
  font-family: var(--font-title);
  color: var(--secondary-color);
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 400px;
}

.modal-body.scrollable::-webkit-scrollbar {
  width: 6px;
}

.modal-body.scrollable::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 3px;
}

/* Save Slots */
.save-slots-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.save-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s ease;
}

.save-slot:hover {
  border-color: rgba(0, 180, 216, 0.4);
}

.slot-num {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--primary-color);
}

.slot-details {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  flex-grow: 1;
  margin-left: 20px;
}

.slot-actions {
  display: flex;
  gap: 8px;
}

.slot-actions button {
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.slot-actions button:hover:not(:disabled) {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.slot-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Campaign Dossiers (Gallery) */
.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.dossier-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.dossier-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--secondary-color);
  margin-bottom: 12px;
  background-size: cover;
  background-position: center;
}

/* Dossier Placeholder styles for characters */
.dossier-avatar.joni-avatar {
  background-color: #ff6b35;
  background-image: url('assets/Joni.png');
}
.dossier-avatar.zidane-avatar {
  background-color: #00b4d8;
  background-image: url('assets/Zidane.png');
}
.dossier-avatar.rizki-avatar {
  background-color: #ffe66d;
  background-image: url('assets/Rizki.png');
}
.dossier-avatar.rachel-avatar {
  background-color: #4ecdc4;
  background-image: url('assets/Rachel.png');
}
.dossier-avatar.rian-avatar {
  background-color: #1a153b;
}
.dossier-avatar.roki-avatar {
  background-color: #ff6b6b;
  background-image: url('assets/Roki.png');
}

.dossier-item h4 {
  font-family: var(--font-title);
  margin-bottom: 4px;
}

.dossier-item .role {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dossier-item p:not(.role) {
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}

/* History overlay */
.history-item {
  margin-bottom: 16px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
}

.history-speaker {
  font-weight: 700;
  color: var(--secondary-color);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

/* 4. Ending Screen Overlay */
#ending-screen {
  background: radial-gradient(circle at center, #130a24 0%, #030408 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#ending-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.ending-content {
  max-width: 650px;
  width: 90%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  border-color: var(--accent-color);
  box-shadow: 0 0 50px rgba(114, 9, 183, 0.4);
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#ending-screen.active .ending-content {
  transform: scale(1);
}

.ending-header {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
}

#ending-title.bad-end {
  color: #ff3333;
  text-shadow: 0 0 15px rgba(255, 51, 51, 0.6);
}

#ending-title.good-end {
  color: var(--secondary-color);
  text-shadow: 0 0 15px rgba(0, 180, 216, 0.6);
}

#ending-title.true-end {
  color: #00ff88;
  text-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

#ending-subtitle {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 1.5px;
}

#ending-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}

.final-stats {
  display: flex;
  gap: 24px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 24px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* Helper Buttons & Animations */
.btn {
  background: transparent;
  border: 2px solid var(--text-light);
  color: var(--text-light);
  padding: 12px 30px;
  border-radius: 30px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.btn:hover {
  transform: translateY(-2px);
}

.primary-btn {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.primary-btn:hover {
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
}

/* Animations */
.pulse-glow {
  animation: pulse-glow-anim 2s infinite alternate;
}

@keyframes pulse-glow-anim {
  0% {
    box-shadow: 0 0 5px rgba(255, 107, 53, 0.4);
  }
  100% {
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.8), 0 0 10px rgba(0, 180, 216, 0.4);
  }
}

.blink {
  animation: blink-anim 1s infinite alternate;
}

@keyframes blink-anim {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

/* Character shaking animation (tense/scared) */
.shake-anim {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Character entry animation */
.slide-in-left {
  animation: slide-in-left-anim 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes slide-in-left-anim {
  0% { opacity: 0; transform: translateX(-80px) translateY(50px); }
  100% { opacity: 1; transform: translateX(0) translateY(0); }
}

.slide-in-right {
  animation: slide-in-right-anim 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes slide-in-right-anim {
  0% { opacity: 0; transform: translateX(80px) translateY(50px); }
  100% { opacity: 1; transform: translateX(0) translateY(0); }
}

.slide-in-center {
  animation: slide-in-center-anim 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes slide-in-center-anim {
  0% { opacity: 0; transform: translateY(80px); }
  100% { opacity: 1; transform: translateY(0); }
}

.fade-out {
  animation: fade-out-anim 0.5s ease forwards;
}
@keyframes fade-out-anim {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translateY(20px); }
}

.credits-text h4, .credits-text h5 {
  font-family: var(--font-title);
  margin-bottom: 6px;
  color: var(--secondary-color);
}
.credits-text p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}
.credits-text hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 16px 0;
}

/* Hidden Class Utility */
.hidden {
  display: none !important;
}

/* Mobile landscape and responsive scale overrides */
@media (max-width: 768px) {
  .game-title {
    font-size: 2.8rem;
  }
  .stat-bar-container {
    width: 60px;
  }
  .modal-card {
    width: 95%;
  }
  #sprites-container {
    padding: 0 4%;
  }
  .choice-btn {
    font-size: 0.95rem;
    padding: 12px 18px;
  }
  .sprite-avatar.placeholder-avatar {
    width: 120px;
    height: 180px;
  }
}
