/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0D0D0D;
  --surface:   #161616;
  --border:    #2a2a2a;
  --lime:      #CCFF00;
  --pink:      #FF3CAC;
  --white:     #F0EDE8;
  --muted:     #666;
  --radius:    4px;
  --font-display: 'Clash Display', sans-serif;
  --font-body:    'Chillax', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── Noise Texture Overlay ── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--white);
}
.logo span { color: var(--lime); }

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--lime);
  border: 1px solid var(--lime);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.dot {
  width: 7px;
  height: 7px;
  background: var(--lime);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ── Main ── */
main {
  flex: 1;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

/* ── Hero ── */
.hero {
  margin-bottom: 3.5rem;
  animation: fadeUp 0.6s ease both;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Poll Options ── */
.poll-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: fadeUp 0.6s 0.15s ease both;
}

.option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  user-select: none;
  overflow: hidden;
}

.option-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lime);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.option-card:hover {
  border-color: #444;
  transform: translateX(4px);
}

.option-card:hover::before { opacity: 0.03; }

.option-card.selected {
  border-color: var(--lime);
  background: #161f00;
}

.option-card.selected::before { opacity: 0.06; }

/* Custom radio */
.radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.option-card.selected .radio-circle {
  border-color: var(--lime);
}

.radio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-card.selected .radio-dot { transform: scale(1); }

.option-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--white);
  flex: 1;
}

.option-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

/* ── Vote Button ── */
.vote-btn-wrap {
  margin-top: 2rem;
  animation: fadeUp 0.6s 0.3s ease both;
}

.vote-btn {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--lime);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
  position: relative;
  overflow: hidden;
}

.vote-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.vote-btn:not(:disabled):hover {
  background: #d9ff1a;
  transform: translateY(-2px);
}

.vote-btn:not(:disabled):active {
  transform: translateY(0);
}

/* Ripple */
.vote-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  transform: scale(0);
  animation: ripple 0.5s linear;
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ── Results ── */
.results {
  animation: fadeUp 0.5s ease both;
}

.results h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--white);
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.result-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
}

.result-label .emoji { font-size: 1.1rem; }

.result-pct {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lime);
}

.result-pct.winner { color: var(--lime); }
.result-pct.loser  { color: var(--muted); }

.bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--lime);
  width: 0%;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-fill.winner { background: var(--lime); }
.bar-fill.loser  { background: #333; }

.result-row.voted-for .result-label::after {
  content: '← your vote';
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--lime);
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.total-votes {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.reset-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.reset-btn:hover {
  color: var(--white);
  border-color: #555;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  header { padding: 1.2rem 1.25rem; }
  main   { padding: 2.5rem 1.25rem 4rem; }
  h1     { font-size: 1.8rem; }
}