/* ============================================================
   THAILAND POLITICAL SIMULATION (TPS) — main-game/style.css
   Governing Module Dashboard Theme
   Palette: Deep Navy, Gold Accents, Whites, Warning Reds
   ============================================================ */

/* ─── CSS CUSTOM PROPERTIES ──────────────────────────────── */
:root {
  /* Core palette */
  --navy-900: #0a0e27;
  --navy-800: #101538;
  --navy-700: #171d4a;
  --navy-600: #1e2660;
  --navy-500: #2a3380;
  --navy-400: #3d4a9e;
  --navy-300: #5a6abf;
  --navy-200: #8892d4;
  --navy-100: #b8bfe8;
  --navy-50:  #e8eaf6;

  /* Accent — Thai Gold */
  --gold-500: #c9a84c;
  --gold-400: #d4b85c;
  --gold-300: #e0c96e;
  --gold-200: #edd99d;
  --gold-100: #f5eac5;

  /* Status colors */
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-bg: rgba(34,197,94,0.12);
  --red-500: #ef4444;
  --red-400: #f87171;
  --red-bg: rgba(239,68,68,0.12);
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-bg: rgba(245,158,11,0.12);
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-bg: rgba(59,130,246,0.12);

  /* Text */
  --text-primary: #f0f1f7;
  --text-secondary: #a0a5c0;
  --text-muted: #6b7094;
  --text-inverse: #0a0e27;

  /* Surface */
  --surface-base: #0d1230;
  --surface-card: rgba(23, 29, 74, 0.7);
  --surface-card-hover: rgba(30, 38, 96, 0.8);
  --surface-elevated: rgba(42, 51, 128, 0.5);
  --surface-glass: rgba(255,255,255,0.04);
  --surface-glass-border: rgba(255,255,255,0.08);

  /* Borders */
  --border-subtle: rgba(255,255,255,0.06);
  --border-normal: rgba(255,255,255,0.1);
  --border-strong: rgba(255,255,255,0.18);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-glow-gold: 0 0 20px rgba(201,168,76,0.3);
  --shadow-glow-red: 0 0 20px rgba(239,68,68,0.3);

  /* Spacing */
  --header-height: 60px;
  --status-height: 90px;
  --sidebar-width: 300px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Font */
  --font-main: 'Inter', 'Noto Sans Thai', system-ui, sans-serif;
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--surface-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-500); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy-400); }

/* ─── SCREEN MANAGEMENT ─────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: block;
}

/* ─── START SCREEN ───────────────────────────────────────── */
#start-screen {
  display: none;
  position: relative;
  background: linear-gradient(145deg, var(--navy-900) 0%, var(--navy-700) 50%, #1a1040 100%);
  min-height: 100vh;
  overflow: hidden;
}
#start-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59,130,246,0.06) 0%, transparent 50%),
    repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.01) 40px, rgba(255,255,255,0.01) 41px);
  pointer-events: none;
}

.start-content {
  position: relative;
  text-align: center;
  padding: 3rem;
  max-width: 620px;
  animation: fadeInUp 0.8s ease;
}

.start-emblem {
  font-size: 5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 20px rgba(201,168,76,0.3));
  animation: gentlePulse 3s ease-in-out infinite;
}

.start-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500), var(--text-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.start-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.start-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.start-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.start-footer {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-md { padding: 0.6rem 1.2rem; font-size: 0.95rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm), 0 0 15px rgba(201,168,76,0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  box-shadow: var(--shadow-md), var(--shadow-glow-gold);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-normal);
}
.btn-secondary:hover {
  background: var(--navy-500);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--surface-glass);
  color: var(--text-primary);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red-500), #dc2626);
  color: white;
}
.btn-danger:hover {
  box-shadow: var(--shadow-md), var(--shadow-glow-red);
  transform: translateY(-1px);
}

.btn-choice {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-normal);
  padding: 1rem 1.25rem;
  text-align: left;
  border-radius: var(--radius-md);
  width: 100%;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}
.btn-choice:hover {
  background: var(--surface-card-hover);
  border-color: var(--gold-500);
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(201,168,76,0.2);
  transform: translateX(4px);
}
.btn-choice:active { transform: translateX(2px); }

.btn-icon { font-size: 1.1em; }

/* ─── HEADER ─────────────────────────────────────────────── */
#game-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: linear-gradient(180deg, rgba(10,14,39,0.95), rgba(16,21,56,0.9));
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
}

.header-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  display: none;
}
@media (min-width: 900px) {
  .header-title { display: block; }
}

.header-center { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 0.5rem; }

.turn-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.35rem 1rem;
}
.turn-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.turn-number { font-size: 1.3rem; font-weight: 800; color: var(--gold-400); }
.turn-date { font-size: 0.8rem; color: var(--text-secondary); }

/* ─── STATUS BAR ─────────────────────────────────────────── */
#status-bar {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(10,14,39,0.6);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.stat-card {
  flex: 1;
  min-width: 155px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}
.stat-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-normal);
}

.stat-card .stat-icon { font-size: 1.1rem; }
.stat-info { display: flex; justify-content: space-between; align-items: baseline; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.stat-value { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); }

.stat-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-slow), background var(--transition-normal);
}

.popularity-bar { background: linear-gradient(90deg, var(--blue-500), var(--blue-400)); }
.budget-bar { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.growth-bar { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.unrest-bar { background: linear-gradient(90deg, var(--amber-500), var(--red-500)); }
.military-bar { background: linear-gradient(90deg, var(--navy-300), var(--red-400)); }

.stat-hidden {
  opacity: 0.5;
  position: relative;
}
.stat-hidden::after {
  content: "CLASSIFIED";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--red-400);
  letter-spacing: 0.1em;
  opacity: 0.6;
  pointer-events: none;
}

.stat-card.warning {
  border-color: var(--amber-500);
  background: rgba(245,158,11,0.08);
  animation: warningPulse 2s ease-in-out infinite;
}
.stat-card.danger {
  border-color: var(--red-500);
  background: rgba(239,68,68,0.1);
  animation: dangerPulse 1.5s ease-in-out infinite;
}

/* ─── GAME LAYOUT (3-column) ─────────────────────────────── */
#game-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - var(--header-height) - var(--status-height));
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  padding: 1rem;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  background: rgba(10,14,39,0.4);
}
#sidebar-right {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

.sidebar-section { margin-bottom: 1.5rem; }

.sidebar-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.heading-icon { font-size: 1rem; }
.seats-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-400);
  background: rgba(201,168,76,0.12);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* ─── PARLIAMENT CHART ───────────────────────────────────── */
.parliament-chart {
  display: flex;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
}
.parliament-segment {
  height: 100%;
  transition: width var(--transition-slow);
  position: relative;
}
.parliament-segment:hover { filter: brightness(1.3); }
.parliament-segment .seg-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-800);
  color: var(--text-primary);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 10;
  border: 1px solid var(--border-normal);
}
.parliament-segment:hover .seg-tooltip { display: block; }

/* ─── PARTY LIST ─────────────────────────────────────────── */
.party-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.party-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: default;
}
.party-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-normal);
}

.party-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.party-card-info { flex: 1; min-width: 0; }
.party-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.party-card-meta { font-size: 0.7rem; color: var(--text-muted); }
.party-card-seats { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); }
.party-card-relation {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}
.relation-positive { color: var(--green-400); background: var(--green-bg); }
.relation-negative { color: var(--red-400); background: var(--red-bg); }
.relation-neutral { color: var(--text-muted); background: var(--surface-glass); }

.party-coalition-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(201,168,76,0.15);
  color: var(--gold-400);
}

/* ─── COALITION METER ────────────────────────────────────── */
.coalition-meter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.coalition-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.coalition-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transition: width var(--transition-slow);
}
.coalition-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-400);
  min-width: 36px;
  text-align: right;
}

/* ─── MAIN CONTENT (center column) ───────────────────────── */
#main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

/* ─── WARNING TICKER ─────────────────────────────────────── */
.warning-ticker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, rgba(239,68,68,0.12), rgba(245,158,11,0.08));
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-md);
  animation: tickerSlide 0.4s ease;
}
.ticker-icon { font-size: 1.1rem; }
.ticker-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--red-400);
  line-height: 1.5;
}

/* ─── CRISIS EVENT PANEL ─────────────────────────────────── */
.crisis-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  animation: crisisAppear 0.5s ease;
  position: relative;
  overflow: hidden;
}
.crisis-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-500), var(--amber-500), var(--red-500));
  animation: urgentBar 2s linear infinite;
  background-size: 200% 100%;
}

.crisis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.crisis-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-400);
  background: var(--red-bg);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,0.2);
  animation: badgePulse 2s ease-in-out infinite;
}
.crisis-turn { font-size: 0.75rem; color: var(--text-muted); }

.crisis-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.crisis-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.crisis-choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ─── OUTCOME PANEL ──────────────────────────────────────── */
.outcome-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  animation: fadeInUp 0.4s ease;
}

.outcome-header { margin-bottom: 0.75rem; }
.outcome-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-400);
  background: var(--blue-bg);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.outcome-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}

.outcome-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.effect-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.effect-positive { background: var(--green-bg); color: var(--green-400); border: 1px solid rgba(34,197,94,0.2); }
.effect-negative { background: var(--red-bg); color: var(--red-400); border: 1px solid rgba(239,68,68,0.2); }

/* ─── REPORT PANEL ───────────────────────────────────────── */
.report-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  animation: fadeInUp 0.4s ease;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.report-badge { font-size: 0.8rem; font-weight: 700; color: var(--gold-400); }
.report-turn { font-size: 0.8rem; color: var(--text-muted); }

.report-stats {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.report-stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.6rem;
  background: var(--surface-glass);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.report-stat-label { color: var(--text-secondary); }
.report-stat-value { font-weight: 700; }
.report-stat-value.positive { color: var(--green-400); }
.report-stat-value.negative { color: var(--red-400); }

.report-laws { margin-bottom: 0.75rem; }
.report-law-line {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.2rem 0;
}

.report-warnings { margin-bottom: 1rem; }
.report-warning-line {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.3rem;
  background: rgba(245,158,11,0.08);
  border-left: 3px solid var(--amber-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--amber-400);
}

/* ─── IDLE PANEL ─────────────────────────────────────────── */
.idle-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idle-content {
  text-align: center;
  animation: fadeInUp 0.5s ease;
}
.idle-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.7; }
.idle-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.idle-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ─── LAWS LIST ──────────────────────────────────────────── */
.laws-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.law-card {
  padding: 0.6rem 0.7rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.law-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-normal);
}
.law-card.passed {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.06);
}

.law-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.law-card-icon { font-size: 1rem; }
.law-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.law-status {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.law-status.active { background: var(--green-bg); color: var(--green-400); }
.law-status.available { background: var(--surface-glass); color: var(--text-muted); }
.law-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─── VOTE PANEL ─────────────────────────────────────────── */
.vote-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  animation: fadeInUp 0.4s ease;
}

.vote-header { margin-bottom: 0.75rem; }
.vote-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
}
.vote-badge.passed { background: var(--green-bg); color: var(--green-400); border: 1px solid rgba(34,197,94,0.2); }
.vote-badge.rejected { background: var(--red-bg); color: var(--red-400); border: 1px solid rgba(239,68,68,0.2); }

.vote-law-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }

.vote-tally { margin-bottom: 1rem; }
.tally-bar {
  display: flex;
  height: 32px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.4rem;
  border: 1px solid var(--border-subtle);
}
.tally-yes {
  background: linear-gradient(90deg, #16a34a, var(--green-400));
  transition: width var(--transition-slow);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: white;
}
.tally-no {
  background: linear-gradient(90deg, var(--red-400), #dc2626);
  transition: width var(--transition-slow);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: white;
}
.tally-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.tally-yes-label { color: var(--green-400); font-weight: 600; }
.tally-no-label { color: var(--red-400); font-weight: 600; }
.tally-threshold { color: var(--text-muted); font-style: italic; }

.vote-party-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}
.vote-party-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  background: var(--surface-glass);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}
.vote-party-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.vote-party-name { flex: 1; color: var(--text-secondary); }
.vote-party-seats { font-weight: 600; color: var(--text-primary); }
.vote-party-verdict {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.verdict-yes { background: var(--green-bg); color: var(--green-400); }
.verdict-no { background: var(--red-bg); color: var(--red-400); }

.vote-message {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

/* ─── EVENT LOG ──────────────────────────────────────────── */
.event-log { max-height: 300px; overflow-y: auto; }
.log-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
  font-style: italic;
}
.log-entry {
  padding: 0.4rem 0.5rem;
  border-left: 2px solid var(--navy-400);
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.log-entry-turn { font-weight: 700; color: var(--text-secondary); font-size: 0.68rem; }
.log-entry-title { color: var(--text-secondary); font-weight: 500; }

/* ─── GAME OVER SCREEN ───────────────────────────────────── */
#gameover-screen {
  position: relative;
  background: var(--navy-900);
  overflow: hidden;
}
#gameover-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gameover-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.7) 100%);
}

.gameover-content {
  position: relative;
  text-align: center;
  max-width: 560px;
  padding: 3rem 2rem;
  animation: fadeInUp 0.8s ease;
}

.gameover-icon { font-size: 5rem; margin-bottom: 1rem; }

.gameover-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.gameover-title.coup { color: var(--red-500); text-shadow: 0 0 40px rgba(239,68,68,0.4); }
.gameover-title.victory { 
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.gameover-reason {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.victory-score {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--surface-card);
  border: 1px solid var(--gold-500);
  border-radius: var(--radius-lg);
}
.victory-grade {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.victory-title-text {
  font-size: 1rem;
  color: var(--gold-400);
  font-weight: 600;
  margin-bottom: 1rem;
}
.score-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  font-size: 0.8rem;
}
.score-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  background: var(--surface-glass);
  border-radius: var(--radius-sm);
}
.score-row-label { color: var(--text-muted); }
.score-row-value { color: var(--gold-400); font-weight: 700; }

.gameover-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.go-stat { text-align: center; }
.go-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.go-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--navy-800);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.3s ease;
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.modal-close:hover {
  background: var(--surface-glass);
  color: var(--text-primary);
}

/* ─── TOAST NOTIFICATIONS ────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.7rem 1.2rem;
  background: var(--navy-700);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green-500); }
.toast.error { border-left: 3px solid var(--red-500); }
.toast.warning { border-left: 3px solid var(--amber-500); }
.toast.info { border-left: 3px solid var(--blue-500); }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes crisisAppear {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes pulse-animation {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(201,168,76,0); }
}
.pulse-animation { animation: pulse-animation 2s ease-in-out infinite; }

@keyframes warningPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.1); }
  50% { box-shadow: 0 0 12px 2px rgba(245,158,11,0.15); }
}

@keyframes dangerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.1); }
  50% { box-shadow: 0 0 12px 2px rgba(239,68,68,0.2); }
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes urgentBar {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --sidebar-width: 250px; }
}

@media (max-width: 900px) {
  #game-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  #sidebar-right {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
  #status-bar { flex-wrap: wrap; }
  .stat-card { min-width: 140px; }
  .start-title { font-size: 2rem; }
}

@media (max-width: 600px) {
  html { font-size: 13px; }
  #status-bar { padding: 0.5rem; gap: 0.5rem; }
  .stat-card { min-width: 120px; }
  #main-content { padding: 0.75rem; }
  .crisis-panel { padding: 1rem; }
  .gameover-stats { gap: 1rem; }
  .go-stat-value { font-size: 1.4rem; }
}
