/* Getekende stijl: dikke zwarte lijnen, egale vlakken, donkergrijze achtergrond. */
:root {
  --bg: #35353b;
  --bg2: #2b2b30;
  --panel: #45454d;
  --panel2: #55555e;
  --ink: #111114;
  --paper: #f5ecd8;
  --text: #f2efe6;
  --muted: #b9b6ad;
  --blue: #74a9ee;
  --pink: #f08fb3;
  --yellow: #f6d55c;
  --green: #8fd694;
  --red: #e8534a;
  --purple: #b69cf0;
  --orange: #f5a25d;
  --wobble: 255px 14px 225px 14px / 14px 225px 14px 255px;
  --font: 'Patrick Hand', 'Segoe Print', 'Comic Sans MS', 'Chalkboard SE', cursive;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 18px; line-height: 1.25;
  background-image: radial-gradient(circle at 20% 10%, rgba(255,255,255,.04) 0, transparent 40%), radial-gradient(circle at 80% 90%, rgba(255,255,255,.03) 0, transparent 35%);
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0 0 .4em; font-weight: 700; letter-spacing: .5px; }
button, input, select, textarea { font: inherit; color: inherit; }
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }
.hidden { display: none !important; }

/* ---------- Knoppen en velden ---------- */
.btn {
  border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); padding: 8px 18px; cursor: pointer;
  border-radius: var(--wobble); box-shadow: 0 4px 0 var(--ink); font-weight: 700; font-size: 1.05em;
  transition: transform .06s, box-shadow .06s, filter .15s; user-select: none;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.blue { background: var(--blue); } .btn.pink { background: var(--pink); } .btn.green { background: var(--green); }
.btn.red { background: var(--red); color: #fff; } .btn.gray { background: #cfcbc0; } .btn.purple { background: var(--purple); }
.btn.small { padding: 3px 11px; font-size: .9em; box-shadow: 0 3px 0 var(--ink); }
.btn.big { padding: 12px 26px; font-size: 1.3em; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.field, input[type=text], input[type=number], select {
  background: #f9f3e3; color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 7px 11px; outline: none; min-width: 0;
}
input:focus, select:focus { box-shadow: 0 0 0 3px var(--blue); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); vertical-align: middle; cursor: pointer; }
label { cursor: pointer; }

.panel {
  background: var(--panel); border: 3px solid var(--ink); border-radius: var(--wobble); padding: 16px 18px;
  box-shadow: 0 6px 0 rgba(0,0,0,.45);
}
.panel.paper { background: var(--paper); color: var(--ink); }
.panel h2, .panel h3 { margin-top: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.tag { display: inline-block; border: 2px solid var(--ink); border-radius: 10px; padding: 0 8px; background: var(--panel2); font-size: .85em; }
.coin { display: inline-flex; align-items: center; gap: 4px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; padding: 1px 10px; font-weight: 700; }
.coin::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #f0a920; border: 2px solid var(--ink); display: inline-block; }

/* ---------- Avatars ---------- */
.avatar {
  --frame: #8b5a2b; position: relative; border-radius: 50%; border: 4px solid var(--frame);
  box-shadow: 0 0 0 3px var(--ink); background: #3a3a40 center/cover no-repeat; flex: none; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.f-vlam { animation: glowOrange 1.4s ease-in-out infinite alternate; }
.avatar.f-bloed { animation: glowRed 1.8s ease-in-out infinite alternate; }
.avatar.f-maan { animation: glowBlue 2s ease-in-out infinite alternate; }
@keyframes glowOrange { to { box-shadow: 0 0 0 3px var(--ink), 0 0 14px 4px #ff9d2e; } }
@keyframes glowRed { to { box-shadow: 0 0 0 3px var(--ink), 0 0 14px 4px #e0182b; } }
@keyframes glowBlue { to { box-shadow: 0 0 0 3px var(--ink), 0 0 14px 4px #9bc6ff; } }

/* ---------- Login ---------- */
.hero {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(rgba(20,20,26,.35), rgba(20,20,26,.7)), url('../assets/bg/titel.webp') center/cover no-repeat, var(--bg2);
}
.hero .card { width: min(480px, 100%); text-align: center; }
.logo { font-size: clamp(44px, 9vw, 78px); margin: 0 0 6px; color: var(--paper); text-shadow: 4px 4px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink); transform: rotate(-2deg); font-family: 'Gaegu', var(--font); }
.logo .w { color: var(--yellow); }

/* ---------- Menu ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--bg2); border-bottom: 3px solid var(--ink); position: sticky; top: 0; z-index: 5; }
.topbar .brand { font-family: 'Gaegu', var(--font); font-weight: 700; font-size: 1.9em; color: var(--paper); text-shadow: 2px 2px 0 var(--ink); }
.page { max-width: 1100px; margin: 0 auto; padding: 22px 18px 50px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
.game-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; background: var(--panel2); margin-bottom: 8px; }
.code-input { text-transform: uppercase; letter-spacing: 4px; text-align: center; width: 150px; font-weight: 700; }
.menu-bg { background: linear-gradient(rgba(35,35,41,.82), rgba(35,35,41,.9)), url('../assets/bg/lobby.webp') center/cover fixed no-repeat; min-height: 100vh; }

/* ---------- Winkel ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { border: 3px solid var(--ink); background: var(--panel2); border-radius: 12px 12px 4px 4px; padding: 5px 14px; cursor: pointer; font-weight: 700; }
.tab.active { background: var(--yellow); color: var(--ink); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.item { border: 3px solid var(--ink); border-radius: var(--wobble); background: var(--panel2); padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px; box-shadow: 0 4px 0 rgba(0,0,0,.4); }
.item.equipped { background: #4b6a50; }
.preview { width: 84px; height: 84px; display: grid; place-items: center; }
.swatch { width: 70px; height: 70px; border-radius: 50%; border: 4px solid var(--ink); }
.roofprev { width: 80px; height: 66px; position: relative; }
.roofprev i { position: absolute; left: 6px; right: 6px; top: 0; height: 36px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: var(--c); }
.roofprev b { position: absolute; left: 14px; right: 14px; bottom: 0; height: 30px; background: #efe3c2; border: 3px solid var(--ink); }

/* ---------- Lobby ---------- */
.lobby-code { font-size: 3em; letter-spacing: 8px; font-weight: 700; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 0 20px; display: inline-block; transform: rotate(-1.5deg); box-shadow: 0 5px 0 var(--ink); cursor: pointer; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pcard { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 3px solid var(--ink); background: var(--panel2); border-radius: 14px; }
.pcard .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.rolechips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 3px solid var(--ink); border-radius: 12px; padding: 3px 10px; background: var(--panel2); cursor: pointer; user-select: none; }
.chip.on { background: var(--green); color: var(--ink); }
.chip.off { opacity: .7; text-decoration: line-through; }
.chip.ro { cursor: default; }

/* ---------- Spelscherm ---------- */
.game { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto 1fr; gap: 12px; padding: 10px; height: 100vh; }
.game .hud { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hud .phase { font-size: 1.5em; font-weight: 700; font-family: 'Gaegu', var(--font); }
.hud .timer { font-size: 1.5em; font-weight: 700; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 0 12px; min-width: 76px; text-align: center; }
.hud .timer.urgent { background: var(--red); color: #fff; animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.07); } }
.rolechip { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.rolechip .tag { font-size: 1em; padding: 1px 10px; }
.stage { position: relative; min-height: 0; display: flex; flex-direction: column; }
.canvaswrap { position: relative; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; background: #2a2a30; box-shadow: 0 6px 0 rgba(0,0,0,.45); flex: 1; min-height: 0; display: grid; place-items: center; }
canvas#village { display: block; touch-action: manipulation; }
.side { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.side .tabs { margin: 0; }
.sidebody { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.pane { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px; }
.badge { background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 0 6px; margin-left: 4px; font-size: .8em; }
.chatlist { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 4px; }
.msg { background: var(--panel2); border: 2px solid var(--ink); border-radius: 12px; padding: 4px 10px; word-wrap: break-word; max-width: 100%; }
.msg b { margin-right: 6px; }
.msg.wolf { background: #5b3a3f; } .msg.dead { background: #3d4458; font-style: italic; } .msg.mine { background: #55705a; }
.msg.sys { background: transparent; border-style: dashed; color: var(--muted); }
.chatform { display: flex; gap: 8px; margin-top: 8px; }
.chatform input { flex: 1; }
.chanlabel { font-weight: 700; margin-bottom: 4px; }
.chanlabel.wolf { color: var(--red); } .chanlabel.dead { color: var(--blue); }
.tlist { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.trow { display: flex; align-items: center; gap: 9px; padding: 5px 9px; border: 3px solid var(--ink); border-radius: 12px; background: var(--panel2); cursor: pointer; text-align: left; width: 100%; }
.trow:hover { background: #666672; }
.trow.sel { background: var(--yellow); color: var(--ink); }
.trow.disabled { opacity: .45; pointer-events: none; }
.trow .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .votes { background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 0 8px; font-weight: 700; }
.logentry { padding: 4px 8px; border-left: 5px solid var(--muted); margin: 5px 0; background: rgba(0,0,0,.18); border-radius: 0 10px 10px 0; }
.logentry.dawn { border-color: var(--yellow); } .logentry.vote { border-color: var(--pink); } .logentry.role { border-color: var(--purple); }
.logentry.wolf { border-color: var(--red); } .logentry.move { border-color: var(--orange); } .logentry.end { border-color: var(--green); }
.logentry.system { border-color: var(--blue); }
.infobox { border: 3px dashed var(--muted); border-radius: 14px; padding: 8px 12px; margin: 8px 0; color: var(--text); background: rgba(0,0,0,.15); }
.cue { font-weight: 700; padding: 4px 10px; border: 3px solid var(--ink); border-radius: 12px; display: inline-block; }
.cue.bad { background: var(--red); color: #fff; animation: pulse .4s infinite alternate; }
.cue.ok { background: var(--green); color: var(--ink); }
.rolemini { display: flex; gap: 10px; align-items: center; }
.rolemini img { width: 54px; height: 72px; object-fit: cover; border: 3px solid var(--ink); border-radius: 10px; background: #333; }

@media (max-width: 1000px) {
  .game { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(380px, 1fr); height: auto; min-height: 100vh; }
  .canvaswrap { flex: none; }
  .side { min-height: 460px; }
}

/* ---------- Overlay / modaal ---------- */
#overlay { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(10,10,14,.72); padding: 18px; overflow-y: auto; }
#overlay.show { display: grid; }
.modal { width: min(620px, 100%); animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.85) rotate(-2deg); opacity: 0; } }
.rolecard { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.rolecard img { width: 210px; height: 280px; object-fit: cover; border: 4px solid var(--ink); border-radius: 16px; background: #333; box-shadow: 0 6px 0 rgba(0,0,0,.5); transform: rotate(-2deg); }
.rolecard .txt { flex: 1; min-width: 220px; }
.team { display: inline-block; font-weight: 700; border: 3px solid var(--ink); border-radius: 10px; padding: 0 10px; }
.team.wolf { background: var(--red); color: #fff; } .team.dorp { background: var(--green); color: var(--ink); }
.restable { width: 100%; border-collapse: collapse; }
.restable td { padding: 5px 6px; border-bottom: 2px dashed rgba(0,0,0,.25); }
.restable tr.dead td { opacity: .6; }

#toasts { position: fixed; top: 14px; right: 14px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 14px; box-shadow: 0 4px 0 var(--ink); max-width: 340px; animation: slidein .25s ease-out; }
.toast.err { background: var(--red); color: #fff; }
.toast.move { background: var(--orange); }
@keyframes slidein { from { transform: translateX(60px); opacity: 0; } }
#banner { position: fixed; left: 0; right: 0; top: 28%; z-index: 70; text-align: center; pointer-events: none; }
#banner span {
  display: inline-block; font-family: 'Gaegu', var(--font); font-weight: 700; font-size: clamp(40px, 8vw, 90px); color: var(--paper);
  text-shadow: 5px 5px 0 var(--ink), -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink);
  animation: banner 2.4s ease-in-out forwards;
}
@keyframes banner { 0% { transform: scale(.4) rotate(-6deg); opacity: 0; } 15% { transform: scale(1.05) rotate(-2deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(1) translateY(-30px) rotate(-2deg); opacity: 0; } }

.housepic { width: 112px; height: 96px; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.housepic.big { width: 150px; height: 128px; }
.item .preview { width: 112px; height: 96px; }

/* ---------- Hoofdmenu als game ---------- */
.menu-scene { position: relative; min-height: 100vh; overflow: hidden; background: #0e1228; isolation: isolate; }
.menu-scene .bgwrap { position: absolute; inset: -4%; transition: transform .35s ease-out; z-index: -5; }
.menu-scene .bgimg { position: absolute; inset: 0; background: url('../assets/bg/titel.webp') center bottom / cover no-repeat; animation: kenburns 45s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
.menu-scene .shade { position: absolute; inset: 0; z-index: -4; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,9,26,.82) 0%, rgba(7,9,26,.45) 34%, rgba(7,9,26,0) 62%),
              linear-gradient(0deg, rgba(7,9,26,.6) 0%, rgba(7,9,26,0) 38%),
              linear-gradient(180deg, rgba(7,9,26,.55) 0%, rgba(7,9,26,0) 30%); }
.fog { position: absolute; left: -50%; width: 200%; height: 40%; z-index: -3; pointer-events: none; opacity: .5;
  background: radial-gradient(ellipse at 20% 50%, rgba(190,205,255,.30), transparent 55%), radial-gradient(ellipse at 70% 40%, rgba(190,205,255,.22), transparent 50%); }
.fog.f1 { bottom: 0; animation: fogmove 60s linear infinite; }
.fog.f2 { bottom: 10%; opacity: .35; animation: fogmove 90s linear infinite reverse; }
@keyframes fogmove { from { transform: translateX(0); } to { transform: translateX(25%); } }
.fly { position: absolute; z-index: -2; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; background: #fff6a8; box-shadow: 0 0 10px 4px rgba(255,236,120,.7); animation: flyfloat ease-in-out infinite; opacity: 0; }
@keyframes flyfloat { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 50% { transform: translate(40px, -50px); opacity: .6; } 85% { opacity: 1; } 100% { transform: translate(-20px, -110px); opacity: 0; } }

.menu-ui { min-height: 100vh; display: flex; flex-direction: column; padding: 22px 5vw 18px; }
.menu-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.logo.big { font-size: clamp(54px, 9vw, 110px); line-height: .95; margin: 0; }
.tagline { font-size: 1.3em; color: #e9dfc2; text-shadow: 2px 2px 0 var(--ink); margin: 6px 0 0 8px; letter-spacing: 1px; }
.profilecard { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 10px; cursor: pointer; background: rgba(36,36,44,.82); border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: 0 5px 0 rgba(0,0,0,.5); backdrop-filter: blur(3px); transition: transform .12s; }
.profilecard:hover { transform: translateY(-2px) rotate(.5deg); }
.profilecard .pname { font-weight: 700; font-size: 1.25em; }
.profilecard .pedit { opacity: .6; font-size: .8em; }

.menu-buttons { margin: auto 0; padding: 22px 0; width: min(430px, 100%); display: flex; flex-direction: column; gap: 15px; }
.gbtn {
  --c1: #ffe27a; --c2: #f2b436; --ink2: #3b2406;
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 11px 20px 11px 12px; color: var(--ink2); cursor: pointer;
  background: linear-gradient(180deg, var(--c1), var(--c2)); border: 4px solid var(--ink); border-radius: 20px 36px 20px 36px / 36px 20px 36px 20px;
  box-shadow: 0 7px 0 var(--ink), 0 12px 22px rgba(0,0,0,.45); transform: rotate(-1.2deg);
  transition: transform .14s cubic-bezier(.3,1.6,.5,1), box-shadow .14s, filter .14s;
  animation: gin .55s cubic-bezier(.2,1.4,.4,1) backwards;
}
.gbtn:nth-child(1) { animation-delay: .05s; } .gbtn:nth-child(2) { animation-delay: .12s; } .gbtn:nth-child(3) { animation-delay: .19s; }
.gbtn:nth-child(4) { animation-delay: .26s; } .gbtn:nth-child(5) { animation-delay: .33s; } .gbtn:nth-child(6) { animation-delay: .4s; }
.gbtn:nth-child(even) { transform: rotate(.9deg); }
@keyframes gin { from { opacity: 0; transform: translateX(-80px) rotate(-6deg); } }
.gbtn:hover { transform: translateX(14px) rotate(0deg) scale(1.03); filter: brightness(1.08); box-shadow: 0 7px 0 var(--ink), 0 0 26px rgba(255,226,122,.55), 0 12px 22px rgba(0,0,0,.45); }
.gbtn:active { transform: translateX(14px) translateY(5px) scale(1.01); box-shadow: 0 2px 0 var(--ink), 0 6px 12px rgba(0,0,0,.4); }
.gbtn.green { --c1: #b4f09b; --c2: #4fba52; --ink2: #0f3411; }
.gbtn.blue { --c1: #a6d4ff; --c2: #4b86df; --ink2: #0b2349; }
.gbtn.pink { --c1: #ffc1da; --c2: #e4609a; --ink2: #4a0f2c; }
.gbtn.wood { --c1: #d9a46a; --c2: #8f5a2c; --ink2: #2e1706; }
.gicon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; font-size: 30px; background: rgba(255,255,255,.55); border: 3px solid var(--ink); border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.gtext { display: flex; flex-direction: column; min-width: 0; }
.glabel { font-size: 1.6em; font-weight: 700; line-height: 1.05; text-shadow: 1px 1px 0 rgba(255,255,255,.35); }
.gsub { font-size: .95em; opacity: .8; }
.gbadge { margin-left: auto; min-width: 34px; text-align: center; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 0 9px; font-weight: 700; font-size: 1.15em; }
.wood .glabel, .wood .gsub { color: #fbe9cf; text-shadow: 2px 2px 0 var(--ink); }
.menu-foot { margin-top: auto; color: #cfc8b0; text-shadow: 2px 2px 0 var(--ink); font-size: .95em; }

@media (max-width: 700px) {
  .menu-ui { padding: 14px 4vw; }
  .menu-top { justify-content: center; text-align: center; }
  .menu-buttons { margin: 10px auto; }
  .gbtn:hover { transform: rotate(0deg) scale(1.02); }
  .shade { background: linear-gradient(0deg, rgba(7,9,26,.8), rgba(7,9,26,.25) 70%); }
  .gicon { width: 46px; height: 46px; font-size: 24px; }
  .glabel { font-size: 1.35em; }
}
@media (prefers-reduced-motion: reduce) { .menu-scene .bgimg, .fog, .fly, .gbtn { animation: none; } .fly { display: none; } }

/* ---------- Spookachtig hoofdmenu ---------- */
.menu-scene { background: #070b1a; }
.menu-scene .shade {
  background: linear-gradient(90deg, rgba(4,8,18,.88) 0%, rgba(4,8,18,.5) 32%, rgba(4,8,18,0) 62%),
              linear-gradient(0deg, rgba(4,8,18,.7) 0%, rgba(4,8,18,0) 40%),
              radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%);
}
.menu-scene .flicker { position: absolute; inset: 0; z-index: -3; pointer-events: none; background: radial-gradient(circle at 18% 78%, rgba(255,150,40,.20), transparent 38%), radial-gradient(circle at 82% 82%, rgba(255,150,40,.18), transparent 36%); animation: flick 3.4s infinite; mix-blend-mode: screen; }
@keyframes flick { 0%,100% { opacity: .85; } 12% { opacity: .5; } 18% { opacity: 1; } 40% { opacity: .7; } 55% { opacity: 1; } 70% { opacity: .55; } 85% { opacity: .95; } }
.fog { opacity: .55; background: radial-gradient(ellipse at 20% 50%, rgba(120,255,190,.22), transparent 55%), radial-gradient(ellipse at 70% 40%, rgba(150,120,255,.20), transparent 50%); }
.fly { background: #c8ff9a; box-shadow: 0 0 10px 4px rgba(150,255,120,.65); }

.bat { position: absolute; z-index: -1; top: 12%; left: -10%; font-size: 34px; filter: drop-shadow(0 0 4px #000); opacity: .9; animation: batfly 16s linear infinite; pointer-events: none; }
.bat.b1 { top: 24%; font-size: 24px; animation-duration: 22s; animation-delay: -7s; }
.bat.b2 { top: 8%; font-size: 28px; animation-duration: 19s; animation-delay: -13s; }
@keyframes batfly { 0% { transform: translate(0, 0) rotate(-6deg); } 25% { transform: translate(30vw, 40px) rotate(8deg) scaleX(-1); } 50% { transform: translate(60vw, -20px) rotate(-8deg); } 75% { transform: translate(85vw, 50px) rotate(6deg) scaleX(-1); } 100% { transform: translate(115vw, 0) rotate(-4deg); } }
.eyes { position: absolute; z-index: -2; display: flex; gap: 12px; pointer-events: none; animation: blink 6s infinite; }
.eyes i { width: 9px; height: 5px; border-radius: 50%; background: #ffe45a; box-shadow: 0 0 10px 4px rgba(255,220,60,.7); }
.eyes.e0 { left: 7%; top: 62%; } .eyes.e1 { right: 12%; top: 55%; animation-delay: -2s; } .eyes.e2 { left: 42%; top: 70%; animation-delay: -4s; }
@keyframes blink { 0%, 44%, 50%, 100% { opacity: 1; } 47% { opacity: 0; } 70% { opacity: 0; } 72% { opacity: 1; } 90% { opacity: .2; } }
.ghost { position: absolute; z-index: -2; right: 18%; top: 38%; font-size: 64px; opacity: .22; filter: blur(.6px) drop-shadow(0 0 14px rgba(160,255,220,.8)); animation: ghostfloat 11s ease-in-out infinite; pointer-events: none; }
@keyframes ghostfloat { 0%,100% { transform: translate(0,0) rotate(-4deg); } 50% { transform: translate(-60px,-40px) rotate(6deg); } }
.web { position: absolute; z-index: -1; top: -10px; right: -6px; font-size: 130px; opacity: .3; pointer-events: none; transform: scaleX(-1); }

.logo.big { font-family: 'Creepster', 'Gaegu', var(--font); font-weight: 400; letter-spacing: 6px; color: #f6edcc;
  text-shadow: 0 0 22px rgba(120,255,170,.55), 0 0 4px rgba(120,255,170,.9), 5px 5px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000; transform: rotate(-2deg); animation: logoglow 4s ease-in-out infinite; }
.logo.big .w { color: #ff8a2a; text-shadow: 0 0 22px rgba(255,120,30,.7), 5px 5px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000; }
@keyframes logoglow { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
.tagline { color: #b8f5cf; font-style: italic; text-shadow: 0 0 10px rgba(120,255,170,.6), 2px 2px 0 #000; }
.profilecard { background: rgba(18,22,36,.86); border-color: #000; box-shadow: 0 5px 0 rgba(0,0,0,.6), 0 0 18px rgba(120,255,170,.15); }

.gbtn { color: #fdf3d8; box-shadow: 0 7px 0 #000, 0 12px 22px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.08); border-color: #000; }
.gbtn .glabel { text-shadow: 2px 2px 0 rgba(0,0,0,.7); }
.gbtn .gsub { opacity: .85; }
.gbtn.gold { --c1: #ffae3d; --c2: #c9540a; }
.gbtn.orange { --c1: #ff9a3d; --c2: #b8480a; }
.gbtn.green { --c1: #7fe05b; --c2: #1f7a3a; }
.gbtn.blue { --c1: #6fd8d0; --c2: #1d6f86; }
.gbtn.pink { --c1: #e0566f; --c2: #7a1230; }
.gbtn.wood { --c1: #8a5a33; --c2: #3c2410; }
.gbtn:hover { box-shadow: 0 7px 0 #000, 0 0 30px rgba(255,170,60,.55), 0 12px 22px rgba(0,0,0,.6); }
.gicon { background: rgba(0,0,0,.35); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 0 10px rgba(255,255,255,.12); }
.menu-foot { color: #9fd6b4; font-style: italic; }

.spinner { width: 46px; height: 46px; margin: 14px auto 0; border: 6px solid rgba(255,255,255,.2); border-top-color: var(--yellow); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bat, .eyes, .ghost, .flicker, .logo.big { animation: none; } }

/* ---------- Spelscherm zonder zijbalk: popups ---------- */
.game2 { display: flex; flex-direction: column; height: 100vh; padding: 10px; gap: 10px; }
.game2 .stage { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.hudbtn { position: relative; border: 3px solid var(--ink); background: var(--panel2); color: var(--text); border-radius: 12px; padding: 4px 12px; cursor: pointer; font-weight: 700; box-shadow: 0 3px 0 var(--ink); transition: transform .08s, background .15s; }
.hudbtn:hover { background: #6a6a76; transform: translateY(-1px); }
.hudbtn.on { background: var(--yellow); color: var(--ink); }
.hudbtn .dot { position: absolute; top: -9px; right: -7px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--red); color: #fff; border: 2px solid var(--ink); font-size: .75em; line-height: 18px; text-align: center; }
.hudbtn .dot.hidden { display: none; }

.popup { position: fixed; z-index: 40; background: var(--panel); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 8px 0 rgba(0,0,0,.45), 0 18px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; animation: popin .2s ease-out; overflow: hidden; }
@keyframes popin { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.popup.right { right: 12px; top: 62px; bottom: 12px; width: 390px; }
.popup.mid { left: 12px; top: 62px; bottom: 12px; width: 390px; }
.popup.left { left: 12px; bottom: 12px; width: 380px; height: min(420px, 55vh); }
.popup.wolfpop { border-color: #2a0a10; box-shadow: 0 8px 0 rgba(0,0,0,.45), 0 0 26px rgba(224,40,60,.4); }
.popup.wolfpop .pop-head { background: #4a1420; }
.pop-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 3px solid var(--ink); background: var(--bg2); font-size: 1.1em; }
.pop-x { border: 2px solid var(--ink); background: var(--red); color: #fff; width: 28px; height: 28px; border-radius: 9px; cursor: pointer; font-weight: 700; line-height: 1; }
.pop-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.popup.left .pop-body { display: flex; flex-direction: column; padding: 8px 10px; overflow: hidden; }
.chatbox { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chatbox .chatlist { flex: 1; min-height: 0; }
.logentry.priv { background: rgba(182,156,240,.14); }
.logbody { display: flex; flex-direction: column; }

/* ---------- Actie: popup midden in beeld ---------- */
.popup.center { left: 50%; top: 50%; right: auto; bottom: auto; width: min(470px, calc(100vw - 24px)); max-height: min(86vh, 680px); transform: translate(-50%, -50%); animation: popcenter .25s cubic-bezier(.2,1.3,.4,1); z-index: 45; }
@keyframes popcenter { from { transform: translate(-50%, -46%) scale(.9); opacity: 0; } }
.popup.actpop { box-shadow: 0 10px 0 rgba(0,0,0,.45), 0 0 0 100vmax rgba(8,8,12,.38), 0 20px 50px rgba(0,0,0,.6); }
.act-body { padding: 0; }
.actpill { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20; border: 3px solid var(--ink); border-radius: 999px; padding: 6px 18px; font-weight: 700; font-size: 1.1em; cursor: pointer; background: var(--paper); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.actpill.hidden { display: none; }
.actpill.todo { background: var(--yellow); animation: dockglow 1.1s ease-in-out infinite alternate; }
.actpill.optional { background: #bcd7ff; }
.actpill.done { background: var(--green); }
.dstatus { border: 3px solid var(--ink); border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; background: var(--panel2); }
.dstatus-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dstatus-badge { font-size: .78em; font-weight: 700; letter-spacing: .06em; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; background: var(--muted); color: var(--ink); }
.dock-timer { font-weight: 700; font-variant-numeric: tabular-nums; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 0 8px; }
.dstatus-title { font-size: 1.35em; font-weight: 700; line-height: 1.15; font-family: 'Gaegu', var(--font); }
.dstatus-text { margin-top: 4px; font-size: 1.02em; opacity: .95; }
.dstatus.todo { background: var(--yellow); color: var(--ink); animation: dockglow 1.3s ease-in-out infinite alternate; }
.dstatus.todo .dstatus-badge { background: var(--red); color: #fff; }
.dstatus.optional { background: #bcd7ff; color: var(--ink); }
.dstatus.optional .dstatus-badge { background: var(--blue); }
.dstatus.done { background: var(--green); color: var(--ink); }
.dstatus.done .dstatus-badge { background: #fff; }
.dstatus.wait, .dstatus.dead { background: var(--panel2); color: var(--text); }
@keyframes dockglow { from { box-shadow: 0 0 0 rgba(255,210,74,0); } to { box-shadow: 0 0 22px rgba(255,210,74,.9); } }
.news { border: 3px solid var(--purple); border-radius: 14px; padding: 6px 10px; margin-bottom: 12px; background: rgba(182,156,240,.14); }
.news-title { font-weight: 700; margin-bottom: 2px; }
.news-item { padding: 3px 0; border-top: 2px dashed rgba(255,255,255,.18); }
.news-item:first-of-type { border-top: 0; }
@media (prefers-reduced-motion: reduce) { .dstatus.todo { animation: none; } }

@media (max-width: 1000px) {
  .game2 { height: auto; min-height: 100vh; }
  .game2 .canvaswrap { flex: none; }
  .popup.right, .popup.left, .popup.mid { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; height: auto; max-height: 62vh; }
  .popup.right .pop-body, .popup.mid .pop-body { max-height: 52vh; }
}

/* ---------- Cutscenes ---------- */
#cutscene { position: fixed; inset: 0; z-index: 90; display: none; cursor: pointer; }
#cutscene.show { display: block; }
.cut { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; animation: cutin .5s ease-out; color: #fff; text-align: center; }
@keyframes cutin { from { opacity: 0; } }
.cut.dawn { background: linear-gradient(180deg, #151a3d 0%, #5a3a68 45%, #e0824f 100%); }
.cut.sunrise { background: linear-gradient(180deg, #3a63a8 0%, #f1b869 100%); }
.cut.dusk { background: radial-gradient(circle at 12% 88%, rgba(255,150,40,.45), transparent 36%), radial-gradient(circle at 88% 88%, rgba(255,150,40,.45), transparent 36%), linear-gradient(180deg, #0c0718 0%, #3a1030 55%, #a8381f 100%); animation: cutin .5s ease-out, torch 2.2s infinite; }
.cut.hunt { background: linear-gradient(180deg, #08160f 0%, #1d4a2c 70%, #2e6a3a 100%); }
@keyframes torch { 0%, 100% { filter: brightness(1); } 30% { filter: brightness(.88); } 60% { filter: brightness(1.08); } }
.cut-sky .sun { position: absolute; left: 50%; bottom: -120px; width: 220px; height: 220px; margin-left: -110px; border-radius: 50%; background: radial-gradient(circle, #fff6c8 0, #ffd36a 55%, rgba(255,160,60,0) 72%); animation: sunrise 5s ease-out forwards; }
.cut.dusk .sun, .cut.hunt .sun { display: none; }
@keyframes sunrise { to { bottom: 24%; } }
.cut-title { position: relative; font-family: 'Creepster', 'Gaegu', var(--font); font-size: clamp(34px, 6vw, 72px); letter-spacing: 3px; text-shadow: 0 0 20px rgba(0,0,0,.6), 4px 4px 0 #000; min-height: 1.2em; }
.cut-title.pop { animation: titlepop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes titlepop { from { transform: scale(.6); opacity: 0; } }
.cut-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 280px; justify-content: center; }
.cut-sub { font-size: 1.5em; text-shadow: 2px 2px 0 #000; max-width: 640px; }
.cut-big { font-size: 110px; animation: titlepop .6s cubic-bezier(.2,1.5,.4,1); }
.cut-hint { position: absolute; bottom: 14px; font-size: .9em; opacity: .55; }
.cut.flash::after { content: ''; position: absolute; inset: 0; background: rgba(220,20,40,.45); animation: redflash .6s ease-out forwards; pointer-events: none; }
@keyframes redflash { to { opacity: 0; } }

.victim { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; flex-direction: column; animation: cutin .4s ease-out; }
.victim.reveal { flex-direction: row; }
.victim .vname { font-size: 2em; font-weight: 700; text-shadow: 2px 2px 0 #000; }
.victim .vcap { font-size: 1.3em; text-shadow: 2px 2px 0 #000; opacity: .95; }
.victim.reveal .vcap { display: none; }
.victim.reveal .portrait { transform: scale(.7); }
.portrait { position: relative; width: 200px; height: 200px; transition: transform .6s ease; animation: portraitin .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes portraitin { from { transform: scale(.2) rotate(-14deg); opacity: 0; } }
.portrait .avatar { width: 200px !important; height: 200px !important; border-width: 8px; }
.portrait.gray .avatar { filter: grayscale(1) brightness(.5); transition: filter .8s; }
.portrait .skull { position: absolute; inset: 0; display: grid; place-items: center; font-size: 100px; animation: titlepop .5s cubic-bezier(.2,1.5,.4,1); text-shadow: 0 0 20px #000; }
.slash { position: absolute; inset: -30px; pointer-events: none; }
.slash i { position: absolute; left: -10%; width: 120%; height: 12px; border-radius: 6px; background: linear-gradient(90deg, transparent, #ff2b3b, #fff, #ff2b3b, transparent); transform: rotate(-38deg) scaleX(0); animation: slash .3s ease-out forwards; box-shadow: 0 0 14px #ff2b3b; }
.slash i:nth-child(1) { top: 30%; } .slash i:nth-child(2) { top: 48%; animation-delay: .12s; } .slash i:nth-child(3) { top: 66%; animation-delay: .24s; }
@keyframes slash { to { transform: rotate(-38deg) scaleX(1); } }
.stamp { position: absolute; left: 50%; top: 50%; padding: 0 14px; border: 8px solid #e0243a; color: #e0243a; font-family: 'Creepster', var(--font); font-size: 64px; letter-spacing: 4px; background: rgba(0,0,0,.35); transform: translate(-50%, -50%) rotate(-14deg); animation: stampin .35s cubic-bezier(.2,1.6,.4,1); text-shadow: 0 0 12px rgba(224,36,58,.7); white-space: nowrap; }
.stamp.stamped { animation: none; z-index: 3; }
@keyframes stampin { from { transform: translate(-50%, -50%) rotate(-14deg) scale(3.2); opacity: 0; } }
.portrait .half { position: absolute; left: 0; top: 0; }
.portrait .half.hl { animation: fallL 1.3s ease-in forwards; transform-origin: 20% 100%; }
.portrait .half.hr { animation: fallR 1.3s ease-in forwards; transform-origin: 80% 100%; }
@keyframes fallL { 0% { transform: none; } 20% { transform: translate(-6px, -4px) rotate(-3deg); } 100% { transform: translate(-90px, 340px) rotate(-38deg); opacity: 0; } }
@keyframes fallR { 0% { transform: none; } 20% { transform: translate(6px, -4px) rotate(3deg); } 100% { transform: translate(90px, 360px) rotate(34deg); opacity: 0; } }
.hunterby { display: flex; align-items: center; gap: 14px; font-size: 1.4em; }
.hunterby .arrow { font-size: 1.6em; animation: arrowfly 1s ease-out infinite; }
@keyframes arrowfly { from { transform: translateX(-24px); opacity: 0; } 40% { opacity: 1; } }

.rcard { width: 210px; padding: 8px; border: 5px solid #000; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 10px 0 rgba(0,0,0,.5), 0 0 40px rgba(255,255,255,.2); animation: flipin .9s cubic-bezier(.2,1.2,.4,1) both; }
.rcard.wolf { background: #f5c9c9; box-shadow: 0 10px 0 rgba(0,0,0,.5), 0 0 50px rgba(255,40,60,.7); }
.rcard.dorp { background: #d4f0cf; box-shadow: 0 10px 0 rgba(0,0,0,.5), 0 0 50px rgba(120,255,140,.5); }
.rcard img { width: 100%; height: 252px; object-fit: cover; border: 3px solid #000; border-radius: 10px; background: #333; display: block; }
.rcard .rname { font-size: 1.5em; font-weight: 700; margin-top: 6px; }
.rcard .rteam { font-size: 1em; }
.rcard.unknown { background: #2a2a33; color: #fff; }
.rcard .rq { font-size: 130px; line-height: 1.3; font-family: 'Creepster', var(--font); }
@keyframes flipin { from { transform: perspective(700px) rotateY(95deg) scale(.8); opacity: 0; } }
.tally { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; justify-content: center; }
.tcol { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: titlepop .5s cubic-bezier(.2,1.5,.4,1) both; }
.tcol .tbar { width: 62px; background: linear-gradient(180deg, #ff8a4a, #c0301a); border: 3px solid #000; border-radius: 10px 10px 0 0; display: flex; align-items: center; justify-content: center; font-size: 1.6em; text-shadow: 2px 2px 0 #000; }
.tcol.win .tbar { background: linear-gradient(180deg, #ff5a6a, #8a0a1c); box-shadow: 0 0 24px rgba(255,60,80,.8); }
.tcol .tvoters { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 110px; }
.tcol .tname { font-weight: 700; text-shadow: 2px 2px 0 #000; }
@media (max-width: 700px) { .victim.reveal { flex-direction: column; } .victim.reveal .portrait { transform: scale(.5); margin: -30px 0; } }

.game2 .hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vleft { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.victim.reveal .hunterby { display: none; }
.portrait .ghostmark { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; animation: titlepop .5s cubic-bezier(.2,1.5,.4,1); filter: drop-shadow(0 0 16px rgba(0,0,0,.7)); }

/* Videoclips in de cutscenes */
.cut-clip { position: absolute; inset: 0; z-index: 5; background: #000; display: flex; align-items: center; justify-content: center; animation: cutin .35s ease-out; transition: opacity .4s; }
.cut-clip.out { opacity: 0; }
.cut-video { width: 100%; height: 100%; object-fit: cover; }
.cut-clipbar { position: absolute; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; background: rgba(10,10,16,.72); border: 3px solid #000; border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.5); max-width: calc(100% - 48px); }
.cut-clipbar .tname { font-size: 1.5em; font-weight: 700; text-shadow: 2px 2px 0 #000; }
.cut-clipcap { font-size: 1.15em; color: #f2efe6; text-shadow: 2px 2px 0 #000; }

.clawstrike { position: absolute; inset: 0; z-index: 6; background: rgba(150,0,16,.55); animation: redflash .9s ease-out forwards; pointer-events: none; }
.clawstrike .slash { inset: 8% 12%; }
.clawstrike .slash i { height: 26px; border-radius: 13px; }

/* Lange lijsten in de actie-popup in twee kolommen, zodat de knoppen eronder in beeld blijven */
.actpop .tlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.actpop .trow { min-width: 0; }
@media (max-width: 480px) { .actpop .tlist { grid-template-columns: 1fr; } }
