﻿:root {
  --bg-color: #0a0f1a;
  --card-bg: rgba(17, 24, 39, 0.9);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --growth-gradient: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
  --button-border: #334155;
  --button-hover-bg: rgba(245, 158, 11, 0.12);
  --modal-bg: rgba(10, 15, 26, 0.92);
  --card-border: rgba(245, 158, 11, 0.15);
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.hero-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.06;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg-color) 0%, transparent 25%, transparent 75%, var(--bg-color) 100%);
}

.container {
  width: 100%; max-width: 550px; margin: 0 auto; padding: 20px; flex: 1;
  display: flex; flex-direction: column; position: relative; z-index: 1;
}

/* Logo */
.logo-wrapper { display: flex; justify-content: center; margin-bottom: 15px; margin-top: 10px; }
.logo-circle {
  width: 80px; height: 80px;
  background: rgba(30, 41, 59, 0.8); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
  position: relative;
}
.logo-circle::after {
  content: ""; position: absolute; top: -4px; left: -4px; right: -4px; bottom: -4px;
  border-radius: 50%; border: 1.5px solid var(--accent-color); opacity: 0;
  animation: ripple 2s infinite;
}
.chart-icon { width: 45px; height: 45px; }

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Header */
header { text-align: center; margin-bottom: 25px; }
h1 { font-size: 2.2rem; line-height: 1.2; font-weight: 700; }
.highlight-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.sub-text { color: var(--text-muted); font-size: 0.95rem; margin-top: 10px; }

/* Quiz Card */
.quiz-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 30px; border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--card-border);
  position: relative; overflow: hidden; min-height: 420px;
}
.quiz-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
}

.progress-container {
  width: 100%; background-color: #1e293b; height: 6px; border-radius: 3px;
  margin-bottom: 25px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: var(--accent-gradient); border-radius: 3px; width: 33%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); position: relative;
}
.progress-bar::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25));
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.question-meta {
  color: var(--accent-color); font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 1px; font-weight: 700; margin-bottom: 10px;
}
.question-text {
  font-size: 1.3rem; font-weight: 600; margin-bottom: 25px;
  min-height: 64px; line-height: 1.4;
}

/* Options */
.options-grid { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid var(--button-border);
  color: var(--text-main); padding: 16px 20px; border-radius: 14px;
  text-align: left; cursor: pointer; font-size: 1rem; font-weight: 500;
  display: flex; align-items: center;
  transition: all 0.25s ease; touch-action: manipulation;
}
.option-btn:hover {
  border-color: var(--accent-color);
  background-color: var(--button-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.1);
}
.option-btn:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.option-btn.selected {
  background: var(--accent-gradient); border-color: transparent;
  color: white; transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.3);
}

.option-circle {
  height: 24px; width: 24px; border: 2px solid #475569; border-radius: 50%;
  margin-right: 15px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
.option-btn:hover .option-circle { border-color: var(--accent-color); }
.option-btn.selected .option-circle {
  border-color: white; background-color: white;
}
.option-btn.selected .option-circle::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-color);
}

.fade-wrapper { opacity: 1; transition: opacity 0.3s ease; }
.fade-out { opacity: 0; }

/* Footer */
footer {
  margin-top: auto; border-top: 1px solid rgba(51, 65, 85, 0.6);
  padding-top: 20px; padding-bottom: 60px;
  font-size: 0.7rem; color: #64748b; text-align: center;
}
footer a { color: #94a3b8; text-decoration: none; }

.links {
  position: fixed; bottom: 16px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 16px; font-size: 0.875rem;
}
.links a { color: #6b7280; text-decoration: none; transition: color 0.2s; }
.links a:hover { color: #f59e0b; }
.links a:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--modal-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  z-index: 100; display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  width: 90%; max-width: 400px; padding: 40px 30px; border-radius: 24px;
  text-align: center; border: 1px solid rgba(245, 158, 11, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

.spinner {
  width: 50px; height: 50px;
  border: 3px solid rgba(245, 158, 11, 0.15);
  border-top-color: var(--accent-color);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--growth-gradient); display: none;
  align-items: center; justify-content: center; margin: 0 auto 20px;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}
.modal-check svg { width: 32px; height: 32px; stroke: white; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.modal-check.visible { display: flex; animation: checkPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes checkPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.modal-title { font-size: 1.5rem; margin-bottom: 10px; color: white; display: flex; align-items: center; justify-content: center; gap: 10px; }
.modal-title-icon { width: 28px; height: 28px; flex-shrink: 0; }
.modal-text { color: var(--text-muted); margin-bottom: 25px; line-height: 1.6; }

.cta-button {
  display: block; width: 100%;
  background: var(--growth-gradient); color: white; font-weight: 700;
  padding: 16px; border-radius: 12px; border: none; font-size: 1.1rem;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  opacity: 0.5; pointer-events: none;
}
.cta-button.ready { opacity: 1; pointer-events: all; }
.cta-button.ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.4);
}
.cta-button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}