/* 引入 Google Fonts (例如 Noto Sans SC) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* CSS 变量定义 */
:root {
    --primary-color: #0062cc; /* 主题蓝色微调 */
    --primary-color-darker: #004a99;
    --secondary-color: #f8f9fa; /* 淡灰色背景 */
    --accent-color: #ffc107; /* 沿用 special 页面的黄色作为强调色 */
    --text-color: #343a40; /* 主要文字颜色变深一点 */
    --text-color-light: #6c757d; /* 辅助文字颜色 */
    --background-color: #ffffff; /* 内容区域背景 */
    --border-color: #dee2e6; /* 边框颜色 */
    --header-text-color: #ffffff;
    --link-hover-bg: rgba(255, 255, 255, 0.15);

    --font-family-base: 'Noto Sans SC', 'Helvetica Neue', Helvetica, Arial, sans-serif; /* 使用新字体 */
    --border-radius: 8px; /* 统一圆角 */
    --box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* 稍微增强阴影 */
}

/* 全局样式 */
body {
    font-family: var(--font-family-base); /* 应用字体 */
    margin: 0;
    padding: 0;
    line-height: 1.7; /* 增加行高 */
    background-color: var(--secondary-color); /* 应用背景色 */
    color: var(--text-color); /* 应用文字颜色 */
    font-size: 16px; /* 标准字体大小 */
}

.container {
    width: 90%; /* 稍微加宽 */
    max-width: 1200px; /* 最大宽度限制增加 */
    margin: 30px auto; /* 上下间距增加 */
    padding: 30px; /* 内边距增加 */
    background-color: var(--background-color);
    box-shadow: var(--box-shadow); /* 应用阴影 */
    border-radius: var(--border-radius); /* 应用圆角 */
}

/* 头部和导航 */
header {
    background-color: var(--primary-color); /* 应用变量 */
    color: var(--header-text-color);
    padding: 20px 0; /* 增加内边距 */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

header h1 {
    margin: 0;
    font-size: 2.8em; /* 稍微加大 */
    font-weight: 700; /* 加粗 */
    letter-spacing: 1px; /* 轻微字间距 */
}
/* 让 H1 内的链接继承颜色 */
header h1 a {
    color: inherit;
    text-decoration: none;
}


nav ul {
    list-style: none;
    padding: 15px 0 0 0; /* 顶部留空调整 */
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin: 0 18px; /* 间距调整 */
}

nav ul li a {
    color: var(--header-text-color);
    text-decoration: none;
    font-size: 1.15em; /* 稍微加大 */
    padding: 8px 15px; /* 内边距调整 */
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, color 0.3s ease; /* 平滑过渡效果 */
    font-weight: 500; /* 适中字重 */
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--link-hover-bg);
}
/* 如果导航链接是当前页，加一点强调 */
nav ul li a.active {
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--accent-color); /* 用强调色加下划线 */
}


/* 主要内容区域 */
main h2, main h3 {
    color: var(--primary-color-darker); /* 使用深一点的蓝色 */
    border-bottom: 3px solid var(--primary-color); /* 下划线加粗并用主色 */
    padding-bottom: 10px; /* 增加底部内边距 */
    margin-top: 40px; /* 标题上方间距增加 */
    margin-bottom: 25px; /* 标题下方间距 */
    font-weight: 700;
}

main section {
    margin-bottom: 40px; /* 每个区域下方间距增加 */
}

/* 首页特色区域 */
.hero {
    background: linear-gradient(to right, var(--primary-color), var(--primary-color-darker)); /* 渐变背景 */
    color: var(--header-text-color); /* 文字用白色 */
    padding: 60px 30px; /* 增加内边距 */
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 50px;
    box-shadow: 0 6px 12px rgba(0, 98, 204, 0.3); /* 添加与背景色匹配的阴影 */
}

.hero h2 {
    margin-top: 0;
    border-bottom: none;
    color: var(--header-text-color); /* 标题也是白色 */
    font-size: 2.8em;
    margin-bottom: 15px;
}
.hero p {
    font-size: 1.2em;
    opacity: 0.9; /* 轻微透明 */
}


/* 师生介绍页面的简单布局 (后续会用卡片布局改进) */
.profile {
    background-color: var(--secondary-color); /* 使用变量 */
    border: 1px solid var(--border-color); /* 使用变量 */
    padding: 20px; /* 增加内边距 */
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    transition: box-shadow 0.3s ease; /* 添加悬停效果 */
}
.profile:hover {
    box-shadow: var(--box-shadow); /* 悬停时加深阴影 */
}

.profile h4 {
    margin-top: 0;
    margin-bottom: 10px; /* 调整间距 */
    color: var(--primary-color); /* 使用变量 */
    font-size: 1.3em;
}

.student-list {
    list-style: none;
    padding-left: 0;
    column-count: 2; /* 尝试将学生列表分为两列 (在大屏幕上) */
    column-gap: 30px;
}

.student-list li {
     padding: 8px 0; /* 增加列表项间距 */
     border-bottom: 1px dashed var(--border-color); /* 添加分隔线 */
     transition: background-color 0.2s ease;
}
.student-list li:hover {
    background-color: var(--secondary-color); /* 悬停时轻微背景 */
}
.student-list li:last-child {
    border-bottom: none;
}


/* --- 相册样式 - Swiper 轮播 --- */
.album-swiper {
    width: 100%;
    margin: 30px auto;
    border-radius: var(--border-radius);
    overflow: hidden; /* 隐藏 Swiper 内部可能溢出的元素 */
    box-shadow: var(--box-shadow);
    background-color: var(--secondary-color);
    position: relative; /* 确保按钮定位是相对于此容器 */
    /* 为下方的分页器留出空间 */
    padding-bottom: 30px; /* 根据分页器高度调整 */
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    /* Center slide text vertically */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* 为了标题定位 */
}

.swiper-slide img {
    display: block;
    width: 100%;
    max-height: 70vh; /* 限制图片最大高度，避免过高 */
    object-fit: contain; /* 保持图片比例完整显示 */
}

.swiper-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px 15px;
    font-size: 0.95em;
    text-align: center;
}


/* 自定义分页器颜色和位置 */
.swiper-pagination {
    /* 将分页器移出轮播图区域，显示在下方 */
    position: static; /* 不再绝对定位 */
    margin-top: 15px; /* 在轮播图下方增加一些间距 */
}

.swiper-pagination-bullet {
    background-color: var(--text-color-light);
    opacity: 0.7;
    margin: 0 5px !important; /* 增加圆点间距 */
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color); /* 使用主题色 */
    opacity: 1;
}

/* 自定义导航按钮颜色和样式 */
.swiper-button-prev,
.swiper-button-next {
    color: var(--primary-color); /* 使用主题色 */
    background-color: rgba(255, 255, 255, 0.7); /* 半透明白色背景 */
    border-radius: 50%; /* 圆形按钮 */
    width: 40px; /* 按钮大小 */
    height: 40px;
    transition: background-color 0.3s ease;
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
     background-color: rgba(255, 255, 255, 0.9);
     color: var(--primary-color-darker);
}

/* 调整按钮图标大小 */
.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 18px; /* 调小箭头图标 */
    font-weight: bold;
}

/* 调整按钮位置 */
.swiper-button-prev {
    left: 15px;
}
.swiper-button-next {
    right: 15px;
}



/* 页脚 */
footer {
    text-align: center;
    margin-top: 50px; /* 增加顶部间距 */
    padding: 30px 0; /* 增加内边距 */
    background-color: var(--text-color); /* 页脚背景用深色 */
    color: var(--secondary-color); /* 文字用浅色 */
    font-size: 0.95em;
}
footer p {
    margin: 0;
}


/* 分隔线 */
hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0)); /* 渐变分隔线 */
    margin: 60px 0; /* 加大分隔线间距 */
}

/* -- 首页新增板块样式 -- */

/* 班级氛围和成就区域段落样式 */
#class-atmosphere p,
#achievements p:first-of-type {
    font-size: 1.1em;
    color: var(--text-color-light);
    text-align: justify;
    margin-bottom: 20px;
}

/* 成就列表样式 */
.achievement-list {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.achievement-list li {
    background-color: var(--secondary-color);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-left: 5px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: 1.05em;
    line-height: 1.8;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.achievement-list li:hover {
    transform: translateX(5px);
    box-shadow: 3px 3px 8px rgba(0,0,0,0.05);
}


.achievement-list .subject {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9em;
    margin-right: 10px;
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

.achievement-list .subject.math { background-color: #28a745; }
.achievement-list .subject.physics { background-color: #17a2b8; }
.achievement-list .subject.chemistry { background-color: #ffc107; }
.achievement-list .subject.biology { background-color: #dc3545; }
.achievement-list .subject.other { background-color: #6c757d; }

.achievement-list .award {
    font-weight: bold;
}
.achievement-list .award.first-prize {
    color: #e64a19;
}


/* 快速导航卡片样式 */
#quick-nav h2 {
     margin-bottom: 30px;
}

.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.nav-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.nav-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.4em;
}

.nav-card h3 a {
    text-decoration: none;
    color: var(--primary-color-darker);
    transition: color 0.3s ease;
}
.nav-card h3 a:hover {
    color: var(--primary-color);
}


.nav-card p {
    color: var(--text-color-light);
    font-size: 0.95em;
    margin-bottom: 0;
}


/* 班级公告区域调整 */
#announcements {
    background-color: var(--secondary-color);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
#announcements h3 {
     margin-top: 0;
     border-bottom: none;
     padding-bottom: 0;
     margin-bottom: 15px;
     color: var(--primary-color);
}

#announcements p {
    margin-bottom: 10px;
}
#announcements p:last-child {
    margin-bottom: 0;
}


/* 响应式调整 */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }
    .student-list {
        column-count: 1;
    }
}


@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    nav ul li {
        margin: 0 10px;
    }
    .hero h2 {
        font-size: 2.2em;
    }
    .hero p {
        font-size: 1.1em;
    }
    main h2, main h3 {
        font-size: 1.8em;
    }
}

@media (max-width: 576px) {
     .achievement-list li {
         padding: 12px 15px;
         line-height: 1.6;
     }
     .nav-cards {
        grid-template-columns: 1fr;
        gap: 20px;
     }
     .swiper-button-prev,
     .swiper-button-next {
         width: 35px;
         height: 35px;
     }
     .swiper-button-prev::after,
     .swiper-button-next::after {
        font-size: 16px;
    }
     .swiper-button-prev {
        left: 10px;
    }
    .swiper-button-next {
        right: 10px;
    }
}


@media (max-width: 480px) {
     nav ul {
         padding-top: 10px;
     }
     nav ul li {
        display: block;
        margin: 8px 0;
     }
     nav ul li a {
         display: block;
         padding: 10px 15px;
     }
     .hero {
         padding: 40px 15px;
     }
     .hero h2 {
         font-size: 1.8em;
     }
      .hero p {
        font-size: 1em;
    }
    .container {
        padding: 15px;
        margin: 15px auto;
    }
     main h2, main h3 {
        font-size: 1.5em;
    }
    footer {
        padding: 20px 0;
    }
}
/* ... (文件前面所有已有的 CSS 代码保持不变) ... */

/* --- 特别惊喜页面专属样式 --- */

/* 1. 定义红色主题变量 (仅当 body 有 special-page 类时生效) */
body.special-page {
  --primary-color: #dc3545; /* Bootstrap Danger Red */
  --primary-color-darker: #c82333;
  /* 可选：给页面添加红色调背景 */
  /* background: linear-gradient(135deg, #ffe8e8, #ffcccc); */
  background-color: #fff0f0; /* 淡红色背景 */
}

/* 2. 确保全局 Header 在此页面也应用红色主题 */
body.special-page header {
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(100, 0, 0, 0.2); /* 红色阴影 */
}
/* 导航 Active 状态可能需要调整颜色以适应红色背景，这里保持黄色强调色 */
/* body.special-page nav ul li a.active { box-shadow: inset 0 -2px 0 #ffc107; } */

/* 3. 调整此页面主容器样式 */
body.special-page .container {
    border: 2px dashed var(--primary-color); /* 红色虚线边框 */
    background-color: #ffffff; /* 保持内容区白色背景 */
}

/* 4. 调整此页面标题样式 */
body.special-page main h2 {
    color: var(--primary-color-darker);
    border-bottom-color: var(--primary-color);
    text-align: center; /* 居中标题 */
    font-size: 2.5em; /* 稍微加大 */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

/* 5. 主要惊喜内容区域 */
.special-content {
    text-align: center;
    padding: 30px 0;
}

/* 6. 图片和旋转文字的聚焦区域 */
.special-focus {
    position: relative; /* 用于绝对定位子元素 */
    width: 300px; /* 容器宽度 */
    height: 300px; /* 容器高度 */
    margin: 50px auto; /* 上下边距和左右自动居中 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 7. 惊喜图片样式 */
#special-image {
    width: 200px; /* 缩小图片宽度 */
    height: 200px; /* 使其为正方形，以便形成圆形 */
    border-radius: 50%; /* 完全圆形 */
    object-fit: cover; /* 保证图片内容覆盖圆形区域不变形 */
    border: 6px solid var(--primary-color-darker); /* 加粗红色边框 */
    /* 添加闪烁/脉冲的光晕效果 */
    box-shadow: 0 0 25px rgba(220, 53, 69, 0.6);
    animation: pulseGlow 2.5s ease-in-out infinite;
}

/* 8. 定义脉冲光晕动画 */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 25px rgba(220, 53, 69, 0.6), 0 0 10px rgba(255, 100, 100, 0.4) inset;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(220, 53, 69, 0.9), 0 0 15px rgba(255, 100, 100, 0.6) inset;
        transform: scale(1.03); /* 轻微放大 */
    }
}

/* 9. 旋转文字容器样式 */
.rotating-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* 尺寸与 .special-focus 一致 */
    height: 100%;
    /* 应用旋转动画 */
    animation: rotateText 12s linear infinite;
    pointer-events: none; /* 避免文字容器阻挡下方元素 */
}

/* 10. 旋转文字本身样式 */
.rotating-text {
    /* 将文字定位在容器圆周的顶部 */
    position: absolute;
    top: -20px; /* 向上移出一点，具体数值可能需要微调 */
    left: 50%;
    transform: translateX(-50%); /* 水平居中 */
    font-size: 1.6em; /* 调整字体大小 */
    font-weight: bold;
    color: var(--primary-color-darker);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.7); /* 加一点白色描边/阴影 */
    white-space: nowrap; /* 防止文字换行 */
    pointer-events: auto; /* 允许选中文字 */
    /* background: rgba(255,255,255,0.5); */ /* Debug用，看文字块位置 */
}

/* 11. 定义旋转动画 */
@keyframes rotateText {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 12. 惊喜文字信息样式 */
.special-message {
    margin-top: 40px;
    padding: 15px;
    font-size: 1.25em;
    color: var(--text-color);
    /* background-color: rgba(255, 220, 220, 0.5); */ /* 可选的淡红背景 */
    /* border: 1px solid var(--primary-color); */
    /* border-radius: var(--border-radius); */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
body.special-page .special-message p {
    font-weight: 500;
    margin-bottom: 15px;
    line-height: 1.8;
}
body.special-page .special-message p:first-of-type {
    font-weight: bold;
    font-size: 1.2em; /* 第一段文字更突出 */
    color: var(--primary-color-darker);
}

/* 13. 音乐警告框样式 */
.audio-warning {
    margin: 30px auto;
    padding: 15px 20px;
    background-color: #f8d7da; /* Bootstrap 红色警告背景 */
    border: 1px solid #f5c6cb;
    color: #721c24; /* Bootstrap 红色警告文字 */
    border-radius: var(--border-radius);
    max-width: 600px; /* 限制宽度 */
    font-size: 0.95em;
}
.audio-warning strong {
    color: inherit; /* 继承父元素颜色 */
}

/* 14. 音频播放器样式 */
#silly-music {
    margin-top: 20px;
    width: 90%; /* 播放器宽度 */
    max-width: 450px; /* 最大宽度 */
    /* 尝试给播放器加一点红色主题感 */
    border: 2px solid var(--primary-color);
    border-radius: 25px; /* 圆角 */
    padding: 3px;
    background-color: #fceded; /* 非常淡的红色 */
}

/* --- 响应式调整 for special page (如果需要) --- */
@media (max-width: 576px) {
    body.special-page main h2 {
        font-size: 1.8em;
    }
    .special-focus {
        width: 240px; /* 在小屏幕上缩小容器 */
        height: 240px;
        margin-top: 30px;
        margin-bottom: 30px;
    }
    #special-image {
        width: 160px; /* 同步缩小图片 */
        height: 160px;
        border-width: 4px;
    }
    .rotating-text {
        font-size: 1.3em; /* 缩小旋转文字 */
        top: -15px;
    }
    .special-message {
        font-size: 1.1em;
    }
     body.special-page .special-message p:first-of-type {
        font-size: 1.15em;
    }
}
