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

/* 主题切换按钮样式 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.theme-toggle i {
    font-size: 20px;
    color: var(--primary);
    transition: all 0.3s ease;
}

/* 深色模式下的主题切换按钮样式 */
[data-theme="dark"] .theme-toggle {
    background: rgba(40, 40, 60, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-toggle i {
    color: rgba(255, 255, 255, 0.9);
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

.container {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page {
    display: none;
    width: 100%;
    max-width: 700px;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    background: var(--white);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.description {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--border);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.feature {
    text-align: center;
    padding: 20px;
}

.feature .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.feature h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.feature p {
    font-size: 14px;
    color: white;
}

.quiz-banner {
    width: 100%;
    margin: 0 0 20px 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.banner-link {
    display: block;
    text-decoration: none;
}

.banner-image {
    width: 100%;
    height: 200px;
    display: block;
    transition: transform 0.3s ease;
}

.banner-link:hover .banner-image {
    transform: scale(1.02);
}

.quiz-header {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.question-number {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.question-container {
    background: var(--white);
    border-radius: 0 0 20px 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.question-container h2 {
    font-size: 24px;
    margin-bottom: 32px;
    line-height: 1.4;
}

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

.option {
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.loading-content {
    background: var(--white);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-content h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.loading-content p {
    color: var(--text-light);
}

.result-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.result-header {
    text-align: center;
    margin-bottom: 32px;
}

.type-image-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.type-image {
    width: 420px;
    height: 320px;
    object-fit: contain;
    /* border-radius: 50%; */
    /* background: rgba(99, 102, 241, 0.1); */
    padding: 10px;
}

.type-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.type-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.type-kicker {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.type-box .type-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.match {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.type-subname {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.analysis-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.analysis-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.analysis-box p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.dim-box {
    padding: 24px;
    margin: 20px 0;
}

.dim-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.dim-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.dim-item {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.dim-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dim-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.dim-score {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.dim-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

.result-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.type-slogan {
    color: var(--text-light);
    font-size: 16px;
}

.dimensions {
    margin-bottom: 32px;
}

.dimension {
    margin-bottom: 20px;
}

.dim-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.dim-bar {
    width: 100%;
    height: 16px;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.dim-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 8px;
    transition: width 1s ease;
}

.dim-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.type-description {
    margin-bottom: 24px;
}

.type-description h3,
.career-section h3,
.compat-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text);
}

.type-description p {
    color: var(--text-light);
    line-height: 1.8;
}

.career-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.career-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.compat-types {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.compat-type {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 12px;
    text-align: center;
}

.compat-type .code {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

.compat-type .name {
    display: block;
    font-size: 12px;
    color: var(--text-light);
}

.qr-code-section {
    margin-top: 32px;
    text-align: center;
}

.qr-code-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.qr-code-text {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    justify-content: center;
}

footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.footer-links a:hover,
.footer-links a:focus,
.footer-links a:active {
    color: #ffffff;
    text-decoration: none;
    outline: none;
}

.page-section {
    padding: 60px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}



.policy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    color: rgba(255, 255, 255, 0.9);
}

.policy-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    color: #ffffff;
}

.policy-content ul {
    margin-left: 24px;
    margin-bottom: 24px;
}

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

/* 深色模式样式 */
[data-theme="dark"] body {
    background: linear-gradient(135deg, #1e1e2f 0%, #1a1a2e 100%);
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .hero {
    background: rgba(30, 30, 47, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .subtitle,
[data-theme="dark"] .description {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(40, 40, 60, 0.9);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(50, 50, 70, 0.9);
}

[data-theme="dark"] .quiz-header,
[data-theme="dark"] .question-container {
    background: rgba(30, 30, 47, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .progress-bar {
    background: rgba(40, 40, 60, 0.9);
}

[data-theme="dark"] .question-number {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .option {
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(40, 40, 60, 0.9);
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .loading-content {
    background: rgba(30, 30, 47, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
}

[data-theme="dark"] .loading-content p {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .result-card {
    background: rgba(30, 30, 47, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .type-box,
[data-theme="dark"] .analysis-box,
[data-theme="dark"] .dim-box {
    background: rgba(40, 40, 60, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .type-kicker {
    color: var(--primary);
}

[data-theme="dark"] .type-box .type-name,
[data-theme="dark"] .analysis-box h3,
[data-theme="dark"] .dim-box h3 {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .type-subname,
[data-theme="dark"] .analysis-box p,
[data-theme="dark"] .dim-desc {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .dim-item {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .dim-item h4 {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .type-slogan {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .dim-label {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .dim-bar {
    background: rgba(40, 40, 60, 0.9);
}

[data-theme="dark"] .dim-labels {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .type-description h3,
[data-theme="dark"] .career-section h3,
[data-theme="dark"] .compat-section h3 {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .type-description p {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .career-tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
}

[data-theme="dark"] .compat-type {
    background: rgba(40, 40, 60, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .compat-type .name {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .qr-code {
    border: 2px solid rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .qr-code-text {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 24px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .features {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    .feature {
        width: 100%;
    }

    .result-card {
        padding: 24px;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .quiz-banner {
        margin-bottom: 15px;
    }

    .banner-image {
        height: 150px;
    }
}