/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* 标题样式 */
h1 {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #4a5568;
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
}

h3 {
    color: #4a5568;
    font-size: 18px;
    margin-bottom: 10px;
}

/* 文本样式 */
.intro-text {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

.section-intro {
    color: #718096;
    font-size: 16px;
    margin-bottom: 25px;
    text-align: center;
}

.hint-text {
    color: #a0aec0;
    font-size: 14px;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    text-align: right;
    color: #a0aec0;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* 按钮样式 */
.btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.4);
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

/* 滑块样式 */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.slider-item {
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.slider-item label {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 10px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-value {
    min-width: 40px;
    text-align: right;
    color: #667eea;
    font-weight: 600;
    font-size: 18px;
}

/* Likert量表样式 */
.question-block {
    margin-bottom: 35px;
}

.question-label {
    display: block;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.question-number {
    color: #667eea;
    margin-right: 8px;
}

.likert-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
}

.likert-question {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 500;
}

.likert-scale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.scale-label {
    font-size: 12px;
    color: #718096;
    text-align: center;
    min-width: 80px;
}

.likert-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.likert-option:hover {
    background: #edf2f7;
}

.likert-option input[type="radio"] {
    margin-bottom: 5px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.likert-option span {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

/* 特殊框样式 */
.instruction-content {
    padding: 20px 0;
}

.warning-box {
    background: #fff5f5;
    border-left: 4px solid #f56565;
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
}

.warning-box h3 {
    color: #c53030;
    margin-bottom: 12px;
}

.warning-box ul {
    margin-left: 20px;
    color: #742a2a;
}

.warning-box li {
    margin-bottom: 8px;
}

.consent-text {
    text-align: center;
    color: #4a5568;
    font-size: 16px;
    margin-top: 25px;
}

.info-box {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
}

.info-box h3 {
    color: #2c5282;
    margin-bottom: 12px;
}

.info-box p {
    color: #2d3748;
    margin-bottom: 10px;
}

/* AI阅读页面样式 */
.scenario-box {
    background: #f7fafc;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
}

.scenario-intro {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.user-query, .ai-response {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
}

.user-query {
    background: #edf2f7;
    border-left: 4px solid #4299e1;
}

.ai-response {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
}

.icon {
    font-size: 24px;
    margin-right: 10px;
}

.query-text {
    color: #2d3748;
    font-size: 16px;
    margin-top: 10px;
    font-style: italic;
}

.response-content {
    margin-top: 15px;
}

.ai-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    white-space: pre-wrap;
    font-family: "Courier New", monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #2d3748;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.timer-notice {
    text-align: center;
    margin: 25px 0;
    padding: 15px;
    background: #fef5e7;
    border-radius: 8px;
}

.timer-notice p {
    color: #c05621;
    font-size: 16px;
}

/* 回忆框 */
.recall-box {
    background: #fffaf0;
    border: 2px solid #fbd38d;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.recall-box p {
    color: #744210;
    margin-bottom: 15px;
}

.product-description {
    background: white;
    padding: 15px;
    border-radius: 6px;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.8;
    color: #2d3748;
    border: 1px solid #fbd38d;
}

/* 错误消息 */
.error-msg {
    color: #e53e3e;
    background: #fff5f5;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    display: none;
    border-left: 4px solid #e53e3e;
}

.error-msg:not(:empty) {
    display: block;
}

/* 感谢页面 */
.thank-you-card {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.thank-you-content {
    margin: 30px 0;
}

.thank-you-content p {
    color: #4a5568;
    font-size: 18px;
    margin-bottom: 15px;
}

.closing-text {
    color: #a0aec0;
    font-size: 14px;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card {
        padding: 25px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .likert-scale {
        flex-wrap: wrap;
    }
    
    .scale-label {
        min-width: 60px;
        font-size: 11px;
    }
    
    .slider-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .slider-value {
        text-align: center;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
