/* ============================================
   DIAGNOSIS PAGE — Emotional Cell
   ============================================ */

.diag-app {
  min-height: 100vh;
  padding-top: 72px;
  background: var(--bg-dark);
}

.diag-screen {
  display: none;
  min-height: calc(100vh - 72px);
  align-items: center;
  justify-content: center;
}

.diag-screen.active {
  display: flex;
}

.diag-container {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ─── INTRO ─────────────────────────── */
.intro-badge {
  display: inline-block;
  background: rgba(232, 69, 122,0.15);
  border: 1px solid rgba(232, 69, 122,0.4);
  color: #C4B5FD;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.intro-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.intro-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 36px;
}

.intro-desc strong { color: var(--text-primary); }
.intro-desc em { color: #C4B5FD; font-style: normal; font-weight: 600; }

.intro-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.metric-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(232, 69, 122,0.1);
  border: 1px solid rgba(232, 69, 122,0.25);
  color: #C4B5FD;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

.intro-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── PROGRESS ─────────────────────── */
.prog-header {
  margin-bottom: 36px;
}

.prog-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.prog-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #E8457A, #FF8FAB);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 5%;
}

.prog-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.prog-label {
  font-size: 0.75rem;
  color: var(--primary-light);
  background: rgba(232, 69, 122,0.12);
  padding: 3px 12px;
  border-radius: 12px;
}

/* ─── CATEGORY ICONS ───────────────── */
.category-icons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.cat-icon.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 16px rgba(232, 69, 122,0.5);
  transform: scale(1.15);
}

.cat-icon.done {
  background: rgba(16,185,129,0.2);
  border-color: rgba(16,185,129,0.4);
  color: #34D399;
}

/* ─── QUESTION CARD ────────────────── */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 28px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}

.q-category-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--primary-light);
}

.q-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text-primary);
}

/* ─── OPTIONS ──────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.option-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  line-height: 1.5;
}

.option-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: rgba(232, 69, 122,0.08);
  transform: translateY(-2px);
}

.option-btn.selected {
  border-color: var(--primary);
  background: rgba(232, 69, 122,0.18);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(232, 69, 122,0.2);
}

.option-btn .opt-score {
  display: none;
}

.option-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  color: var(--text-muted);
  margin-top: 1px;
}

.option-btn.selected .option-letter {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── QUESTION NAV ─────────────────── */
.q-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-sm {
  padding: 10px 20px !important;
  font-size: 0.85rem !important;
  border-radius: 10px !important;
}

.q-dots {
  display: flex;
  gap: 5px;
}

.q-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.q-dot.answered {
  background: var(--primary);
  transform: scale(1.2);
}

.q-dot.current {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}

/* ─── LOADING ──────────────────────── */
#screenLoading .diag-container {
  text-align: center;
}

.loading-cell {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.load-nucleus {
  font-size: 3rem;
  z-index: 10;
  animation: nucleusPulse 1.5s ease-in-out infinite;
}

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

.load-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: ringRotate linear infinite;
}

.r1 { width: 80px;  height: 80px;  border-color: rgba(232,69,122,0.6);  animation-duration: 3s; }
.r2 { width: 120px; height: 120px; border-color: rgba(255,143,171,0.4); animation-duration: 5s; animation-direction: reverse; }
.r3 { width: 158px; height: 158px; border-color: rgba(200,75,143,0.25); animation-duration: 8s; }

@keyframes ringRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.loading-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text-secondary);
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  max-width: 360px;
  margin: 0 auto;
}

.load-step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.3;
  transition: all 0.4s ease;
}

.load-step.active {
  opacity: 1;
  color: var(--text-secondary);
}

.load-step.done {
  opacity: 1;
  color: #34D399;
}

.load-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.load-step.active .load-step-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(6,182,212,0.6);
  animation: dotPulse 0.8s ease-in-out infinite;
}

.load-step.done .load-step-dot {
  background: #34D399;
}

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

/* ─── RESULT ───────────────────────── */
.result-container {
  max-width: 900px !important;
  padding: 48px 24px 80px !important;
}

.result-header {
  text-align: center;
  margin-bottom: 48px;
}

.result-badge {
  display: inline-block;
  background: rgba(232, 69, 122,0.15);
  border: 1px solid rgba(232, 69, 122,0.4);
  color: #C4B5FD;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.result-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* MAIN SCORE */
.main-score-area {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 40px;
}

.main-score-circle {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.main-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.main-score-num {
  font-size: 3.5rem;
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  line-height: 1;
  color: var(--text-primary);
}

.main-score-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  margin-top: 2px;
}

.main-score-grade {
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 6px;
  padding: 3px 12px;
  border-radius: 12px;
}

.score-bio-age {
  margin-bottom: 20px;
}

.bio-age-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.bio-age-val {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 6px;
}

.bio-age-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.score-interpretation {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  padding: 16px 20px;
  background: rgba(232, 69, 122,0.06);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
}

/* METRICS BREAKDOWN */
.metrics-breakdown {
  margin-bottom: 40px;
}

.breakdown-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.metric-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.metric-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.metric-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.4;
}

.metric-score-num {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.metric-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  position: relative;
}

.metric-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.metric-ring .ring-bg   { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 5; }
.metric-ring .ring-fill { fill: none; stroke-width: 5; stroke-linecap: round; }

/* RADAR */
.risk-visual {
  margin-bottom: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

.radar-area {
  display: flex;
  justify-content: center;
  height: 300px;
}

/* ADVICE */
.advice-section { margin-bottom: 40px; }

.advice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.advice-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.advice-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.advice-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.advice-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.advice-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* BEFORE/AFTER */
.result-cta-area { text-align: center; }

.longevity-before-after {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.ba-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  min-width: 140px;
}

.ba-box.after { border-color: var(--primary); }

.ba-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ba-num {
  display: block;
  font-size: 2.8rem;
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  line-height: 1;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.ba-num.accent { color: var(--primary-light); }

.ba-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ba-arrow {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 900;
}

.result-note {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── RESPONSIVE ───────────────────── */
@media (max-width: 768px) {
  .options-grid    { grid-template-columns: 1fr; }
  .metrics-grid    { grid-template-columns: repeat(3, 1fr); }
  .advice-cards    { grid-template-columns: 1fr; }
  .main-score-area { grid-template-columns: 1fr; text-align: center; }
  .main-score-circle { margin: 0 auto; }
  .longevity-before-after { flex-direction: column; gap: 12px; }
  .ba-arrow { transform: rotate(90deg); }
}

@media (max-width: 480px) {
  .metrics-grid    { grid-template-columns: repeat(2, 1fr); }
  .question-card   { padding: 24px 20px; }
  .q-text          { font-size: 1.05rem; }
}
