/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --highlight: #f59e0b;
  --success: #22c55e;
  --error: #ef4444;
  --border: #334155;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
.hidden { display: none !important; }

/* ===== App Layout ===== */
.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.header { text-align: center; padding: 32px 0 16px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}
.logo:hover { text-decoration: none; }

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
}
.logo-icon svg { width: 40px; height: 40px; }

.logo h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tagline {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  gap: 6px;
  flex-wrap: wrap;
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  transition: all 0.2s;
  background: transparent;
  border: 1px solid transparent;
  letter-spacing: 0.2px;
}
.nav a:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-color: var(--border);
  text-decoration: none;
}
.nav a.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.header-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

/* ===== Streak Display ===== */
.streak-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-icon { width: 24px; height: 24px; }
.streak-icon svg { width: 24px; height: 24px; }

.streak-icon.streak-active { animation: pulse 2s ease-in-out infinite; }

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

.streak-info { display: flex; align-items: baseline; gap: 4px; }

.streak-count {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--highlight);
}

.streak-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.streak-best {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ===== Main Content ===== */
.main { flex: 1; padding: 24px 0; }

/* ===== Loading ===== */
.loading { text-align: center; padding: 60px 0; color: var(--text-secondary); }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Question Section ===== */
.question-section { text-align: center; }

.date-badge-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  color: var(--highlight);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  user-select: none;
}
.date-badge:hover { background: var(--bg-hover); transform: scale(1.03); }
.date-badge .date-chevron {
  font-size: 10px;
  transition: transform 0.2s;
  color: var(--text-muted);
}
.date-badge.open .date-chevron { transform: rotate(180deg); }

/* Calendar Dropdown */
.date-calendar {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 300px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.date-calendar.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cal-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}
.cal-nav {
  display: flex;
  gap: 4px;
}
.cal-nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s;
}
.cal-nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
  text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: default;
  position: relative;
}
.cal-day.has-debate {
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
}
.cal-day.has-debate:hover {
  background: var(--accent);
  color: white;
}
.cal-day.today {
  color: var(--highlight);
  font-weight: 700;
}
.cal-day.today::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--highlight);
}
.cal-day.other-month { opacity: 0.3; }

.date-icon { width: 14px; height: 14px; display: inline-flex; }
.date-icon svg { width: 14px; height: 14px; color: var(--highlight); }

.question-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
  animation: questionReveal 0.5s ease-out;
}

@keyframes questionReveal {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.vote-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.vote-icon { width: 16px; height: 16px; display: inline-flex; }
.vote-icon svg { width: 16px; height: 16px; color: var(--text-muted); }

/* ===== Input Section ===== */
.input-section { margin-bottom: 24px; }

.slider-container { padding: 0 8px; }

.slider-labels {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  transition: transform 0.15s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.slider-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 16px;
}

/* Choice Buttons */
.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.choice-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  padding: 16px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.choice-btn:hover { border-color: var(--accent); background: var(--bg-hover); }
.choice-btn.selected {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* ===== Submit Button ===== */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  padding: 16px 48px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 200px;
}
.submit-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.15);
}
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Reveal Overlay ===== */
.reveal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
}
.reveal-overlay.show { opacity: 1; transform: scale(1); }
.reveal-overlay.fade-out { opacity: 0; transform: scale(1.05); }

.reveal-content { text-align: center; }

.reveal-lock {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--success);
  animation: scaleIn 0.3s ease;
}
.reveal-lock svg { width: 48px; height: 48px; }

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.reveal-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.reveal-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 8px;
  animation: spin 0.6s linear infinite;
}

.reveal-subtext {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Results Section ===== */
.results-section { animation: fadeInUp 0.5s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-header { text-align: center; margin-bottom: 24px; }

/* Reaction (majority/minority) */
.reaction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.reaction-icon { width: 28px; height: 28px; display: flex; }
.reaction-icon svg { width: 28px; height: 28px; }

.reaction h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.reaction-majority { color: var(--accent); }
.reaction-majority .reaction-icon { color: var(--accent); }

.reaction-minority { color: var(--highlight); }
.reaction-minority .reaction-icon { color: var(--highlight); }

.fun-fact { color: var(--highlight); font-size: 14px; font-weight: 500; }

/* YOU tag in choice charts */
.you-tag {
  display: inline-block;
  background: var(--highlight);
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Chart */
.chart-container {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  overflow: hidden;
}

.chart-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

.chart-label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 60px;
  text-align: right;
  white-space: nowrap;
}

.chart-bar-wrapper {
  flex: 1;
  height: 28px;
  background: var(--bg-primary);
  border-radius: 6px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}
.chart-bar.user-bar { background: var(--highlight); }

.chart-bar-count { font-size: 12px; color: var(--text-secondary); min-width: 36px; text-align: left; }

/* Choice chart */
.choice-chart-row { margin-bottom: 16px; }

.choice-chart-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.choice-chart-label span:first-child { font-weight: 600; color: var(--text-primary); }
.choice-chart-label .choice-percent { color: var(--text-secondary); }

.choice-bar-wrapper { height: 36px; background: var(--bg-primary); border-radius: 8px; overflow: hidden; }

.choice-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: white;
}
.choice-bar.user-choice { background: var(--highlight); }
.choice-bar.other-choice { background: var(--accent); }

/* Stats Row */
.stats-row { display: flex; gap: 12px; margin-bottom: 24px; }

.stat-card {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== Results Streak ===== */
.results-streak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  color: var(--highlight);
  font-weight: 600;
  font-size: 15px;
}

.results-streak-icon { width: 22px; height: 22px; display: flex; }
.results-streak-icon svg { width: 22px; height: 22px; }

/* ===== Countdown Timer ===== */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  margin-top: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.countdown-icon { width: 20px; height: 20px; color: var(--text-muted); }
.countdown-icon svg { width: 20px; height: 20px; }

.countdown-text { display: flex; flex-direction: column; align-items: center; }

.countdown-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.countdown-time {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
}

/* ===== Milestone Overlay ===== */
.milestone-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.milestone-overlay.show { opacity: 1; }

.milestone-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: var(--shadow);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.milestone-icon { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--highlight); }
.milestone-icon svg { width: 48px; height: 48px; }

.milestone-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--highlight);
  margin-bottom: 8px;
}

.milestone-text { color: var(--text-secondary); font-size: 15px; margin-bottom: 20px; }

.milestone-reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 20px;
}

.milestone-shield { width: 20px; height: 20px; display: inline-flex; }
.milestone-shield svg { width: 20px; height: 20px; }

.milestone-dismiss {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 32px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.milestone-dismiss:hover { background: var(--accent-hover); }

/* ===== Share Section ===== */
.share-section {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.share-section h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 16px;
}

/* Share visual block */
.share-visual { margin-bottom: 16px; }

/* Bold Take Card */
.bold-take-card {
  background: linear-gradient(135deg, #0a1122, #0f172a, #131c33);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius);
  padding: 24px 28px;
  border-top: 3px solid;
  border-image: linear-gradient(to right, #3b82f6, #8b5cf6) 1;
}
.btc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.btc-label { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 2px; }
.btc-url { font-size: 11px; color: var(--text-muted); }
.btc-answer {
  font-family: var(--font-display); font-size: 42px; font-weight: 800;
  color: #ffffff; text-align: center; margin-bottom: 8px; line-height: 1.1;
}
.btc-question {
  font-size: 14px; color: var(--text-secondary); text-align: center;
  margin-bottom: 20px; line-height: 1.4;
}
.btc-stats {
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.btc-stat { display: flex; flex-direction: column; gap: 2px; }
.btc-pct { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--text-secondary); }
.btc-pct.btc-blue { color: #3b82f6; }
.btc-stat-label { font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: 1px; }
.btc-cta { font-size: 16px; font-weight: 700; color: #3b82f6; margin-left: auto; align-self: center; text-decoration: none; transition: opacity 0.2s; }
.btc-cta:hover { opacity: 0.8; text-decoration: underline; }

@media (max-width: 480px) {
  .btc-answer { font-size: 32px; }
  .btc-pct { font-size: 26px; }
  .btc-cta { font-size: 14px; margin-left: 0; margin-top: 8px; width: 100%; text-align: right; }
}

.share-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  text-align: left;
  margin: 0;
}

/* Social share grid — uniform buttons */
.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn i { font-size: 18px; }

.share-btn-dark {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.share-btn-dark:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

/* Utility row — smaller, muted */
.share-utils {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-util-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.share-util-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* Already Voted */
.already-voted {
  text-align: center;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 16px;
}

/* ===== Yesterday's Debate ===== */
.yesterday-section {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.yesterday-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
  transition: color 0.2s;
}
.yesterday-toggle:hover { color: var(--text-primary); }

.yesterday-chevron { width: 20px; height: 20px; display: flex; transition: transform 0.3s; }
.yesterday-chevron svg { width: 20px; height: 20px; }
.yesterday-toggle.open .yesterday-chevron { transform: rotate(180deg); }

.yesterday-content h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 12px;
}

#yesterday-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Page Title ===== */
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

/* ===== Archive ===== */
.archive-list { display: flex; flex-direction: column; gap: 12px; }

.archive-card {
  display: block;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid transparent;
}
.archive-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.15);
  text-decoration: none;
}

.archive-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.archive-date { font-size: 12px; color: var(--highlight); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.archive-type { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }

.archive-question {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.archive-votes { font-size: 13px; color: var(--text-muted); }

/* ===== About Page ===== */
.about-content { max-width: 520px; margin: 0 auto; text-align: center; }
.about-section { margin-bottom: 36px; }
.about-section h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.about-section p { color: var(--text-secondary); line-height: 1.7; }

.how-it-works { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.step { display: flex; gap: 16px; align-items: flex-start; }

.step-number {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.step-text strong { display: block; margin-bottom: 2px; }
.step-text p { font-size: 14px; }

.suggest-form { margin-top: 16px; }
.suggest-form textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 16px;
  resize: vertical;
  margin-bottom: 12px;
}
.suggest-form textarea:focus { outline: none; border-color: var(--accent); }
.suggest-btn { padding: 12px 24px; font-size: 14px; }

.suggest-success {
  background: var(--bg-secondary);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  color: var(--success);
  padding: 16px;
  text-align: center;
  font-weight: 500;
}

/* ===== Results Disclosure ===== */
.results-disclosure {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0.7;
}
.results-disclosure i { font-size: 14px; }

/* ===== Footer ===== */
.footer { text-align: center; padding: 20px 0 24px; border-top: 1px solid rgba(51, 65, 85, 0.5); margin-top: auto; }
.footer p { font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; justify-content: center; }
.footer-links a { font-size: 13px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text-primary); }

.app-download {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.app-download-title {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.app-download-title i {
  font-size: 22px;
  color: var(--accent);
}

.app-download-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.app-store-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.store-btn:hover {
  text-decoration: none;
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.store-btn-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-btn-kicker {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1;
}

.store-btn-name {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.store-btn-apple .store-btn-logo {
  color: var(--text-primary);
}

.store-btn-google .store-btn-logo {
  color: var(--accent);
}

/* ===== Error ===== */
.error { color: var(--error); text-align: center; padding: 24px; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
  z-index: 1000;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast { pointer-events: none; }

.account-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.account-btn:hover { border-color: var(--accent); background: var(--bg-hover); }
.account-btn.logged-in { border-color: var(--success); background: rgba(34, 197, 94, 0.1); }

.account-icon { width: 18px; height: 18px; display: flex; color: var(--text-secondary); }
.account-icon svg { width: 18px; height: 18px; }
.account-btn.logged-in .account-icon { color: var(--success); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }

/* Auth forms */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }

.auth-tab {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active { background: var(--accent); color: white; border-color: var(--accent); font-weight: 700; }

.auth-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; text-align: center; }

.auth-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.auth-input:focus { outline: none; border-color: var(--accent); }

.auth-submit { width: 100%; margin-top: 4px; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-error {
  color: var(--error);
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}

.auth-perks {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.auth-perks-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.auth-perks ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.auth-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.perk-icon { width: 20px; height: 20px; display: flex; flex-shrink: 0; }
.perk-icon svg { width: 20px; height: 20px; }

/* Profile view */
.profile-header { text-align: center; margin-bottom: 20px; }

.profile-avatar {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.profile-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.profile-email { color: var(--text-muted); font-size: 13px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.profile-stat {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.profile-stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.profile-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.profile-history h4 {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.profile-vote-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.profile-vote-question {
  color: var(--text-primary); flex: 1; margin-right: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-vote-answer { color: var(--highlight); font-weight: 600; white-space: nowrap; }

/* ===== Icon Utilities ===== */
.icon-gray { color: #475569 !important; }

.ti { vertical-align: middle; }

/* Logo icon styling */
.logo-icon .ti { font-size: 28px; color: var(--accent); }

/* ===== Social Auth ===== */
.social-auth { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.social-auth #google-signin-btn { display: flex; justify-content: center; }

.apple-sign-in-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 10px 24px;
  background: #000;
  color: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s;
}
.apple-sign-in-button:hover { background: #1a1a1a; }

.google-fallback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 10px 24px;
  background: #131314;
  color: #e3e3e3;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s;
}
.google-fallback-btn:hover { background: #1a1a1a; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== Scrollbar ===== */
.modal-card::-webkit-scrollbar { width: 6px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.modal-card { scrollbar-gutter: stable; }

/* ===== Responsive ===== */

/* Small phones */
@media (max-width: 380px) {
  .app { padding: 0 12px; }
  .header { padding: 20px 0 12px; }
  .logo h1 { font-size: 22px; }
  .nav { gap: 14px; }
  .nav a { font-size: 13px; }
  .question-text { font-size: 22px; }
  .slider-value { font-size: 36px; }
  .submit-btn { min-width: unset; width: 100%; padding: 14px 20px; font-size: 16px; }
  .modal-card { padding: 20px; width: 95%; }
  .share-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-label { min-width: 40px; font-size: 11px; }
  .chart-container { padding: 16px; }
  .countdown-time { font-size: 18px; letter-spacing: 1px; }
  .profile-stats { grid-template-columns: 1fr; }
  .milestone-card { padding: 28px 20px; }
  .stats-row { flex-wrap: wrap; }
  .stat-card { min-width: calc(50% - 8px); }
}

/* Mobile */
@media (max-width: 640px) {
  .question-text { font-size: 24px; }
  .slider-value { font-size: 40px; }
  .submit-btn { min-width: unset; width: 100%; }
  .share-grid { grid-template-columns: repeat(2, 1fr); }
  .results-streak { padding: 14px; font-size: 14px; margin: 16px 0; }
  .date-calendar { min-width: 280px; }
  .app-store-grid { flex-direction: column; align-items: stretch; }
}

/* Tablet+ */
@media (min-width: 500px) {
  .choice-grid { flex-direction: row; flex-wrap: wrap; }
  .choice-btn { flex: 1; min-width: 140px; }
}

/* Desktop */
@media (min-width: 768px) {
  .question-text { font-size: 36px; }
  .slider-value { font-size: 56px; }
  .share-grid { grid-template-columns: repeat(3, 1fr); }
}
