/* Hithop, meedoen in de browser. Zelfde sfeer als de app: donker feestdecor met een
   bewegend kleurverloop en glazen panelen. */

:root {
    --achter: #14051f;
    --tekst: #ffffff;
    --zacht: rgba(255, 255, 255, 0.72);
    --vaag: rgba(255, 255, 255, 0.5);
    --glas: rgba(255, 255, 255, 0.1);
    --glas-sterk: rgba(255, 255, 255, 0.16);
    --rand: rgba(255, 255, 255, 0.22);
    --roze: #ff3d7f;
    --groen: #30d158;
    --oranje: #ff9f0a;
    --rood: #ff453a;
    --paars: #8e5bff;
    --geel: #ffd60a;
    --radius: 26px;
    --gutter: 16px;
    --hoes-kleur: 107, 41, 217;
    --rond: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--achter);
    color: var(--tekst);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body { min-height: 100dvh; }

/* Achtergrond */

.achtergrond { position: fixed; inset: 0; overflow: hidden; z-index: 0; background: #0b0212; }
.vlek { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: 0.75; }
.vlek.een { background: rgb(var(--hoes-kleur)); top: -25vmax; left: -15vmax; animation: drijf 18s ease-in-out infinite alternate; transition: background 1.2s; }
.vlek.twee { background: #f2337f; top: 30vh; right: -30vmax; opacity: 0.55; animation: drijf 22s ease-in-out infinite alternate-reverse; }
.vlek.drie { background: #fa7347; bottom: -40vmax; left: 10vw; opacity: 0.45; animation: drijf 26s ease-in-out infinite alternate; }
.hoes-gloed { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(60px) saturate(1.3); opacity: 0; transition: opacity 1.2s; }
.hoes-gloed.aan { opacity: 0.5; }
.achtergrond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.55)); }

@keyframes drijf {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(8vw, 6vh) scale(1.12); }
}

/* Indeling */

#app {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) calc(env(safe-area-inset-bottom) + 20px);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.midden { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.rij { display: flex; align-items: center; gap: 10px; }
.rij.tussen { justify-content: space-between; }
.stroom { display: flex; flex-wrap: wrap; gap: 8px; }
.centreer { text-align: center; }
.verborgen { display: none !important; }

h1, h2, h3 { margin: 0; }
.titel-groot { font-family: var(--rond); font-weight: 900; font-size: 56px; letter-spacing: -1px; text-align: center; text-shadow: 0 4px 18px rgba(0,0,0,0.35); }
.kop { font-weight: 800; font-size: 26px; }
.sub { color: var(--zacht); font-size: 15px; }
.klein { color: var(--zacht); font-size: 13px; }
.schaduw { text-shadow: 0 2px 10px rgba(0,0,0,0.4); }

/* Glas */

.glas {
    background: var(--glas);
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 30px rgba(0,0,0,0.18);
}
.paneel { padding: 18px; display: flex; flex-direction: column; gap: 12px; }

/* Knoppen */

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: 0.45; }

.knop {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; padding: 0 20px; border-radius: 999px;
    background: var(--glas-sterk); border: 1px solid var(--rand);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    font-weight: 700; font-size: 16px;
    transition: transform 0.15s, opacity 0.15s;
}
.knop:active:not(:disabled) { transform: scale(0.96); }
.knop.vol { width: 100%; }
.knop.groot { min-height: 60px; font-size: 20px; font-weight: 900; }
.knop.roze { background: linear-gradient(180deg, #ff5a93, var(--roze)); border-color: rgba(255,255,255,0.35); }
.knop.groen { background: linear-gradient(180deg, #4ce07a, var(--groen)); border-color: rgba(255,255,255,0.35); }
.knop.paars { background: linear-gradient(180deg, #a57bff, var(--paars)); }
.knop.klein-knop { min-height: 36px; padding: 0 14px; font-size: 14px; }

.buzzer {
    width: 100%; height: 150px; border-radius: 34px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    font-family: var(--rond); font-weight: 900; font-size: 22px; letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.35), 0 16px 40px rgba(0,0,0,0.3);
    transition: transform 0.12s;
}
.buzzer:active:not(:disabled) { transform: scale(0.95); }
.buzzer .hand { font-size: 44px; line-height: 1; }

/* Invoer */

.veld {
    width: 100%; min-height: 54px; padding: 0 18px; border-radius: 999px;
    background: var(--glas-sterk); border: 1px solid var(--rand); color: var(--tekst);
    font: inherit; font-size: 18px; outline: none;
}
.veld:focus { border-color: rgba(255,255,255,0.6); }
.veld.code { text-align: center; text-transform: uppercase; letter-spacing: 10px; font-family: var(--rond); font-weight: 900; font-size: 32px; }
::placeholder { color: var(--vaag); letter-spacing: normal; }

/* Avatar en chips */

.avatar {
    flex: none; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--rond); font-weight: 900; font-size: 14px; color: #fff;
}
.avatar.groot { width: 44px; height: 44px; font-size: 20px; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 4px 12px 4px 4px; border-radius: 999px;
    background: var(--glas); border: 1px solid var(--rand);
    font-weight: 600; font-size: 14px; white-space: nowrap;
}
.chip.ik { border-color: rgba(255,255,255,0.85); }
.chip.gedimd { opacity: 0.5; }
.chip .punt { font-weight: 900; font-variant-numeric: tabular-nums; }
.vink { color: var(--groen); }
.label {
    display: inline-flex; align-items: center; gap: 6px; align-self: center;
    padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
    border: 1px solid rgba(255,255,255,0.25);
}
.label.oranje { background: rgba(255,159,10,0.55); }
.label.rood { background: rgba(255,69,58,0.6); }
.label.groen { background: rgba(48,209,88,0.55); }
.label.geel { background: rgba(255,214,10,0.45); }
.label.glas-label { background: var(--glas-sterk); }

/* Bovenbalk en stand */

.bovenbalk { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bovenbalk .midden-tekst { text-align: center; flex: 1; }
.rond-knop { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.stand { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--gutter); margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none; }
.stand::-webkit-scrollbar { display: none; }

/* De kaart */

.kaart-vak { perspective: 1200px; width: min(78vw, 300px); aspect-ratio: 1; margin: 0 auto; position: relative; }
.kaart { position: absolute; inset: 0; transition: transform 0.7s cubic-bezier(.3,1.4,.5,1); transform-style: preserve-3d; }
.kaart.open { transform: rotateY(180deg); }
.kaart-kant { position: absolute; inset: 0; border-radius: 36px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.kaart-voor { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.kaart-achter { transform: rotateY(180deg); background: rgba(255,255,255,0.1) center / cover no-repeat; border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 20px 50px rgba(0,0,0,0.45); }
.vraag { font-family: var(--rond); font-weight: 900; font-size: 110px; line-height: 0.9; text-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.balkjes { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.balkjes span { width: 9px; border-radius: 9px; background: #fff; animation: dans 0.9s ease-in-out infinite alternate; }
.balkjes span:nth-child(1) { animation-delay: -0.3s; }
.balkjes span:nth-child(2) { animation-delay: -0.7s; }
.balkjes span:nth-child(3) { animation-delay: -0.1s; }
.balkjes span:nth-child(4) { animation-delay: -0.5s; }
.balkjes span:nth-child(5) { animation-delay: -0.9s; }
.balkjes.stil span { animation: none; height: 10px; }
@keyframes dans { from { height: 12px; } to { height: 56px; } }
.aftel { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-variant-numeric: tabular-nums; z-index: 2; }
.tijd-om { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2; }

.ronde-tekst { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ronde-tekst .groot { font-size: 28px; font-weight: 900; line-height: 1.15; }
.jaar { font-family: var(--rond); font-weight: 900; font-size: 24px; padding: 4px 18px; border-radius: 999px; }

/* Tijdlijn */

.tijdlijn { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 4px var(--gutter); margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none; }
.tijdlijn::-webkit-scrollbar { display: none; }
.plek { flex: none; width: 36px; height: 78px; border-radius: 999px; font-size: 20px; font-weight: 900; }
.plek.gekozen { background: rgba(255,214,10,0.6); }
.jaarkaartje { flex: none; width: 66px; padding: 6px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jaarkaartje img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,0.1); }
.jaarkaartje b { font-family: var(--rond); font-size: 13px; }

/* Stemmen */

.schakels { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.schakel { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--glas); border: 1px solid var(--rand); font-weight: 700; font-size: 15px; }
.schakel.aan { background: rgba(48,209,88,0.6); }

/* Teams in de lobby */

.team { padding: 14px; border-radius: 22px; display: flex; flex-direction: column; gap: 10px; }

/* Bord en eindstand */

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.bordkaart { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bordkaart .beeld { position: relative; aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,0.1) center / cover no-repeat; }
.bordkaart .beeld span { position: absolute; left: 5px; bottom: 5px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,0.45); font-family: var(--rond); font-weight: 900; font-size: 12px; }
.bordkaart b, .bordkaart small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bordkaart b { font-size: 12px; }
.bordkaart small { font-size: 11px; color: var(--zacht); }
.laag { position: fixed; inset: 0; z-index: 10; overflow-y: auto; background: rgba(10, 2, 18, 0.72); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); }
.laag-binnen { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) var(--gutter) 40px; display: flex; flex-direction: column; gap: 22px; }
.podium { display: flex; align-items: flex-end; gap: 10px; }
.podium > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.podium .blok { width: 100%; border-radius: 18px; display: flex; justify-content: center; padding-top: 8px; font-family: var(--rond); font-weight: 900; font-size: 30px; }

.melding { padding: 14px 18px; border-radius: 20px; background: rgba(255,69,58,0.35); border: 1px solid rgba(255,255,255,0.25); font-weight: 600; }
.wacht { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; animation: draai 0.8s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .vlek, .balkjes span { animation: none; }
    .kaart { transition: none; }
}
