* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success-color: #10b981;
    --secondary-color: #64748b;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

#app {
    position: relative;
    min-height: 100vh;
}

.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><circle cx="1" cy="1" r="1" fill="%23ffffff" opacity="0.3"/></svg>') repeat;
    background-size: 2px 2px;
    animation: animateStars 50s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 3"><circle cx="1.5" cy="1.5" r="1" fill="%23ffffff" opacity="0.2"/></svg>') repeat;
    background-size: 3px 3px;
    animation: animateStars 100s linear infinite;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 4"><circle cx="2" cy="2" r="1" fill="%23ffffff" opacity="0.1"/></svg>') repeat;
    background-size: 4px 4px;
    animation: animateStars 150s linear infinite;
}

@keyframes animateStars {
    from { transform: translateY(0); }
    to { transform: translateY(-10000px); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-light);
}

/* 隐藏滚动条但保留滚动功能 */
body {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* 为底部备案号预留空间 */
.container {
    padding-bottom: 50px;
}

.header {
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 14px;
    color: var(--text-secondary);
}

.page {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-delay {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.fade-in-delay-2 {
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.fade-in-delay-3 {
    animation: fadeIn 0.6s ease-out 0.6s both;
}

.welcome-content {
    text-align: center;
    padding: 60px 20px;
}

.title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.author-info {
    text-align: center;
    padding: 20px;
}

.author-info p {
    margin-bottom: 10px;
}

.link {
    color: var(--primary-light);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.disclaimer {
    font-size: 13px;
    color: var(--text-secondary);
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.progress-container {
    flex: 1;
}

.progress-bar {
    height: 8px;
    background: var(--card-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-text {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--card-hover);
}

.btn-icon svg {
    width: 24px;
    height: 24px;
}

.quiz-content {
    margin-bottom: 30px;
}

.question-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.question-container h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.5;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    padding: 18px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

.option:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.option.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(129, 140, 248, 0.1));
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.option-letter {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    font-size: 16px;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.result-content {
    padding: 20px 0;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-card {
    background: linear-gradient(135deg, var(--card-bg), var(--card-hover));
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.type-image-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.type-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.type-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.type-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.type-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.type-name {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light), #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.match-percent {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.percent-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--success-color);
}

.percent-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.type-remark {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.result-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.interpretation {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    line-height: 1.8;
}

.dimensions {
    display: grid;
    gap: 16px;
}

.dimension-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dimension-name {
    font-weight: 600;
}

.dimension-value {
    color: var(--primary-light);
    font-weight: 700;
}

.dimension-bar {
    height: 8px;
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
}

.dimension-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 4px;
    transition: width 0.8s ease;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border-color);
}

.modal-content h3 {
    margin-bottom: 24px;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.share-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.share-option:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
}

.share-option svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .type-name {
        font-size: 48px;
    }
    
    .percent-number {
        font-size: 36px;
    }
    
    .quiz-footer {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .title {
        font-size: 26px;
    }
    
    .welcome-content {
        padding: 30px 10px;
    }
    
    .question-container {
        padding: 20px;
    }
    
    .option {
        padding: 14px 16px;
    }
    
    .result-card {
        padding: 24px;
    }
}