:root {
  --bg: #08111f;
  --panel: rgba(13, 23, 39, 0.9);
  --border: rgba(106, 139, 184, 0.24);
  --border-strong: rgba(56, 189, 248, 0.72);
  --text: #edf2f7;
  --muted: #94a3b8;
  --accent: #22c55e;
  --accent-2: #38bdf8;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.10), transparent 30%),
    linear-gradient(180deg, #020617, #0b1220);
  background-color: #020617;
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body {
  overflow-x: hidden;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px;
}

.poll-stage {
  max-width: 760px;
  margin: 0 auto;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-center {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

h1, h2, h3, p { margin-top: 0; }

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--border);
}

.info-box { border-color: rgba(56,189,248,.6); }

.input {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #020617;
  color: white;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease, background .18s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

button.primary {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #052e16;
}

button.dark {
  background: #334155;
  color: white;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.option-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.option-item {
  background: rgba(7, 18, 39, 0.75);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
  overflow: hidden;
}

.option-item:hover {
  border-color: rgba(56, 189, 248, 0.44);
}

.option-item.selected {
  border-color: var(--border-strong);
  background: rgba(14, 165, 233, 0.18);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.16);
}

.option-item.correct {
  border-color: rgba(34, 197, 94, 0.78);
  background: rgba(34, 197, 94, 0.14);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14);
}

.option-item.locked {
  opacity: .88;
}

.option-button,
.big-option {
  width: 100%;
  display: block;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 26px 24px;
  border-radius: 0;
  box-shadow: none;
  font-size: 18px;
  font-weight: 800;
}

.big-option.binary {
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  font-size: 22px;
}

.option-button:hover,
.big-option:hover {
  transform: none;
  filter: none;
}

.option-item.selected .option-button,
.option-item.selected .big-option {
  color: #eaf8ff;
}

.option-item.correct .option-button,
.option-item.correct .big-option {
  color: #f0fff4;
}

.binary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.poll-actions {
  margin-top: 18px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.status-pill {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.64);
}

.log {
  min-height: 180px;
  max-height: 340px;
  overflow: auto;
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  color: var(--text);
}

@media (max-width: 720px) {
  .binary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .big-option.binary {
    min-height: 120px;
    padding: 22px 16px;
    font-size: 20px;
  }
}
