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

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

/* 滚动行为 */
html {
    scroll-behavior: smooth;
}

/* 链接样式重置 */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.company-logo {
    font-size: 48px;
    margin-bottom: 15px;
}

.company-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.survey-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

.survey-description {
    font-size: 18px;
    opacity: 0.9;
}

.survey-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.meta-item {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* 问卷内容区域 */
.survey-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* 进度条样式 */
.progress-container {
    margin-bottom: 30px;
}

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

.progress-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 问题样式 */
.question-container {
    margin-bottom: 30px;
}

.question-text {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.required-indicator {
    color: #f44336;
    margin-left: 5px;
}

.question-hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

/* 选项容器 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 单选和多选选项样式 */
.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover, .checkbox-option:hover {
    background: #f9f9f9;
}

.radio-option.selected, .checkbox-option.selected {
    background: #f5f5f5;
}

.radio-option input, .checkbox-option input {
    margin-right: 15px;
    width: 20px;
    height: 20px;
}

.radio-option label, .checkbox-option label {
    font-size: 16px;
    cursor: pointer;
    flex: 1;
}

/* 文本输入框样式 */
.text-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.text-input:focus {
    outline: none;
}

.text-length {
    text-align: right;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.text-length.warning {
    color: #f44336;
}

/* 导航按钮 */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

/* 确保下一题按钮始终在最右侧 */
.navigation-buttons .next-btn {
    order: 2;
    margin-left: auto;
}

/* 上一题和提交按钮在左侧 */
.navigation-buttons .prev-btn,
.navigation-buttons .submit-btn {
    order: 1;
}

.nav-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-btn {
    background: #f5f5f5;
    color: #666;
}

.prev-btn:hover {
    background: #e0e0e0;
}

.next-btn, .submit-btn {
    color: white;
}

.next-btn:hover, .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 验证错误 */
.validation-error {
    color: #f44336;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

/* 结果页面 */
.result-container {
    text-align: center;
    padding: 50px 20px;
}

.thank-you-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.thank-you-message {
    font-size: 24px;
    margin-bottom: 20px;
}

.return-btn {
    padding: 12px 30px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

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

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 重要性评分 */
.importance-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
}

.rating-label {
    font-size: 12px;
    color: #666;
}

/* 调查网格 */
.surveys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.survey-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.survey-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 20px;
}

.survey-btn {
    display: block;
    width: 100%;
    padding: 15px;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.survey-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 元标签 */
.meta-badge {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}



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

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    color: #666;
}

.stat-description {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container, .survey-container {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .survey-title {
        font-size: 24px;
    }
    
    .survey-description {
        font-size: 16px;
    }
    
    .survey-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .surveys-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .survey-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
}