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

:root {
  --red: #b20323;
  --red-light: #d1284a;
  --maroon: #4a020f;
  --white: #ffffff;
  --card-radius: 28px;
  --pill-radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--red) url("assets/bg-wave.jpg") center top / cover no-repeat fixed;
  color: var(--white);
  font-family: "Nunito", system-ui, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  padding: 24px 16px 48px;
}

.wrap {
  width: 100%;
  max-width: 460px;
}

.wrap.wide { max-width: 1100px; }

.card {
  background: var(--red);
  border-radius: var(--card-radius);
  padding: 28px 24px 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

h1, h2, .heading {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 6px;
}

h1 { font-size: 1.9rem; }
h2.prefix { font-size: 1.3rem; opacity: 0.92; margin-bottom: 2px; }
h1.question { font-size: 1.7rem; margin-bottom: 22px; }

.subtitle { opacity: 0.85; margin: 0 0 20px; font-weight: 600; }

.options { display: flex; flex-direction: column; gap: 12px; }

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: var(--pill-radius);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.option-btn:hover { background: rgba(255, 255, 255, 0.26); }
.option-btn:active { transform: scale(0.99); }
.option-btn[disabled] { cursor: default; }

.option-btn .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.25);
}

.option-btn.chosen { background: var(--maroon); }
.option-btn.chosen .avatar { border-color: var(--white); }

.result-row { margin-bottom: 12px; }

.result-row .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  margin-bottom: 6px;
}

.result-row .who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-row .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.result-row.chosen .avatar { border-color: #ffe1a8; }

.bar-track {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--white);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.result-row.chosen .bar-fill { background: #ffe1a8; }

.names-list { font-size: 0.85rem; opacity: 0.85; margin: 4px 0 0; }

.btn {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  border: none;
  border-radius: var(--pill-radius);
  padding: 14px 18px;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary { background: var(--maroon); color: var(--white); width: 100%; }
.btn-primary:hover { background: #63030f; }
.btn-primary[disabled] { opacity: 0.5; cursor: default; }

.btn-secondary { background: rgba(255,255,255,0.16); color: var(--white); }
.btn-secondary:hover { background: rgba(255,255,255,0.26); }

.name-field {
  max-width: 460px;
  margin: 0 auto 20px;
}

.name-field label { display: block; font-size: 0.85rem; opacity: 0.85; margin-bottom: 6px; }

.name-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--pill-radius);
  border: none;
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  background: rgba(255,255,255,0.92);
  color: #222;
}

.footnote { text-align: center; font-size: 0.78rem; opacity: 0.75; margin-top: 18px; max-width: 700px; margin-left: auto; margin-right: auto; }

/* ---- widescreen poll layout: photos left, vote card right (mirrors the original slide) ---- */

.game-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}

.photo-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.photo-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  color: inherit;
  display: block;
  width: 100%;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card .cap {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: rgba(74, 2, 15, 0.88);
  border-radius: 999px;
  padding: 8px 6px;
  text-align: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
}

.photo-card.chosen { box-shadow: 0 0 0 4px var(--white); }
.photo-card.chosen .cap { background: var(--white); color: var(--maroon); }
.photo-card.static { cursor: default; }

.vote-panel.card { display: flex; flex-direction: column; justify-content: center; }

@media (min-width: 820px) {
  .game-layout { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .photo-panel { grid-template-rows: 1fr 1fr; }
}

/* ---- roster ("De Mannen") slides: big name ABOVE a plain photo, 4-col grid ---- */

.names-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 14px;
  margin-top: 18px;
}

@media (min-width: 640px) {
  .names-grid { grid-template-columns: repeat(4, 1fr); }
}

.names-grid .roster-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.names-grid .roster-name {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  text-align: center;
}

.names-grid .avatar {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.12);
}

/* part-1 roster slide gets the bordered title box from the original design */
.bordered-title h1 {
  display: inline-block;
  border: 2px solid var(--white);
  border-radius: 10px;
  padding: 10px 22px;
}

/* ---- intro/title slide decoration (matches the original Canva title slide) ---- */

.intro-card {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.intro-card .deco-logo {
  position: absolute;
  top: -4px;
  left: -8px;
  width: 28%;
  max-width: 150px;
  pointer-events: none;
}

.intro-card .deco-rainbow {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 42%;
  max-width: 240px;
  pointer-events: none;
}

.intro-card .intro-text {
  position: relative;
  z-index: 1;
  margin-top: 120px;
}

@media (min-width: 640px) {
  .intro-card .intro-text { max-width: 62%; }
}

.center-msg {
  text-align: center;
  padding: 30px 10px;
  opacity: 0.9;
  font-weight: 600;
}

.pulse {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--white);
  margin-right: 6px;
  animation: pulse 1.4s infinite ease-in-out;
}
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* ---- presenter-only ---- */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
}

.nav-row { display: flex; gap: 10px; margin-top: 22px; }
.nav-row .btn { flex: 1; }

.link-box {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.14);
  border-radius: var(--pill-radius);
  padding: 10px 12px;
  align-items: center;
  margin-bottom: 18px;
  font-size: 0.9rem;
  word-break: break-all;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.open { background: #2f7a3d; }
.badge.locked { background: #7a2f2f; }

.utility-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.utility-row .btn { flex: 1; min-width: 140px; }

.login-box { text-align: center; }
.login-box input { margin: 14px 0; }
