/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #7b68ee;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border-color: #e8e8e8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* 页面切换 */
.page {
    display: none;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

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

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 40px;
}

/* 品牌标识 */
.brand-logo {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.brand-name {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.brand-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 1px;
}

.header h1 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-style: italic;
}

/* 内容区域 */
.content {
    max-width: 600px;
    margin: 0 auto;
}

/* 卡片样式 */
.intro-card,
.user-info-card,
.instructions,
.question-card,
.result-card,
.interpretation-card,
.contact-card,
.score-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.intro-card h2,
.user-info-card h3,
.instructions h3,
.result-card h3,
.interpretation-card h3,
.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 20px;
}

.intro-card p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.brand-intro {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(123, 104, 238, 0.1));
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary) !important;
    font-weight: 500;
    margin-bottom: 20px !important;
}

.brand-intro strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.radio-group {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 说明列表 */
.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text-secondary);
}

.instructions li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--primary-color);
    font-weight: bold;
}

/* 示例说明框 */
.example-box {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border-left: 4px solid var(--warning-color);
    border-radius: 8px;
}

.example-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 15px;
}

.example-item {
    margin: 8px 0;
    padding-left: 8px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

.example-item strong {
    color: var(--primary-color);
}

.example-note {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 152, 0, 0.15);
    border-radius: 6px;
    color: #d84315;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.6;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    width: 0%;
}

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

/* 测试内容 */
.test-content {
    max-width: 600px;
    margin: 0 auto;
}

.question-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.question-number {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 16px;
}

.question-text {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 32px;
    line-height: 1.8;
    font-weight: 500;
}

/* 选项样式 */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.option {
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-white);
    font-size: 16px;
}

.option:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(123, 104, 238, 0.1));
    font-weight: 600;
}

/* 导航按钮 */
.navigation-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.navigation-buttons button {
    flex: 1;
}

/* 结果页面 */
.result-header {
    text-align: center;
    margin-bottom: 32px;
}

.result-header h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.result-name {
    font-size: 18px;
    color: var(--text-secondary);
}

.result-content {
    max-width: 600px;
    margin: 0 auto;
}

/* 分数圆圈 */
.score-card {
    text-align: center;
    padding: 40px;
}

.score-circle {
    display: inline-block;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.score-value {
    font-size: 64px;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
}

.score-label {
    font-size: 16px;
    color: white;
    opacity: 0.9;
}

/* 结果等级 */
.result-level {
    font-size: 24px;
    margin-bottom: 16px;
    text-align: center;
}

.result-level.normal {
    color: var(--success-color);
}

.result-level.mild {
    color: var(--warning-color);
}

.result-level.moderate {
    color: #ff7a45;
}

.result-level.severe {
    color: var(--danger-color);
}

.result-description {
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
}

/* 评分范围 */
.score-range {
    display: grid;
    gap: 12px;
}

.range-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.range-label {
    font-weight: 600;
    color: var(--text-primary);
}

.range-desc {
    color: var(--text-secondary);
}

/* 联系信息 */
.contact-card h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 32px;
}

/* 二维码区域 - 最显著 */
.qrcode-section {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(123, 104, 238, 0.05));
    border-radius: 12px;
    margin-bottom: 32px;
    border: 2px solid var(--primary-color);
}

.qrcode {
    max-width: 350px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    border: 3px solid white;
    transition: transform 0.3s;
}

.qrcode:hover {
    transform: scale(1.02);
}

.qrcode-text {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.8;
}

/* 咨询师介绍 */
.teacher-intro {
    text-align: center;
    margin: 32px 0;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
}

.teacher-title {
    font-size: 22px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 12px;
}

.teacher-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-list {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
}

.service-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-list ul {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.service-list li {
    padding: 8px 0 8px 24px;
    color: var(--text-secondary);
    position: relative;
    line-height: 1.6;
}

.service-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 18px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    text-align: left;
    line-height: 1.8;
}

.mission {
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.6;
}

/* 地址区域 - 独立显著 */
.address-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-top: 32px;
    box-shadow: var(--shadow-md);
}

.address-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
}

.address-content {
    flex: 1;
    text-align: left;
}

.address-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.address-text {
    font-size: 18px;
    color: white;
    font-weight: 600;
    line-height: 1.6;
    margin: 0;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 32px;
    padding: 20px;
    color: white;
    font-size: 14px;
    opacity: 0.9;
}

.footer p {
    margin: 4px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .page {
        padding: 24px 20px;
    }

    .brand-name {
        font-size: 24px;
    }

    .brand-subtitle {
        font-size: 13px;
    }

    .header h1 {
        font-size: 24px;
    }

    .question-text {
        font-size: 18px;
    }

    .score-circle {
        width: 160px;
        height: 160px;
    }

    .score-value {
        font-size: 48px;
    }

    .navigation-buttons {
        flex-direction: column-reverse;
    }

    .qrcode {
        max-width: 280px;
    }

    .qrcode-text {
        font-size: 16px;
    }

    .address-section {
        flex-direction: column;
        text-align: center;
    }

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

    .address-icon {
        font-size: 36px;
    }

    .teacher-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .brand-subtitle {
        font-size: 12px;
    }

    .header h1 {
        font-size: 20px;
    }

    .subtitle {
        font-size: 14px;
    }

    .question-text {
        font-size: 16px;
    }

    .option {
        padding: 14px 16px;
        font-size: 15px;
    }

    .qrcode {
        max-width: 240px;
    }

    .qrcode-section {
        padding: 24px 16px;
    }

    .qrcode-text {
        font-size: 15px;
    }

    .address-text {
        font-size: 16px;
    }

    .address-section {
        padding: 20px 16px;
    }

    .dimension-grid {
        grid-template-columns: 1fr;
    }

    .dimensions-scores {
        grid-template-columns: 1fr;
    }

    .options-yn {
        flex-direction: column;
        gap: 12px;
    }

    .option-yn {
        max-width: 100%;
    }
}

/* MHT 特殊样式 */

/* 年级选择器 */
#userGrade {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s;
}

#userGrade:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* MHT 维度展示 */
.mht-dimensions {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}

.mht-dimensions h4 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 16px;
}

.dimension-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dimension-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* 是/否选项样式 */
.options-yn {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.option-yn {
    flex: 1;
    max-width: 200px;
    padding: 20px 40px;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.option-yes {
    color: var(--success-color);
}

.option-no {
    color: var(--text-secondary);
}

.option-yn:hover {
    transform: scale(1.05);
}

.option-yes:hover {
    border-color: var(--success-color);
    background: rgba(82, 196, 26, 0.1);
}

.option-no:hover {
    border-color: var(--text-secondary);
    background: var(--bg-light);
}

.option-yn.selected {
    transform: scale(1.05);
}

.option-yes.selected {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.option-no.selected {
    border-color: var(--text-secondary);
    background: var(--text-secondary);
    color: white;
}

/* 维度得分展示 */
.dimensions-result {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.dimensions-result h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
}

.dimensions-scores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dimension-score-item {
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}

.dimension-score-item.normal {
    border-left-color: var(--success-color);
}

.dimension-score-item.warning {
    border-left-color: var(--warning-color);
}

.dimension-score-item.danger {
    border-left-color: var(--danger-color);
}

.dimension-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dimension-score {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.dimension-status {
    font-size: 12px;
    margin-top: 4px;
}

.dimension-status.normal {
    color: var(--success-color);
}

.dimension-status.warning {
    color: var(--warning-color);
}

.dimension-status.danger {
    color: var(--danger-color);
}

.validity-note {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.validity-note.warning {
    color: var(--danger-color);
    font-weight: 600;
}

.dimension-note {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}
