/* Solar System Walk — shared styles
   Fixed dark theme throughout. Mobile-first; not designed for desktop/tablet. */

:root {
  --bg: #0a0a0e;
  --surface: #17171c;
  --text: #f2f2f2;
  --muted: #b7b7bf;
  --accent: #3fa9f5;
  --nav-height: 76px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Landing / mode-select page ---------- */

.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  gap: 28px;
}

.landing h1 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0;
}

.landing p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.landing-choices {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 360px;
}

.choice-btn {
  display: block;
  width: 100%;
  padding: 20px 16px;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid #2a2a32;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.choice-btn:active {
  background: #222229;
}

/* ---------- Content pages (shared shell) ---------- */

.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px 14px;
  z-index: 20;
  pointer-events: none;
  background: transparent;
  border-bottom: none;
}

/* Text mode scrolls, so the header needs a solid backing to stop scrolled
   text from showing through underneath it. Audio mode never scrolls, so
   keeping the header transparent there lets the full image show instead
   of a solid bar cutting off the top of the photo. */
body.mode-text .page-header {
  background: #101014;
  border-bottom: 1px solid #222228;
}

.page-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(10,10,14,0.55);
  padding: 6px 12px;
  border-radius: 20px;
  pointer-events: none;
}

.mode-toggle {
  pointer-events: auto;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid #2a2a32;
  background: rgba(23,23,28,0.9);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
}

/* Text mode */

.text-view {
  display: none;
  padding: 72px 20px calc(var(--nav-height) + 24px) 20px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
}

.text-view.active {
  display: block;
}

.text-view p {
  font-size: 1.15rem;
  line-height: 1.65;
  margin: 0 0 1.1em 0;
  color: var(--text);
}

.text-view p:last-of-type {
  font-weight: 700;
}

/* Audio mode */

.audio-view {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.audio-view.active {
  display: flex;
}

.audio-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  cursor: pointer;
}

.play-overlay.show {
  display: flex;
}

.play-overlay .play-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(23,23,28,0.9);
  border: 2px solid var(--accent);
  color: var(--text);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px; /* optically center the triangle */
}

/* ---------- Bottom nav bar (shared) ---------- */

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom)) 14px;
  background: #101014;
  border-top: 1px solid #222228;
  min-height: var(--nav-height);
}

.nav-btn {
  flex: 1 1 0;
  max-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 10px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid #2a2a32;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.25;
}

.nav-btn:active {
  background: #222229;
}

.nav-btn.next {
  background: var(--accent);
  border-color: var(--accent);
  color: #05131d;
}

.nav-btn.next:active {
  background: #3596d6;
}

.nav-btn.restart {
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 120px;
}
