/* ===========================
   SBTI 全站共享样式 — Light Theme
   Color system from sbti.ai
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@300;400;500;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* sbti.ai 官方配色 */
  --bg:            #f6faf6;
  --panel:         #ffffff;
  --soft:          #edf6ef;
  --line:          #dbe8dd;
  --text:          #1e2a22;
  --muted:         #6a786f;
  --dim:           #9fb3a4;
  --accent:        #6c8d71;
  --accent-strong: #4d6a53;
  --accent-deep:   #2f4937;
  --shadow:        0 8px 32px rgba(47,73,55,0.10);
  --shadow-lg:     0 20px 60px rgba(47,73,55,0.14);
  --shadow-sm:     0 2px 12px rgba(47,73,55,0.07);
  --radius:        22px;
  --radius-sm:     12px;
  --radius-xs:     8px;
  --transition:    0.22s cubic-bezier(0.4,0,0.2,1);

  /* 各人格色（浅色系版本） */
  --dead:    #7a8a82;
  --shit:    #8B6347;
  --malo:    #4a8c62;
  --atm:     #b08030;
  --fuck:    #c0392b;
  --solo:    #4a6fa5;
  --imsb:    #7b4fa0;
  --ghost:   #3d8bcd;
  --robot:   #5a7a8a;
  --npc:     #6a8070;
  --chaos:   #c47820;
  --broken:  #b83070;
  --witch:   #5c3d9a;
  --alien:   #2a8a70;
  --zombie:  #6a7840;
  --vampire: #8b0000;
  --boss:    #c85000;
  --baby:    #2a7ab0;
  --healer:  #a03070;
  --observer:#1a5c9a;
  --survivor:#3a5060;
  --phantom: #008090;
  --joker:   #b03010;
  --edge:    #2060a0;
  --faker:   #5a1a80;
  --clown:   #c04000;
  --god:     #b07800;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

/* subtle dot pattern */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, #2f493712 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Ma Shan Zheng', 'Noto Sans SC', sans-serif;
  line-height: 1.25;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(246,250,246,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Ma Shan Zheng', sans-serif;
  font-size: 1.5rem;
  color: var(--accent-deep);
}

.nav-logo span:first-child { color: var(--accent-strong); }

.nav-links {
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.88rem;
  color: var(--muted);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--accent-deep); background: var(--soft); }

.nav-cta {
  background: var(--accent-strong) !important;
  color: white !important;
  font-weight: 600;
  padding: 8px 20px !important;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(77,106,83,0.30);
  transition: all var(--transition) !important;
}
.nav-cta:hover {
  background: var(--accent-deep) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(47,73,55,0.35) !important;
}

.nav-mobile-btn {
  display: none; padding: 8px; background: none;
  border: none; color: var(--muted); cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px;
  border-radius: 50px;
  font-family: 'Ma Shan Zheng', sans-serif;
  font-size: 1.1rem;
  cursor: pointer; border: none;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}
.btn-primary {
  background: var(--accent-strong);
  color: white;
  box-shadow: 0 6px 24px rgba(77,106,83,0.35);
  font-size: 1.1rem; padding: 14px 36px;
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(47,73,55,0.40);
}
.btn-secondary {
  background: var(--panel);
  color: var(--accent-strong);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--soft); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent; color: var(--accent-strong);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--soft); transform: translateY(-2px); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.page-top   { padding-top: 64px; }

/* ===== SECTION HEADERS ===== */
.section-header { text-align: center; margin-bottom: 52px; }
.section-label {
  display: inline-block;
  padding: 4px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-family: 'Space Mono', monospace;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: 14px;
}
.section-desc {
  font-size: 0.97rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  color: var(--accent-strong);
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== TYPE CARD (with image) ===== */
.type-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.type-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--type-color, var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.type-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--type-color, var(--accent));
}
.type-card:hover::after { transform: scaleX(1); }

.type-card-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
  flex-shrink: 0;
}
.type-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.type-card:hover .type-card-img-wrap img { transform: scale(1.06); }

.type-card-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.type-card-id {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: var(--type-color, var(--accent));
  letter-spacing: 0.12em; text-transform: uppercase;
}
.type-card-name {
  font-family: 'Ma Shan Zheng', sans-serif;
  font-size: 1.2rem; color: var(--text);
}
.type-card-desc {
  font-size: 0.82rem; color: var(--muted);
  line-height: 1.55; flex: 1;
}
.type-card-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--soft);
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--type-color, var(--accent));
  border: 1px solid var(--line);
  margin-top: 4px;
  align-self: flex-start;
}

/* Emoji fallback (no image) */
.type-card-emoji {
  font-size: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1;
  background: var(--soft);
  font-size: 3rem;
}

/* ===== GRIDS ===== */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ===== STATS ===== */
.stats-row {
  display: flex; align-items: center; justify-content: center;
  gap: 48px; flex-wrap: wrap;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Space Mono', monospace;
  font-size: 2rem; font-weight: 700;
  color: var(--accent-strong); display: block;
}
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.faq-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%; padding: 18px 22px;
  background: none; border: none;
  color: var(--text); font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.97rem; font-weight: 500;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--accent-strong); }
.faq-icon { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--transition); color: var(--dim); }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent-strong); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer-inner {
  padding: 0 22px 18px;
  color: var(--muted); font-size: 0.9rem; line-height: 1.8;
  border-top: 1px solid var(--line); padding-top: 14px;
}

/* ===== STEPS ===== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.step {
  text-align: center; padding: 32px 24px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: var(--accent-strong);
  border-radius: 50%;
  font-family: 'Space Mono', monospace;
  font-weight: 700; font-size: 1.1rem; color: white;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(77,106,83,0.30);
}
.step-title { font-size: 1.05rem; color: var(--text); margin-bottom: 10px; }
.step-desc { font-size: 0.86rem; color: var(--muted); line-height: 1.7; }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: var(--line); }

/* ===== TAG ROW ===== */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag {
  padding: 5px 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 50px; font-size: 0.78rem; color: var(--muted);
  cursor: default; transition: all var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--soft); }

/* ===== QUIZ ===== */
.quiz-progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.quiz-step-label { font-family: 'Space Mono', monospace; font-size: 0.76rem; color: var(--dim); margin-bottom: 28px; }
.quiz-question {
  font-family: 'Ma Shan Zheng', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--text); text-align: center; margin-bottom: 36px; line-height: 1.4;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  padding: 16px 22px;
  background: var(--panel); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer; font-family: 'Noto Sans SC', sans-serif; font-size: 0.95rem;
  color: var(--text); text-align: left;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 14px;
}
.quiz-option-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); font-family: 'Space Mono', monospace;
  font-size: 0.72rem; font-weight: 700; color: var(--accent);
  flex-shrink: 0; transition: all var(--transition);
}
.quiz-option:hover {
  border-color: var(--accent); background: var(--soft);
  transform: translateX(4px);
}
.quiz-option:hover .quiz-option-letter { background: var(--accent); color: white; }
.quiz-option.selected { border-color: var(--accent-strong); background: #edf6ef; }
.quiz-option.selected .quiz-option-letter { background: var(--accent-strong); color: white; }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 36px; }

/* ===== RESULT ===== */
.result-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.result-emoji { font-size: 4.5rem; display: block; margin-bottom: 16px; animation: floatEmoji 3s ease-in-out infinite; }
.result-type-name { font-family: 'Ma Shan Zheng', sans-serif; font-size: 2.5rem; color: var(--text); margin-bottom: 8px; }
.result-type-zh { font-size: 0.97rem; color: var(--muted); margin-bottom: 16px; }
.result-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.85; margin-bottom: 22px; }
.result-traits { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.result-trait {
  padding: 5px 14px; background: var(--soft);
  border: 1px solid var(--line); border-radius: 50px;
  font-size: 0.80rem; color: var(--muted);
}
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; background: var(--soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--muted);
  font-size: 0.92rem; cursor: pointer; transition: all var(--transition);
}
.share-btn:hover { background: var(--panel); border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); }

/* ===== FOOTER ===== */
.footer { background: var(--panel); border-top: 1px solid var(--line); padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand-name { font-family: 'Ma Shan Zheng', sans-serif; font-size: 1.3rem; color: var(--text); margin-bottom: 10px; }
.footer-brand-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.7; max-width: 280px; }
.footer-col-title { font-size: 0.72rem; font-family: 'Space Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-bottom: 14px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.88rem; color: var(--muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent-strong); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-size: 0.80rem; color: var(--dim); }
.footer-disclaimer { font-size: 0.76rem; color: var(--dim); text-align: right; }

/* ===== BADGE ===== */
.badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; }
.badge-hot { background: rgba(192,57,43,0.10); color: #c0392b; border: 1px solid rgba(192,57,43,0.25); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--accent-deep); border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 0.9rem; color: white;
  z-index: 9999; transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-lg); white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== TICKER ===== */
.ticker-wrap {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 0; background: var(--panel);
}
.ticker-track { display: flex; gap: 40px; animation: ticker 30s linear infinite; width: max-content; }
.ticker-item {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace; font-size: 0.80rem;
  color: var(--muted); white-space: nowrap;
}

/* ===== ANIMATIONS ===== */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes floatEmoji { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.animate-fade-up { animation: fadeUp 0.6s ease both; }
.animate-fade-up-delay-1 { animation-delay: 0.1s; }
.animate-fade-up-delay-2 { animation-delay: 0.2s; }
.animate-fade-up-delay-3 { animation-delay: 0.3s; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 16px; z-index: 99;
  }
  .nav-mobile-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { gap: 24px; }
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .footer-disclaimer { text-align: left; }
}
