* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 700px;
    width: 100%;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.card h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1rem;
    color: #999;
    margin-bottom: 25px;
}

.intro p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* 特质标签 */
.traits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.trait {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 25px;
}

.trait-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.trait-name {
    color: #555;
    font-size: 0.9rem;
}

.note {
    color: #999;
    font-size: 0.85rem;
    margin-top: 20px;
}

/* 按钮样式 */
.btn {
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 进度条 */
.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: white;
    transition: width 0.3s ease;
}

.progress-text {
    color: white;
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* 问题区域 */
.question-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.dimension-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 20px;
    background: #9b59b6;
}

.question-card h2 {
    font-size: 1.3rem;
    color: #333;
    line-height: 1.5;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 选项按钮 */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background: white;
    border: 2px solid transparent;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.option-btn:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.option-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.option-btn.selected .number,
.option-btn.selected .text {
    color: white;
}

.option-btn .number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
}

.option-btn.selected .number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.option-btn .text {
    color: #555;
    font-size: 1rem;
}

/* 导航按钮 */
.navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* 密码表单 */
.password-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.error-msg {
    color: #e74c3c;
    font-size: 0.9rem;
    margin: 10px 0 0 0;
    min-height: 20px;
}

.help-text {
    color: #999;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* 加载动画 */
.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 结果页面 */
.result-container {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.result-container h1 {
    font-size: 1.8rem;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

/* 分数概览 */
.scores-overview {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 30px;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-label {
    color: #555;
    font-weight: 500;
}

.score-value {
    font-size: 1.3rem;
    font-weight: bold;
}

.score-bar {
    height: 24px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    width: 0%;
    transition: width 1s ease;
    border-radius: 12px;
}

/* AI分析 */
.ai-analysis {
    margin-top: 30px;
}

.ai-analysis h2 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.ai-content {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid #e8ecff;
    border-radius: 20px;
    padding: 30px;
    line-height: 2;
    color: #444;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
    font-size: 1rem;
    box-shadow: inset 0 2px 10px rgba(102, 126, 234, 0.05);
}

.ai-content::-webkit-scrollbar {
    width: 8px;
}

.ai-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.ai-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.ai-content .placeholder {
    color: #999;
    text-align: center;
}

/* 结果操作按钮 */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

/* 响应式 */
@media (max-width: 600px) {
    .card, .result-container, .question-card {
        padding: 25px;
    }

    .card h1, .result-container h1 {
        font-size: 1.5rem;
    }

    .question-card h2 {
        font-size: 1.1rem;
    }

    .option-btn {
        padding: 12px 15px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
}
