@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Plus+Jakarta+Sans:wght@400;600;700;800&family=UnifrakturMaguntia&display=swap');

:root {
  --bg-dark: #12061e;
  --bg-card: rgba(30, 14, 46, 0.85);
  --gold-primary: #f3c64f;
  --gold-dark: #b8860b;
  --gold-light: #ffe89e;
  --purple-cathedral: #2d0b4e;
  --parchment-bg: #f4ece1;
  --parchment-text: #1a0c02;
  --crimson-accent: #900c3f;
  --emerald-payday: #2ecc71;
  --ruby-trial: #e74c3c;
  --sapphire-tile: #3498db;
  --amethyst-stop: #9b59b6;
  --text-main: #f5ebd6;
  --text-muted: #c8b9d6;
  --shadow-gothic: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(243, 198, 79, 0.2);
  --border-gold: 1px solid rgba(243, 198, 79, 0.35);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(144, 12, 63, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(45, 11, 78, 0.4) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4af37' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M30 30L15 0h30L30 30zM0 30l30 15v-30L0 30zm60 0L30 15v30l30-15zM30 30l15 30H15l15-30z'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text-main);
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
}

/* HEADER BANNER */
.header-container {
  max-width: 1400px;
  margin: 0 auto 20px auto;
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: 16px;
  box-shadow: var(--shadow-gothic);
  backdrop-filter: blur(12px);
  overflow: hidden;
  position: relative;
}

.header-banner-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) contrast(1.1);
  border-bottom: 2px solid var(--gold-primary);
}

.header-content {
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.header-title-box h1 {
  font-family: 'UnifrakturMaguntia', serif;
  font-size: 2.8rem;
  color: var(--gold-primary);
  text-shadow: 0 0 10px rgba(243, 198, 79, 0.4), 2px 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 1px;
}

.header-title-box p {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.audio-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-gothic {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  background: linear-gradient(135deg, #3d1566 0%, #1c0733 100%);
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.btn-gothic:hover {
  background: linear-gradient(135deg, #57208f 0%, #2e0d52 100%);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(243, 198, 79, 0.5);
  transform: translateY(-2px);
}

/* MAIN LAYOUT GRID */
.main-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  gap: 20px;
}

@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* DASHBOARD CARD */
.card-panel {
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-gothic);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  color: var(--gold-primary);
  border-bottom: 1px solid rgba(243, 198, 79, 0.25);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 15-PASSENGER VAN DASHBOARD */
.van-container {
  background: rgba(18, 6, 30, 0.9);
  border: 2px solid var(--gold-dark);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  position: relative;
}

.van-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}

/* VAN SCHEMATIC - proper front cabin + rear bench rows */
.van-schematic {
  background: #09030f;
  border-radius: 12px;
  border: 2px solid rgba(243, 198, 79, 0.25);
  padding: 10px 8px;
  margin-bottom: 12px;
  font-size: 0;  /* kill inline whitespace */
}

/* front cabin: 2 wide seats side by side with aisle gap */
.van-row-front {
  display: grid;
  grid-template-columns: 1fr 12px 1fr;
  gap: 0;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(243, 198, 79, 0.2);
}

.van-row-front .van-aisle {
  /* empty aisle column */
}

/* rear bench rows: 3 seats across */
.van-row {
  display: grid;
  grid-template-columns: 1fr 8px 1fr 1fr;
  gap: 0;
  margin-bottom: 5px;
}

.van-row .van-aisle {
  /* aisle gap */
}

.van-seat {
  height: 34px;
  border: 1px dashed rgba(243, 198, 79, 0.25);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(255,255,255,0.02);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  margin: 1px;
}

.van-seat.occupied {
  border-style: solid;
  border-color: var(--gold-primary);
  background: rgba(243, 198, 79, 0.15);
  box-shadow: inset 0 0 6px rgba(243, 198, 79, 0.35);
}

/* STATS LIST */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-val {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold-primary);
}

/* WHEEL OF PROVIDENCE */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  background: rgba(18, 6, 30, 0.8);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(243, 198, 79, 0.3);
}

.wheel-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid var(--gold-primary);
  z-index: 10;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.8));
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(243, 198, 79, 0.3), inset 0 0 15px rgba(0,0,0,0.8);
  transition: transform 3s cubic-bezier(0.15, 0.85, 0.35, 1);
}

.btn-spin {
  font-size: 1.2rem;
  padding: 12px 32px;
  width: 100%;
  background: linear-gradient(135deg, #d4af37 0%, #855812 100%);
  color: #12061e;
  text-shadow: 0 1px 1px rgba(255,255,255,0.4);
  border: 2px solid #fff;
  border-radius: 10px;
}

.btn-spin:hover {
  background: linear-gradient(135deg, #ffe082 0%, #b8860b 100%);
}

/* 2D VERTICAL BOARD CANVAS DISPLAY WITH COMPACT SMOOTH SCROLLING VIEWPORT */
.board-container {
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-gothic);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.board-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 650px;
  overflow: auto;
  border: 4px solid var(--gold-primary);
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(243, 198, 79, 0.3), inset 0 0 20px rgba(0,0,0,0.9);
  background: #12061e;
}

.board-canvas {
  display: block;
  width: 1200px;
  height: 17300px;
}

/* GAME LOG PANEL */
.log-box {
  background: rgba(10, 4, 18, 0.9);
  border: 1px solid rgba(243, 198, 79, 0.2);
  border-radius: 10px;
  padding: 12px;
  height: 240px;
  overflow-y: auto;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-entry {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.log-entry strong {
  color: var(--gold-primary);
}

/* HIGH-CONTRAST OPAQUE PARCHMENT MODAL DIALOGS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 2, 16, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#modal-content, .modal-card, .modal-content {
  background: #f4ece1 !important;
  color: #1a0c02 !important;
  border: 4px solid #b8860b !important;
  border-radius: 18px;
  padding: 32px;
  max-width: 680px;
  width: 92%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(212, 175, 55, 0.4);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-family: 'Cinzel', serif !important;
  font-size: 1.9rem !important;
  font-weight: 700 !important;
  color: #2d0b4e !important;
  margin-bottom: 12px !important;
  text-align: center !important;
  border-bottom: 2px solid #b8860b !important;
  padding-bottom: 12px !important;
  text-shadow: none !important;
}

.modal-subtitle {
  font-size: 1.05rem !important;
  line-height: 1.5 !important;
  color: #2c1a04 !important;
  text-align: center !important;
  margin-bottom: 22px !important;
  font-weight: 600 !important;
}

.option-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.option-card {
  background: #ffffff !important;
  border: 2px solid #b8860b !important;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  color: #1a0c02 !important;
}

.option-card:hover {
  background: #fdf8ec !important;
  border-color: #57208f !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(45, 11, 78, 0.2);
}

.option-title {
  font-family: 'Cinzel', serif !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  color: #2d0b4e !important;
}

.option-icon {
  font-size: 2rem;
  float: left;
  margin-right: 16px;
}

/* REVEAL TILES GRID IN CELESTIAL THRESHOLD */
.life-tile-stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.flip-tile {
  background: linear-gradient(135deg, #4a154b 0%, #1c0733 100%);
  color: #fff;
  border: 1px solid var(--gold-primary);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
