/* Wilmazel — verjaardags-PWA */
:root {
  --bg: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 50%, #ffd6e0 100%);
  --bg-dark: linear-gradient(135deg, #2c1810 0%, #3d1f1a 50%, #4a2820 100%);
  --ink: #2c1810;
  --ink-soft: #6b4a3a;
  --brand: #e91e63;
  --brand-2: #ff6b9d;
  --accent: #ffa726;
  --gold: #ffd700;
  --card: #ffffff;
  --card-dark: #3d2820;
  --line: #ffd1dc;
  --line-dark: #5a3a30;
  --shadow: 0 8px 24px rgba(233, 30, 99, 0.15);
  --radius: 16px;
  --max: 760px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}
body.dark {
  background: var(--bg-dark);
  color: #fff0f5;
}
body.dark .card { background: var(--card-dark); border-color: var(--line-dark); }
body.dark .hero h1 { color: var(--brand-2); }
body.dark .big-clock .clock-cell { background: var(--card-dark); }
body.dark footer { background: rgba(45, 24, 16, 0.6); }
body.dark .actions .primary { background: var(--brand-2); }

#confetti {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
}

/* ==== Hero ==== */

.hero {
  text-align: center;
  padding: 48px 20px 36px;
  background: linear-gradient(135deg, rgba(233,30,99,0.1) 0%, rgba(255,107,157,0.05) 100%);
  position: relative;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(233,30,99,0.2);
}

.sub {
  margin: 0 0 24px;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--ink-soft);
  font-style: italic;
}

.big-clock {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.clock-cell {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 90px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s;
}
.clock-cell:hover { transform: translateY(-2px); }
.clock-cell span {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.clock-cell label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-message {
  font-size: 1.15rem;
  color: var(--brand);
  font-weight: 600;
  margin: 16px 0;
  min-height: 1.5em;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

button {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 10px;
  border: 2px solid var(--brand);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
button.primary {
  background: var(--brand);
  color: white;
}
button.primary:hover { background: var(--brand-2); transform: translateY(-2px); }
button.secondary {
  background: transparent;
  color: var(--brand);
}
button.secondary:hover { background: var(--brand); color: white; }
button.hidden { display: none; }
button.small { padding: 6px 12px; font-size: 0.85rem; }

/* ==== Main ==== */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: fade-in 0.6s ease;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
  color: var(--brand);
  border-bottom: 2px dashed var(--line);
  padding-bottom: 8px;
}

.lead {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 16px;
}

.facts, .traits {
  margin: 0;
  padding-left: 24px;
  display: grid;
  gap: 8px;
}
.facts li, .traits li {
  color: var(--ink);
  padding-left: 4px;
}
.facts li strong, .traits li strong {
  color: var(--brand);
}
.muted {
  color: var(--ink-soft);
  font-style: italic;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat-card {
  background: linear-gradient(135deg, rgba(233,30,99,0.08) 0%, rgba(255,107,157,0.04) 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.stat-card .num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.stat-card .lbl {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ==== Wensen ==== */
.wishes {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.wish {
  background: linear-gradient(135deg, rgba(255,167,38,0.08) 0%, rgba(255,107,157,0.04) 100%);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px 16px;
  position: relative;
}
.wish .from { font-weight: 700; color: var(--brand); }
.wish .from::after { content: " zegt:"; color: var(--ink-soft); font-weight: 400; }
.wish .text { color: var(--ink); margin: 4px 0 0; }
.wish .date { font-size: 0.75rem; color: var(--ink-soft); margin-top: 4px; }

#wishes-empty { text-align: center; padding: 12px; }

/* ==== Dialog ==== */
.dialog {
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 0;
  background: var(--card);
  color: var(--ink);
  max-width: 480px;
  width: 90vw;
}
.dialog::backdrop { background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.dialog-form { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.dialog-form h3 { margin: 0 0 4px; color: var(--brand); }
.dialog-form input, .dialog-form textarea {
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: white;
  color: var(--ink);
}
.dialog-form textarea { min-height: 80px; resize: vertical; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* ==== Footer ==== */
footer {
  text-align: center;
  padding: 24px 16px;
  background: rgba(255,255,255,0.4);
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ==== Print template ==== */
.print-only { display: none; }
@media print {
  body > *:not(.print-only) { display: none !important; }
  .print-only {
    display: block;
    padding: 60px 40px;
    background: white;
    color: #2c1810;
    font-family: 'Georgia', serif;
    border: 6px double #e91e63;
    text-align: center;
    page-break-inside: avoid;
  }
  .print-only h1 { font-size: 2.5em; color: #e91e63; margin: 0 0 20px; }
  .print-only .card-from { font-size: 1.1em; margin: 20px 0 10px; }
  .print-only .card-msg { font-size: 1.3em; font-style: italic; line-height: 1.6; margin: 30px 0; }
  .print-only .card-date { font-size: 1em; color: #888; margin-top: 40px; }
}

/* ==== Mobile ==== */
@media (max-width: 480px) {
  .hero { padding: 32px 16px 24px; }
  .big-clock { gap: 8px; }
  .clock-cell { min-width: 70px; padding: 12px 14px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions button { width: 100%; }
}