/* ============ 심심랩 기본 스타일 (모바일 우선) ============ */

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

:root {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --text: #2b2b3a;
  --text-sub: #7a7a8c;
  --primary: #7c5cff;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(60, 50, 120, 0.08);
}

body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 헤더 / 푸터 ---------- */

.site-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 20px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.site-footer {
  text-align: center;
  padding: 30px 20px;
  font-size: 0.8rem;
  color: var(--text-sub);
}

/* ---------- 레이아웃 ---------- */

.container {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 20px 40px;
}

/* ---------- 홈 ---------- */

.hero {
  text-align: center;
  padding: 30px 0 26px;
}

.hero h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.hero p {
  color: var(--text-sub);
  font-size: 0.95rem;
}

.test-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.test-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 6px solid var(--card-color, var(--primary));
  box-shadow: var(--shadow);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.test-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(60, 50, 120, 0.14);
}

.test-emoji {
  font-size: 2rem;
}

.test-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.test-info strong {
  font-size: 1.05rem;
}

.test-info small {
  color: var(--text-sub);
}

.test-meta {
  font-size: 0.78rem;
  color: var(--card-color, var(--primary));
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 퀴즈 ---------- */

.quiz {
  padding-top: 10px;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e6e3f2;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--card-color, var(--primary));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.question-text {
  font-size: 1.25rem;
  margin-bottom: 26px;
  word-break: keep-all;
}

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

.option-btn {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  word-break: keep-all;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.option-btn:hover {
  border-color: var(--card-color, var(--primary));
}

.option-btn:active {
  transform: scale(0.98);
}

/* ---------- 결과 ---------- */

.result {
  text-align: center;
  padding-top: 10px;
}

.result-test-name {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 6px solid var(--card-color, var(--primary));
  padding: 30px 24px;
  margin-bottom: 24px;
}

.result-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

.result-badge {
  display: inline-block;
  background: var(--card-color, var(--primary));
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 4px 16px;
  margin-bottom: 12px;
}

.result-card h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  word-break: keep-all;
}

.result-desc {
  color: var(--text-sub);
  word-break: keep-all;
}

.result-jobs {
  margin-top: 16px;
  font-size: 0.92rem;
  background: var(--bg);
  border-radius: 12px;
  padding: 12px;
  word-break: keep-all;
}

.axis-detail {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.axis-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.axis-label {
  width: 20px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.axis-bar {
  flex: 1;
  height: 10px;
  background: #e6e3f2;
  border-radius: 5px;
  overflow: hidden;
}

.axis-fill {
  height: 100%;
  background: var(--card-color, var(--primary));
  border-radius: 5px;
}

.scale-detail {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.scale-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.scale-head span:last-child {
  color: var(--card-color, var(--primary));
  font-variant-numeric: tabular-nums;
}

.scale-text {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-sub);
  word-break: keep-all;
}

/* ---------- 공유 ---------- */

.share-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.share-box p {
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.share-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 버튼 공통 ---------- */

.btn {
  display: inline-block;
  background: var(--bg);
  color: var(--text);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn:hover {
  filter: brightness(0.95);
}

.btn.primary {
  background: var(--card-color, var(--primary));
  color: #fff;
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 10px;
}

.btn-ghost:hover {
  color: var(--text);
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- 개인정보처리방침 ---------- */

.footer-link {
  color: var(--text-sub);
  text-decoration: underline;
}

.legal {
  padding-top: 16px;
  word-break: keep-all;
}

.legal h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.legal-date {
  color: var(--text-sub);
  font-size: 0.85rem;
}

.legal h2 {
  font-size: 1.05rem;
  margin: 26px 0 8px;
}

.legal p,
.legal li {
  color: var(--text-sub);
  font-size: 0.95rem;
}

.legal ul {
  padding-left: 20px;
}

.legal a {
  color: var(--primary);
}

.legal-back {
  margin-top: 30px;
  text-align: center;
}

/* ---------- 정적 페이지 (테스트 소개 / 유형 상세) ---------- */

.intro-hero {
  text-align: center;
  padding: 10px 0 4px;
}

.intro-hero h1 {
  font-size: 1.5rem;
  margin: 6px 0 4px;
}

.intro-subtitle {
  color: var(--text-sub);
  font-size: 0.92rem;
}

.page-cta {
  text-align: center;
  margin: 24px 0;
}

.intro-page .test-list,
.legal + .test-list {
  margin-top: 14px;
}

.result-more {
  margin-top: 12px;
}

.result-more a {
  color: var(--card-color, var(--primary));
  font-weight: 700;
  text-decoration: none;
}

.result-more a:hover {
  text-decoration: underline;
}

.type-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.type-nav a {
  display: block;
  text-align: center;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 10px 0;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.type-nav a:hover {
  color: var(--primary);
}

.type-dict {
  margin-top: 34px;
  text-align: center;
}

.type-dict h2 {
  font-size: 1rem;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.type-dict a {
  display: inline-block;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 8px 14px;
  margin: 4px 2px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.type-dict a:hover {
  color: var(--primary);
}

/* ---------- 404 / 토스트 ---------- */

.notfound {
  text-align: center;
  padding: 60px 0;
}

.notfound h2 {
  margin-bottom: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100% - 40px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
