/* css/styles.css */

/* --------------- 基础样式 --------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #3a86ff;
    /* 主色调 */
    --secondary-color: #5a8dee;
    /* 次主色调 */
    --light-blue: #a2d2ff;
    /* 浅蓝色 */
    --very-light-blue: #e0f2ff;
    /* 极浅蓝色，用于背景或强调 */
    --text-dark: #2c3e50;
    /* 深色文本 */
    --text-light: #5d6d7e;
    /* 浅色文本 */
    --white: #ffffff;
    --shadow: rgba(58, 134, 255, 0.1);
    /* 基础阴影 */
    --transition: all 0.3s ease;
    /* 过渡效果 */
    --border-radius-lg: 16px;
    --border-radius-md: 8px;
}

body {
    background-color: #f8fafd;
    color: var(--text-dark);
    line-height: 1.7;
    /* 增加行高，提升可读性 */
    min-height: 100vh;
    background-image: linear-gradient(135deg, #f5f7ff 0%, #f0f8ff 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------- 头部样式 --------------- */
header {
    padding: 25px 0;
    text-align: center;
    background-color: var(--white);
    box-shadow: 0 4px 15px var(--shadow);
    /* 阴影更柔和 */
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.logo-icon {
    color: var(--primary-color);
    font-size: 36px;
    /* 增大图标 */
    animation: pulse 2s infinite alternate;
}

.logo-text {
    font-size: 32px;
    /* 增大文字 */
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    color: var(--text-light);
    font-size: 17px;
    /* 略微增大 */
    letter-spacing: 1px;
}

/* --------------- 主体内容区域 --------------- */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px 0;
    animation: fadeIn 1s ease-out 0.3s both;
}

/* --------------- 文本区域样式 --------------- */
.text-section {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    /* 调整阴影 */
    transition: var(--transition);
    border-left: 8px solid var(--primary-color);
    /* 加粗左侧边框 */
    padding-bottom: 120px;
    /* 增加底部内边距，为交错显示腾出更多空间 */
    position: relative;
    /* 确保 z-index 在父容器中有效 */
    z-index: 10;
    /* 文本区域应在浮动元素和页脚之上，但在子页面卡片悬停时之下 */
}

.text-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(58, 134, 255, 0.2);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    /* 增大间距 */
    margin-bottom: 30px;
    /* 增大底部间距 */
    padding-bottom: 15px;
    border-bottom: 2px solid var(--very-light-blue);
}

.section-title i {
    color: var(--primary-color);
    font-size: 28px;
    /* 增大图标 */
}

.section-title h2 {
    font-size: 30px;
    /* 增大标题 */
    color: var(--text-dark);
}

.text-content {
    font-size: 18px;
    /* 基础文本大小 */
    color: var(--text-light);
}

.text-content p {
    margin-bottom: 22px;
    /* 增加段落间距 */
}

.text-content h3 {
    font-size: 26px;
    /* H3标题 */
    color: var(--primary-color);
    margin-top: 35px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.text-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 80%;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.text-content h4 {
    font-size: 22px;
    /* H4标题 */
    color: var(--text-dark);
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--very-light-blue);
    padding-bottom: 5px;
}

.text-content ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.text-content ol {
    list-style-type: decimal;
    margin-left: 25px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.text-content li {
    margin-bottom: 8px;
}

.intro-paragraph {
    font-size: 20px;
    /* 介绍段落稍大 */
    font-weight: 500;
    color: var(--text-dark);
    border-left: 4px solid var(--light-blue);
    padding-left: 15px;
    margin-bottom: 30px;
}

/* --------------- 自我评估阶段样式 --------------- */
.assessment-stage {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.assessment-stage:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(58, 134, 255, 0.1);
}

.assessment-stage h4 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}

.assessment-stage .stage-core {
    font-style: italic;
    font-weight: 600;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: var(--border-radius-md);
    background-color: var(--very-light-blue);
    border-left: 5px solid;
}

.assessment-stage .stage-subtitle {
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.assessment-stage ul {
    margin-left: 20px;
    list-style-type: circle;
    line-height: 1.7;
}

.assessment-stage ul ul {
    /* 嵌套列表 */
    list-style-type: disc;
    margin-left: 15px;
}

/* 信号灯图标样式 */
.light-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.light-icon.green {
    background-color: #18da38;
}

.light-icon.yellow {
    background-color: #e7e408;
}

.light-icon.red {
    background-color: #d32f2f;
}

/* 绿灯区 */
.stage-green h4,
.stage-green .stage-core {
    color: #18da38;
    /* 绿色 */
}

.stage-green h4 {
    border-bottom-color: #18da38;
}

.stage-green .stage-core {
    border-left-color: #18da38;
    background-color: #fffbed;
}

.stage-green ul {
    color: var(--text-light);
    /* 正常文本颜色 */
}

/* 黄灯区 */
.stage-yellow h4,
.stage-yellow .stage-core {
    color: #adab19;
    /* 醒目黄色 */
}

.stage-yellow h4 {
    border-bottom-color: #e7e408;
}

.stage-yellow .stage-core {
    border-left-color: #e7e408;
    background-color: #fff4e0;
}

.stage-yellow ul {
    color: var(--text-light);
    /* 正常文本颜色 */
}

/* 红灯区 */
.stage-red h4,
.stage-red .stage-core {
    color: #d32f2f;
    /* 红色 */
}

.stage-red h4 {
    border-bottom-color: #d32f2f;
}

.stage-red .stage-core {
    border-left-color: #d32f2f;
    background-color: #ffebeb;
}

.stage-red ul {
    color: var(--text-light);
    /* 正常文本颜色 */
}

/* 分隔线 */
.divider {
    border: none;
    border-top: 2px dashed var(--very-light-blue);
    margin: 40px auto;
    width: 80%;
}

/* --------------- 子页面区域样式 --------------- */
.subpages-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: -80px;
    /* 让子页面卡片向上偏移，与文本区域形成交错 */
    position: relative;
    /* 确保 z-index 在父容器中有效 */
    z-index: 20;
    /* 子页面卡片应显示在文本区域之上 */
}

.subpage-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 5px solid transparent;
    /* 保持顶部颜色条 */
    cursor: pointer;
}

.subpage-card:nth-child(1) {
    border-top-color: #18da38;
}

/* 绿灯区颜色 */
.subpage-card:nth-child(2) {
    border-top-color: #e7e408;
}

/* 黄灯区颜色 */
.subpage-card:nth-child(3) {
    border-top-color: #d32f2f;
}

/* 红灯区颜色 */
.subpage-card:nth-child(4) {
    border-top-color: #06d6a0;
}

/* 一个新的绿色系，代表科学与健康 */
.subpage-card:nth-child(5) {
    border-top-color: #2d98da;
}

/* 科普阅读 - 选用专业感强的深蓝色 */
.subpage-card:nth-child(6) {
    border-top-color: #a29bfe;
}

/* 深夜指南 - 选用代表夜晚与心理的紫色 */
.subpage-card:nth-child(7) {
    border-top-color: #f48c06;
}

/* 生活习惯与饮食 - 选用代表活力与健康的橙色 */
.subpage-card:nth-child(8) {
    border-top-color: #6c757d;
}

/* 开发中页面 - 选用中性灰色 */

/* 悬浮时的渐变边框效果 */
.subpage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--light-blue));
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.subpage-card:hover {
    transform: translateY(-15px);
    /* 悬停时上移更多，增加视觉层次感 */
    box-shadow: 0 18px 35px rgba(58, 134, 255, 0.2);
    /* 悬停时阴影更明显 */
    z-index: 25;
    /* 悬停时提升层级，确保在其他卡片之上 */
}

.subpage-card:active {
    transform: translateY(-5px);
    /* 点击时略微下移，模拟按压效果 */
    box-shadow: 0 10px 20px rgba(58, 134, 255, 0.15);
    /* 点击时阴影减小 */
}

.subpage-card:hover::before {
    transform: scaleX(1);
}

.subpage-icon {
    font-size: 52px;
    /* 增大图标 */
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: var(--transition);
}

.subpage-title {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.subpage-desc {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.explore-link {
    color: var(--primary-color);
    font-weight: bold;
}

/* --------------- 页脚样式 --------------- */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    color: #bdc3c7;
    font-size: 14px;
}

.copyright {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.5;
}

.disclaimer {
    color: #bdc3c7;
    font-size: 14px;
}

/* 关键部分：重置链接样式 */
.copyright a:link,
.copyright a:visited,
.copyright a:hover,
.copyright a:active,
.footer-content p a:link,
.footer-content p a:visited,
.footer-content p a:hover,
.footer-content p a:active,
.subpage-card:link,
.subpage-card:visited,
.subpage-card:hover,
.subpage-card:active {
    color: inherit;
    /* 继承父元素的颜色 */
    text-decoration: none;
    /* 去掉默认的下划线 */
}

/* --------------- 动画效果 --------------- */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}