@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

:root {
     --bg: #fff3f8;
     --card: #ffffff;
     --ink: #6b4a58;
     --muted: #a98b98;
     --primary: #ffc2d9;
     --primary-dk: #f58cb3;
     --accent: #bfe6ec;
     --line: #ffd6e6;
     --ok: #79c79a;
     --shadow: 0 8px 28px rgba(245,140,179,.16);
     --radius: 22px;
}

* { box-sizing: border-box; }
body {
     margin: 0;
     /* Dikke, ronde letters. Fredoka = de ronde font; val terug op system-fonts
        als er geen internet is (self-hosted zonder internet). */
     font-family: 'Fredoka', 'Baloo 2', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
     color: var(--ink);
     background:
         radial-gradient(1200px 600px at 8% -8%, #ffe1ee 0%, transparent 58%),
         radial-gradient(1000px 520px at 108% 2%, #dff2f5 0%, transparent 52%),
         var(--bg);
     min-height: 100vh;
     line-height: 1.55;
     font-weight: 500;
}

/* --- Drijvende wolkjes (decoratief) --- */
.clouds { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cloud {
     position: absolute;
     font-size: 46px;
     opacity: .85;
     filter: drop-shadow(0 6px 8px rgba(245,140,179,.12));
     animation: float 14s ease-in-out infinite;
}
.cloud.c1 { top: 6%;  left: 5%;  font-size: 56px; animation-delay: 0s; }
.cloud.c2 { top: 14%; right: 8%; font-size: 40px; animation-delay: 2s; }
.cloud.c3 { top: 44%; left: 3%;  font-size: 38px; animation-delay: 4s; }
.cloud.c4 { top: 70%; right: 5%; font-size: 52px; animation-delay: 1s; }
.cloud.c5 { top: 82%; left: 12%; font-size: 34px; animation-delay: 3s; }
@keyframes float {
     0%, 100% { transform: translateY(0) translateX(0); }
     50%      { transform: translateY(-16px) translateX(10px); }
}
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } }

.page { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; padding: 28px 18px 60px; }
.page.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.page.narrow { max-width: 460px; }

.hero { text-align: center; margin-bottom: 22px; }
.hero .emoji { font-size: 60px; line-height: 1; }
.hero h1 {
     margin: .12em 0 .1em;
     font-size: 2.5rem;
     font-weight: 700;
     letter-spacing: .5px;
     color: var(--primary-dk);
     text-shadow: 0 2px 0 #fff, 0 3px 10px rgba(245,140,179,.18);
}
.hero .sub { color: var(--primary-dk); font-weight: 700; margin: .2em 0; font-size: 1.1rem; }
.hero .greeting { color: var(--muted); max-width: 640px; margin: .5em auto 0; white-space: pre-line; font-weight: 500; }

.card {
     position: relative; z-index: 1;
     background: var(--card);
     border: 2px solid var(--line);
     border-radius: var(--radius);
     box-shadow: var(--shadow);
     padding: 24px 24px 10px;
     margin: 16px 0;
}
.narrow-card { max-width: 380px; width: 100%; }

form.form fieldset { border: none; margin: 0; padding: 0; }
form.form legend {
     font-size: 1.25rem;
     font-weight: 700;
     color: var(--primary-dk);
     margin: 14px 0 10px;
     padding-bottom: 6px;
     border-bottom: 3px dotted var(--line);
}
form.form h3.small { font-size: 1.1rem; margin: 18px 0 8px; color: var(--primary-dk); font-weight: 700; }

label { display: block; margin: 10px 0; font-weight: 600; font-size: 1rem; }
label.full { margin-top: 14px; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"],
input[type="password"], textarea, select {
     display: block;
     width: 100%;
     margin-top: 6px;
     padding: 12px 14px;
     border: 2px solid var(--line);
     border-radius: 16px;
     font: inherit;
     font-weight: 500;
     background: #fffafc;
     color: var(--ink);
     transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--primary-dk); box-shadow: 0 0 0 4px rgba(255,194,217,.4); }
textarea { resize: vertical; min-height: 76px; }

.ph { font-size: .8rem; color: var(--muted); font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 20px 0 6px; }
.actions.center-actions { justify-content: center; }
.hint { color: var(--muted); font-size: .9rem; font-weight: 500; }
.error { color: #d1466b; font-weight: 700; background: #fdeef2; padding: 8px 12px; border-radius: 12px; }

.btn {
     display: inline-block;
     border: none;
     cursor: pointer;
     text-decoration: none;
     padding: 13px 26px;
     border-radius: 999px;
     font-weight: 700;
     font-size: 1.05rem;
     background: var(--primary-dk);
     color: #fff;
     box-shadow: var(--shadow);
     transition: transform .06s ease, background .15s ease;
}
.btn:hover { background: #ef7aa4; }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 9px 16px; font-size: .9rem; }

.footnote { text-align: center; color: var(--muted); margin-top: 26px; font-size: .95rem; font-weight: 500; }
.footnote a { color: var(--primary-dk); text-decoration: none; font-weight: 700; }
.footnote a:hover { text-decoration: underline; }

code { background: #fdeef4; padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* --- Admin (functieel, iets strakker) --- */
.admin-head {
     position: relative; z-index: 1;
     display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
     background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
     padding: 14px 18px; box-shadow: var(--shadow);
}
.admin-head h1 { font-size: 1.5rem; margin: 0; font-weight: 700; color: var(--primary-dk); }
.admin-head h1 small { color: var(--muted); font-weight: 500; }
.admin-head nav { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-head nav a { color: var(--primary-dk); text-decoration: none; font-weight: 700; font-size: .95rem; }
.admin-head nav a:hover { text-decoration: underline; }

.toolbar { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 8px; flex-wrap: wrap; }
.toolbar .count { margin: 0; font-weight: 600; }

.table-wrap { position: relative; z-index: 1; overflow-x: auto; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.responses th, table.responses td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.responses th { background: #ffeaf3; position: sticky; top: 0; font-weight: 700; }
table.responses td.wrap { max-width: 180px; white-space: normal; }
.del { background: #fde2e8; color: #d1466b; border: none; border-radius: 10px; width: 28px; height: 28px; cursor: pointer; font-weight: 700; }
.del:hover { background: #f6c6d2; }
th.pts, td.pts { text-align: center; font-weight: 700; }

.hit { color: var(--ok); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.ranking td { padding: 8px 10px; }
.ranking .wrap { max-width: 420px; }
