/* ==========================================================================
   THE RENEWAL CITY — Design System v1.0 (Vice City Neon 80s)
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-base: #0B0614;
  --bg-elev: #141B4D;
  --bg-glass: rgba(255, 250, 242, 0.045);
  --border: rgba(255, 250, 242, 0.13);
  --border-subtle: rgba(255, 250, 242, 0.08);

  --accent-primary: #FF2D95;     /* Neon Hot Pink */
  --accent-warm: #FF7A2F;        /* Sunset Orange */
  --accent-secondary: #5CE1E6;   /* Pool Aqua */
  --accent-deep: #00B5AD;        /* Ocean Teal */
  --accent-quiet: #C3A6FF;       /* Dusk Lilac */
  --success: #1F8A5B;            /* Palm Green */
  --cash: #7DFFB0;               /* Bright Cash Green */
  --danger: #C2103F;             /* Deep Red */

  --text-primary: #FFFAF2;       /* Stucco White */
  --text-muted: rgba(255, 250, 242, 0.65);
  --text-faint: rgba(255, 250, 242, 0.35);

  /* Fonts */
  --font-display: 'Anton', impact, sans-serif;
  --font-hud: 'Archivo Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmosphere & Scanlines */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.5) 0px,
    rgba(255, 255, 255, 0.5) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.04;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 45, 149, 0.28) 0%, transparent 55%),
    radial-gradient(circle at 10% 85%, rgba(92, 225, 230, 0.12) 0%, transparent 50%),
    linear-gradient(168deg, #0B0614 0%, #0d0818 100%);
}

/* Base Typography */
.anton {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  line-height: 0.95;
  text-transform: uppercase;
}

.hud-label {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Brand Logo */
.logo-lockup {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-shadow: 0 0 26px rgba(255, 45, 149, 0.65);
}

.logo-dot {
  color: var(--accent-primary);
  margin: 0 1px;
}

/* Live Badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 45, 149, 0.5);
  border-radius: 3px;
  background: rgba(255, 45, 149, 0.12);
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-warm));
  color: #0B0614;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s ease, filter 0.15s ease;
}

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

.btn-primary:disabled {
  background: rgba(255, 250, 242, 0.10);
  color: var(--text-faint);
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(11, 6, 20, 0.7);
  color: var(--text-primary);
  font-family: var(--font-hud);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 45, 149, 0.15);
  border-color: var(--accent-primary);
  color: #FFFFFF;
}

.btn-outline:active {
  transform: scale(0.97);
}

/* Striped Retro Sun (Pure CSS) */
.retro-sun {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FF7A2F 0%, #FF2D95 65%, #C2103F 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 45px rgba(255, 45, 149, 0.45);
}

.retro-sun::after {
  content: "";
  position: absolute;
  inset: 50% 0 0 0;
  background: repeating-linear-gradient(
    180deg,
    var(--bg-base) 0px,
    var(--bg-base) 6px,
    transparent 6px,
    transparent 14px
  );
}

/* Wanted Stars */
.wanted-stars {
  display: inline-flex;
  gap: 6px;
}

.wanted-star {
  font-size: 26px;
  color: rgba(255, 250, 242, 0.15);
  transition: transform 0.18s ease-out, color 0.18s ease-out;
}

.wanted-star.filled {
  color: var(--text-primary);
  text-shadow: 0 0 15px rgba(255, 250, 242, 0.85);
}

.wanted-star.gained {
  animation: star-pop 0.22s ease-out;
}

@keyframes star-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); color: var(--accent-primary); }
  100% { transform: scale(1); }
}

/* Health Bar */
.health-bar-container {
  width: 100%;
  height: 20px;
  background: rgba(255, 250, 242, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}

.health-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--danger) 0%, var(--accent-primary) 68%, var(--accent-warm) 100%);
  transition: width 0.6s ease-in-out;
  border-radius: 2px;
}

.health-bar-container.shaking {
  animation: health-shake 0.4s ease-in-out;
}

@keyframes health-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Chat Band */
.chat-band {
  display: flex;
  gap: 12px;
  overflow-x: hidden;
  padding: 4px 0;
}

.chat-bubble {
  flex: 0 0 280px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: rgba(255, 250, 242, 0.85);
  backdrop-filter: blur(8px);
  animation: bubble-enter 0.35s ease-out;
}

.chat-bubble .handle {
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 4px;
}

.chat-bubble .handle.pink { color: var(--accent-primary); }
.chat-bubble .handle.aqua { color: var(--accent-secondary); }
.chat-bubble .handle.green { color: var(--cash); }

@keyframes bubble-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loading Interstitial Screen */
.loading-screen-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0B0614;
  display: flex;
  flex-direction: column;
}

.loading-top {
  flex: 62;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, #1b0c2a 0%, #0B0614 85%);
}

.loading-bottom {
  flex: 38;
  background: #07040d;
  border-top: 3px solid var(--text-primary);
  padding: 32px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Motion Accessibility Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   CSM HYBRID FLOW: CRISIS SIMULATION, SKILL RADAR & PLAYBOOK
   ========================================================================== */

/* Crisis Alert Banner */
.crisis-beacon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(194, 16, 63, 0.25);
  border: 1px solid var(--danger);
  border-radius: 4px;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #FF5A79;
  animation: beacon-pulse 1.8s infinite ease-in-out;
}

@keyframes beacon-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px rgba(194, 16, 63, 0.4); }
  50% { opacity: 0.75; transform: scale(0.98); box-shadow: 0 0 4px rgba(194, 16, 63, 0.1); }
}

.crisis-callout-box {
  background: rgba(20, 27, 77, 0.7);
  border-left: 4px solid var(--danger);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 12px 0 18px 0;
}

/* Crisis Option Cards (Big Screen Grid) */
.crisis-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.crisis-option-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.crisis-option-card.leading {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 24px rgba(92, 225, 230, 0.25);
}

.crisis-option-card.correct {
  border-color: var(--cash);
  background: rgba(125, 255, 176, 0.08);
}

.crisis-option-card.dimmed {
  opacity: 0.45;
}

/* Deconstruction reveal cards */
.deconstruct-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.deconstruct-card {
  background: rgba(20, 27, 77, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deconstruct-card.flaw-bleed {
  border-top: 4px solid #FF7A2F;
}

.deconstruct-card.flaw-trap {
  border-top: 4px solid #5CE1E6;
}

.deconstruct-card.elite-move {
  border-top: 4px solid var(--cash);
  background: rgba(125, 255, 176, 0.07);
  box-shadow: 0 0 25px rgba(125, 255, 176, 0.15);
}

/* Skill Radar Matrix Grid */
.skill-divide-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  height: 100%;
}

.skill-col {
  background: rgba(20, 27, 77, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.skill-col.commodity {
  border-top: 4px solid #8E9AA8;
}

.skill-col.elite {
  border-top: 4px solid var(--accent-primary);
  box-shadow: 0 0 35px rgba(255, 45, 149, 0.15);
  background: radial-gradient(circle at top right, rgba(255, 45, 149, 0.08) 0%, rgba(20, 27, 77, 0.6) 70%);
}

.skill-item-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Playbook Mobile & Host Styles */
.playbook-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
}

.copy-btn {
  background: rgba(92, 225, 230, 0.15);
  border: 1px solid var(--accent-secondary);
  color: var(--accent-secondary);
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.copy-btn:hover, .copy-btn:active {
  background: var(--accent-secondary);
  color: #0B0614;
}

.script-text-box {
  background: #08040F;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 14px;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #E2E8F0;
  white-space: pre-wrap;
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
  user-select: text;
}

