:root {
  --bg: #070912;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #7c5cff;
  --accent2: #3dd6d0;
  --danger: #ff5c7a;

  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: radial-gradient(1200px 800px at 15% 10%, rgba(124, 92, 255, 0.22), transparent 55%),
              radial-gradient(900px 650px at 85% 25%, rgba(61, 214, 208, 0.16), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.brand__title { font-weight: 800; letter-spacing: 0.2px; }
.brand__subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.counter { color: var(--muted); font-variant-numeric: tabular-nums; }

.deck {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 16px;
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  /* allow scrolling if content is tall */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.slide__content {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  align-content: start;
}

.slide__header h2 {
  margin: 2px 0 2px;
  font-size: 28px;
}

.muted { color: var(--muted); margin: 0; }

.hero {
  position: relative;
  height: calc(100vh - 150px);
  max-height: 720px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(61, 214, 208, 0.18));
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.55));
}

.hero__content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  gap: 10px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin: 0;
}

.lead { margin: 0; color: var(--muted); font-size: 18px; }

.pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.86);
  font-size: 13px;
}

.hint { margin-top: 18px; color: rgba(255,255,255,0.72); font-size: 13px; }

.textCard {
  padding: 14px 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

.textCard h3 { margin: 0 0 10px; font-size: 16px; }
.textCard ul { margin: 0; padding-left: 18px; color: rgba(255,255,255,0.84); }
.textCard li { margin: 6px 0; }

.mediaStrip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.mediaItem {
  position: relative;
  flex: 0 0 78%;
  max-width: 520px;
  min-height: 220px;
  scroll-snap-align: center;
}

.mediaItem__counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.9);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}

.mediaCard {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  display: block; /* ensure block for img */
}

.mediaCard--img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

@media (min-width: 860px) {
  .mediaCard--img { height: 300px; }
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 18px;
  gap: 10px;
}

.navBtn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.navBtn:active { transform: translateY(1px); }

.navBtn--primary {
  border-color: rgba(124, 92, 255, 0.35);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.40), rgba(124, 92, 255, 0.18));
}

.dots { display: flex; gap: 6px; align-items: center; justify-content: center; flex: 1; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.16);
}
.dot.is-active { background: rgba(124, 92, 255, 0.85); }

.poll {
  display: grid;
  gap: 12px;
}

.authGate {
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.authCard h3 { margin: 0 0 6px; }

.field { display: grid; gap: 6px; margin: 10px 0; }
.field label { font-size: 12px; color: rgba(255,255,255,0.70); }
.field input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.20);
  color: var(--text);
  outline: none;
}

.otpSection { display: grid; gap: 10px; margin-top: 10px; }

#authMsg {
  margin-top: 16px;
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  text-align: center;
}

.poll__options { display: grid; gap: 10px; }

.pollBtn {
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-weight: 750;
}

.pollBtn[disabled] { opacity: 0.65; }

.poll__status {
  color: var(--muted);
  font-size: 13px;
}

.results {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

.resultRow {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  gap: 10px;
  align-items: center;
}

.resultRow__label { color: rgba(255,255,255,0.88); font-weight: 650; }
.resultRow__count { color: rgba(255,255,255,0.78); text-align: right; font-variant-numeric: tabular-nums; }

.bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}

.bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.95), rgba(61, 214, 208, 0.85));
  transition: width 260ms ease;
}

.fineprint {
  color: rgba(255,255,255,0.62);
  font-size: 12px;
}

@media (min-width: 860px) {
  .mediaCard { flex-basis: 420px; }
  .slide__header h2 { font-size: 34px; }
}
