/* Kerststijl van Alone at Christmas VR: winternacht, kerstrood, dennengroen, goud en sneeuw. */

:root {
  --night: #0b1324;
  --night-2: #13203a;
  --panel: rgba(255, 248, 235, 0.07);
  --panel-border: rgba(255, 248, 235, 0.14);
  --text: #fff8eb;
  --muted: #c7c2b6;
  --red: #c8102e;
  --red-dark: #7d0a1d;
  --green: #1f6b45;
  --green-dark: #0f3d27;
  --gold: #f4c542;
  --gold-dark: #b8891a;
  --title-font: "Alfa Slab One", "Rockwell Extra Bold", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(244, 197, 66, 0.18), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ---------- Sneeuw ---------- */

.snow,
.snow::after {
  position: fixed;
  inset: -100% 0 0 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 90px 120px, #fff, transparent),
    radial-gradient(3px 3px at 160px 60px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 230px 170px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 300px 90px, #fff, transparent),
    radial-gradient(2.5px 2.5px at 50px 200px, rgba(255, 255, 255, 0.7), transparent);
  background-size: 320px 240px;
  opacity: 0.55;
  animation: snow 14s linear infinite;
}

.snow::after {
  content: "";
  inset: 0;
  background-size: 220px 180px;
  opacity: 0.4;
  animation-duration: 22s;
}

@keyframes snow {
  to {
    transform: translateY(50%);
  }
}

/* ---------- Kerstlichtjes ---------- */

.lights {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 26px;
  display: flex;
  justify-content: space-around;
  z-index: 2;
  pointer-events: none;
  border-top: 2px solid #233;
}

.lights span {
  width: 10px;
  height: 16px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 2px 12px 2px var(--red);
  animation: twinkle 1.6s ease-in-out infinite alternate;
}

.lights span:nth-child(4n + 2) {
  background: var(--gold);
  box-shadow: 0 2px 12px 2px var(--gold);
  animation-delay: 0.4s;
}

.lights span:nth-child(4n + 3) {
  background: #2fbf71;
  box-shadow: 0 2px 12px 2px #2fbf71;
  animation-delay: 0.8s;
}

.lights span:nth-child(4n) {
  background: #3d8bff;
  box-shadow: 0 2px 12px 2px #3d8bff;
  animation-delay: 1.2s;
}

@keyframes twinkle {
  to {
    opacity: 0.35;
    box-shadow: none;
  }
}

/* ---------- Layout ---------- */

main {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}

.logo {
  text-align: center;
  font-family: var(--title-font);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.logo .home,
.logo .alone {
  display: block;
  font-size: 2.6rem;
  color: var(--text);
  text-shadow:
    3px 3px 0 var(--red),
    6px 6px 0 rgba(0, 0, 0, 0.35);
}

.logo .alone {
  color: var(--red);
  text-shadow:
    3px 3px 0 var(--text),
    6px 6px 0 rgba(0, 0, 0, 0.35);
}

.logo .vr {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--night);
  background: var(--gold);
  border-radius: 4px;
}

h1 {
  font-family: var(--title-font);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.15;
  margin: 0;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--red-dark);
}

p {
  margin: 0;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
}

.status {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.status::before {
  content: "●";
  margin-right: 6px;
  color: #2fbf71;
}

.status.offline::before {
  color: var(--red);
}

.status.offline {
  color: #ff8a8a;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(3px);
}

.center {
  margin: auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Stemmen ---------- */

.question {
  font-family: var(--title-font);
  font-size: 1.5rem;
  line-height: 1.2;
}

.message {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
  color: var(--text);
}

/* Elke optie is een cadeautje met een gouden lint. */
.option {
  position: relative;
  padding: 26px 16px;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 14px;
  background:
    linear-gradient(90deg, transparent calc(50% - 7px), var(--gold) calc(50% - 7px), var(--gold) calc(50% + 7px), transparent calc(50% + 7px)),
    var(--red);
  box-shadow: 0 6px 0 var(--red-dark);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.2s;
}

.option:nth-child(even) {
  background:
    linear-gradient(90deg, transparent calc(50% - 7px), var(--gold) calc(50% - 7px), var(--gold) calc(50% + 7px), transparent calc(50% + 7px)),
    var(--green);
  box-shadow: 0 6px 0 var(--green-dark);
}

.option span {
  position: relative;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}

.option:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--red-dark);
}

.options.has-choice .option:not(.selected) {
  filter: grayscale(0.7) brightness(0.6);
}

.option.selected {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

.option.selected::after {
  content: "★";
  position: absolute;
  top: 6px;
  right: 12px;
  color: var(--gold);
  font-size: 1.3rem;
}

.bar {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

/* Aftelbalk als zuurstok. */
.bar > div {
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, var(--text) 10px 20px);
  transition: width 0.1s linear;
}

/* ---------- Samen-actie ---------- */

.big-button {
  width: min(80vw, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff4d5e, var(--red) 60%);
  font-family: var(--title-font);
  font-size: 1.4rem;
  line-height: 1.15;
  padding: 28px;
  border: 6px solid var(--gold);
  box-shadow:
    0 10px 0 var(--red-dark),
    0 0 40px rgba(200, 16, 46, 0.6);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  animation: pulse 0.9s ease-in-out infinite alternate;
}

.big-button:active,
.big-button.pressed {
  transform: translateY(8px);
  box-shadow: 0 2px 0 var(--red-dark);
  animation: none;
}

.big-button.pressed {
  background: radial-gradient(circle at 35% 30%, #4fdc92, var(--green) 60%);
  box-shadow:
    0 2px 0 var(--green-dark),
    0 0 40px rgba(47, 191, 113, 0.6);
}

@keyframes pulse {
  to {
    box-shadow:
      0 10px 0 var(--red-dark),
      0 0 70px rgba(200, 16, 46, 0.9);
  }
}

/* ---------- Einde ---------- */

ul {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  line-height: 1.8;
}

ul li::before {
  content: "🎁 ";
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .snow,
  .snow::after,
  .lights span,
  .big-button {
    animation: none;
  }
}

/* ---------- Code invullen (6 vakjes) ---------- */

.code-input {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.code-input .box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  flex: 1 1 0;
  max-width: 56px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  border: 2px solid var(--panel-border);
  background: rgba(255, 248, 235, 0.08);
  color: var(--text);
  font-family: var(--title-font);
  font-size: 1.8rem;
  text-align: center;
}

/* Na het derde vakje een beetje extra ruimte: 365 895 */
.code-input .box:nth-child(3) {
  margin-right: 10px;
}

.code-input .box.current {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.3);
}

.code-input.disabled .box {
  opacity: 0.5;
}

/* Het echte invoerveld ligt onzichtbaar over de vakjes. 16px: anders zoomt iOS in. */
.code-input input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  font-size: 16px;
  cursor: text;
}

.error {
  color: #ff8a8a;
  font-weight: 800;
  min-height: 1.45em;
}

a {
  color: var(--gold);
}

/* Telefoon in de wachtkamer: het verhaal in een paar zinnen. */
.lore {
  margin: 0 auto;
  max-width: 34ch;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-style: italic;
  line-height: 1.5;
  text-align: left;
}
