/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --accent: #f472b6;
  --accent-dark: #ec4899;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #263348;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #34d399;
  --error: #f87171;
  --border: rgba(255,255,255,0.1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.15), 0 20px 40px -5px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.25);
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === HERO === */
.hero {
  position: relative;
  width: 100%;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.7) 0%, rgba(15,23,42,0.92) 100%);
  z-index: 1;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 2;
  opacity: 0.5;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.4), transparent 70%);
  top: -100px;
  right: -80px;
  animation: float 8s ease-in-out infinite;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(244,114,182,0.35), transparent 70%);
  bottom: -60px;
  left: -60px;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #fff;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8, #f472b6, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto;
}

/* === COUNTDOWN === */
.countdown-bar {
  width: 100%;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(244,114,182,0.1));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
}

.countdown-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.countdown-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.countdown-digits {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.02em;
}

.countdown-digits small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-right: 6px;
}

/* === STATUS MESSAGES === */
.status-message {
  width: 100%;
  max-width: 600px;
  text-align: center;
  padding: 80px 24px;
}

.status-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.status-message h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.status-message p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* === POLL SECTION === */
.poll-section {
  width: 100%;
  max-width: 960px;
  padding: 60px 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* === CHOICES GRID === */
.choices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .choices-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.choice-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
}

.choice-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.choice-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.25), var(--shadow);
}

.choice-card.is-selected .choice-check {
  opacity: 1;
  transform: scale(1);
}

.choice-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
  z-index: 2;
}

.choice-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  position: relative;
}

.choice-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.choice-card:hover .choice-image-wrap img {
  transform: scale(1.05);
}

.choice-info {
  padding: 20px;
}

.choice-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.choice-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* === VOTE FORM === */
.vote-form-wrapper {
  max-width: 540px;
  margin: 0 auto;
}

.selected-indicator {
  text-align: center;
  padding: 12px 20px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--primary-light);
  animation: fadeIn 0.3s ease;
}

.selected-indicator .checkmark {
  color: var(--success);
  font-weight: 700;
}

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

.vote-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-group .optional {
  font-weight: 400;
  color: var(--text-dim);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all 0.25s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  background: rgba(255,255,255,0.08);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.form-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--error);
  font-size: 0.9rem;
  text-align: center;
}

.submit-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.4);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

/* === RESULTS SECTION === */
.results-section {
  width: 100%;
  max-width: 960px;
  padding: 60px 20px 40px;
}

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

.results-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.results-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.results-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.result-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.result-card.is-user-pick {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.result-card .choice-image-wrap {
  position: relative;
}

.result-percent-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.result-percent-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.result-vote-count {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.result-bar-wrap {
  padding: 0 20px;
  margin-top: -2px;
}

.result-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.result-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s ease;
  width: 0;
}

.result-info {
  padding: 16px 20px;
}

.result-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.your-pick-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-pill);
  margin-left: 8px;
  vertical-align: middle;
}

.user-pick-message {
  text-align: center;
  padding: 12px 20px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-md);
  color: var(--primary-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.user-pick-message .checkmark {
  color: var(--success);
  font-weight: 700;
}

.total-votes {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

/* === SHARE PANEL === */
.share-panel {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
}

.share-panel h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.share-panel p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.share-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-row input {
  flex: 1;
  padding: 12px 14px;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
}

.copy-btn {
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--primary-dark);
}

.social-share-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: all 0.25s ease;
}

.share-fb { background: #1877f2; }
.share-fb:hover { background: #166fe5; }
.share-tw { background: #1d1d1b; }
.share-tw:hover { background: #333; }

/* === POWERED BY SLOT === */
#wbx-powered-by-slot {
  width: 100%;
  max-width: 960px;
  padding: 20px 20px 32px;
  text-align: center;
}

/* === RESPONSIVE === */
@media (max-width: 767px) {
  .hero {
    min-height: 45vh;
    padding: 60px 20px 48px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .section-header h2,
  .results-header h2 {
    font-size: 1.6rem;
  }
  .choice-info {
    padding: 16px;
  }
}
