@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --accent: #7c3aed;
  --accent-2: #ec4899;
  --accent-light: #ede9fe;
  --accent-mid: #c4b5fd;
  --text: #0f0a1e;
  --text-2: #6b7280;
  --bg: #f9f7ff;
  --surface: #ffffff;
  --border: #e8e4f3;
  --radius: 18px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', -apple-system, 'Noto Sans TC', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ── HEADER ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249,247,255,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--border);
  padding: 4px;
  border-radius: 30px;
}

.lang-switch a {
  padding: 5px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.2s;
}

.lang-switch a.active,
.lang-switch a:hover {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 6px rgba(124,58,237,0.12);
}

/* ── HERO ── */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 28px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-text h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 420px;
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  padding: 13px 26px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(124,58,237,0.3);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.4);
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s;
}

.hero-stat:hover { transform: translateY(-3px); }

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-top: 2px;
}

.hero-stat.span2 { grid-column: span 2; }

/* ── AD ── */
/* 暫時隱藏所有廣告位（尚未申請 AdSense，等有流量再移除這段） */
.ad-wrap, .ad-slot { display: none !important; }

.ad-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: center;
}

.ad-slot {
  background: var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 0.75rem;
}

.ad-banner { width: 728px; max-width: 100%; height: 90px; }
.ad-rect { width: 300px; height: 250px; }

/* ── SECTION ── */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 28px;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

/* ── BENTO GRID ── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(.22,1,.36,1), box-shadow 0.22s;
  display: flex;
  flex-direction: column;
}

.quiz-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.13);
  border-color: var(--accent-mid);
}

.quiz-card.featured {
  grid-column: span 2;
  flex-direction: row;
}

.quiz-card-emoji {
  font-size: 2.8rem;
  padding: 28px 28px 0;
}

.quiz-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--accent-light);
}

.quiz-card.featured .quiz-card-emoji {
  font-size: 4rem;
  padding: 28px;
  display: flex;
  align-items: center;
  background: var(--accent-light);
  min-width: 120px;
  justify-content: center;
}

.quiz-card-body { padding: 20px; flex: 1; }

.quiz-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.quiz-card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.3;
}

.quiz-card.featured .quiz-card-title {
  font-size: 1.2rem;
}

.quiz-card-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.5;
}

.quiz-card-meta {
  font-size: 0.78rem;
  color: var(--text-2);
  display: flex;
  gap: 12px;
  font-weight: 500;
}

/* ── QUIZ PAGE ── */
.quiz-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.quiz-header { text-align: center; margin-bottom: 20px; }
.quiz-cover-img { max-width:420px; width:100%; height:auto; border-radius:16px; margin:0 auto 20px; display:block; box-shadow:0 6px 20px rgba(124,58,237,0.15); }
@media(max-width:480px){ .quiz-cover-img { max-width:100%; } }
.quiz-about { background:#fff; border:1.5px solid #f0c6d4; border-radius:16px; padding:20px 22px; margin-bottom:24px; text-align:left; }
.quiz-about-title { display:flex; align-items:center; gap:8px; font-size:1rem; font-weight:800; color:#333; margin-bottom:14px; }
.quiz-about-text { font-size:.88rem; color:#555; line-height:1.8; margin-bottom:14px; }
.quiz-about-divider { border:none; border-top:1px solid #f0e8ee; margin:0 0 14px; }
.quiz-about-tags { display:flex; gap:14px; flex-wrap:wrap; }
.quiz-about-tags span { color:#b06090; font-size:.85rem; font-weight:600; }

.quiz-header h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.quiz-header p { color: var(--text-2); font-size: 0.95rem; }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 6px;
  margin-bottom: 32px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 6px;
  transition: width 0.45s cubic-bezier(.22,1,.36,1);
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 16px;
}

.question-number {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  line-height: 1.4;
}

.options { display: flex; flex-direction: column; gap: 10px; }

.option-btn {
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  font-weight: 500;
  transition: all 0.18s;
  line-height: 1.4;
}

.option-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  transform: translateX(4px);
}

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

/* ── RESULT ── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 36px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.result-emoji { font-size: 4.5rem; margin-bottom: 16px; }

.result-type {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.result-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.result-desc {
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 24px;
  font-size: 0.95rem;
  text-align: left;
}

.result-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.trait-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

.share-label {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: 12px;
}

.share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.18s, opacity 0.18s;
}

.share-btn:hover { opacity: 0.88; transform: translateY(-2px); }
.share-btn-x { background: #000; color: #fff; }
.share-btn-copy { background: var(--accent); color: #fff; }

.retry-btn {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.18s;
  margin-top: 12px;
}

.retry-btn:hover { border-color: var(--accent); color: var(--accent); }

.more-quizzes { margin-top: 40px; }
.more-quizzes h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 36px 28px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.83rem;
}

footer a { color: var(--accent); font-weight: 600; }

/* ── ANIMATIONS ── */
@media (prefers-reduced-motion: no-preference) {
  .quiz-card {
    animation: fadeUp 0.5s both;
  }
  .quiz-card:nth-child(2) { animation-delay: 0.06s; }
  .quiz-card:nth-child(3) { animation-delay: 0.12s; }
  .quiz-card:nth-child(4) { animation-delay: 0.18s; }
  .quiz-card:nth-child(5) { animation-delay: 0.24s; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 20px 32px;
    gap: 32px;
  }
  .hero-visual { display: none; }
  .bento { grid-template-columns: 1fr; }
  .quiz-card { min-height: unset; height: auto; grid-column: span 1 !important; }
  .quiz-card.featured { flex-direction: column; }
  .quiz-card.featured .quiz-card-emoji { min-width: auto; font-size: 2.8rem; padding: 20px 20px 0; }
  .question-card { padding: 24px 18px; }
  .result-card { padding: 32px 20px; }
  .section { padding: 36px 20px; }
}

/* 全部測驗連結（SEO 內鏈：讓搜尋引擎爬到並把權重傳給各測驗頁；低調呈現、不搶版面）
   max-height + overflow 讓畫面高度封頂：題目再多也只在區塊內捲動，連結全在 HTML 裡、Google 照爬，SEO 不受影響 */
.seo-all-quizzes { max-width: 1100px; margin: 8px auto 0; padding: 12px 24px; border-top: 1px solid #eef0f4; max-height: 116px; overflow-y: auto; }
.seo-all-quizzes::-webkit-scrollbar { width: 6px; }
.seo-all-quizzes::-webkit-scrollbar-thumb { background: #d7dbe2; border-radius: 3px; }
.seo-all-quizzes h2 { font-size: 0.92rem; font-weight: 700; color: #9aa1ac; text-align: center; margin: 0 0 12px; letter-spacing: 0.02em; }
.seo-all-quizzes a { display: inline-block; font-size: 0.8rem; line-height: 1.5; color: #9aa1ac; text-decoration: none; margin: 0 10px 7px 0; border-bottom: 1px dotted transparent; transition: color .15s, border-color .15s; }
.seo-all-quizzes a:hover { color: #6b7280; border-bottom-color: #cbd5e1; }

/* ===== 專欄文章（靜態內容，提升內容厚度＋SEO 長尾） ===== */
.article-page { max-width: 760px; margin: 40px auto; padding: 0 24px 72px; line-height: 1.9; }
.article-page h1 { font-size: 1.85rem; font-weight: 800; margin-bottom: 8px; line-height: 1.35; color: #1f2330; }
.article-meta { color: #9aa1ac; font-size: 0.85rem; margin-bottom: 24px; }
.article-lead { font-size: 1.02rem; color: #4b5563; background: #f7f5fb; border-left: 4px solid #a78bfa; padding: 14px 18px; border-radius: 8px; margin-bottom: 26px; }
.article-page h2 { font-size: 1.2rem; font-weight: 800; margin: 32px 0 10px; color: #2a2f3d; }
.article-page h3 { font-size: 1.02rem; font-weight: 700; margin: 22px 0 6px; color: #374151; }
.article-page p { color: #374151; margin-bottom: 14px; }
.article-page ul { color: #374151; margin: 0 0 16px 1.2em; }
.article-page li { margin-bottom: 6px; }
.article-cta { display: block; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; border-radius: 14px; padding: 22px 24px; margin: 34px 0 8px; text-decoration: none; }
.article-cta .cta-k { font-size: 0.78rem; opacity: 0.92; letter-spacing: 0.06em; }
.article-cta .cta-t { font-size: 1.15rem; font-weight: 800; margin-top: 5px; line-height: 1.4; }
.article-cta .cta-go { display: inline-block; margin-top: 12px; font-weight: 700; border-bottom: 2px solid rgba(255,255,255,.55); }
.article-related { margin-top: 36px; border-top: 1px solid #eef0f4; padding-top: 22px; }
.article-related .ar-h { font-size: 0.95rem; font-weight: 700; color: #6b7280; margin-bottom: 12px; }
.article-related a { display: inline-block; font-size: 0.85rem; color: #7c3aed; text-decoration: none; margin: 0 14px 8px 0; font-weight: 600; }
.article-related a:hover { text-decoration: underline; }
.article-disclaimer { font-size: 0.8rem; color: #9aa1ac; margin-top: 28px; border-top: 1px solid #eef0f4; padding-top: 14px; line-height: 1.7; }
/* 專欄索引 */
.article-list { max-width: 860px; margin: 40px auto; padding: 0 24px 72px; }
.article-list h1 { font-size: 1.85rem; font-weight: 800; margin-bottom: 6px; color: #1f2330; }
.article-list .al-sub { color: #6b7280; margin-bottom: 26px; }
.article-card { display: block; border: 1px solid #ece9f3; border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.article-card:hover { box-shadow: 0 6px 20px rgba(124,58,237,.10); transform: translateY(-2px); }
.article-card .ac-tag { font-size: 0.74rem; color: #7c3aed; font-weight: 700; letter-spacing: 0.04em; }
.article-card .ac-title { font-size: 1.12rem; font-weight: 800; color: #1f2330; margin: 6px 0; }
.article-card .ac-desc { font-size: 0.9rem; color: #6b7280; line-height: 1.65; }

/* Site trust navigation */
.site-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;padding:14px 18px;border-bottom:1px solid #ece5f6;background:#fff}
.site-nav a{font-size:.88rem;color:#5b21b6;text-decoration:none;padding:5px 2px;font-weight:600}
.site-nav a:hover{text-decoration:underline}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #7c3aed;outline-offset:4px}
.result-limits{max-width:680px;margin:20px auto 0;padding:14px 22px;background:#f5f1fc;color:#514267;font-size:.82rem;line-height:1.8;border-radius:10px}
.result-limits a,.article-page a:not(.article-cta){color:#6d28d9;text-decoration:underline}
.article-page ol{padding-left:24px;line-height:1.9}.article-page li{margin:10px 0}
footer [data-trust-links]{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;line-height:1.9}
@media(max-width:480px){.site-nav{gap:4px 14px}.site-nav a{font-size:.8rem}.result-limits{margin:16px 16px 0}}

/* Editorial voice */
:root{--bg:#faf9f6;--text:#29282b;--border:#e6e2dc;--accent:#675377}
header{background:rgba(250,249,246,.96);backdrop-filter:none}
.logo{background:none;-webkit-text-fill-color:currentColor;color:#413947;letter-spacing:-.04em}
.site-nav{background:transparent;border-bottom:1px solid var(--border);padding:9px 18px;gap:12px 28px}
.site-nav a{color:#57505d;font-weight:500;font-size:.84rem}
body .hero-compact{text-align:left;padding-top:42px;padding-bottom:30px}
body .hero-compact h1{font-family:Georgia,"Noto Serif TC","Noto Serif JP",serif;font-weight:600;font-size:clamp(2.2rem,5vw,3.8rem);line-height:1.24;letter-spacing:-.025em;margin:12px 0 18px}
body .hero-compact h1 span{background:none;-webkit-text-fill-color:currentColor;color:#675377}
body .hero-compact p{margin:0;max-width:520px;line-height:1.8;color:#655f68}
body .hero-compact .issue-label{font-size:.69rem;letter-spacing:.12em;color:#7e7368}
body .feature-card{border-radius:8px;box-shadow:none}
body .pcard{border-radius:6px;border-color:#e6e2dc;box-shadow:none}
body .pcard:hover{transform:translateY(-2px);box-shadow:0 5px 14px #29282b0d;border-color:#bbb0c1}
.result-limits{margin:0 auto 22px;padding:0 4px;background:none;border-radius:0;font-size:.78rem;color:#777079;line-height:1.75}
.result-limit-detail{display:block;font-size:.72rem;color:#777079}
.result-limits a{color:#675377;text-underline-offset:3px;margin-left:6px}
.article-lead{background:none;border:0;border-radius:0;padding:8px 0 18px;font-size:1.08rem;color:#57505d}
.article-page h1,.article-list h1{font-family:Georgia,"Noto Serif TC","Noto Serif JP",serif;font-weight:600}
.article-card{border:0;border-bottom:1px solid #ded9d1;border-radius:0;padding:23px 0;margin:0}
.article-card:hover{transform:none;box-shadow:none;background:#f2efea}
.article-cta{background:#605167;border-radius:5px}
.editor-picks{max-width:1120px;margin:48px auto 64px;padding:0 28px}
.editor-picks>h2{font-size:1.2rem;font-weight:600;margin-bottom:22px}
.editor-picks-grid{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #ccc4ba}
.editor-picks-grid>a{position:relative;padding:24px 24px 24px 0;border-bottom:1px solid #ccc4ba}
.editor-picks-grid>a+a{padding-left:24px;border-left:1px solid #ddd6cd}
.pick-label{font-size:.73rem;color:#7a6e61;letter-spacing:.04em}
.editor-picks h3{font-size:1.05rem;line-height:1.5;margin:12px 0}
.editor-picks p{font-size:.87rem;line-height:1.85;color:#6b636d;padding-right:12px}
.pick-arrow{display:block;margin-top:16px;color:#675377}
.editor-picks a:hover h3{text-decoration:underline;text-underline-offset:4px}
footer [data-trust-links]{font-size:.76rem}
@media(max-width:600px){.editor-picks-grid{grid-template-columns:1fr}.editor-picks-grid>a+a{padding-left:0;border-left:0}.editor-picks{padding:0 20px;margin:32px auto 42px}body .hero-compact{padding-top:30px}.result-limits{margin:0 0 18px;padding:0 4px}.site-nav{gap:8px 22px}}
