:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --glow-cyan: rgba(6, 182, 212, 0.25);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.12) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Header and Footer styles are unified in politicade-shell.css */

/* Main Container */
.quiz-container {
  flex: 1;
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Progress Section */
.progress-bar-container {
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.layer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.layer-badge.federal { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.layer-badge.state { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: rgba(168, 85, 247, 0.3); }
.layer-badge.local { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }

/* Card Styling */
.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
}

.question-text {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 1.75rem;
  color: #fff;
}

/* Options */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  color: var(--text-main);
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  line-height: 1.4;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.option-btn.selected {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px var(--glow-cyan);
  color: #fff;
}

.option-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.option-btn.selected .option-indicator {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
}

.option-btn.selected .option-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
}

/* Linear Slider Question */
.linear-container {
  padding: 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.linear-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.linear-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-cyan);
  transition: transform 0.15s ease;
}

.linear-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Card Actions */
.card-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  color: #fff;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

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

/* Results View */
.results-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.archetype-title {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0.5rem 0;
}

.archetype-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.axis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.axis-stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
}

.axis-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.axis-label-high, .axis-label-low {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.axis-label-low { color: var(--accent-purple); }
.axis-label-high { color: var(--accent-cyan); }

.axis-meter {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  height: 8px;
  border-radius: 4px;
  margin: 0.75rem 0;
}

.axis-meter-pointer {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent-cyan);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.axis-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Results Share Card & Social Share Buttons
   ========================================================================== */
.quiz-share-card {
  border-color: rgba(6, 182, 212, 0.3);
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.08), transparent 70%), var(--bg-card);
  padding: 1.75rem 2rem;
}

.share-card-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.35rem;
}

.share-card-icon {
  font-size: 2.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.share-buttons-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn-social svg {
  flex-shrink: 0;
}

.btn-x {
  background: #000;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-x:hover {
  background: #111;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-facebook {
  background: #1877f2;
  color: #fff;
}
.btn-facebook:hover {
  background: #166fe5;
  transform: translateY(-2px);
}

.btn-linkedin {
  background: #0a66c2;
  color: #fff;
}
.btn-linkedin:hover {
  background: #095196;
  transform: translateY(-2px);
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
}
.btn-instagram:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-copy:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.results-permalink-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.permalink-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.permalink-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.permalink-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
  outline: none;
  min-width: 0;
}

.permalink-input:focus {
  border-color: var(--accent-cyan);
}

.btn-copy-permalink {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 6px;
  padding: 0.55rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn-copy-permalink:hover {
  background: var(--accent-cyan);
  color: #080c14;
  box-shadow: 0 0 12px var(--glow-cyan);
}

.share-toast {
  width: 100%;
  font-size: 0.8rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  text-align: center;
  margin-top: 0.75rem;
}

/* Mobile Screen Adaptations */
@media (max-width: 768px) {
  .quiz-container {
    padding: 1.5rem 1rem 2.5rem;
  }
  .quiz-card {
    padding: 1.5rem 1.25rem;
    border-radius: 14px;
  }
  .question-text {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
  }
  .option-btn {
    padding: 0.95rem 1.1rem;
    font-size: 0.95rem;
  }
  .results-header .archetype-title {
    font-size: 1.85rem;
  }
}

@media (max-width: 480px) {
  .quiz-container {
    padding: 1rem 0.75rem 2rem;
  }
  .quiz-card {
    padding: 1.25rem 0.95rem;
  }
  .question-text {
    font-size: 1.05rem;
    line-height: 1.4;
  }
  .option-btn {
    padding: 0.85rem 0.9rem;
    gap: 0.75rem;
    font-size: 0.9rem;
  }
  .card-nav {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
  .card-nav .btn-secondary,
  .card-nav .btn-primary {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .results-header .archetype-title {
    font-size: 1.55rem;
  }
  .archetype-tagline {
    font-size: 0.92rem;
  }
  .axis-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
