/* =====================================================================
   THE BIG LAP — DUAL-TIMELINE RPG (1975 ↔ 2026) & CHALLENGE SUITE (v64)
   ===================================================================== */

/* 1975 Super-8 Kodachrome Retro Era Mode Banner & Filter */
body.era-1975 #webgl-3d-canvas,
body.era-1975 #game-canvas {
  filter: sepia(0.26) contrast(1.06) saturate(1.16) brightness(0.98);
  transition: filter 0.45s ease;
}

#era-1975-banner {
  position: fixed;
  top: calc(var(--safe-top, 0px) + 52px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.94) 0%, rgba(69, 26, 3, 0.96) 100%);
  border: 2px solid #fbbf24;
  color: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 18px rgba(245, 158, 11, 0.45);
  pointer-events: auto;
  white-space: nowrap;
}

body.era-1975:not(.title-active) #era-1975-banner {
  display: inline-flex;
}

#era-1975-banner button {
  background: #fbbf24;
  color: #451a03;
  border: none;
  border-radius: 999px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

#era-1975-banner button:hover {
  filter: brightness(1.08);
  transform: scale(1.04);
}

/* Floating Map / Camp Circular Button for 1975 RPG & Challenges Hub */
.rpg-map-chip {
  position: fixed;
  left: 10px;
  top: calc(var(--safe-top, 0px) + 250px);
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  background: radial-gradient(circle at 32% 30%, #451a03 0%, #1e1b4b 100%);
  color: #fde047;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.rpg-map-chip:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), 0 0 20px rgba(251, 191, 36, 0.7);
}

body.title-active .rpg-map-chip {
  display: none !important;
}

.rpg-chip-badge,
.rpg-map-chip-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 20px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* RPG Hub & Cutscene Fullscreen Modal Backdrops */
#modal-rpg-hub,
#modal-rpg-scene {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(5px);
}

#modal-rpg-scene {
  z-index: 270;
}

#modal-rpg-hub.hidden,
#modal-rpg-scene.hidden {
  display: none !important;
}

/* RPG Hub Card */
.rpg-hub-card {
  max-width: 920px;
  width: 96vw;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 20px;
  border: 2px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 28px rgba(245, 158, 11, 0.25);
}

.rpg-hub-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #31102f 55%, #451a03 100%);
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.35);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rpg-hub-title-wrap h2 {
  color: #fde047;
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}

.rpg-hub-title-wrap p {
  color: #cbd5e1;
  font-size: 12px;
  margin: 2px 0 0;
}

.rpg-hub-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  background: rgba(15, 23, 42, 0.75);
  color: #fde047;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rpg-hub-close:hover {
  background: #dc2626;
  color: #fff;
  border-color: #fff;
}

/* Tabs Bar */
.rpg-tabs-bar {
  display: flex;
  gap: 6px;
  padding: 9px 14px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  overflow-x: auto;
  flex-shrink: 0;
}

.rpg-tab-btn {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.14s ease;
}

.rpg-tab-btn:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #ffffff;
}

.rpg-tab-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border-color: #fde047;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.rpg-hub-body {
  padding: 14px 18px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 1975 Cipher Progress Banner */
.rpg-cipher-banner {
  background: linear-gradient(135deg, #2e1065 0%, #451a03 100%);
  border: 1.5px solid #fbbf24;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.rpg-cipher-slots {
  display: grid;
  grid-template-columns: repeat(12, minmax(28px, 1fr));
  gap: 5px;
}

@media (max-width: 620px) {
  .rpg-cipher-slots {
    grid-template-columns: repeat(6, 1fr);
  }
}

.rpg-cipher-slot {
  height: 32px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px dashed rgba(251, 191, 36, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: #64748b;
}

.rpg-cipher-slot.unlocked {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1.5px solid #f59e0b;
  color: #78350f;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}

/* Cards Grid */
.rpg-ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.rpg-ep-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid #334155;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
}

.rpg-ep-card.completed {
  border-color: #10b981;
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.35) 0%, #0f172a 100%);
}

.rpg-ep-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 800;
  color: #fbbf24;
  text-transform: uppercase;
}

.rpg-ep-card h3 {
  font-size: 15px;
  font-weight: 900;
  color: #fef08a;
  margin: 0;
}

.rpg-ep-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
}

.rpg-ep-summary {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.38;
}

.rpg-ep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Buttons */
.rpg-btn {
  padding: 7px 11px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.rpg-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.rpg-btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border-color: #fde68a;
}

.rpg-btn-blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #f8fafc;
  border-color: #7dd3fc;
}

.rpg-btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #f8fafc;
  border-color: #6ee7b7;
}

.rpg-btn-slate {
  background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
  border-color: #475569;
}

/* 3x3 Outback Bingo Card */
.rpg-bingo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rpg-bingo-cell {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 104px;
}

.rpg-bingo-cell.done {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32) 0%, rgba(5, 150, 105, 0.48) 100%);
  border-color: #34d399;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.rpg-bingo-icon {
  font-size: 26px;
  line-height: 1;
}

.rpg-bingo-text {
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.25;
}

.rpg-bingo-prog {
  font-size: 11px;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.75);
  padding: 2px 9px;
  border-radius: 999px;
}

.rpg-bingo-cell.done .rpg-bingo-prog {
  background: #10b981;
  color: #022c22;
}

/* RPG Trait Cards */
.rpg-trait-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.rpg-trait-card {
  background: #1e293b;
  border: 1.5px solid #334155;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

/* Interactive 1975 Cutscene & Dialogue Choice Card (#modal-rpg-scene) */
.rpg-scene-card {
  max-width: 680px;
  width: 95vw;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1c1917 0%, #0f172a 100%);
  color: #fef3c7;
  border: 2.5px solid #f59e0b;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 32px rgba(245, 158, 11, 0.32);
}

.rpg-scene-header {
  background: linear-gradient(90deg, #78350f 0%, #451a03 100%);
  padding: 12px 18px;
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rpg-scene-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rpg-dialogue-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
}

.rpg-speaker-avatar {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.rpg-speaker-name {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 2px;
}

.rpg-speaker-text {
  font-size: 13px;
  color: #f8fafc;
  line-height: 1.4;
}

.rpg-choice-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rpg-choice-btn {
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.14s ease;
}

.rpg-choice-btn:hover {
  border-color: #fde047;
  background: rgba(120, 53, 15, 0.55);
  transform: translateY(-1px);
}
