@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,600;0,8..60,700;1,8..60,600&display=swap');

:root {
  --bg-canvas: #fbf8f3;
  --bg-surface: #ffffff;
  --border-light: #e6dfd3;
  --border-medium: #d1c7b7;

  --text-dark: #191614;
  --text-muted: #5e574f;
  --text-subtle: #8a8277;

  /* Replaced amber entirely: Deep Navy Blue for reading phase */
  --timer-reading: #1e3a8a;
  --timer-answering: #065f46;
  --timer-urgent: #b91c1c;

  --btn-bg: #ffffff;
  --btn-border: #d4cab9;
  --btn-hover: #f1ebd8;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-canvas);
  color: var(--text-dark);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.presentation-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
}

/* ==========================================================================
   TUCKED-AWAY TIMER HUD (Top-Right / RHS Corner)
   Doesn't steal central space so clue/image can be massive for 50m viewing!
   ========================================================================== */
.timer-corner-hud {
  position: absolute;
  top: 1.5rem;
  right: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-medium);
  box-shadow: 0 4px 16px rgba(25, 22, 20, 0.08);
  z-index: 50;
  min-width: 180px;
  transition: all 0.2s ease;
}

.hud-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.hud-clock {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hud-bar-track {
  width: 100%;
  height: 5px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.hud-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.15s linear;
}

/* Timer Phase Theme Colors - NO AMBER */
.timer-phase-reading {
  border-color: var(--timer-reading);
}
.timer-phase-reading .hud-label,
.timer-phase-reading .hud-clock {
  color: var(--timer-reading);
}
.timer-phase-reading .hud-bar-fill {
  background: var(--timer-reading);
}

.timer-phase-answering {
  border-color: var(--timer-answering);
}
.timer-phase-answering .hud-label,
.timer-phase-answering .hud-clock {
  color: var(--timer-answering);
}
.timer-phase-answering .hud-bar-fill {
  background: var(--timer-answering);
}

.timer-phase-urgent {
  border-color: var(--timer-urgent);
  background: #fef2f2;
}
.timer-phase-urgent .hud-label,
.timer-phase-urgent .hud-clock {
  color: var(--timer-urgent);
}
.timer-phase-urgent .hud-bar-fill {
  background: var(--timer-urgent);
}

/* ==========================================================================
   MAIN SLIDE SCREEN - Optimized for 50-meter auditorium distance
   ========================================================================== */
.slide-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 3rem;
  width: 100%;
  height: calc(100vh - 76px);
  max-width: 1300px;
  margin: 0 auto;
}

/* Slide Titles */
.slide-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(3rem, 6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.slide-subtitle {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Clue Presentation - Large, High Contrast for Distance */
.clue-label {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.75rem;
}

.clue-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(2.6rem, 4.8vw, 4.4rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  max-width: 1100px;
  margin: 0 auto;
}

.clue-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}

.clue-image {
  height: 68vh;
  max-height: 68vh;
  width: auto;
  max-width: 88vw;
  border-radius: 12px;
  border: 2px solid var(--border-medium);
  box-shadow: 0 10px 35px rgba(25, 22, 20, 0.12);
  object-fit: contain;
  background: #ffffff;
}

/* Rules List */
.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
  text-align: left;
  max-width: 680px;
  width: 100%;
}

.rule-item {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-dark);
  padding: 1rem 1.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(25, 22, 20, 0.04);
}

/* Team Slide List */
.team-table {
  width: 100%;
  max-width: 820px;
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
}

.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 1.25rem;
  box-shadow: 0 2px 6px rgba(25, 22, 20, 0.03);
}

.team-role {
  color: var(--text-muted);
  font-weight: 600;
}

.team-name {
  color: var(--text-dark);
  font-weight: 800;
}

/* Reveal Answer Card */
.answer-card {
  margin-top: 2rem;
  padding: 1.5rem 2.25rem;
  background: var(--bg-surface);
  border: 2px solid var(--timer-reading);
  border-radius: 10px;
  max-width: 900px;
  width: 100%;
  text-align: left;
  box-shadow: 0 6px 20px rgba(25, 22, 20, 0.08);
  animation: answerSlideUp 0.2s ease-out;
}

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

.answer-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--timer-reading);
  margin-bottom: 0.35rem;
}

.answer-ref {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.answer-desc {
  font-size: 1.25rem;
  color: var(--text-dark);
  line-height: 1.5;
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR
   ========================================================================== */
.navigation-bar {
  height: 76px;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  z-index: 40;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-btn {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text-dark);
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  box-shadow: 0 2px 5px rgba(25, 22, 20, 0.04);
}

.nav-btn:hover:not(:disabled) {
  background: var(--btn-hover);
  border-color: var(--border-medium);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn-reveal {
  border-color: var(--timer-reading);
  color: var(--timer-reading);
  background: #ffffff;
}

.nav-btn-reveal:hover {
  background: #eff6ff;
  border-color: var(--timer-reading);
}

.slide-indicator {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 800px) {
  .timer-corner-hud {
    top: 0.75rem;
    right: 1rem;
    min-width: 140px;
    padding: 0.5rem 0.85rem;
  }
  .hud-clock {
    font-size: 1.7rem;
  }
  .slide-screen {
    padding: 1rem;
  }
  .navigation-bar {
    padding: 0 1rem;
  }
}
