/**
 * style.css - 物含妙理网站样式文件
 * 
 * 文件说明：
 * 1. 此文件包含网站的所有CSS样式规则
 * 2. 从原index.html文件中提取而来，实现样式与结构的分离
 * 3. 使用CSS变量系统实现主题一致性
 * 4. 包含响应式设计和动画效果
 * 
 * 文件结构：
 * 1. CSS变量定义 (:root)
 * 2. 全局样式 (body, 背景装饰)
 * 3. 头部和导航栏样式
 * 4. 网格布局样式
 * 5. 组件样式 (按钮、列表、表单等)
 * 6. 响应式设计 (媒体查询)
 * 7. 动画效果
 * 
 * 使用说明：
 * - 主页面 (index.html): 导航栏、网格布局、按钮、格言、点名、问题等
 * - 班级纪实页面: 轮播图、记录列表
 * - 参考文章页面: 参考文章列表
 * - 物理图片页面: 图片展示
 * - 可视化教学页面: 课程卡片
 */

/* ==================== CSS变量定义 ==================== */
/* 定义网站的主题颜色和常用值，便于统一管理和维护 */
:root {
    /* 主色调 - 蓝色系 */
    --primary-color: #1e88e5;           /* 主要品牌色，用于按钮、链接、标题等 */
    --primary-light: #64b5f6;          /* 主色调浅色，用于悬停效果、背景等 */
    --primary-dark: #1565c0;           /* 主色调深色，用于激活状态等 */
    --primary-gradient: linear-gradient(135deg, #1e88e5 0%, #64b5f6 100%); /* 渐变背景，用于头部装饰、按钮等 */
    
    /* 辅助色 */
    --secondary-color: #37474f;        /* 次要颜色，用于副标题、边框等 */
    --accent-color: #ff6b6b;           /* 强调色，用于警告、错误提示或重要元素 */
    --success-color: #2ecc71;          /* 成功状态颜色，用于成功提示、完成状态 */
    
    /* 背景色 */
    --light-blue: #e3f2fd;             /* 浅蓝色背景，用于页面主体背景 */
    --lighter-blue: #f5faff;           /* 更浅的蓝色背景，用于卡片内部背景 */
    --white: #ffffff;                  /* 纯白色，用于卡片背景、文字反色等 */
    --light-gray: #f8f9fa;             /* 浅灰色，用于次要背景、分隔线等 */
    
    /* 文字颜色 */
    --text-dark: #263238;              /* 主要文字颜色，用于标题、正文等 */
    --text-gray: #607d8b;              /* 次要文字颜色，用于描述、日期、标签等 */
    
    /* 阴影效果 */
    --shadow-light: 0 8px 25px rgba(30, 136, 229, 0.08);   /* 轻量阴影，用于卡片、按钮等 */
    --shadow-medium: 0 12px 30px rgba(30, 136, 229, 0.12); /* 中等阴影，用于悬停效果等 */
}

/* ==================== 全局样式 ==================== */
/* 设置页面基础样式和背景装饰 */
body {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5faff 100%);
    min-height: 100vh;
    font-family: 'Microsoft YaHei', 'Segoe UI', 'PingFang SC', sans-serif;
    padding: 20px;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰元素 - 右上角圆形渐变 */
body::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.05) 0%, rgba(30, 136, 229, 0) 70%);
    z-index: -1;
}

/* 背景装饰元素 - 左下角圆形渐变 */
body::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.05) 0%, rgba(100, 181, 246, 0) 70%);
    z-index: -1;
}

/* ==================== 头部和导航栏样式 ==================== */
/* 网站头部容器样式 */
.header {
    background: var(--white);
    color: var(--text-dark);
    padding: 0;
    box-shadow: var(--shadow-light);
    margin-bottom: 25px;
    border-radius: 16px;
    position: relative;
    z-index: 1050; /* 提高z-index确保在最上层 */
    overflow: visible; /* 改为visible确保下拉菜单能显示 */
    border: none;
}

/* 头部顶部装饰线 */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

/* 导航栏基础样式 */
.navbar {
    padding: 1.2rem 2rem;
    background: var(--white) !important;
}

/* 网站品牌标识 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
    transform: translateY(-2px);
}

/* 品牌标识中的图标样式 */
.navbar-brand i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航链接样式 */
.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin-right: 8px;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 10px 18px !important;
    position: relative;
}

/* 导航链接底部指示线 */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary-color) !important;
    background-color: rgba(30, 136, 229, 0.05);
}

.nav-link:hover::before {
    width: 80%;
}

/* ==================== 下拉菜单样式 ==================== */
/* 修复下拉菜单样式 */
.dropdown-menu {
    background: var(--white);
    border: none;
    box-shadow: var(--shadow-medium);
    border-radius: 12px;
    padding: 8px 0;
    margin-top: 8px !important;
    min-width: 200px;
}

.dropdown-item {
    color: var(--text-dark);
    padding: 10px 20px;
    transition: all 0.2s;
    border-radius: 6px;
    margin: 0 8px;
    width: calc(100% - 16px);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--primary-gradient);
    color: var(--white) !important;
    transform: translateX(5px);
}

/* 确保下拉箭头显示正确 */
.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    color: var(--text-dark);
}

/* ==================== 日期显示样式 ==================== */
.date-display {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: 500;
    background: var(--primary-gradient);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

/* ==================== 网格布局样式 ==================== */
/* 主网格容器 - 2x2布局，用于主页面(index.html)的四个主要功能模块 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 25px;
    min-height: 70vh;
    margin-bottom: 25px;
}

/* 网格项基础样式 - 用于主页面四个模块：最近更新、随机点名、今日格言、每日一问 */
.grid-item {
    border-radius: 18px;
    padding: 25px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    overflow: hidden;
    background: var(--white);
    border: none;
    color: var(--text-dark);
    position: relative;
}

/* 网格项顶部装饰线 - 蓝色渐变装饰条 */
.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

.grid-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

/* 网格项头部样式 - 包含标题和操作按钮 */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(30, 136, 229, 0.1);
}

/* 网格项标题样式 - 用于模块标题显示 */
.grid-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
}

/* 网格标题中的图标样式 - 图标使用渐变效果 */
.grid-title i {
    margin-right: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 网格内容区域样式 - 用于模块主要内容显示 */
.grid-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ==================== 列表样式 ==================== */
.list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.list li {
    border-bottom: 1px solid rgba(30, 136, 229, 0.1);
    padding: 14px 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.list li:hover {
    background-color: rgba(30, 136, 229, 0.05);
    padding-left: 10px;
    border-radius: 8px;
}

.list li:last-child {
    border-bottom: none;
}

.list li span {
    font-size: 0.9em;
    margin-right: 20px;
    display: inline-block;
    min-width: 90px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(30, 136, 229, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    text-align: center;
}

.list li a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    flex: 1;
}

.list li a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* ==================== 按钮样式 ==================== */
/* 刷新按钮样式 - 用于主页面各模块的刷新/更换功能按钮 */
.btn-refresh {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh:hover {
    background: rgba(30, 136, 229, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.15);
}

/* 主要操作按钮样式 - 用于重要操作如"开始随机点名"等 */
.btn-action {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(30, 136, 229, 0.25);
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 按钮流光效果 - 鼠标悬停时的流光动画效果 */
.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(30, 136, 229, 0.35);
}

.btn-action:hover::before {
    left: 100%;
}

/* ==================== 特定元素样式 ==================== */
/* 格言文本样式 - 用于主页面"今日格言"模块的格言内容显示 */
#quoteText {
    font-size: 1.5rem;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 500;
    font-style: italic;
    padding: 0 10px;
}

/* 格言作者样式 - 用于主页面"今日格言"模块的作者信息显示 */
#quoteAuthor {
    text-align: center;
    opacity: 0.8;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* 问题文本样式 - 用于主页面"每日一问"模块的问题内容显示 */
#questionText {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    line-height: 1.6;
    padding: 15px;
    background: rgba(30, 136, 229, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

/* ==================== 点名区域样式 ==================== */
/* 点名区域内容布局 - 用于主页面"随机点名"模块的内容区域 */
.rollcall-item .grid-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 被选中学生显示样式 - 用于显示随机点名结果 */
#selectedStudent {
    font-size: 3rem; /* 增大字体到3rem */
    font-weight: 700;
    min-height: 100px; /* 增加最小高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-shadow: 0 3px 6px rgba(30, 136, 229, 0.15);
    transition: all 0.3s ease;
    padding: 20px 25px; /* 增加内边距 */
    background: rgba(30, 136, 229, 0.05);
    border-radius: 12px;
    margin-top: 10px;
    width: 100%; /* 确保宽度为100% */
    max-width: 100%; /* 确保不超出容器 */
    text-align: center;
    word-break: break-word; /* 长单词或长名字换行 */
    overflow-wrap: break-word; /* 确保文本在容器内换行 */
    box-sizing: border-box; /* 确保padding不会增加总宽度 */
    line-height: 1.2; /* 调整行高 */
}

/* ==================== 响应式设计 ==================== */
/* 大屏幕调整 (1200px以下) */
@media (max-width: 1200px) {
    #selectedStudent {
        font-size: 2.2rem;
    }
}

/* 中等屏幕调整 (992px以下) */
@media (max-width: 992px) {
    #selectedStudent {
        font-size: 2rem;
    }
    
    .navbar {
        padding: 1rem;
    }
    
    /* 移动端下拉菜单修复 */
    .navbar-collapse {
        background: var(--white);
        border-radius: 12px;
        margin-top: 10px;
        padding: 15px;
        box-shadow: var(--shadow-medium);
    }
}

/* 平板设备调整 (768px以下) */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        height: auto;
        gap: 20px;
    }
    
    .list li {
        padding: 12px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list li span {
        display: block;
        margin-bottom: 8px;
        width: 100%;
    }
    
    #quoteText {
        font-size: 1.3rem;
    }
    
    #selectedStudent {
        font-size: 1.8rem;
        min-height: 70px;
        padding: 12px 15px;
    }
    
    #questionText {
        font-size: 1.2rem;
    }
}

/* 手机设备调整 (480px以下) */
@media (max-width: 480px) {
    #selectedStudent {
        font-size: 1.5rem;
        min-height: 60px;
        padding: 10px 12px;
    }
}

/* ==================== 页脚样式 ==================== */
footer {
    padding: 1.5rem 0;
    background: var(--white);
    color: var(--text-dark);
    text-align: center;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    border: none;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

/* ==================== 加载和提示样式 ==================== */
.spinner-border {
    color: var(--primary-color);
}

.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-left: 4px solid var(--accent-color);
    color: #d32f2f;
}

.alert-info {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(30, 136, 229, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
}

/* ==================== 动画效果 ==================== */
/* 淡入向上动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 网格项动画已移除，立即显示 */

/* ==================== 导航栏切换器样式 ==================== */
.navbar-toggler {
    border-color: rgba(30, 136, 229, 0.2);
    border-radius: 8px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830, 136, 229, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==================== 工具栏样式 ==================== */
.section-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
}

.section-toolbar .btn {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(30, 136, 229, 0.3);
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.section-toolbar .btn:hover {
    background: rgba(30, 136, 229, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.15);
    color: var(--primary-color);
}

/* ==================== 轮播组件样式 ==================== */
/* 图片轮播容器 - 用于班级纪实页面的图片展示区域 */
.carousel-container {
    background: var(--white);
    border-radius: 18px;
    padding: 30px;
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: none;
}

/* 轮播容器顶部装饰线 - 蓝色渐变装饰条 */
.carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

/* 轮播标题区 - 包含标题和计数器 */
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(30, 136, 229, 0.1);
}

/* 轮播标题样式 - 用于班级纪实页面的轮播标题 */
.carousel-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
}

/* 轮播标题中的图标样式 - 图标使用渐变效果 */
.carousel-title i {
    margin-right: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 轮播主容器 - Bootstrap轮播组件样式 */
.carousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    background-color: var(--light-blue);
    position: relative;
}

/* 轮播内部容器 - 包含所有轮播项 */
.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    max-height: 600px;
}

/* 轮播项样式 - 单个图片展示项 */
.carousel-item {
    position: relative;
    width: 100%;
    display: none;
    transition: transform 0.6s ease-in-out;
}

.carousel-item.active {
    display: block;
}

/* 轮播图片样式 - 图片显示和尺寸控制 */
.carousel-item img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 图片信息容器 - 图片标题和描述显示区域 */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    text-align: left;
    border-radius: 0 0 12px 12px;
}

.carousel-caption h5 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.carousel-caption h5 i {
    margin-right: 8px;
    color: var(--primary-light);
}

.carousel-caption p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.carousel-caption .image-size {
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

/* 轮播指示器 - 显示当前图片位置和数量 */
.carousel-indicators {
    position: relative;
    margin: 20px 0 0 0;
    bottom: auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    z-index: 20;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(30, 136, 229, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 4px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
    border-color: var(--primary-light);
}

/* 轮播控制按钮 - 上一张/下一张按钮 */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: var(--primary-color);
    margin: 0 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid rgba(30, 136, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background-color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-image: none;
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev-icon::before {
    content: '‹';
    font-size: 30px;
    font-weight: bold;
    color: var(--primary-color);
}

.carousel-control-next-icon::before {
    content: '›';
    font-size: 30px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 图片尺寸显示 - 显示图片的尺寸信息 */
.image-size-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 5;
    backdrop-filter: blur(4px);
}

/* 轮播计数器 - 显示图片总数和当前索引 */
.carousel-count {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.carousel-count:hover {
    background: rgba(30, 136, 229, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.15);
}

.carousel-count i {
    margin-right: 8px;
}

/* ==================== 班级纪实样式 ==================== */
.records-container {
    background: var(--white);
    border-radius: 18px;
    padding: 30px;
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: none;
}

.records-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

.records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(30, 136, 229, 0.1);
}

.records-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
}

.records-title i {
    margin-right: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.records-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.record-item {
    border-bottom: 1px solid rgba(30, 136, 229, 0.1);
    padding: 18px 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.record-item:hover {
    background-color: rgba(30, 136, 229, 0.05);
    padding-left: 15px;
    transform: translateX(5px);
    border-radius: 10px;
}

.record-item:last-child {
    border-bottom: none;
}

.record-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-item-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.record-item-title:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.record-item-title::after {
    content: '→';
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
    color: var(--primary-color);
}

.record-item-title:hover::after {
    opacity: 1;
    transform: translateX(5px);
}

.record-item-date {
    color: var(--text-gray);
    font-size: 0.9rem;
    min-width: 110px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.record-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(30, 136, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.record-item:hover .record-item-icon {
    background: rgba(30, 136, 229, 0.2);
    transform: scale(1.05);
}

.records-count {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.records-count:hover {
    background: rgba(30, 136, 229, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.15);
}

.records-count i {
    margin-right: 8px;
}

/* 活动类型标签 */
.record-type-badge {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== 班级纪实页面响应式设计 ==================== */
@media (max-width: 768px) {
    .record-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .record-item-date {
        text-align: left;
        justify-content: flex-start;
        width: 100%;
    }
    
    .records-header, .carousel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .records-count, .carousel-count {
        align-self: flex-start;
    }
    
    .section-toolbar {
        justify-content: stretch;
    }
    
    .section-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
    
    .carousel-container, .records-container {
        padding: 20px;
    }
    
    .carousel-title, .records-title {
        font-size: 1.4rem;
    }
    
    .record-item {
        padding: 15px 0;
    }
    
    .record-item-icon {
        width: 42px;
        height: 42px;
        margin-right: 15px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 0.7;
        margin: 0 10px;
        width: 40px;
        height: 40px;
    }
    
    .carousel-caption {
        padding: 15px;
    }
    
    .carousel-caption h5 {
        font-size: 1.1rem;
    }
    
    .carousel-caption p {
        font-size: 0.85rem;
    }
    
    .carousel-item img {
        max-height: 400px;
    }
}

@media (max-width: 576px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 35px;
        height: 35px;
        margin: 0 5px;
    }
    
    .carousel-control-prev-icon::before,
    .carousel-control-next-icon::before {
        font-size: 20px;
    }
    
    .carousel-title {
        font-size: 1.3rem;
    }
    
    .image-size-badge {
        top: 10px;
        right: 10px;
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .carousel-item img {
        max-height: 300px;
    }
}

/* ==================== 登录界面样式 ==================== */
/* 登录模态框样式 */
#loginModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-medium);
}

#loginModal .modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem 2rem;
    border-bottom: none;
}

#loginModal .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

#loginModal .modal-body {
    padding: 2rem;
}

#loginModal .modal-footer {
    border-top: 1px solid var(--light-gray);
    padding: 1.5rem 2rem;
    border-radius: 0 0 16px 16px;
}

/* 登录表单样式 */
#loginForm .form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

#loginForm .form-control {
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#loginForm .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.15);
}

/* 登录错误提示样式 */
#loginError {
    border-radius: 10px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

/* ==================== 用户信息和班级选择样式 ==================== */
/* 用户信息显示区域 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#userDisplay {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

#usernameDisplay {
    font-weight: 600;
    color: var(--primary-color);
}

#logoutBtn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

#loginTrigger {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
}

/* 班级选择区域 */
#classSelection {
    transition: all 0.3s ease;
    margin-bottom: 1.5rem !important; /* 减小底部间距，缩小与点名按钮的间隙 */
}

#classSelection .d-flex {
    align-items: center;
    gap: 1rem;
}

#classSelection .form-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem; /* 稍微增大标签字体 */
    white-space: nowrap; /* 确保标签不换行 */
    margin-bottom: 0;
}

#classSelect {
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1.1rem; /* 稍微增大下拉框字体 */
    transition: all 0.3s ease;
    min-width: 220px; /* 进一步增加最小宽度 */
    flex-grow: 1; /* 占据剩余空间 */
}

#classSelect:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.15);
}

/* 被选中学生显示样式 - 增大字体 */
#selectedStudent {
    font-size: 3rem; /* 增大字体到3rem */
    font-weight: 700;
    min-height: 100px; /* 增加最小高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-shadow: 0 3px 6px rgba(30, 136, 229, 0.15);
    transition: all 0.3s ease;
    padding: 20px 25px; /* 增加内边距 */
    background: rgba(30, 136, 229, 0.05);
    border-radius: 12px;
    margin-top: 10px;
    width: 100%; /* 确保宽度为100% */
    max-width: 100%; /* 确保不超出容器 */
    text-align: center;
    word-break: break-word; /* 长单词或长名字换行 */
    overflow-wrap: break-word; /* 确保文本在容器内换行 */
    box-sizing: border-box; /* 确保padding不会增加总宽度 */
    line-height: 1.2; /* 调整行高 */
}

/* 点名按钮状态样式 */
#rollcallBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#rollcallBtn:disabled:hover {
    transform: none !important;
    box-shadow: var(--shadow-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    #loginModal .modal-dialog {
        margin: 1rem;
    }
    
    #loginModal .modal-body {
        padding: 1.5rem;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    #userDisplay {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    #loginModal .modal-body {
        padding: 1rem;
    }
    
    #loginModal .modal-header,
    #loginModal .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    #classSelect {
        font-size: 0.85rem;
    }
}

/* ==================== 参考文章样式 ==================== */
.reference-container {
    background: var(--white);
    border-radius: 18px;
    padding: 30px;
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: none;
    animation: fadeInUp 0.6s ease-out;
}

.reference-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(30, 136, 229, 0.1);
}

.reference-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
}

.reference-title i {
    margin-right: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reference-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.reference-item {
    border-bottom: 1px solid rgba(30, 136, 229, 0.1);
    padding: 18px 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.reference-item:hover {
    background-color: rgba(30, 136, 229, 0.05);
    padding-left: 15px;
    transform: translateX(5px);
    border-radius: 10px;
}

.reference-item:last-child {
    border-bottom: none;
}

.reference-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reference-item-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.reference-item-title:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.reference-item-title::after {
    content: '→';
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
    color: var(--primary-color);
}

.reference-item-title:hover::after {
    opacity: 1;
    transform: translateX(5px);
}

.reference-item-date {
    color: var(--text-gray);
    font-size: 0.9rem;
    min-width: 110px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.reference-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(30, 136, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.reference-item:hover .reference-item-icon {
    background: rgba(30, 136, 229, 0.2);
    transform: scale(1.05);
}

.reference-count {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.reference-count:hover {
    background: rgba(30, 136, 229, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.15);
}

.reference-count i {
    margin-right: 8px;
}

/* 资料类型标签 */
.reference-type-badge {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== 参考文章页面响应式设计 ==================== */
@media (max-width: 768px) {
    .reference-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reference-item-date {
        text-align: left;
        justify-content: flex-start;
        width: 100%;
    }
    
    .reference-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .reference-count {
        align-self: flex-start;
    }
    
    .reference-container {
        padding: 20px;
    }
    
    .reference-title {
        font-size: 1.4rem;
    }
    
    .reference-item {
        padding: 15px 0;
    }
    
    .reference-item-icon {
        width: 42px;
        height: 42px;
        margin-right: 15px;
    }
}

/* ==================== 物理图片展示样式 ==================== */
/* 图片容器 */
.image-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 图片框 */
.image-box {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.05) 0%, rgba(30, 136, 229, 0.02) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(30, 136, 229, 0.05) 100%);
    z-index: 1;
    pointer-events: none;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 10px;
    position: relative;
    z-index: 2;
}

.grid-item:hover .image-box img {
    transform: scale(1.08);
}

/* 图片描述 */
.image-description {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
    flex: 1;
    overflow-y: auto;
    max-height: 120px;
    padding: 10px;
    background: rgba(30, 136, 229, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* 图片信息 */
.image-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(30, 136, 229, 0.1);
    font-size: 0.9rem;
    color: var(--text-gray);
}

.image-number {
    display: flex;
    align-items: center;
    background: rgba(30, 136, 229, 0.1);
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--primary-color);
}

.image-date {
    display: flex;
    align-items: center;
}

/* 统计信息卡片 */
.stats-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    display: none;
}

.stats-card {
    background: var(--white);
    border-radius: 12px;
    padding: 15px 25px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.stats-card i {
    font-size: 1.5rem;
    margin-right: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-count {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.stats-text {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-left: 5px;
}

/* 图片类型标签 */
.image-category {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== 物理图片展示页面响应式设计 ==================== */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        gap: 20px;
    }
    
    .image-box {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .image-box {
        height: 220px;
    }
    
    .grid-item {
        padding: 20px;
    }
    
    .grid-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .image-box {
        height: 180px;
    }
    
    .image-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ==================== 可视化教学样式 ==================== */
/* 课程卡片特殊样式 */
.course-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(30, 136, 229, 0.1);
    font-size: 0.9rem;
    color: var(--text-gray);
}

.course-date {
    background: rgba(30, 136, 229, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--primary-color);
}

.course-count {
    font-weight: 600;
    color: var(--primary-color);
}

/* ==================== 可视化教学页面响应式设计 ==================== */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-toolbar {
        justify-content: center;
    }
    
    .section-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
    
    .grid-item {
        padding: 20px;
    }
    
    .list li {
        padding: 12px 0;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==================== 参考资料描述样式 ==================== */
.reference-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 5px;
}
