/* ============================================
   Auckland City Decoder — Stylesheet
   ============================================ */

.hidden { display: none !important; }

:root {
  --color-sky-light:    #e0f7fa;
  --color-sky-main:     #b2ebf2;
  --color-ocean-dark:   #0077b6;
  --color-ocean-accent: #023e8a;
  --color-wood:         #d4a373;
  --color-wood-dark:    #bc6c25;
  --color-stone:        #f5f5dc;
  --color-stone-dark:   #e0e0e0;
  --color-text-main:    #2b2b2b;
  --color-text-muted:   #555555;
  --color-white:        #ffffff;
  --color-danger:       #d90429;
  --color-success:      #2dc653;

  --font-heading: 'Quicksand', sans-serif;
  --font-body:    'Nunito', sans-serif;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.14);
  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 8px;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-sky-light);
  color: var(--color-text-main);
  line-height: 1.6;
  overscroll-behavior-y: none;
}

h1, h2, h3 { font-family: var(--font-heading); color: var(--color-ocean-accent); }

/* ── App Shell ── */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* ── Intro Overlay ── */
.intro-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #023e8a 0%, #0077b6 50%, #00b4d8 100%);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  animation: fadeIn 0.4s ease;
}

.intro-overlay.hidden { display: none; }

.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  color: var(--color-white);
  max-width: 360px;
}

.intro-icon { font-size: 4rem; line-height: 1; }

.intro-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-white);
  letter-spacing: 0.02em;
}

.intro-story {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.97rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
}

.intro-quote {
  border-left: 3px solid rgba(255,255,255,0.5);
  padding: 10px 16px;
  margin: 4px 0;
  font-style: italic;
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.08);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  text-align: left;
}

.intro-start-btn {
  background: var(--color-white);
  color: var(--color-ocean-accent);
  border: none;
  padding: 14px 36px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}

.intro-start-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.intro-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  padding: 0 8px;
}

/* ── Header ── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--color-sky-main);
  border-bottom: 2px solid var(--color-white);
  gap: 8px;
}

.progress-indicator {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-ocean-accent);
  flex: 1;
  display: flex;
  align-items: center;
}

.time-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--color-text-main);
}

.penalty { color: var(--color-danger); font-size: 0.84rem; font-weight: 700; }
.penalty.hidden { display: none; }

.lang-btn {
  background: var(--color-ocean-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--r-sm);
  padding: 4px 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.1s;
  min-width: 36px;
}
.lang-btn:active { transform: scale(0.9); }

/* ── Progress Bar ── */
.progress-bar-track {
  width: 100%;
  height: 5px;
  background: var(--color-stone-dark);
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-ocean-dark), var(--color-sky-main));
  transition: width 0.7s ease;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 12px;
  overflow-y: auto;
  transition: opacity 0.28s ease;
}

/* ── Image Card ── */
.visual-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--color-sky-main);
}
.visual-card.hidden { display: none; }

.visual-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Image toggle button */
.image-toggle-btn {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-stone);
  border: 1px solid #c8dff0;
  border-radius: var(--r-lg);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-ocean-dark);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
.image-toggle-btn:active { background: #ddeeff; }

/* Puzzle type badge (inline in toggle button) */
.puzzle-type-badge-inline {
  background: var(--color-ocean-dark);
  color: var(--color-white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ── Info Card ── */
.info-card {
  background: var(--color-stone);
  padding: 16px 18px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card h1 { font-size: 1.3rem; line-height: 1.3; }

.story-text {
  font-size: 0.91rem;
  color: var(--color-text-muted);
  line-height: 1.68;
}

/* ── GPS Arrival Section ── */
.arrival-section {
  border: 2px solid #c8dff0;
  border-radius: var(--r-lg);
  overflow: hidden;
}

.arrival-section.hidden { display: none; }

.arrival-map {
  height: 200px;
  width: 100%;
  background: #e8f4f8;
  isolation: isolate;
}

.arrival-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.distance-msg {
  font-size: 0.88rem;
  color: var(--color-danger);
  font-weight: 700;
  background: #ffe5e9;
  padding: 6px 14px;
  border-radius: 50px;
}
.distance-msg.hidden { display: none; }

.arrive-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-ocean-dark);
  color: var(--color-white);
  border: none;
  padding: 13px 24px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--color-ocean-accent);
  transition: transform 0.1s, box-shadow 0.1s;
  width: 100%;
}
.arrive-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--color-ocean-accent);
}
.arrive-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.arrive-btn.pulse {
  animation: pulse-ring 0.5s ease;
}

.skip-gps-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

/* ── Puzzle Section ── */
.puzzle-section { display: flex; flex-direction: column; gap: 12px; }
.puzzle-section.hidden { display: none; }

.puzzle-clue {
  background: var(--color-white);
  padding: 14px 16px;
  border-radius: var(--r-md);
  border-left: 4px solid var(--color-wood);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.clue-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-wood-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.clue-label .material-symbols-rounded { font-size: 1rem; }

#level-clue {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--color-text-main);
  line-height: 1.55;
}

/* ── Interaction ── */
.interaction-area { display: flex; flex-direction: column; gap: 10px; }

.input-group { display: flex; gap: 8px; align-items: center; }

input[type="text"] {
  flex: 1;
  padding: 13px 16px;
  border: 2px solid var(--color-stone-dark);
  border-radius: var(--r-md);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  outline: none;
  background: var(--color-white);
}
input[type="text"]:focus  { border-color: var(--color-ocean-dark); }
input[type="text"].error  { border-color: var(--color-danger); animation: shake 0.4s ease-in-out; }
input[type="text"].success{ border-color: var(--color-success); }

.primary-btn {
  background: var(--color-ocean-dark);
  color: var(--color-white);
  border: none;
  padding: 13px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--color-ocean-accent);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
}
.primary-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--color-ocean-accent);
}

.action-row { display: flex; gap: 10px; }

.secondary-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--color-wood);
  color: var(--color-white);
  border: none;
  padding: 11px 10px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.87rem;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--color-wood-dark);
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
}
.secondary-btn .material-symbols-rounded { font-size: 1.1rem; }
.secondary-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--color-wood-dark); }

.warning-btn { background: #666; box-shadow: 0 3px 0 #333; }
.warning-btn:active { box-shadow: 0 0 0 #333; }

/* ── Cryptex dual-input ── */
.cryptex-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #f2f2f2;
  border: 1.5px solid #d4d4d4;
  border-radius: var(--r-lg);
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.cryptex-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #555;
  text-transform: uppercase;
  align-self: flex-start;
}

.cryptex-input {
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid #d4d4d4;
  border-radius: var(--r-md);
  color: #222;
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  text-transform: uppercase;
  caret-color: #444;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.cryptex-input::placeholder { color: #bbb; letter-spacing: 0.3em; }
.cryptex-input:focus {
  outline: none;
  border-color: #888;
  box-shadow: 0 0 8px rgba(0,0,0,0.12);
}
.cryptex-input.error {
  border-color: #d32f2f;
  box-shadow: 0 0 8px rgba(211,47,47,0.2);
  animation: shake 0.4s ease;
}
.cryptex-input.success {
  border-color: #388e3c;
  box-shadow: 0 0 8px rgba(56,142,60,0.2);
}

.cryptex-separator {
  font-size: 1.4rem;
  font-weight: 700;
  color: #aaa;
  line-height: 1;
  margin: 2px 0;
}

.cryptex-submit {
  width: 100%;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-ocean-dark);
  box-shadow: 0 3px 0 var(--color-ocean-accent);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.cryptex-submit:active { transform: translateY(3px); box-shadow: 0 0 0 var(--color-ocean-accent); }

/* ── Color picker (Level 6) ── */
.color-picker-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.color-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: #f5f5f5;
  border: 2px solid #ddd;
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  color: #444;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  user-select: none;
}
.color-btn:active { transform: scale(0.95); }

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.15);
}

.color-btn.selected {
  border-color: var(--color-ocean-dark);
  background: #e3f2fd;
  color: var(--color-ocean-dark);
}
.color-btn.selected .color-swatch {
  outline: 2.5px solid var(--color-ocean-dark);
  outline-offset: 2px;
}

.color-btn.success {
  border-color: #388e3c;
  background: #e8f5e9;
  color: #388e3c;
}

.color-btn.error {
  border-color: #d32f2f;
  background: #ffebee;
  animation: shake 0.4s ease;
}

.color-grid.flag-grid {
  grid-template-columns: repeat(2, 1fr);
}
.flag-btn {
  padding: 12px 8px;
  font-size: 0.8rem;
}
.flag-emoji {
  font-size: 2rem;
  line-height: 1;
}

.color-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.color-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Animations ── */
@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0,119,182,0.5); }
  100% { box-shadow: 0 0 0 14px rgba(0,119,182,0); }
}

/* ── Dialog ── */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(3px);
}
.overlay.hidden { display: none; }

.dialog-box {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--r-lg);
  width: 100%; max-width: 340px;
  text-align: center;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.22s ease;
}
.dialog-box h2 { font-size: 1.3rem; }
.dialog-body {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  text-align: left;
}

/* ── Victory Screen ── */
.victory-screen {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 28px 16px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}
.victory-rank { font-size: 3.5rem; line-height: 1; }
.victory-screen h1 { font-size: 1.7rem; }
.victory-screen h2 {
  font-size: 1.1rem; color: var(--color-wood-dark);
  background: var(--color-stone);
  padding: 10px 20px; border-radius: var(--r-md); width: 100%;
}
.victory-stats { display: flex; gap: 14px; width: 100%; }
.stat-box {
  flex: 1; background: var(--color-sky-light);
  border-radius: var(--r-md); padding: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.stat-box .stat-value {
  font-family: var(--font-heading); font-size: 1.4rem;
  font-weight: 700; color: var(--color-ocean-accent);
}
.stat-box .stat-label { font-size: 0.76rem; color: var(--color-text-muted); text-align: center; }

/* ── Confetti ── */
.confetti-canvas {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 200;
}

/* ── Direction Overlay (shown 2.8s after correct answer) ── */
.direction-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #023e8a 0%, #0077b6 60%, #00b4d8 100%);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  animation: fadeIn 0.3s ease;
  cursor: pointer;
}
.direction-overlay.hidden { display: none; }

.direction-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: var(--color-white);
  max-width: 320px;
}

.direction-check {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-success);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(45,198,83,0.45);
  animation: slideUp 0.3s ease;
}

.direction-correct {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.direction-divider {
  width: 48px;
  height: 2px;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
}

.direction-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.65);
}

.direction-next-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-white);
}

.direction-walk {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
  background: rgba(255,255,255,0.1);
  padding: 10px 16px;
  border-radius: var(--r-md);
}

.direction-tap-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
  animation: tapHint 1.8s ease-in-out infinite;
}
@keyframes tapHint {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}


/* ── Pause Button (header) ── */
.pause-btn {
  background: rgba(2,62,138,0.15);
  color: var(--color-ocean-accent);
  border: none;
  border-radius: var(--r-sm);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.pause-btn:active { transform: scale(0.88); background: rgba(2,62,138,0.25); }
.pause-btn .material-symbols-rounded { font-size: 1.2rem; }

/* ── Help Button ── */
.help-btn {
  background: rgba(2,62,138,0.12);
  color: var(--color-ocean-accent);
  border: none;
  border-radius: 50%;
  width: 24px; height: 24px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
  margin-left: 6px;
}
.help-btn:active { transform: scale(0.88); background: rgba(2,62,138,0.25); }

/* ── Tutorial Overlay ── */
.tutorial-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,20,40,0.80);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.25s ease;
}
.tutorial-overlay.hidden { display: none; }

.tutorial-card {
  background: var(--color-white);
  border-radius: var(--r-lg);
  padding: 28px 24px 20px;
  width: calc(100% - 48px);
  max-width: 340px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: slideUp 0.25s ease;
  text-align: center;
}

.tutorial-dots { display: flex; gap: 7px; }
.tutorial-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #d8dde4;
  transition: background 0.2s, transform 0.2s;
}
.tutorial-dot.active {
  background: var(--color-ocean-accent);
  transform: scale(1.3);
}

.tutorial-icon { font-size: 3rem; line-height: 1; margin: 4px 0; }

.tutorial-title {
  font-size: 1.15rem; font-weight: 700;
  color: var(--color-text-main); margin: 0;
}

.tutorial-desc {
  font-size: 0.91rem;
  color: var(--color-text-muted);
  line-height: 1.6; margin: 0;
}

.tutorial-actions { display: flex; gap: 10px; width: 100%; margin-top: 4px; }

.tutorial-skip {
  flex: 1;
  background: #f0f2f5;
  color: var(--color-text-muted);
  border: none;
  border-radius: var(--r-md);
  padding: 11px 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.tutorial-next {
  flex: 2;
  background: var(--color-ocean-accent);
  color: white;
  border: none;
  border-radius: var(--r-md);
  padding: 11px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.tutorial-next:active { background: #023e8a; }

/* ── Pause Overlay ── */
.pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2,62,138,0.75);
  backdrop-filter: blur(6px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  cursor: pointer;
}
.pause-overlay.hidden { display: none; }

.pause-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: var(--color-white);
}

.pause-icon-big {
  font-size: 5rem;
  color: rgba(255,255,255,0.9);
}

.pause-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-white);
}

.pause-sub {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
}

/* ── Victory Secrets List ── */
.secrets-section {
  width: 100%;
  text-align: left;
}

.secrets-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-align: center;
}

.secrets-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.secret-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-sky-light);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  animation: slideUp 0.25s ease both;
}

.secret-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}

.secret-loc {
  flex: 1;
  font-size: 0.84rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.secret-ans {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-ocean-accent);
  background: rgba(0,119,182,0.1);
  padding: 3px 10px;
  border-radius: 50px;
  white-space: nowrap;
}

/* ── Login Overlay ─────────────────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #0077b6 0%, #023e8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-content {
  background: white;
  border-radius: 24px;
  padding: 36px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
  text-align: center;
}

.login-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.login-title {
  font-size: 1.4rem;
  color: #023e8a;
  margin-bottom: 24px;
}

.login-form { text-align: left; }

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.login-form label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #444;
}

.lang-select,
.login-form input {
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}

.lang-select:focus,
.login-form input:focus {
  border-color: #0077b6;
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: #0077b6;
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.2s;
}

.login-btn:hover:not(:disabled) { opacity: 0.88; }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.login-msg {
  min-height: 20px;
  font-size: 0.88rem;
  color: #d90429;
  text-align: center;
  margin-top: 10px;
}

/* ── Leaderboard Overlay ───────────────────────────────────────────────── */
.leaderboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}

.leaderboard-content {
  background: white;
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.leaderboard-content h2 {
  text-align: center;
  font-size: 1.3rem;
  color: #023e8a;
  margin-bottom: 12px;
}

.lb-my-rank {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #0077b6;
  margin-bottom: 16px;
  padding: 8px;
  background: #e0f7fa;
  border-radius: 8px;
}

.lb-list { display: flex; flex-direction: column; gap: 6px; }

.lb-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f9fa;
  font-size: 0.9rem;
}

.lb-row.lb-me {
  background: #e0f7fa;
  border: 1.5px solid #0077b6;
  font-weight: 700;
}

.lb-rank { font-size: 1.1rem; text-align: center; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-time { font-family: monospace; font-weight: 700; color: #023e8a; white-space: nowrap; }
.lb-date { font-size: 0.78rem; color: #999; white-space: nowrap; }

/* ── Victory leaderboard inline section ───────────────────────────────── */
.lb-page-section {
  margin-top: 24px;
  margin-bottom: 8px;
}

.lb-page-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-ocean-accent);
  margin-bottom: 12px;
  text-align: center;
}

/* ── Leaderboard scrollable container + pagination ────────────────────── */
.lb-scroll-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1.5px solid var(--color-stone-dark);
  border-radius: 10px;
  padding: 4px 0;
}

.lb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.lb-pag-btn {
  background: var(--color-ocean-dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.lb-pag-btn:hover:not(:disabled) { opacity: 0.85; }
.lb-pag-btn:disabled { background: #ccc; cursor: default; }

.lb-page-info {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  min-width: 80px;
  text-align: center;
}

/* ── Feedback section ─────────────────────────────────────────────────── */
.feedback-skip-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px;
  text-align: center;
}

.feedback-textarea {
  width: 100%;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.feedback-textarea:focus { border-color: var(--color-ocean-dark); }

.feedback-msg {
  min-height: 20px;
  font-size: 0.88rem;
  text-align: center;
  margin-top: 8px;
}
