/* =====================================================================
   AI 시대 돈 버는 유형 테스트 — style.css
   무드: 절제된 다크 (세련 · 심플)
   - 잉크빛 단색 배경, 효과 최소화
   - 단 하나의 액센트(샴페인 골드)만 꼭 필요한 곳에
   - 여백 + 타이포 중심, 모바일 우선
   ===================================================================== */

/* ---------- 디자인 토큰 ---------- */
:root {
  --bg: #0f1014;            /* 잉크빛 단색 배경 */
  --card: #181a21;          /* 카드 표면 */
  --card-border: rgba(255, 255, 255, 0.06);

  --accent: #d8b46a;        /* 샴페인 골드 (유일한 액센트) */
  --accent-soft: rgba(216, 180, 106, 0.12);
  --accent-line: rgba(216, 180, 106, 0.4);

  --text: #ececef;          /* 본문 */
  --text-sub: #a4a7b2;      /* 보조 */
  --text-muted: #6b6e7a;    /* 흐린 */

  --line: rgba(255, 255, 255, 0.07);
  --surface: rgba(255, 255, 255, 0.03);

  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ---------- 기본 리셋 ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

/* ---------- 앱 컨테이너 ---------- */
.app {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100%;
  padding: 20px 16px calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- 화면 전환 ---------- */
.screen {
  width: 100%;
  animation: fadeIn 0.35s ease;
}
.screen[hidden] {
  display: none;
}

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

/* ---------- 카드 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 26px;
}
.card--center {
  text-align: center;
  padding: 60px 26px;
}

/* ---------- 시작 화면 ---------- */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  padding: 0;
  margin-bottom: 24px;
}

.title {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
  color: var(--text);
}

.subtitle {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 16px;
}
.subtitle--muted {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 30px;
}

.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}
.hint--center {
  text-align: center;
  margin-top: 24px;
}

/* ---------- 버튼 공통 ---------- */
.btn {
  width: 100%;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  padding: 16px 20px;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.2s ease, opacity 0.2s ease;
  font-family: inherit;
}
/* 메인 CTA: 솔리드 골드 (효과 없음, 또렷한 한 가지) */
.btn--primary {
  background: var(--accent);
  color: #1a1408;
  font-weight: 700;
}
.btn--primary:hover { opacity: 0.92; }
.btn--primary:active { transform: scale(0.985); }

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-sub);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.btn--ghost:active { transform: scale(0.985); }

/* 카카오톡 공유 버튼 (브랜드 컬러 유지) */
.btn--kakao {
  background: #fee500;
  color: #191600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn--kakao:hover { opacity: 0.92; }
.btn--kakao:active { transform: scale(0.985); }
.kakao-icon { font-size: 18px; line-height: 1; }

/* 보조 버튼: 외곽선 스타일 (절제) */
.btn--secondary {
  background: transparent;
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 15px;
  padding: 14px 16px;
}
.btn--secondary:hover { background: var(--accent-soft); }
.btn--secondary:active { transform: scale(0.985); }

/* 포커스 접근성 */
.btn:focus-visible,
.option:focus-visible,
.btn-back:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

/* ---------- 질문 화면 상단 ---------- */
.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 28px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  font-family: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.btn-back:hover { color: var(--text-sub); }
.btn-back:disabled {
  opacity: 0;
  pointer-events: none;
}

.progress-count {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* ---------- 진행률 바 ---------- */
.progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 30px;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- 질문/선택지 ---------- */
.question {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.3px;
  margin-bottom: 26px;
  color: var(--text);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.2s ease, background-color 0.2s ease;
  font-family: inherit;
  line-height: 1.5;
}
.option:hover {
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, 0.05);
}
.option:active {
  transform: scale(0.985);
}
.option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

/* ---------- 로딩 스피너 ---------- */
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 22px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

/* ---------- 결과 화면 ---------- */
.result-head {
  text-align: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.result-emoji {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 14px;
}
.result-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.result-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
  margin-bottom: 12px;
}
.result-summary {
  font-size: 15px;
  color: var(--text-sub);
  font-weight: 400;
}

.result-scores {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 26px;
}

.result-block {
  margin-bottom: 26px;
}
.result-block--highlight {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.result-block__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.result-desc {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.75;
}
.result-mission {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.75;
}

.result-list {
  list-style: none;
}
.result-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 9px;
  line-height: 1.65;
}
.result-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* AI 도구 태그 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 8px;
}

/* 결과 액션 버튼 */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.result-actions__row {
  display: flex;
  gap: 10px;
}
.result-actions__row .btn { flex: 1; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #2a2c35;
  border: 1px solid var(--card-border);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  white-space: nowrap;
}
.toast[hidden] { display: none; }
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- PC(넓은 화면) ---------- */
@media (min-width: 481px) {
  .app { padding-top: 40px; padding-bottom: 40px; }
  .title { font-size: 28px; }
}

/* ---------- 모션 최소화 선호 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
