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

:root {
  --bg: #0f0e17;
  --surface: #1a1926;
  --surface-light: #232136;
  --accent: #ff8906;
  --accent-glow: rgba(255, 137, 6, 0.3);
  --green: #a7f442;
  --green-glow: rgba(167, 244, 66, 0.25);
  --purple: #7f5af0;
  --purple-glow: rgba(127, 90, 240, 0.25);
  --pink: #e53170;
  --text: #fffffe;
  --text-secondary: #94a1b2;
  --text-muted: #72757e;
  --radius: 16px;
  --radius-sm: 10px;
}

body {
  font-family: 'SN Pro', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
  padding: 2rem 1.25rem;
  animation: fadeIn 0.5s ease;
}
.screen--active {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.bird-animation {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}
.bird {
  font-size: 5rem;
  animation: birdBounce 2s ease-in-out infinite;
}
.bird-sparkles {
  position: absolute;
  top: -10px;
  right: -20px;
  font-size: 2rem;
  animation: sparkleSpin 3s linear infinite;
}

@keyframes birdBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes sparkleSpin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

.title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 50px;
  font-family: 'SN Pro', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px var(--accent-glow);
}
.btn--secondary {
  background: var(--surface-light);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn--secondary:hover {
  background: #2e2c42;
  color: var(--text);
}
.btn__icon {
  font-size: 1.3rem;
}

/* ===== QUIZ ===== */
.quiz-container {
  width: 100%;
  max-width: 560px;
}

.progress {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--surface-light);
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: visible;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 16.66%;
}
.progress__text {
  position: absolute;
  top: -22px;
  right: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.question-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.question-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.question-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface-light);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'SN Pro', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.answer-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 137, 6, 0.08);
  transform: translateX(4px);
}
.answer-btn:active {
  transform: scale(0.98);
}
.answer-btn .answer-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ===== SLIDER ===== */
.slider-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.slider-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.slider-value span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: var(--surface-light);
  border-radius: 4px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.slider-submit {
  margin-top: 0.5rem;
}

/* ===== THINKING ===== */
.thinking-container {
  text-align: center;
}
.hat-animation {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}
.hat {
  font-size: 6rem;
  animation: hatWobble 1s ease-in-out infinite;
}
.hat-sparkles .sparkle {
  position: absolute;
  font-size: 1.5rem;
  animation: sparkleFloat 2s ease-in-out infinite;
}
.sparkle.s1 { top: -20px; left: -15px; animation-delay: 0s; }
.sparkle.s2 { top: -25px; right: -15px; animation-delay: 0.5s; }
.sparkle.s3 { bottom: 10px; left: -25px; animation-delay: 1s; }
.sparkle.s4 { bottom: 10px; right: -25px; animation-delay: 1.5s; }

@keyframes hatWobble {
  0%, 100% { transform: rotate(-5deg); }
  50%      { transform: rotate(5deg); }
}
@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50%      { transform: translateY(-10px) scale(1.3); opacity: 1; }
}

.thinking-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.thinking-dots span {
  font-size: 2rem;
  color: var(--accent);
  animation: dotBounce 1.4s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-8px); }
}

/* ===== RESULT ===== */
.result-container {
  text-align: center;
  max-width: 560px;
  width: 100%;
}

.result-badge {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: badgePop 0.6s ease;
}
@keyframes badgePop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.result-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.result-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  margin-bottom: 1.5rem;
  animation: cardSlideUp 0.5s ease;
}
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-course-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}
.result-course-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--accent);
}
.result-course-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.result-reasons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}
.result-reasons .reason {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.result-reasons .reason-icon {
  flex-shrink: 0;
  color: var(--green);
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .question-card { padding: 1.5rem 1rem; }
  .title { font-size: 1.8rem; }
  .bird { font-size: 3.5rem; }
}
