* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #dbeafe;
  --success: #10b981;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.poll-page {
  overflow: hidden;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59,130,246,0.08), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(16,185,129,0.06), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59,130,246,0.04), transparent 70%);
  pointer-events: none;
}

#app {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 640px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 100;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.screen.exit-up {
  opacity: 0;
  transform: translateY(-20px);
}

/* ========== WELCOME ========== */
.welcome-content {
  text-align: center;
  max-width: 480px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.welcome-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.info-cards {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.info-icon {
  font-size: 1rem;
}

.privacy-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}

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

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

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-secondary);
}

.btn-submit {
  background: var(--success);
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.btn-submit:hover:not(:disabled) {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16,185,129,0.35);
}

/* ========== QUESTION ========== */
.question-content {
  width: 100%;
  max-width: 520px;
}

.question-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.question-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 6px;
}

.question-cargo {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.question-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.question-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.options::-webkit-scrollbar {
  width: 4px;
}
.options::-webkit-scrollbar-track {
  background: transparent;
}
.options::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.option-key {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.option.selected .option-key {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.option-text {
  font-size: 1rem;
  font-weight: 500;
  flex: 1;
}

.option-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  color: transparent;
  font-size: 0.7rem;
}

.option.selected .option-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.outro-field {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
}

.outro-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.outro-field input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.outro-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

/* ========== REVIEW ========== */
.review-content {
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.review-content h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.review-list {
  text-align: left;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.review-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.review-cargo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.review-choice {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* ========== DONE ========== */
.done-content {
  text-align: center;
  max-width: 400px;
}

.done-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
  animation: pop 0.4s ease;
}

.done-icon.already {
  background: #f59e0b;
  box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}

@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.done-content h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  .welcome-content h1 { font-size: 1.75rem; }
  .question-title { font-size: 1.35rem; }
  .info-cards { flex-direction: column; align-items: center; }
  .screen { padding: 1.25rem; }
  .btn { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
  .nav-buttons .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .screen, .option, .btn { transition: none; }
  .done-icon { animation: none; }
}
