:root {
  --bg: #fbf3ea;
  --text: #2b1a10;
  --muted: #7a5a44;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-text: #fff;
  --shadow: rgba(80, 30, 0, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1410;
    --text: #f6e9dc;
    --muted: #c9ab93;
    --accent: #ea580c;
    --accent-hover: #f97316;
    --accent-text: #1c1410;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 16px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 4rem);
  letter-spacing: -0.02em;
}

button {
  font: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75em 1.6em;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 6px 18px var(--shadow);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

button:hover { background: var(--accent-hover); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.6; cursor: wait; }
button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

button.big {
  font-size: clamp(1.4rem, 5vw, 2rem);
  padding: 0.9em 2em;
}

#viewer {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

#viewer[hidden] { display: none; }

.player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 30px var(--shadow);
}

.player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

#message {
  margin: 0;
  min-height: 1.5em;
  color: var(--muted);
}
