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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

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

/* 页面通用样式 */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

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

/* 卡片样式 */
.welcome-card, .question-card, .result-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

/* 欢迎页面样式 */
.welcome-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.welcome-header i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.welcome-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-content {
    padding: 40px;
}

.description {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
}

.instructions {
    background: #f0f7ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 40px;
}

.instructions h3 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 25px;
}

.instructions li:before {
    content: "✓";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.start-section {
    text-align: center;
}

.note {
    color: #888;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* 问卷页面样式 */
.questionnaire-container {
    max-width: 800px;
    margin: 0 auto;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
}

.question-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.question-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.question-type {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f7ff;
    color: #667eea;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.options-container {
    padding: 30px;
}

.option {
    margin-bottom: 15px;
}

.option input[type="radio"],
.option input[type="checkbox"] {
    display: none;
}

.option label {
    display: block;
    padding: 18px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #555;
}

.option label:hover {
    background: #f0f7ff;
    border-color: #667eea;
}

.option input[type="radio"]:checked + label,
.option input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    color: #667eea;
    font-weight: 500;
}

/* Likert量表样式 */
.likert-scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.likert-option {
    flex: 1;
    text-align: center;
}

.likert-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
}

.likert-option label span:first-child {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #666;
}

.likert-option label span:last-child {
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

.likert-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
}

.likert-option input[type="radio"]:checked + label span {
    color: #667eea;
}

.navigation {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
}

/* 路径指示器 */
.path-indicator {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    position: relative;
}

.path-indicator:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.path-dot {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #999;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.path-dot.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: scale(1.2);
}

/* 结果页面样式 */
.result-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.result-header i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.result-content {
    padding: 40px;
}

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

.result-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.path-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.path-result h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.path-result p {
    color: #666;
    line-height: 1.8;
}

.score-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.score-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.score-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.score-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.recommendations {
    background: #f0f7ff;
    border-radius: 15px;
    padding: 25px;
}

.recommendations ul {
    list-style: none;
    padding-left: 0;
}

.recommendations li {
    padding: 10px 0;
    color: #555;
    position: relative;
    padding-left: 30px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.recommendations li:last-child {
    border-bottom: none;
}

.recommendations li:before {
    content: "💡";
    position: absolute;
    left: 0;
}

.save-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 加载指示器 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .welcome-header, .result-header {
        padding: 30px 20px;
    }
    
    .welcome-header h1, .result-header h1 {
        font-size: 2rem;
    }
    
    .welcome-content, .result-content {
        padding: 30px 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
    
    .path-indicator {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .path-dot {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .save-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .welcome-header h1, .result-header h1 {
        font-size: 1.8rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .question-header h2 {
        font-size: 1.3rem;
    }
    
    .option label {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .likert-option label {
        min-height: 100px;
        padding: 10px 5px;
    }
    
    .likert-option label span:first-child {
        font-size: 1.5rem;
    }
}