/* ===================================================
   오정국 변호사 음주운전 처벌 수위 판례 분석 시스템
   Design System & Styles
   =================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Primary Palette */
  --navy-900: #0a1628;
  --navy-800: #0f1f3d;
  --navy-700: #152a4e;
  --navy-600: #1b3a6b;
  --navy-500: #234d8a;
  --navy-400: #3268ad;
  --navy-300: #4a83c9;
  --navy-200: #7eaadf;
  --navy-100: #b8d2f0;
  --navy-50: #e4eef9;

  /* Accent / Warning */
  --crimson-700: #8b1a2b;
  --crimson-600: #a82039;
  --crimson-500: #c62842;
  --crimson-400: #dc3545;
  --crimson-300: #e66070;
  --crimson-200: #f0a0aa;
  --crimson-100: #fbe0e4;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8f9fc;
  --gray-100: #f0f2f7;
  --gray-200: #e2e6ee;
  --gray-300: #c8cdd8;
  --gray-400: #99a1b3;
  --gray-500: #6b7489;
  --gray-600: #4a5264;
  --gray-700: #2d3344;
  --gray-800: #1a1f2e;

  /* Semantic */
  --danger: #dc3545;
  --warning: #f0ad4e;
  --success: #22c55e;
  --info: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08);
  --shadow-md: 0 4px 16px rgba(10, 22, 40, 0.10);
  --shadow-lg: 0 8px 32px rgba(10, 22, 40, 0.14);
  --shadow-xl: 0 16px 48px rgba(10, 22, 40, 0.18);
  --shadow-glow-navy: 0 0 40px rgba(35, 77, 138, 0.25);
  --shadow-glow-crimson: 0 0 40px rgba(198, 40, 66, 0.2);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Spacing */
  --container-max: 660px;
}

/* ==========================================
   HERO / INTRO SECTION
   ========================================== */

.hero-section {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  animation: fadeInUp 0.8s var(--ease-out-expo);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 100px;
  padding: 8px 20px;
  margin-bottom: 28px;
  animation: fadeInDown 0.6s var(--ease-out-expo);
}

.hero-badge span:first-child {
  font-size: 18px;
}

.hero-badge span:last-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-600);
  letter-spacing: 0.5px;
}

/* Hero Headline */
.hero-headline {
  text-align: center;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  font-weight: 900;
  color: var(--navy-800);
  line-height: 1.35;
  margin-bottom: 20px;
  animation: fadeInDown 0.6s 0.1s var(--ease-out-expo) both;
}

.hero-accent {
  background: linear-gradient(135deg, var(--crimson-600), var(--crimson-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Quote */
.hero-quote {
  text-align: center;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: var(--gray-600);
  line-height: 1.8;
  font-weight: 400;
  max-width: 540px;
  margin-bottom: 36px;
  animation: fadeInDown 0.6s 0.2s var(--ease-out-expo) both;
}

.hero-quote strong {
  color: var(--navy-700);
  font-weight: 700;
}

/* Divider */
.hero-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-400), var(--crimson-400));
  border-radius: 3px;
  margin-bottom: 40px;
  animation: fadeInDown 0.6s 0.25s var(--ease-out-expo) both;
}

/* Promise Blocks */
.hero-promise {
  display: flex;
  gap: 20px;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  padding: 28px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out-expo);
  animation: fadeInUp 0.6s 0.3s var(--ease-out-expo) both;
}

.hero-promise:nth-child(6) { animation-delay: 0.35s; }
.hero-promise:nth-child(8) { animation-delay: 0.4s; }

.hero-promise:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--navy-100);
}

.promise-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-700));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
}

.promise-content {
  flex: 1;
}

.promise-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 10px;
  line-height: 1.45;
}

.promise-desc {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 8px;
}

.promise-desc strong {
  color: var(--navy-700);
}

.promise-desc:last-child {
  margin-bottom: 0;
}

.promise-highlight {
  background: linear-gradient(90deg, var(--navy-50), transparent);
  border-left: 3px solid var(--navy-400);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  margin-top: 12px;
}

/* Checklist */
.promise-checklist {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promise-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.65;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: 12px;
  border: 1px solid var(--gray-100);
}

.promise-checklist li strong {
  color: var(--navy-700);
}

.check-icon {
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 1px;
}

/* Closing Quote */
.hero-closing {
  width: 100%;
  text-align: center;
  margin: 28px 0 24px;
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  border-radius: 16px;
  animation: fadeInUp 0.6s 0.45s var(--ease-out-expo) both;
}

.hero-closing p {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  font-style: italic;
}

/* Video Note */
.hero-video-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s 0.5s var(--ease-out-expo) both;
}

.video-icon {
  flex-shrink: 0;
  font-size: 22px;
  margin-top: 2px;
}

.hero-video-note p {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.65;
}

/* CTA Button */
.hero-cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--crimson-600), var(--crimson-500));
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s 0.55s var(--ease-out-expo) both;
  transition: all 0.4s var(--ease-out-expo);
}

.hero-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(198, 40, 66, 0.3);
}

.hero-cta-btn:active {
  transform: translateY(0);
}

.cta-pulse {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 2px solid var(--crimson-400);
  animation: ctaPulse 2s ease-out infinite;
}

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

.cta-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.cta-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.cta-label {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
}

.cta-label strong {
  font-size: 1rem;
  color: var(--white);
  font-weight: 700;
}

.cta-label small {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.cta-arrow {
  font-size: 1.3rem;
  color: var(--white);
  transition: transform 0.3s var(--ease-out-expo);
  flex-shrink: 0;
}

.hero-cta-btn:hover .cta-arrow {
  transform: translateX(6px);
}

/* Hero Footer */
.hero-footer {
  text-align: center;
}

.hero-footer p {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* Hero Section Hidden */
.hero-section.hidden {
  display: none;
}

/* Hero responsive */
@media (max-width: 600px) {
  .hero-section {
    padding: 32px 16px 32px;
  }

  .hero-promise {
    flex-direction: column;
    gap: 14px;
    padding: 22px 18px;
  }

  .promise-number {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .hero-closing p {
    font-size: 0.85rem;
  }

  .cta-content {
    padding: 16px 20px;
  }

  .cta-label strong {
    font-size: 0.92rem;
  }
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--gray-700);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Background Particles ---------- */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  animation: floatParticle 20s infinite ease-in-out;
}

.p1 { width: 400px; height: 400px; background: var(--navy-100); top: -10%; left: -5%; animation-delay: 0s; }
.p2 { width: 300px; height: 300px; background: var(--crimson-200); bottom: 10%; right: -8%; animation-delay: -5s; animation-duration: 25s; }
.p3 { width: 200px; height: 200px; background: var(--navy-100); top: 50%; left: 60%; animation-delay: -10s; animation-duration: 18s; }
.p4 { width: 350px; height: 350px; background: var(--navy-200); bottom: -5%; left: 30%; animation-delay: -7s; animation-duration: 22s; }
.p5 { width: 150px; height: 150px; background: var(--crimson-100); top: 20%; right: 20%; animation-delay: -3s; animation-duration: 16s; }

@keyframes floatParticle {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 35px) scale(1.02); }
}

/* ---------- Main Container ---------- */
.main-container {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* ---------- Header ---------- */
.page-header {
  text-align: center;
  margin-bottom: 32px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 100px;
  padding: 6px 18px;
  margin-bottom: 20px;
  animation: fadeInDown 0.6s var(--ease-out-expo);
}

.badge-icon { font-size: 16px; }
.badge-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-500);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.main-title {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1.35;
  margin-bottom: 14px;
  animation: fadeInDown 0.6s 0.1s var(--ease-out-expo) both;
}

.title-accent {
  background: linear-gradient(135deg, var(--crimson-600), var(--crimson-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-title {
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  color: var(--gray-500);
  font-weight: 400;
  line-height: 1.7;
  animation: fadeInDown 0.6s 0.2s var(--ease-out-expo) both;
}

/* ---------- Progress Bar ---------- */
.progress-wrapper {
  margin-bottom: 28px;
  animation: fadeInDown 0.6s 0.3s var(--ease-out-expo) both;
}

.progress-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-400), var(--crimson-400));
  border-radius: 4px;
  transition: width 0.5s var(--ease-out-expo);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  transition: all 0.4s var(--ease-out-expo);
}

.step-dot span {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  transition: color 0.4s var(--ease-out-expo);
}

.progress-step.active .step-dot {
  background: var(--navy-500);
  border-color: var(--navy-400);
  box-shadow: 0 0 16px rgba(35, 77, 138, 0.25);
}

.progress-step.active .step-dot span {
  color: var(--white);
}

.progress-step.completed .step-dot {
  background: var(--success);
  border-color: var(--success);
}

.progress-step.completed .step-dot span {
  color: var(--white);
}

.step-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.4s var(--ease-out-expo);
}

.progress-step.active .step-label {
  color: var(--navy-600);
  font-weight: 600;
}

.progress-step.completed .step-label {
  color: var(--gray-600);
}

/* ---------- Card Container ---------- */
.card-container {
  position: relative;
  min-height: 460px;
  animation: fadeInUp 0.6s 0.35s var(--ease-out-expo) both;
}

/* ---------- Step Card ---------- */
.step-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  opacity: 0;
  visibility: hidden;
  transform: translateX(60px) scale(0.96);
  transition: all 0.5s var(--ease-out-expo);
}

.step-card.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  position: relative;
}

.step-card.exit-left {
  transform: translateX(-60px) scale(0.96);
  opacity: 0;
}

/* Step Header */
.step-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.step-number {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy-400);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.step-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ---------- Question Group ---------- */
.question-group {
  border: none;
  margin-bottom: 24px;
}

.question-group:last-of-type {
  margin-bottom: 0;
}

.q-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
}

.q-multi-hint {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 100px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--navy-500);
  letter-spacing: 0.3px;
  margin-left: 2px;
}

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--navy-50);
  color: var(--navy-500);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Radio Grid (Card style) ---------- */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.radio-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.radio-card {
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: 14px;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  transition: all 0.3s var(--ease-out-expo);
  text-align: center;
}

.radio-body:hover {
  border-color: var(--navy-300);
  background: var(--navy-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.radio-card input:checked + .radio-body {
  border-color: var(--navy-500);
  background: linear-gradient(135deg, var(--navy-50), #e8f0fb);
  box-shadow: 0 4px 16px rgba(35, 77, 138, 0.15);
  transform: translateY(-2px);
}

.radio-icon {
  font-size: 24px;
}

.radio-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.3;
}

.radio-text small {
  font-weight: 400;
  color: var(--gray-500);
}

/* ---------- Radio Row (Pill style) ---------- */
.radio-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-pill {
  cursor: pointer;
  flex: 1;
  min-width: 100px;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.3s var(--ease-out-expo);
  text-align: center;
}

.radio-pill span:hover {
  border-color: var(--navy-300);
  background: var(--navy-50);
  color: var(--navy-600);
  transform: translateY(-1px);
}

.radio-pill input:checked + span {
  border-color: var(--navy-500);
  background: var(--navy-500);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(35, 77, 138, 0.25);
  transform: translateY(-1px);
}

/* ---------- Select / Dropdown ---------- */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  appearance: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px rgba(35, 77, 138, 0.12);
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
  pointer-events: none;
}

/* ---------- Text Inputs ---------- */
.input-group {
  display: flex;
  gap: 14px;
}

.input-field {
  flex: 1;
}

.input-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.input-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.3s var(--ease-out-expo);
}

.input-field input::placeholder {
  color: var(--gray-400);
}

.input-field input:focus {
  outline: none;
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px rgba(35, 77, 138, 0.12);
  background: var(--white);
}

/* ---------- Submit Button ---------- */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
  padding: 18px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-700));
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--crimson-600), var(--crimson-500));
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-expo);
}

.submit-btn:hover::before {
  opacity: 1;
}

.submit-btn > * {
  position: relative;
  z-index: 1;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow-crimson);
}

.submit-btn:active {
  transform: translateY(0);
}

.btn-icon { font-size: 1.2rem; }
.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease-out-expo);
}
.submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ---------- Navigation Buttons ---------- */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  animation: fadeInUp 0.6s 0.4s var(--ease-out-expo) both;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.prev-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
}

.prev-btn:hover:not(:disabled) {
  background: var(--gray-200);
  color: var(--navy-700);
  transform: translateX(-2px);
}

.next-btn {
  background: var(--navy-500);
  color: var(--white);
  margin-left: auto;
}

.next-btn:hover:not(:disabled) {
  background: var(--navy-400);
  transform: translateX(2px);
  box-shadow: 0 4px 20px rgba(35, 77, 138, 0.35);
}

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

.nav-buttons.hidden {
  display: none;
}

/* ---------- Footer ---------- */
.page-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.page-footer p {
  font-size: 0.75rem;
  color: var(--gray-400);
  line-height: 1.8;
}

/* ---------- Loading Overlay ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--navy-300);
  position: absolute;
  animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(1) { width: 50px; height: 50px; animation-duration: 1.2s; border-top-color: var(--navy-300); }
.spinner-ring:nth-child(2) { width: 40px; height: 40px; animation-duration: 0.9s; border-top-color: var(--crimson-400); animation-direction: reverse; }
.spinner-ring:nth-child(3) { width: 30px; height: 30px; animation-duration: 0.6s; border-top-color: var(--navy-200); }

.loading-spinner {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-text {
  position: absolute;
  top: 80px;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  text-align: center;
}

.loading-sub {
  position: absolute;
  top: 108px;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--gray-400);
  text-align: center;
}

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

/* ==========================================
   RESULT CARD STYLES
   ========================================== */

.result-card {
  padding: 0 !important;
  overflow: hidden;
}

.result-card.active {
  animation: slideInResult 0.7s var(--ease-out-expo) both;
}

@keyframes slideInResult {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Risk Gauge */
.result-gauge-section {
  padding: 32px 28px 24px;
  text-align: center;
}

.gauge-container {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 20px;
}

.gauge-bar {
  width: 100%;
  height: 14px;
  border-radius: 10px;
  background: linear-gradient(90deg,
    var(--success) 0%,
    #a3e635 20%,
    var(--warning) 45%,
    #f97316 65%,
    var(--danger) 85%,
    #991b1b 100%
  );
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gauge-pointer {
  position: absolute;
  top: -8px;
  width: 4px;
  height: 30px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: left 1.2s var(--ease-out-expo);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.gauge-pointer::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--navy-800);
  border: 2px solid var(--white);
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--gray-500);
  font-weight: 500;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.result-badge.danger {
  background: var(--crimson-100);
  color: var(--crimson-700);
}

.result-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.result-badge.safe {
  background: #dcfce7;
  color: #166534;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-top: 4px;
}

/* Result Detail Sections */
.result-section {
  padding: 24px 28px;
  border-top: 1px solid var(--gray-200);
}

.result-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-700);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-section-title .section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--navy-50);
  font-size: 14px;
}

.result-list {
  list-style: none;
}

.result-list li {
  position: relative;
  padding: 8px 0 8px 20px;
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.result-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy-400);
}

/* CTA Section */
.result-cta {
  padding: 28px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  text-align: center;
}

.cta-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.cta-subtitle {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.cta-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 직통 전화번호 표시 */
.cta-phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.cta-phone-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cta-phone-number {
  display: inline-block;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: 3px;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  transition: all 0.3s var(--ease-out-expo);
  line-height: 1;
}

.cta-phone-number:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--white);
}

.cta-phone-sub {
  font-size: 0.78rem;
  color: var(--gray-400);
  letter-spacing: 0.2px;
}

/* Retry */
.retry-section {
  padding: 20px 28px 28px;
  text-align: center;
}

.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.retry-btn:hover {
  border-color: var(--navy-400);
  color: var(--navy-600);
  transform: translateY(-1px);
}

/* ---------- Animations ---------- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ---------- Validation highlight ---------- */
.question-group.invalid .radio-row,
.question-group.invalid .radio-grid,
.question-group.invalid .select-wrapper select,
.question-group.invalid .input-field input {
  outline: 2px solid var(--crimson-400);
  outline-offset: 4px;
  border-radius: 14px;
  animation: shakeX 0.4s var(--ease-out-expo);
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .main-container {
    padding: 28px 14px 40px;
  }

  .step-card {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .radio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .radio-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .radio-row {
    flex-direction: column;
  }

  .radio-pill {
    min-width: 100%;
  }

  .input-group {
    flex-direction: column;
    gap: 12px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .nav-btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  .step-label {
    font-size: 10px;
  }

  .step-dot {
    width: 26px;
    height: 26px;
  }

  .step-dot span {
    font-size: 11px;
  }

  .gauge-labels {
    font-size: 0.65rem;
  }

  .result-badge {
    font-size: 0.9rem;
    padding: 8px 18px;
  }
}

@media (max-width: 380px) {
  .main-title {
    font-size: 1.3rem;
  }

  .radio-body {
    padding: 12px 6px;
  }

  .radio-icon {
    font-size: 20px;
  }

  .radio-text {
    font-size: 0.75rem;
  }
}

/* ---------- Dynamic Prior Record Fields & Accident Details ---------- */
.prior-records-container,
.accident-details-container {
  display: none;
  margin-top: 0;
  animation: fadeInUp 0.4s var(--ease-out-expo);
}

.prior-records-container.visible,
.accident-details-container.visible {
  display: block;
}

.sub-question {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px;
  margin-top: 15px;
  margin-bottom: 5px;
}

.sub-question .q-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-700);
  margin-bottom: 12px;
}

.prior-record-entry {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
  animation: fadeInUp 0.4s var(--ease-out-expo);
}

.prior-record-entry .entry-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-600);
  margin-bottom: 14px;
}

.prior-record-entry .entry-label .entry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--navy-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.prior-fields-row {
  display: flex;
  gap: 12px;
}

.prior-fields-row .input-field {
  flex: 1;
}

.prior-fields-row .input-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  appearance: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2399a1b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.prior-fields-row .input-field select:focus {
  outline: none;
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px rgba(35, 77, 138, 0.12);
}

.prior-fields-row .input-field input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.3s var(--ease-out-expo);
  -moz-appearance: textfield;
}

.prior-fields-row .input-field input[type="number"]::-webkit-outer-spin-button,
.prior-fields-row .input-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.prior-fields-row .input-field input[type="number"]:focus {
  outline: none;
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px rgba(35, 77, 138, 0.12);
}

.add-prior-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px dashed var(--gray-300);
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  margin-top: 4px;
}

.add-prior-btn:hover {
  border-color: var(--navy-400);
  color: var(--navy-500);
  background: var(--navy-50);
}

@media (max-width: 600px) {
  .prior-fields-row {
    flex-direction: column;
    gap: 10px;
  }
}
