/* ============================================
   性格测试 - 发现你的内在人格
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, sans-serif;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ============ Header ============ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: #eef2ff;
}

/* ============ Hero ============ */
.hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    color: #fff;
    text-align: center;
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99,102,241,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(245,158,11,0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(167,139,250,0.2) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.hero .hero-sub {
    font-size: 1.1rem;
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 36px;
}

.hero-cta {
    display: inline-block;
    background: var(--accent);
    color: #1e1b4b;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 14px 40px;
    border-radius: 50px;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(245,158,11,0.4);
}

.hero-cta:hover {
    background: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(245,158,11,0.5);
    color: #1e1b4b;
}

/* ============ Main Container ============ */
.main-container {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px;
    width: 100%;
}

/* ============ Section Titles ============ */
.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1rem;
}

/* ============ How It Works ============ */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 56px;
}

.step-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-1);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============ Type Preview ============ */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 48px 0;
}

.type-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
    cursor: default;
}

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

.type-card.t1:hover { border-color: #818cf8; }
.type-card.t2:hover { border-color: #fb923c; }
.type-card.t3:hover { border-color: #34d399; }
.type-card.t4:hover { border-color: #f472b6; }

.type-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 16px;
}

.type-card.t1 .type-icon { background: #eef2ff; }
.type-card.t2 .type-icon { background: #fff7ed; }
.type-card.t3 .type-icon { background: #ecfdf5; }
.type-card.t4 .type-icon { background: #fdf2f8; }

.type-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.type-card .type-tag {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.type-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============ Quiz Page ============ */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-progress {
    margin-bottom: 32px;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-text {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.quiz-question {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease;
}

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

.question-number {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 28px;
    line-height: 1.5;
}

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

.option-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.option-btn:hover {
    border-color: var(--primary-light);
    background: #eef2ff;
    transform: translateX(4px);
}

.option-btn.selected {
    border-color: var(--primary);
    background: #eef2ff;
    color: var(--primary-dark);
    font-weight: 600;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    background: #c7d2fe;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #fff;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--text);
}

/* ============ Result Page ============ */
.result-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.result-header {
    padding: 48px 24px;
    border-radius: var(--radius);
    color: #fff;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}

.result-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1);
}

.result-header > * {
    position: relative;
    z-index: 1;
}

.result-type-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.result-type-name {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.result-type-sub {
    font-size: 1rem;
    opacity: 0.9;
}

.result-traits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 32px 0;
}

.trait-bar-item {
    text-align: left;
}

.trait-bar-item .trait-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.trait-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.trait-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.result-desc {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    text-align: left;
    margin-bottom: 32px;
}

.result-desc h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text);
}

.result-desc p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.8;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.result-tag {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.retake-btn {
    display: inline-block;
    margin-top: 16px;
}

/* ============ Share ============ */
.share-section {
    text-align: center;
    margin: 32px 0;
}

.share-section p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ============ Footer ============ */
.site-footer {
    background: #1e293b;
    color: rgba(255,255,255,0.6);
    padding: 40px 24px 20px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.footer-col p,
.footer-col a {
    font-size: 0.85rem;
    line-height: 2;
    color: rgba(255,255,255,0.5);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: 1100px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

.footer-bottom a {
    color: rgba(255,255,255,0.4);
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* ============ About Page ============ */
.page-content {
    max-width: 750px;
    margin: 0 auto;
}

.page-content h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef2ff;
}

.page-content h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin: 24px 0 10px;
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-indent: 2em;
}

.page-content ul,
.page-content ol {
    margin: 10px 0 18px 2em;
    color: var(--text-secondary);
}

.page-content li {
    margin-bottom: 8px;
}

.icp-box {
    background: linear-gradient(135deg, #eef2ff, #fef3c7);
    border: 2px solid #ddd6fe;
    border-radius: var(--radius);
    padding: 32px;
    margin: 32px 0;
    text-align: center;
}

.icp-box .icp-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #ccc; }
.breadcrumb .current { color: var(--text); }

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .hero h2 { font-size: 1.8rem; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 8px; }
    .main-nav a { padding: 6px 12px; font-size: 0.82rem; }
    .result-traits { grid-template-columns: 1fr; }
    .page-content p { text-indent: 1em; }
}

@media (max-width: 480px) {
    .hero { padding: 48px 16px; }
    .hero h2 { font-size: 1.4rem; }
    .quiz-question { padding: 24px 20px; }
    .question-text { font-size: 1.05rem; }
}
