/* Sinterklaasthema: dieprood, goud, warm. Werkt ook zonder Google Font. */
:root {
  --red-0: #3d040a;
  --red-1: #5c0710;
  --red-2: #8e0e1b;
  --red-3: #b3121f;
  --gold: #f2c14e;
  --gold-2: #ffe08a;
  --gold-deep: #c8962e;
  --cream: #fff4dc;
  --paper: #fbf5ea;
  --brown: #3b1408;
  --ink: #2a0d05;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', 'Segoe UI Black', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }

body {
  font-family: var(--body);
  color: var(--cream);
  background: radial-gradient(ellipse at 50% 25%, var(--red-3) 0%, var(--red-2) 45%, var(--red-1) 80%, var(--red-0) 100%) fixed;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* pepernoten- en sterretjespatroon */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 22px 24px, #e0a45c 0 7px, transparent 8px),
    radial-gradient(circle at 19px 21px, #f6c98a 0 2px, transparent 3px),
    radial-gradient(circle at 78px 70px, #d09048 0 10px, transparent 11px),
    radial-gradient(circle at 74px 66px, #f6c98a 0 3px, transparent 4px),
    radial-gradient(circle at 52px 112px, var(--gold) 0 2.5px, transparent 3.5px);
  background-size: 120px 130px;
  z-index: 0;
}

/* goudlint bovenaan, als een pakje */
body::after {
  content: '';
  position: fixed;
  left: 0; right: 0; top: 0;
  height: 10px;
  background: repeating-linear-gradient(45deg, var(--gold) 0 14px, var(--gold-deep) 14px 28px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  z-index: 50;
  pointer-events: none;
}

h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: .5px; margin: 0; }

.gold-text {
  color: var(--gold);
  text-shadow: 0 3px 0 var(--brown), 0 6px 18px rgba(0, 0, 0, .45);
}

/* ------------------------------------------------------------ avatars */
.avatar {
  --size: 48px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  border: calc(var(--size) * .07) solid var(--gold);
  background: var(--cream);
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar .emoji { font-size: calc(var(--size) * .58); line-height: 1; }

/* ------------------------------------------------------------ knoppen */
.btn {
  font-family: var(--display);
  font-size: 20px;
  border: 0;
  border-radius: 16px;
  padding: 14px 20px;
  min-height: 52px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 4px 0 #c9b48f, 0 6px 14px rgba(0, 0, 0, .3);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c9b48f, 0 3px 8px rgba(0, 0, 0, .3); }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 4px 0 var(--gold-deep), 0 6px 14px rgba(0, 0, 0, .3); }
.btn.red { background: var(--red-3); color: var(--cream); box-shadow: 0 4px 0 var(--red-1), 0 6px 14px rgba(0, 0, 0, .3); }
.btn.ghost { background: rgba(255, 255, 255, .12); color: var(--cream); box-shadow: none; }
.btn.big { font-size: 26px; min-height: 64px; width: 100%; }
.btn:disabled { opacity: .45; }

#toast {
  position: fixed;
  left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: rgba(30, 5, 5, .92);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: 14px;
  border: 2px solid var(--gold);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

@keyframes pop-in { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } to { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
