/**
 * WCTI 旅游人格类型测试 - 样式文件
 * 
 * 设计风格：现代简洁，单一色调（炭灰色系）
 * 
 * 【如何修改颜色】
 * 在 :root 中修改 --primary-color 的值即可更换主色调
 * 例如：--primary-color: #2c3e50; （深蓝灰）
 *       --primary-color: #34495e; （灰蓝）
 *       --primary-color: #1a1a2e; （深紫灰）
 */

:root {
    /* 主色调 - 可修改此处更换整体颜色 */
    --primary-color: #2d2d2d;
    --primary-light: #4a4a4a;
    --primary-lighter: #6a6a6a;
    --text-color: #2d2d2d;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #fafafa;
    --bg-card: #ffffff;
    --border-color: #e5e5e5;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 页面容器 */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ========== 首页样式 ========== */
.home-page {
    text-align: center;
}

.home-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.home-author {
    font-size: 14px;
    color: var(--text-lighter);
    margin-bottom: 30px;
}

.home-disclaimer {
    font-size: 13px;
    color: var(--text-lighter);
    margin-bottom: 50px;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    display: inline-block;
}

.start-btn {
    padding: 18px 60px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background-color: var(--primary-light);
}

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

/* ========== 答题页样式 ========== */
.test-page {
    width: 100%;
}

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

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.question-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.question-number {
    font-size: 13px;
    color: var(--text-lighter);
    margin-bottom: 15px;
}

.question-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 35px;
    line-height: 1.5;
}

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

.option-btn {
    padding: 20px 25px;
    font-size: 16px;
    color: var(--text-color);
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(45, 45, 45, 0.03);
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
}

/* ========== 结果页样式 ========== */
.result-page {
    text-align: center;
}

.result-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 600px;
}

/* 人格类型标签（类似MBTI风格） */
.result-type-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.result-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 4px solid rgba(45, 45, 45, 0.1);
}

.result-name {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.result-name-en {
    font-size: 13px;
    color: var(--text-lighter);
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.result-description {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 30px;
    padding: 0 15px;
    text-align: left;
}

/* 建议词区域（突出显示） */
.result-message-box {
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.03) 0%, rgba(45, 45, 45, 0.06) 100%);
    border-left: 3px solid var(--primary-color);
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 0 12px 12px 0;
}

.result-message {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.9;
    font-style: normal;
}

.retest-btn {
    padding: 15px 50px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.retest-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

/* 匹配度显示 */
.match-score {
    font-size: 13px;
    color: var(--text-lighter);
    margin-top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 20px;
    display: inline-block;
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* ========== 响应式设计 ========== */
@media (max-width: 600px) {
    .home-title {
        font-size: 32px;
    }
    
    .question-card {
        padding: 30px 20px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .option-btn {
        padding: 15px 18px;
        font-size: 15px;
    }
    
    .result-card {
        padding: 35px 25px;
    }
    
    .result-image {
        width: 150px;
        height: 150px;
    }
    
    .result-name {
        font-size: 26px;
    }
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 20px;
    color: var(--text-light);
}
