/* MBTI 网站样式 - CSCA 风格改版：深色首屏、令牌化、响应式 + SEO 友好 */
:root {
    --color-primary: #3b5bdb;
    --color-primary-dark: #2d46b8;
    --color-accent: #14b8a6;
    --color-accent-dark: #0d9488;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f1f5f9;
    --color-border: #e2e8f0;
    --surface-page: #f8fafc;
    --surface-elevated: #ffffff;
    --surface-hero: #0f172a;
    --hero-text: #f8fafc;
    --hero-text-muted: #cbd5e1;
    --footer-bg: #0c1222;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 18px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 14px 44px rgba(15, 23, 42, 0.12);
    --shadow-card-hover: 0 20px 50px rgba(15, 23, 42, 0.14);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --container: 1140px;
    --spacing: 1.5rem;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--surface-page);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header — 玻璃顶栏 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.875rem 0;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@supports not (backdrop-filter: blur(12px)) {
    .site-header {
        background: rgba(255, 255, 255, 0.96);
    }
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.logo:hover {
    text-decoration: none;
    color: var(--color-primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.main-nav a:not(.btn) {
    color: #475569;
    font-weight: 500;
    font-size: 0.9375rem;
}

.main-nav a:not(.btn):hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    padding: 0.5rem 1.35rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
        box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
    border: 2px solid transparent;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff !important;
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.btn-outline {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff !important;
    text-decoration: none;
}

.btn-lg {
    padding: 0.8rem 1.65rem;
    font-size: 1.0625rem;
}

.main-nav .btn-primary {
    box-shadow: 0 4px 14px rgba(59, 91, 219, 0.35);
}

.main-nav .btn-primary:hover {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .main-nav .btn-primary,
    .main-nav .btn-primary:hover {
        transition: none;
        transform: none;
    }
}

/* Hero — 深色渐变首屏 */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(3rem, 8vw, 5.25rem) 0 clamp(3rem, 6vw, 4.5rem);
    color: var(--hero-text);
    background-color: var(--surface-hero);
    background-image:
        radial-gradient(ellipse 100% 70% at 75% -30%, rgba(59, 91, 219, 0.5), transparent 55%),
        radial-gradient(ellipse 70% 50% at 0% 110%, rgba(20, 184, 166, 0.22), transparent 50%),
        linear-gradient(168deg, #0f172a 0%, #1e293b 42%, #0f172a 100%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    margin: 0 0 1rem;
    font-size: clamp(1.85rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: #fff;
}

.hero-desc {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--hero-text-muted);
    max-width: 36rem;
    margin: 0 auto 1.75rem;
}

.hero-actions {
    display: flex;
    gap: 0.875rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero .btn-primary {
    background: linear-gradient(180deg, #4f6ef7 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 6px 22px rgba(59, 91, 219, 0.45);
    border: 0;
}

.hero .btn-primary:hover {
    filter: brightness(1.08);
    text-decoration: none;
}

.hero .btn-outline {
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.hero .btn-outline:hover {
    background: #fff;
    color: var(--color-text) !important;
    border-color: #fff;
    text-decoration: none;
}

.hero-rating {
    font-size: 0.9rem;
    color: var(--hero-text-muted);
    margin: 0;
}

/* Hero 信任条与数据 */
.hero-trust {
    list-style: none;
    margin: 0 auto 1.75rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    max-width: 52rem;
}

.hero-trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--hero-text-muted);
}

.hero-trust li::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
    flex-shrink: 0;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2rem;
    margin: 0 auto 1.5rem;
    max-width: 40rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-accent);
    line-height: 1.1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--hero-text-muted);
    margin-top: 0.2rem;
}

/* Sections */
.section {
    padding: clamp(2.75rem, 5vw, 3.75rem) 0;
    background: var(--surface-elevated);
}

.section.section--muted {
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, #eef2f6 100%);
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    text-align: center;
    color: var(--color-text);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin: 0 0 2rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    margin-bottom: 2rem;
}

.lead {
    font-size: 1.125rem;
    max-width: 720px;
    margin: 0 auto 2rem;
    text-align: center;
    color: #475569;
}

/* 中段强调条 */
.band-cta {
    text-align: center;
    padding: clamp(2.5rem, 5vw, 3.25rem) 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 55%, #134e4a 160%);
    color: var(--hero-text-muted);
    border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.band-cta .section-title {
    color: #fff;
}

.band-cta-lead {
    margin: 0 auto 1.5rem;
    max-width: 32rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #e2e8f0;
}

.band-cta .hero-actions {
    margin-bottom: 0;
}

.band-cta .btn-primary {
    background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    box-shadow: 0 6px 22px rgba(20, 184, 166, 0.35);
}

.band-cta .btn-primary:hover {
    filter: brightness(1.06);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.2s var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: rgba(59, 91, 219, 0.2);
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Types grid */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.type-card {
    position: relative;
    background: var(--surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.35rem 1.35rem 1.35rem 1.15rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary);
    transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.type-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.type-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--color-primary-dark);
}

.type-name-zh {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem;
}

.type-desc {
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    color: #475569;
}

.text-center {
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .card:hover,
    .type-card:hover {
        transform: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
}

/* Test CTA */
.steps-list {
    list-style: none;
    padding: 0;
    max-width: 560px;
    margin: 1.5rem auto;
    counter-reset: step;
}

.steps-list li {
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
    counter-increment: step;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent-dark));
    border-radius: 50%;
}

.steps-list li strong {
    display: block;
}

.test-actions {
    text-align: center;
    margin: 2rem 0;
}

.test-actions .note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.sample-questions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.sample-pair {
    margin-bottom: 1rem;
}

.sample-pair ul {
    margin: 0.25rem 0 0 1.25rem;
}

/* History */
.history-block {
    margin-top: 2rem;
    padding: 1.75rem;
    background: var(--surface-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.history-block h3 {
    margin-top: 0;
}

.link-more {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Stats */
.stats-bar {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, #fff 0%, var(--color-bg-alt) 100%);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.rating-num {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.25rem;
    color: var(--color-accent-dark);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .rating-num {
        background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
}

.stats-bar > p:not(.rating-num) {
    margin: 0 0 1rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.stat-bars {
    list-style: none;
    padding: 0;
    max-width: 420px;
    margin: 1rem auto 0;
}

.stat-bars li {
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.stat-bars .label {
    width: 5rem;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-align: left;
}

.stat-bars .bar {
    height: 1.65rem;
    min-width: 0;
    flex: 1;
    max-width: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0.5rem;
    border-radius: var(--radius-pill);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.review-card {
    background: var(--surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 0;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.review-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.review-card p {
    margin: 0 0 1rem;
    font-style: italic;
    color: #475569;
}

.review-card footer {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.review-card cite {
    font-style: normal;
    color: var(--color-primary-dark);
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .review-card:hover {
        transform: none;
    }
}

/* FAQ */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-list dt {
    font-weight: 700;
    margin-top: 1.35rem;
    margin-bottom: 0.4rem;
    color: var(--color-text);
    font-size: 1.02rem;
}

.faq-list dt:first-child {
    margin-top: 0;
}

.faq-list dd {
    margin: 0 0 0 0.25rem;
    padding-left: 1rem;
    border-left: 3px solid rgba(59, 91, 219, 0.25);
    color: var(--color-text-muted);
}

/* CTA bottom */
.cta-bottom {
    text-align: center;
    background: linear-gradient(165deg, #eff6ff 0%, #e0f2fe 40%, #ccfbf1 100%);
    border-top: 1px solid var(--color-border);
}

.cta-bottom .section-title {
    color: var(--color-text);
}

.cta-bottom .lead {
    color: #475569;
}

.cta-bottom .btn-outline {
    background: rgba(255, 255, 255, 0.65);
}

/* 与首屏 Hero「了解更多」一致：hover 为浅底深字，而非实心主色白字 */
.cta-bottom .btn-outline:hover {
    background: #fff;
    color: var(--color-text) !important;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer a {
    color: #7dd3fc;
}

.site-footer a:hover {
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p,
.footer-contact p {
    margin: 0.35rem 0;
    font-size: 0.9rem;
    opacity: 0.92;
}

.footer-links h3,
.footer-contact h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #f1f5f9;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.35rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.88;
}

.footer-bottom p {
    margin: 0.25rem 0;
}

/* Type detail page */
.type-detail .type-header {
    text-align: center;
    padding: 2rem 0;
}

.type-detail .type-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.type-dadge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.type-detail .meta-pct {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.type-detail .content-block {
    margin: 1.5rem 0;
}

.type-detail .content-block h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.type-detail .traits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.type-detail .traits-list span {
    background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 100%);
    color: var(--color-primary-dark);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(59, 91, 219, 0.15);
}

/* Page title — 与首屏语言统一（深色短带） */
.page-header {
    padding: clamp(2.25rem, 5vw, 3rem) 0;
    text-align: center;
    color: var(--hero-text);
    background-color: var(--surface-hero);
    background-image:
        radial-gradient(ellipse 90% 60% at 80% 0%, rgba(59, 91, 219, 0.35), transparent 50%),
        linear-gradient(168deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.65rem, 3.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.page-header p {
    margin: 0;
    color: var(--hero-text-muted);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
}

.page-header a {
    color: #93c5fd;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        justify-content: center;
    }

    .section {
        padding: 2.25rem 0;
    }

    .hero-trust {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 1rem;
    }
}
