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

:root {
    --primary: #4ADE80;
    --primary-dark: #22C55E;
    --bg: #FFFFFF;
    --card: #F0FDF4;
    --text: #1F2937;
    --text-secondary: #6B7280;
    --accent: #86EFAC;
    --border: #BBF7D0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 页面整体背景装饰 */
.page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(74, 222, 128, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(134, 239, 172, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* 首页 */
#page-home .container {
    text-align: center;
}

.title {
    font-size: 72px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 8px;
    margin-bottom: 8px;
    text-shadow: 4px 4px 0 rgba(74, 222, 128, 0.3);
}

.subtitle {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--accent);
}

.desc {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.btn-primary {
    width: 100%;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(74, 222, 128, 0.5);
}

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

.disclaimer {
    margin-top: 40px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 答题页 */
#page-quiz {
    padding-top: 40px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

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

.question-counter {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.question-box {
    background: var(--card);
    border-radius: 20px;
    padding: 30px 25px;
    margin-bottom: 30px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

#question-text {
    font-size: 20px;
    line-height: 1.6;
    text-align: center;
    font-weight: 600;
}

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

.option-btn {
    width: 100%;
    padding: 18px 20px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.option-btn:hover {
    border-color: var(--primary);
    background: var(--card);
}

.option-btn:active {
    transform: scale(0.98);
}

.force-hint {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

/* 结果预览页 */
#page-preview {
    text-align: center;
}

.result-teaser {
    margin-bottom: 40px;
}

.teaser-label {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.type-code {
    font-size: 80px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 10px;
    margin-bottom: 10px;
    filter: blur(8px);
    user-select: none;
}

.type-name {
    font-size: 20px;
    color: var(--text-secondary);
    filter: blur(6px);
    user-select: none;
}

.blur-content {
    background: var(--card);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    filter: blur(4px);
    border: 1px solid var(--border);
}

.blur-content p {
    margin-bottom: 15px;
    font-size: 14px;
}

.blur-content ul {
    list-style: none;
    text-align: left;
}

.blur-content li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
}

.blur-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-dark);
}

.pay-section {
    margin-top: 20px;
}

.btn-pay {
    width: 100%;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4);
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(74, 222, 128, 0.5);
}

.btn-pay .text {
    font-size: 18px;
    font-weight: 700;
}



/* 结果详情页 */
#page-result {
    padding-top: 30px;
}

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

.match-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.match-percent {
    font-size: 48px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 15px;
}

.type-code-large {
    font-size: 64px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 8px;
    margin-bottom: 10px;
}

.type-name-large {
    font-size: 18px;
    color: var(--text-secondary);
}

.character-image {
    width: 150px;
    height: 150px;
    margin: 20px auto;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--primary);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.character-emoji {
    font-size: 80px;
    line-height: 1;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.radar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

#radar-chart {
    max-width: 100%;
}

.comment-section,
.system-note {
    background: var(--card);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.comment-section h3,
.system-note h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.comment-text {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
}

.note-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--primary-dark);
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-secondary {
    flex: 1;
    padding: 16px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    animation: fadeIn 0.4s ease;
}

/* 响应式 */
@media (max-width: 380px) {
    .title {
        font-size: 60px;
    }
    
    .type-code {
        font-size: 64px;
    }
    
    .type-code-large {
        font-size: 52px;
    }
}
