
html {
    font-size: clamp(12px, 1.5vw, 16px);
}

/* 通用样式：设置所有元素的盒模型为 border-box，包括伪元素 */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

/* 页面基础样式 */
body {
    font-family: "Microsoft YaHei", sans-serif;
    margin: clamp(15px, 2vw, 30px);
    /* 使用clamp函数设置动态外边距 */
    background-color: #f5f7fa; /* 使用与Bootstrap兼容的背景色 */
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

/* 主标题区域样式 - 使用CSS变量兼容动态主题 */
.main-header {
    background: linear-gradient(135deg, var(--primary-color, #3E9EFF), var(--secondary-color, #26d0ce));
    margin: clamp(10px, 1.5vw, 20px) clamp(5px, 1vw, 10px) clamp(12px, 2vw, 25px);
    padding: clamp(25px, 3vw, 40px) clamp(20px, 2.5vw, 40px);
    border-radius: clamp(15px, 2vw, 25px);
    box-shadow:
        0 10px 30px rgba(62, 158, 255, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* 标题Logo容器 */
.logo-container {
    height: 0rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    transform: translateX(0.5rem);
}

/* 标题Logo样式 */
.header-logo {
    width: 80px; /* 调整为合理尺寸 */
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

/* 主标题区域的动画效果 */
@keyframes headerGlow {
    0% {
        box-shadow:
            0 10px 30px rgba(62, 158, 255, 0.3),
            inset 0 0 15px rgba(255, 255, 255, 0.2);
    }

    100% {
        box-shadow:
            0 10px 40px rgba(38, 208, 206, 0.4),
            inset 0 0 25px rgba(255, 255, 255, 0.3);
    }
}

/* 标题容器样式 */
.title-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* 应用标题样式 */
.app-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: #fff;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    padding: 15px 0;
}

/* 标题文本样式 */
.title-text {
    color: var(--text-color, white);
    padding: 15px 30px;
    position: relative;
    letter-spacing: 3px;
    font-weight: 700;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

/* 子标题样式 */
.title-sub {
    color: var(--text-color, white);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-top: 10px;
    letter-spacing: 2px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

/* 图标浮动动画 */
.sub-icon {
    animation: float 2s ease-in-out infinite;
    font-size: 1.2em;
}

/* 浮动动画定义 */
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 按钮基础样式 */
.btn {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: clamp(8px, 1vw, 12px);
    padding: clamp(12px, 1.3vw, 18px) clamp(25px, 3vw, 40px);
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color, #3E9EFF);
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 clamp(1px, 0.2vw, 2px) clamp(4px, 0.8vw, 8px) rgba(62, 158, 255, 0.2);
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    -webkit-touch-callout: none; /* 禁止长按弹出菜单 */
    -webkit-user-select: none; /* 禁止选择文本 */
    user-select: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(62, 158, 255, 0.4);
}

.btn.active {
    background: var(--primary-color, #3E9EFF);
    color: white;
    box-shadow: 0 4px 20px rgba(62, 158, 255, 0.4);
}

/* 年级导航样式 */
.grade-tabs {
    display: flex;
    gap: clamp(10px, 1.5vw, 20px);
    margin-bottom: clamp(10px, 1.5vw, 20px);
}

/* 年级按钮样式 */
.grade-btn {
    padding: clamp(12px, 1.3vw, 18px) clamp(25px, 3vw, 40px);
    border: none;
    border-radius: clamp(8px, 1vw, 12px);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color, #3E9EFF);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 clamp(1px, 0.2vw, 2px) clamp(4px, 0.8vw, 8px) rgba(62, 158, 255, 0.2);
    font-weight: 600;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 悬停动画 */
.grade-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(62, 158, 255, 0.4);
}

/* 选中样式 */
.grade-btn.active {
    background: var(--primary-color, #3E9EFF);
    color: white;
    box-shadow: 0 4px 20px rgba(62, 158, 255, 0.4);
}

/* 班级导航样式 */
.class-tabs {
    display: flex;
    gap: clamp(4px, 0.8vw, 8px);
    margin-bottom: clamp(12px, 1.8vw, 25px);
}

/* 班级按钮样式 */
.class-btn {
    padding: clamp(12px, 1.3vw, 18px) clamp(25px, 3vw, 40px);
    border: none;
    border-radius: clamp(8px, 1vw, 12px);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color, #3E9EFF);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 clamp(1px, 0.2vw, 2px) clamp(4px, 0.8vw, 8px) rgba(62, 158, 255, 0.2);
    font-weight: 600;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 悬停动画 */
.class-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(62, 158, 255, 0.4);
}

/* 选中样式 */
.class-btn.active {
    background: var(--primary-color, #3E9EFF);
    color: white;
    box-shadow: 0 4px 20px rgba(62, 158, 255, 0.4);
}

/* 提示标记样式 */
.auto-flag {
    color: #ff4400dd;
    font-size: 1.2em;
    margin-left: 8px;
}

/* 内容区域样式 */
.content-box {
    background: rgba(255, 255, 255, 0.9);
    padding: clamp(15px, 1.5vw, 20px);
    border-radius: clamp(8px, 1vw, 12px);
    margin-bottom: clamp(15px, 1.8vw, 25px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(235, 235, 235, 0.8);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease;
}

/* 内容区域悬停效果 */
.content-box:hover {
    transform: translateY(-2px);
}

/* 图片容器样式 */
.image-container {
    width: 100%;
    height: clamp(50vh, 70vw, 80vh);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    touch-action: none;
    will-change: transform;
}

/* 操作提示样式 */
.operation-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .image-container {
        height: 70vh;
    }

    .operation-hint {
        font-size: 12px;
        padding: 6px 12px;
        bottom: 10px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 85vh;
    }
}

/* 可缩放图片样式 */
#zoomable-image {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.2s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    position: absolute;
    pointer-events: auto;
    /* 添加以下属性解决图片放大模糊问题 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: bicubic;
}

image {
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* 图片盒子样式 */
.image-box {
    width: 100%;
    aspect-ratio: 4/3;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: block;
    position: relative;
    background: #f9f9f9;
    transition: border-color 0.3s ease;
    min-height: 150px; /* 确保最小高度，防止过度压缩 */
    overflow: hidden; /* 防止内容溢出 */
}

/* 图片盒子内的图片样式 */
.image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}


/* 历史作业网格容器样式 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    min-height: 300px;
    position: relative;
}

/* 网格项样式 - 遵循网格项组件布局与图片显示规范 */
.grid-item {
    aspect-ratio: 4/3; /* 设置固定宽高比 */
    background: rgb(255, 255, 255);
    border-radius: 8px;
    background-size: contain; /* 使用contain确保完整显示 */
    background-position: center; /* 居中对齐 */
    background-repeat: no-repeat;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden; /* 防止内容溢出 */
    min-height: 150px; /* 设置最小高度 */
    width: 100%; /* 确保网格项占满容器宽度 */
}

/* 网格项悬停效果 */
.grid-item:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(62, 158, 255, 0.15);
}

/* 修复Bootstrap模态框相关样式，允许背景滚动 */
body.modal-open {
    overflow: visible !important; /* 允许body滚动 */
    padding-right: 0 !important; /* 移除Bootstrap添加的右边距 */
}

/* 确保html和body元素允许滚动 */
html {
    overflow: auto;
}

body {
    overflow: auto;
}

/* 模态框基础样式调整，确保在页面可滚动时也能正确定位 */
.modal {
    display: block; /* 保持模态框在文档流中 */
}

.modal-dialog {
    pointer-events: none; /* 防止模态框影响页面滚动 */
    margin: 1.75rem;
    max-width: calc(100vw - 3.5rem);
    max-height: calc(100vh - 3.5rem);
}

.modal.show .modal-dialog {
    pointer-events: auto; /* 显示时恢复指针事件 */
}

/* 修复Bootstrap模态框backdrop的z-index问题 */
.modal-backdrop {
    display: none !important; /* 隐藏背景遮罩以允许页面滚动 */
}

/* 模态框显示时的样式 */
.modal.show {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    background-color: rgba(0,0,0,0.5);
}

/* 优化模态框居中和自适应高度 */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal-dialog-centered::before {
    display: block;
    height: calc(100vh - 3.5rem);
    content: "";
}

.modal-dialog-scrollable {
    height: calc(100% - 3.5rem);
}

.modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer {
    flex-shrink: 0;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

/* 上传模态框样式调整 */
#uploadModal .modal-dialog {
    max-width: 55em; /* 限制上传模态框的最大宽度 */
    margin: 0rem auto; /* 垂直居中，但留出空间 */
}

#uploadModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* 限制最大高度 */
}

#uploadModal .modal-body {
    flex: 1;
    overflow-y: auto; /* 内容超出时允许滚动 */
    padding: 1.5rem;
}

/* 赞助模态框样式调整 */
#sponsor-modal .modal-dialog {
    max-width: 500px; /* 限制赞助模态框的最大宽度 */
    margin: 3rem auto; /* 垂直居中，但留出空间 */
}

#sponsor-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* 限制最大高度 */
}

#sponsor-modal .modal-body {
    flex: 1;
    overflow-y: auto; /* 内容超出时允许滚动 */
    padding: 1.5rem;
}

/* 图片模态框样式 */
#image-modal .modal-content {
    background-color: rgba(0, 0, 0, 0.9); /* 深色背景突出图片 */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90vh;
    margin: 2.5vh auto;
    border-radius: 8px;
    overflow: hidden;
}

#image-modal .modal-header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(30, 30, 30, 0.85) 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem !important;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#image-modal .modal-body {
    display: flex;
    flex-direction: column;
    height: calc(100% - 3.5rem); /* 减去header的高度 */
    padding: 0;
    width: 100%;
    overflow: hidden; /* 图片模态框不需要内部滚动 */
}

#image-modal .modal-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    background: white;
    border-radius: 4px;
}

#image-modal .modal-title {
    color: white;
}

#image-modal .image-footer {
    background-color: rgba(248, 249, 250, 0.9);
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    width: 100%;
    box-sizing: border-box;
}

/* 模态框关闭按钮样式 */
#image-modal .btn-close {
    position: relative;
    z-index: 1055; /* 确保关闭按钮在图片上方 */
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框内容区域 */
#image-modal .image-container {
    position: relative;
    width: 100%;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0; /* 允许flex子项收缩至内容以下 */
}

.zoom-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s;
}

/* 通用模态框内容滚动样式 */
.modal-content {
    max-height: 90vh; /* 限制模态框最大高度 */
    overflow: hidden; /* 防止内容溢出 */
}

.modal-body {
    max-height: 70vh; /* 限制内容区域最大高度 */
    overflow-y: auto; /* 允许内容垂直滚动 */
    overflow-x: hidden; /* 防止水平滚动 */
}

/* 针对不同屏幕尺寸的响应式优化 */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    #uploadModal .modal-dialog,
    #sponsor-modal .modal-dialog {
        max-width: 95vw; /* 在小屏幕上使用更大宽度 */
    }
    
    .modal-body {
        max-height: 60vh; /* 在小屏幕上调整内容区域高度 */
        padding: 1rem;
    }
    
    /* 为小屏幕优化图片模态框 */
    #image-modal .modal-header {
        padding: 0.75rem 1rem;
    }
    
    #image-modal .modal-title {
        font-size: 1.2rem;
    }
    
    #image-modal .image-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    #image-modal .image-footer .image-controls,
    #image-modal .image-footer > div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    #image-modal .image-footer button {
        flex: 1 1 auto;
        min-width: 80px;
        font-size: 0.85rem;
        padding: 0.375rem 0.5rem;
    }
    
    #image-modal .image-info {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
@media (min-width: 768px) {
    #image-modal .image-footer {
        flex-direction: row;
        align-items: center;
    }
    
    #image-modal .image-footer .image-controls {
        flex: 0 0 auto;
    }
}

@media (min-width: 992px) {
    .modal-lg,
    .modal-dialog-lg {
        max-width: 800px; /* 在大屏幕上设置更大的模态框 */
    }
}

/* 今日作业和历史作业模块加载状态样式 */
.content-box.loading::after,
.grid-container.loading::after {
    content: "正在加载...";
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    color: #666;
    z-index: 10;
    border-radius: 12px;
    animation: loadingFade 1.5s infinite;
}

/* 加载状态文字动画 */
@keyframes loadingFade {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

/* 加载状态时的网格容器样式 */
.grid-container.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* 网格容器悬停效果 */
.grid-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* 公告栏样式 */
.announcement-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.announcement-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.announcement-header h3 {
    margin: 0;
    margin-left: 10px;
    color: #333;
}

.announcement-text {
    line-height: 1.6;
    color: #666;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal {
    display: none;
    z-index: 1050;
    overflow: auto;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    margin: auto;
    background-color: #fff;
}

.modal-content {
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: auto;
    display: flex;
    flex-direction: column;
}

/* 上传表单容器样式 */
.upload-form {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 20px;
    flex: 1 1 auto;
}

/* 优化上传部分的模态框样式 */
.upload-section .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* 上传按钮样式 */
.upload-btn {
    background: var(--primary-color, #3E9EFF);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(62, 158, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-btn:hover {
    background: var(--primary-dark, #2d7be6);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(62, 158, 255, 0.4);
}

/* 拖放区域样式 */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color, #3E9EFF);
    background-color: rgba(62, 158, 255, 0.05);
}

/* ICP备案样式 */
.icp-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.icp-icon {
    margin-right: 10px;
}

.icp-custom-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* 赞助按钮样式 */
.sponsor-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sponsor-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.sponsor-icon {
    font-size: 24px;
}

.sponsor-text {
    display: none;
    margin-right: 10px;
    font-weight: 600;
}

.sponsor-button:hover .sponsor-text {
    display: inline;
}

}

/* 赞助模态框样式 */
.sponsor-modal-content {
    max-width: 800px;
    width: 90%;
    position: relative;
}

.sponsor-qrcode {
    width: 200px;
    height: 200px;
    margin: 10px auto;
}

.sponsor-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    body {
        margin: 15px 10px;
    }
    
    .grade-tabs,
    .class-tabs {
        flex-wrap: wrap;
    }
    
    .grade-btn,
    .class-btn {
        flex: 1 0 auto;
        margin-bottom: 8px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .content-box {
        padding: 15px 10px;
    }
    
    .sponsor-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 20px 15px;
    }
    
    .app-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .title-sub {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
        flex-direction: column;
        gap: 8px;
    }
    
    .grid-item {
        min-height: 120px;
    }
    
    .sponsor-button {
        width: 45px;
        height: 45px;
    }
}

/* 修复Bootstrap模态框backdrop的z-index问题 */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

/* 确保页面主要内容的z-index低于模态框 */
main {
    z-index: auto;
}

.announcement-header {
    /* 下内边距 */
    border-bottom: 2px solid #eee;
    /* 底边框 */
}

/* 添加针对Bootstrap模态框的特殊样式，确保aria-hidden属性移除后仍能正常显示 */
.modal[aria-hidden="true"] {
    display: none;
}

.modal[aria-hidden="false"] {
    display: block;
}

.announcement-text strong {
    color: #f26422;
    /* 橙色文字 */
    font-size: 1.2em;
    /* 字号 */
    margin: 10px 0;
    /* 外边距 */
}

.announcement-text a {
    color: #409eff;
    /* 蓝色链接 */
    text-decoration: underline;
    /* 下划线 */
}

.announcement-text code {
    background: #f5f5f5;
    /* 浅灰背景 */
    padding: 2px 5px;
    /* 内边距 */
    border-radius: 3px;
    /* 圆角 */
}

.announcement-text pre {
    background: #f8f8f8;
    /* 更浅的背景 */
    padding: 10px;
    /* 内边距 */
    border-radius: 5px;
    /* 圆角 */
    overflow-x: auto;
    /* 水平滚动 */
}

/* 新增样式（作业过期、周六日自动跳周五） */
.caption-tips {
    font-size: 1em;
    /* 字号 */
    margin-top: 4px;
    /* 上边距 */
    opacity: 0.8;
    /* 透明度 */
}

/* 周末调整提示样式 */
.weekend-tip {
    display: block;
    /* 块级元素 */
    color: #2196F3;
    /* 蓝色文字 */
    background: rgba(33, 150, 243, 0.1);
    /* 浅蓝背景 */
    padding: 8px 12px;
    /* 内边距 */
    border-radius: 8px;
    /* 圆角 */
    margin-top: 8px;
    /* 上边距 */
    border-left: 3px solid #2196F3;
    /* 左边框 */
}

/* 过期时间特殊样式 */
.weekend-expire {
    color: #FF5722 !important;
    /* 红色文字 */
    background: rgba(255, 87, 34, 0.1);
    /* 浅红背景 */
    padding: 4px 8px;
    /* 内边距 */
    border-radius: 6px;
    /* 圆角 */
}

.weekend-tip::before {
    content: "⇄";
    /* 特殊字符 */
    display: inline-block;
    /* 行内块 */
    margin-right: 6px;
    /* 右边距 */
    font-weight: 700;
    /* 字重 */
    transform: rotate(90deg);
    /* 旋转 */
    animation: swing 2s ease-in-out infinite;
    /* 动画 */
}

/* 动态时间数字样式 */
.expire-info {
    color: #FF5722;
    /* 红色文字 */
    font-weight: 700;
    /* 字重 */
    font-style: normal;
    /* 正常字体 */
    text-shadow: 0 2px 3px rgba(255, 87, 34, 0.2);
    /* 文字阴影 */
}

/* 时间数字动态强调 */
.caption-tips span {
    color: #FF5722;
    /* 红色文字 */
    font-size: 1.1em;
    /* 字号 */
    font-weight: 900;
    /* 字重 */
    text-shadow: 0 2px 4px rgba(255, 87, 34, 0.2);
    /* 文字阴影 */
    position: relative;
    /* 相对定位 */
    padding: 0 2px;
    /* 内边距 */
}

.caption-tips span::after {
    content: "";
    /* 内容 */
    position: absolute;
    /* 绝对定位 */
    bottom: -2px;
    /* 下边距 */
    left: 0;
    /* 左边距 */
    width: 100%;
    /* 宽度 */
    height: 2px;
    /* 高度 */
    background: linear-gradient(90deg, transparent 10%, #FF5722 50%, transparent 90%);
    /* 渐变背景 */
    animation: highlight 2s linear infinite;
    /* 动画 */
}

/* 新增动画效果 */
@keyframes pulseWarning {

    0%,
    100% {
        opacity: 1;
        /* 不透明度 */
    }

    50% {
        opacity: 0.6;
        /* 半透明 */
        text-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
        /* 文字阴影 */
    }
}

@keyframes swing {

    0%,
    100% {
        transform: rotate(90deg) translateX(0);
        /* 旋转和平移 */
    }

    50% {
        transform: rotate(90deg) translateX(3px);
        /* 旋转和移动 */
    }
}

@keyframes highlight {
    0% {
        background-position: -100% 0;
        /* 背景位置 */
    }

    100% {
        background-position: 200% 0;
        /* 背景位置 */
    }
}

/* 添加呼吸动画 */
@keyframes breathing {
    0% {
        opacity: 0.8;
        /* 不透明度 */
        transform: scale(1);
        /* 缩放 */
    }

    50% {
        opacity: 1;
        /* 不透明度 */
        transform: scale(1.02);
        /* 缩放 */
    }

    100% {
        opacity: 0.8;
        /* 不透明度 */
        transform: scale(1);
        /* 缩放 */
    }
}

.weekend-adjust .expire-info {
    animation: breathing 3s ease-in-out infinite;
    /* 动画 */
}

/* 状态容器增强 */
.expired-date .image-box {
    position: relative;
    /* 相对定位 */
    overflow: hidden;
    /* 隐藏溢出 */
}

/* 今日作业图片容器样式 */
.image-box {
    /* 容器最小高度 */
    min-height: 300px;
    /* 背景样式 */
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f4 100%);
    /* 圆角 */
    border-radius: 12px;
    /* 内边距 */
    padding: 20px;
    /* 相对定位 */
    position: relative;
    /* 阴影效果 */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
    /* 盒模型 */
    box-sizing: border-box;
}

/* 指导信息容器样式 */
.guide-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    text-align: center;
    color: #5f6368;
    box-sizing: border-box;
}

/* 状态图标样式 */
.status-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #9aa0a6;
}

/* 警告状态样式 */
.status-warn {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #d93025;
}

/* 信息状态样式 */
.status-info {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #1a73e8;
}

/* 详细信息样式 */
.status-detail {
    font-size: 1.1rem;
    color: #5f6368;
    margin-top: 5px;
}

/* 已部署班级信息样式 */
.deployed-classes {
    font-weight: 500;
    color: #1a73e8;
}

/* 最近上传时间样式 */
#last-upload-time {
    font-weight: 500;
    color: #1a73e8;
}




/* From Uiverse.io by javierBarroso */
.custom-close-btn {
  position: relative;
  width: 4em;
  height: 4em;
  border: none;
  background: rgba(180, 83, 107, 0.11);
  border-radius: 5px;
  transition: background 0.5s;
  cursor: pointer;
  outline: none;
}

.close-x, .close-y {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}

.close-x {
  width: 2em;
  height: 1.5px;
  background-color: rgb(255, 255, 255);
  transform: translateX(-50%) rotate(45deg);
}

.close-y {
  width: 2em;
  height: 1.5px;
  background-color: #fff;
  transform: translateX(-50%) rotate(-45deg);
}

.close-tooltip {
  position: absolute;
  display: flex;
  padding: 0.8rem 1.5rem;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  top: -70%;
  left: 50%;
  width: 3em;
  height: 1.7em;
  font-size: 12px;
  background-color: rgb(19, 22, 24);
  color: rgb(187, 229, 236);
  border: none;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
}

.custom-close-btn:hover {
  background-color: rgb(211, 21, 21);
}

.custom-close-btn:active {
  background-color: rgb(130, 0, 0);
}

.custom-close-btn:hover > .close-tooltip {
  animation: close-tooltip 0.2s forwards 0.25s;
}

@keyframes close-tooltip {
  100% {
    opacity: 1;
  }
}

.expired-date .image-box::after {
    content: "作业已过期";
    /* 内容 */
    position: absolute;
:root {
  --primary-color: #3E9EFF;
  --text-color: #333;
  --primary-gradient-start: #3E9EFF;
  --primary-gradient-end: #1a78e3;
  --holiday-primary: #4f46e5;
  --holiday-text: #fff;
  --holiday-secondary: #e03011;
  --holiday-gradient-start: #4f46e5;
  --holiday-gradient-end: #2d22a9;
}

/* 节日模式样式 */
.holiday-mode {
  --primary-color: var(--holiday-primary);
  --text-color: var(--holiday-text);
  --primary-gradient-start: var(--holiday-gradient-start);
  --primary-gradient-end: var(--holiday-gradient-end);
}

/* 节日背景动画 */
.holiday-mode {
  background-size: 400% 400% !important;
  animation: gradientShift 30s ease infinite;
  background: linear-gradient(-45deg, 
    var(--holiday-gradient-start, #4f46e5), 
    var(--holiday-secondary, #e03011), 
    var(--holiday-primary, #4f46e5), 
    var(--holiday-gradient-end, #2d22a9)) !important;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 节日横幅样式 */
#holiday-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: linear-gradient(90deg, var(--holiday-primary, #4f46e5), var(--holiday-secondary, #e03011));
  color: white;
  text-align: center;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.holiday-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.holiday-name {
  font-weight: bold;
  font-size: 1.2em;
}

.holiday-greeting {
  font-style: italic;
}

/* 雪花样式 */
.snowflake {
  position: fixed;
  top: -20px;
  z-index: 9998;
  user-select: none;
  pointer-events: none;
  font-size: 1em;
  animation: fall linear forwards, sway 2s ease-in-out alternate;
}

@keyframes fall {
  to {
    transform: translateY(105vh);
  }
}

@keyframes sway {
  0% {
    transform: translateX(0px);
  }
  100% {
    transform: translateX(20px);
  }
}

/* 按钮样式使用CSS变量 */
.grade-btn, .class-btn {
    background: var(--primary-gradient-start);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grade-btn:hover, .class-btn:hover {
    background: var(--primary-gradient-end);
    transform: translateY(-2px);
}

.grade-btn.active, .class-btn.active {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    box-shadow: 0 4px 15px rgba(62, 158, 255, 0.4);
}

/* 节日覆盖层样式 */
.holiday-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
}

.holiday-overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.holiday-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.holiday-text {
    font-size: 1.2em;
    font-weight: bold;
}

/* 节日提示样式 */
.holiday-note {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
}

}

/* 节日标题样式 */
.holiday-caption {
    background: linear-gradient(135deg, var(--holiday-primary, #4f46e5) 0%, var(--holiday-secondary, #e03011) 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.holiday-caption .holiday-name {
    font-weight: bold;
    font-size: 1.4em;
    margin-bottom: 5px;
}

.holiday-caption .holiday-date {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.holiday-caption .holiday-greeting {
    font-style: italic;
    margin-bottom: 10px;
}

.holiday-caption .holiday-message {
    font-size: 1.2em;
}

/* 默认标题样式 */
.default-caption {
    background: linear-gradient(135deg, var(--primary-color, #3E9EFF) 0%, #6c5ce7 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 节日信息样式 */
.holiday-message {
    font-size: 1.2em;
    color: var(--holiday-text, white);
}

.status-detail.holiday-message {
    font-size: 1em;
    opacity: 0.9;
}

.expired-date .image-box::after {
    content: "作业已过期";
    /* 内容 */
    position: absolute;
    /* 绝对定位 */
    top: 50%;
    /* 上边距 */
    left: 50%;
    /* 左边距 */
    transform: translate(-50%, -50%);
    /* 居中 */
    background: rgba(255, 68, 68, 0.9);
    /* 深红背景 */
    color: white;
    /* 白色文字 */
    padding: 8px 20px;
    /* 内边距 */
    border-radius: 24px;
    /* 圆角 */
    font-weight: bold;
    /* 字重 */
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    /* 阴影 */
}

.weekend-adjust .image-box {
    border: 2px solid #2196F3;
    /* 蓝色边框 */
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.2);
    /* 阴影 */
}

/* 上传相关样式 */
.upload-btn {
    font-family: inherit;
    font-size: 18px;
    background: linear-gradient(to bottom, #4dc7d9 0%, #66a6ff 100%);
    color: white;
    padding: 0.8em 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.upload-btn:active {
    transform: translateY(0);
}

.upload-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: center center;
}

.upload-btn:focus:not(:active) {
    outline: 2px solid #66a6ff;
    outline-offset: 2px;
}

.upload-btn:active::after {
    animation: ripple 0.6s ease-out;
}

/* 波纹动画 */
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}

/* 拖放区域样式 */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color, #3E9EFF);
    background-color: rgba(62, 158, 255, 0.05);
}

/* 上传按钮固定定位 */
.upload-section {
    position: fixed;
    /* 固定定位 */
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    /* 提高层级优先级 */
    /* 添加视觉反馈 */
    opacity: 0.95;
    transition: all 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .upload-section {
        bottom: 20px;
        right: 20px;
    }
}

/* 修改状态提示样式 */
#uploadStatus {
    max-height: 100px;
    /* 最大高度 */
    overflow-y: auto;
    /* 垂直滚动 */
    font-size: 14px;
    /* 字号 */
    line-height: 1.5;
    /* 行高 */
}

/* 新增上传相关样式 */
.oss-config-alert {
    background: #fff4e5;
    /* 浅黄背景 */
    border: 2px solid #ffd8a7;
    /* 橙色边框 */
    border-radius: 8px;
    /* 圆角 */
    padding: 12px;
    /* 内边距 */
    margin-bottom: 20px;
    /* 下边距 */
    color: #663d00;
    /* 深棕色文字 */
    font-size: 0.9em;
    /* 字号 */
}

/* 新增模态框布局修正 */
.modal {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    /* 固定定位 */
    top: 0;
    /* 上边距 */
    left: 0;
    /* 左边距 */
    width: 100%;
    /* 宽度 */
    height: 100%;
    /* 高度 */
    background: rgba(0, 0, 0, 0.8);
    /* 半透明背景 */
    z-index: 999;
    /* 层级 */
    padding: 20px;
    /* 内边距 */
    overflow: hidden;
    /* 禁止外部滚动 */
}

/* 文件元信息样式 */
.file-meta {
    margin: 10px 0;
    /* 外边距 */
    color: #666;
    /* 灰色文字 */
}

/* 文件名样式 */
.file-name {
    font-weight: bold;
    /* 字重 */
    margin-right: 8px;
    /* 右边距 */
}

.file-preview-container {
    max-height: 200px;
    /* 设置最大高度 */
    overflow-y: auto;
    /* 启用垂直滚动 */
    margin-top: 10px;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    /* 允许换行 */
    gap: 10px;
    /* 图片之间的间距 */
    padding: 10px;
    /* 内边距 */
}

.file-preview img {
    max-width: 100px;
    /* 设置图片的最大宽度 */
    max-height: 100px;
    /* 设置图片的最大高度 */
    object-fit: cover;
    /* 覆盖模式，保持图片比例 */
    border-radius: 4px;
    /* 圆角 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    /* 添加阴影效果 */
}

/* 状态加载样式 */
.status-loading {
    position: sticky;
    /* 粘性定位 */
    bottom: 0;
    /* 底部 */
    background: white;
    /* 白色背景 */
    padding: 10px 0;
    /* 内边距 */
}

/* 成功状态样式 */
.status-success {
    color: #52c41a;
    /* 绿色文字 */
    font-weight: bold;
    /* 字重 */
}

/* 错误状态样式 */
.status-error {
    color: #ff4d4f;
    /* 红色文字 */
    font-weight: bold;
    /* 字重 */
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        opacity: 1;
        /* 不透明度 */
    }

    50% {
        opacity: 0.6;
        /* 半透明 */
    }

    100% {
        opacity: 1;
        /* 不透明度 */
    }
}

/* 拖拽进入样式 */
.dragover {
    background: rgba(62, 158, 255, 0.1) !important;
    /* 浅蓝背景 */
    border-color: #3E9EFF !important;
    /* 蓝色边框 */
    transform: scale(1.02);
    /* 缩放 */
}

/* 上传部分的模态框样式 */
.upload-section .modal {
    background: rgba(0, 0, 0, 0.7);
    /* 半透明背景 */
}

/* 调整模态框布局结构 */
.upload-section .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* 上传按钮样式 */
.upload-section .upload-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
}

/* 上传按钮悬停效果 */
.upload-section .upload-btn:hover {
    background-color: #0056b3;
}

/* 上传进度条样式 */
.upload-section .progress-bar {
    width: 0%;
    height: 20px;
    background-color: #007bff;
    border-radius: 5px;
    margin-top: 10px;
}

/* 上传进度条文本样式 */
.upload-section .progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

/* 上传文件列表样式 */
.upload-section .file-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

/* 上传文件列表项样式 */
.upload-section .file-list li {
    background-color: #f8f9fa;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 上传文件列表项悬停效果 */
.upload-section .file-list li:hover {
    background-color: #e9ecef;
}

/* 上传文件列表项删除按钮样式 */
.upload-section .file-list .delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

/* 上传文件列表项删除按钮悬停效果 */
.upload-section .file-list .delete-btn:hover {
    background-color: #c82333;
}


/* 优化移动端体验 */
@media (max-height: 700px) {
    .modal-content {
        max-height: 98vh;
        /* 最大高度 */
    }

    .file-preview {
        max-height: 30vh;
        /* 最大高度 */
    }
}

/* 表单组响应式布局 */
.form-group {
    display: flex;
    /* 弹性布局 */
    align-items: center;
    /* 垂直居中 */
    gap: 10px;
    /* 元素间距 */
}

/* 表单输入响应式样式 */
.form-select,
.form-input {
    flex: 1;
    /* 弹性伸缩 */
    padding: 8px 12px;
    /* 内边距 */
    border: 1px solid #ddd;
    /* 边框 */
    border-radius: 6px;
    /* 圆角 */
    font-size: 14px;
    /* 字号 */
}

/* 调整拖放区域的高度限制 */
.drop-zone {
    border: 2px dashed #ddd;
    /* 虚线边框 */
    border-radius: 8px;
    /* 圆角 */
    padding: 20px;
    /* 内边距 */
    text-align: center;
    /* 文本居中 */
    background-color: #fff;
    /* 白色背景 */
    transition: all 0.3s ease;
    /* 平滑过渡 */
    min-height: 120px;
    /* 最小高度 */
    max-height: 40vh;
    /* 最大高度 */
    overflow: hidden;
    /* 隐藏溢出 */
}

/* 拖拽进入样式 */
.drop-zone.dragover {
    background: rgba(62, 158, 255, 0.1);
    /* 浅蓝背景 */
    border-color: #3E9EFF;
    /* 蓝色边框 */
    transform: scale(1.02);
    /* 缩放 */
}

/* 悬停样式 */
.drop-zone:hover {
    background: rgba(62, 158, 255, 0.05);
    /* 浅蓝背景 */
    cursor: pointer;
    /* 手型光标 */
}

/* 上传确认按钮悬停效果 */
.upload-confirm:hover {
    background: #2d8be6;
    /* 深蓝色背景 */
}

/* 上传状态文本样式 */
#uploadStatus {
    min-height: 100px;
    /* 最小高度 */
    text-align: center;
    /* 居中 */
    font-size: 14px;
    /* 字号 */
}

/* 新增节日主题模块 */
:root {
    --primary-color: #3E9EFF;
    --secondary-color: #26d0ce; /* 第二主题色 */
    --text-color: #ffffff;
    --primary-gradient-start: #1d37ca;
    --primary-gradient-end: #26d0ce;
    --holiday-primary: #1194e0ff; /* 假日主色调 */
    --holiday-secondary: #26d0ce; /* 假日第二主题色 */
    --holiday-text: #ffffff; /* 白色文字 */
    --holiday-gradient-start: #1194e0ff;
    --holiday-gradient-end: #26d0ce;
    /* 节日模式特有变量 */
    --holiday-bg-gradient-start: #1194e0ff;
    --holiday-bg-gradient-end: #8e44ad;
}

.holiday-mode {
    --primary-color: var(--holiday-primary);
    /* 主色调变量 */
    --secondary-color: var(--holiday-secondary);
    /* 第二主题色变量 */
    --text-color: var(--holiday-text);
    /* 文字颜色变量 */
    --primary-gradient-start: var(--holiday-gradient-start);
    /* 渐变起始色 */
    --primary-gradient-end: var(--holiday-gradient-end);
    /* 渐变结束色 */
}

/* 节日横幅样式 */
#holiday-banner {
    background: linear-gradient(135deg, var(--holiday-bg-gradient-start), #448cada8);
    /* 渐变背景 */
    color: var(--holiday-text);
    /* 文字颜色 */
    padding: 3rem 1rem;
    /* 内边距 */
    text-align: center;
    /* 居中 */
    margin: -14px -10px 25px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: holidayPulse 8s infinite alternate;
    /* 动画 */
}

/* 主标题样式 */
.main-header {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    /* 外边距 */
    border-radius: 0 0 15px 15px;
    /* 圆角 */
    box-shadow: 0 6px 30px rgba(255, 255, 255, 0.856);
    /* 阴影 */
    position: relative;
    /* 相对定位 */
    overflow: hidden;
    /* 隐藏溢出 */
    background-size: cover;
    /* 背景覆盖 */
    background-position: center;
    /* 背景居中 */
    animation: holidayPulse 8s infinite alternate;
    /* 动画 */
}

/* 节日内容样式 */
.holiday-content {
    position: relative;
    /* 相对定位 */
    z-index: 2;
    /* 层级 */
    padding: 1rem;
    /* 内边距 */
    border-radius: 12px;
    /* 圆角 */
    max-width: 1200px;
    /* 最大宽度 */
    margin: 0 auto;
    /* 居中 */
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.15);
}

/* 节日名称样式 */
.holiday-name {
    font-size: 2.2rem;
    /* 字号 */
    font-weight: bold;
    /* 字重 */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    /* 文字阴影 */
    margin-bottom: 10px;
    /* 下边距 */
    animation: float 3s ease-in-out infinite;
    /* 动画 */
    color: var(--holiday-text);
}

/* 节日问候语样式 */
.holiday-greeting {
    font-size: 1.5rem;
    /* 字号 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* 文字阴影 */
    color: var(--holiday-text);
}

/* 节日动画 */
@keyframes holidayPulse {
    0% {
        opacity: 0.9;
        /* 不透明度 */
        transform: scale(1);
    }

    100% {
        opacity: 1;
        /* 不透明度 */
        transform: scale(1.01);
    }
}

/* 假日作业说明样式 */
.holiday-caption {
    text-align: center;
    /* 居中 */
    color: var(--holiday-primary);
    /* 主色调文字 */
    font-weight: bold;
    /* 字重 */
    padding: 10px;
    /* 内边距 */
    border-radius: 8px;
    /* 圆角 */
    background: rgba(255, 255, 255, 0.1);
    /* 浅白背景 */
    backdrop-filter: blur(5px);
    margin: 10px 0;
}

.holiday-caption .holiday-name {
    font-size: 1.5em;
    /* 字号 */
    color: var(--holiday-primary);
    /* 继承颜色 */
}

.holiday-caption .holiday-date {
    font-size: 1.1em;
    /* 字号 */
    opacity: 0.9;
    /* 透明度 */
}

.holiday-caption .holiday-greeting {
    font-size: 1.2em;
    /* 字号 */
    margin-top: 5px;
    /* 上边距 */
    color: inherit;
    /* 继承颜色 */
}

/* 假日消息样式 */
.holiday-message {
    font-size: 1.8em !important;
    /* 字号 */
    color: var(--holiday-primary) !important;
    /* 主色调文字 */
    text-shadow: 0 0 10px rgba(94, 255, 0, 0.757);
    /* 文字阴影 */
    animation: pulse 2s infinite;
    /* 动画 */
}

/* 节日模式下调整原有元素的样式 */
.holiday-mode .grade-btn.active {
    background: var(--primary-color);
    /* 主色调背景 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.holiday-mode .class-btn.active {
    border-color: var(--holiday-primary);
    /* 主色调边框 */
    background: var(--holiday-primary);
    /* 主色调背景 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.holiday-mode .upload-btn {
    background: linear-gradient(135deg, var(--holiday-primary), var(--holiday-secondary));
    /* 主色调背景 */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.holiday-mode .announcement-box {
    background: rgb(61 184 255 0.2);
    /* 主色调背景 */
    border-color: var(--holiday-primary);
    /* 主色调边框 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 备案号悬浮样式优化 */
#icp-footer {
    /* 改为固定定位保持可见 */
    position: static;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    color: #000;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#icp-footer .icp-icon {
    width: 36px;
    /* 宽度 */
    height: 36px;
    /* 高度 */
    border-radius: 50%;
    /* 圆形 */
    display: flex;
    /* 弹性布局 */
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
    /* 水平居中 */
    margin-right: 12px;
    /* 右边距 */
    flex-shrink: 0;
    /* 不收缩 */
    background: rgb(255, 255, 255);
    /* 白色背景 */
}

/* 禁止图片下载 */
img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
}

.image-box,
.grid-item {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 自定义图标样式 */
.icp-custom-icon {
    width: 24px;
    /* 宽度 */
    height: 24px;
    /* 高度 */
    object-fit: contain;
    /* 包含图片 */
    filter: brightness(0) invert(1);
    /* 反色 */
}

.icp-custom-icon {
    filter:
        brightness(1.4) contrast(1.4) drop-shadow(0 0 4px rgba(62, 158, 255, 0.8));
    /* 亮度、对比度、阴影 */
    transform: scale(1.1);
    /* 缩放 */
}

/* 图标加载中状态 */
.icp-custom-icon.loading {
    background:
        linear-gradient(45deg,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    /* 背景尺寸 */
    animation: loading 1.5s infinite;
    /* 动画 */
    filter: none;
    /* 清除滤镜 */
}

/* 图标加载失败状态 */
.icp-custom-icon.error {
    content: "!";
    /* 内容 */
    display: flex;
    /* 弹性布局 */
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
    /* 水平居中 */
    background: #ff4d4f;
    /* 红色背景 */
    color: white;
    /* 白色文字 */
    font-weight: bold;
    /* 字重 */
    font-size: 18px;
    /* 字号 */
    filter: none;
    /* 清除滤镜 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    #icp-footer {
        left: 15px;
        /* 左边距 */
        right: 15px;
        /* 右边距 */
        max-width: calc(100% - 30px);
        /* 最大宽度 */
        bottom: 10px;
        /* 底部距离 */
        padding: 8px 15px;
        /* 内边距 */
        font-size: 13px;
        /* 字号 */
    }

    #icp-footer .icp-icon {
        width: 32px;
        /* 宽度 */
        height: 32px;
        /* 高度 */
    }

    .icp-custom-icon {
        width: 24px;
        /* 宽度 */
        height: 24px;
        /* 高度 */
    }
}

@media (max-width: 480px) {
    #icp-footer {
        font-size: 12px;
        /* 字号 */
        padding: 6px 12px;
        /* 内边距 */
        border-radius: 40px;
        /* 圆角 */
    }

    #icp-footer .icp-icon {
        width: 28px;
        /* 宽度 */
        height: 28px;
        /* 高度 */
    }

    .icp-custom-icon {
        width: 20px;
        /* 宽度 */
        height: 20px;
        /* 高度 */
    }
}

/* 呼吸动画效果 */
@keyframes icp-pulse {
    0% {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 8px 30px rgba(62, 158, 255, 0.6);
        /* 增强高光阴影 */
        transform: scale(1.03);
        /* 添加3%缩放动画 */
    }

    100% {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
        transform: scale(1);
    }
}

/*
#icp-footer {
    animation: icp-pulse 3s infinite;
}
*/
/* 禁止图片下载 */
img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
}

.image-box,
.grid-item {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 新增：小屏幕设备优化 */
@media (max-width: 480px) {
    .app-title {
        flex-direction: column;
        /* 小屏幕时改为垂直布局 */
        gap: 0.5rem;
    }

    .title-before,
    .title-after {
        width: 60px;
        /* 增大装饰条宽度 */
    }

    .grade-tabs {
        flex-direction: column;
        /* 小屏幕时年级按钮垂直排列 */
        gap: 10px;
    }

    .class-tabs {
        flex-wrap: wrap;
        /* 班级按钮换行 */
        justify-content: center;
    }
}


.meting-js {
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .meting-js {
        width: 95%;
        margin: 10px auto;
    }
}

/* 公共关闭按钮基础样式 */
.close-btn {
    position: absolute;
    top: clamp(8px, 1vw, 16px);
    right: clamp(8px, 1vw, 16px);
    font-size: 24px;
    color: #666;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: clamp(36px, 3vw, 32px);
    height: clamp(36px, 3vw, 32px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
    flex-wrap: wrap;
    align-content: center;
    flex-direction: column;

}

.class-btn:hover {
    color: #ff4d4f;
    box-shadow: 0px 0px 12px 4px rgba(255, 77, 79, 0.25);
}

/* 公告关闭按钮继承基础样式 */
.announcement-close-btn {
    @extend .close-btn;
    top: clamp(8px, 1vw, 16px);
    right: clamp(8px, 1vw, 16px);

}

/* 公告栏容器添加定位上下文 */
.announcement-box {
    position: relative;

}

.no-history-message{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* 铺满父容器 */
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f4 100%);
    color: #5f6368;
    border-radius: 12px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
    font-size: 1.1rem;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.no-history-message::before{
    content: "📚";
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    color: #9aa0a6;
}

.no-history-message strong {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #202124;
}

/* 赞助按钮样式 */
.sponsor-button {
    position: fixed;
    
    bottom: 100px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    border: none;
    outline: none;
    overflow: hidden;
}

.sponsor-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.sponsor-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.sponsor-button:hover::before {
    transform: translateX(100%);
}

.sponsor-button:active {
    transform: translateY(-2px);
}

.sponsor-icon {
    font-size: 20px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 赞助模态框样式 */
/* 赞助模态框样式 */
.sponsor-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.sponsor-modal .modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    position: relative;
    overflow: hidden;
    margin: 5% auto;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.sponsor-modal-content {
    overflow-y: auto;
    flex: 1;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sponsor-modal .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
}

.sponsor-modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    min-height: 300px;
}

/* 滚动条样式美化 */
.sponsor-modal-body::-webkit-scrollbar {
    width: 6px;
}

.sponsor-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.sponsor-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.sponsor-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sponsor-modal h2 {
    text-align: center;
    color: #ff6b6b;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
    position: relative;
    padding-bottom: 15px;
    flex-shrink: 0;
}

.sponsor-modal h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    border-radius: 2px;
}

.sponsor-description {
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}

.sponsor-description p {
    margin: 8px 0;
}

.sponsor-description ul {
    text-align: left;
    max-width: 400px;
    margin: 20px auto;
    padding-left: 20px;
}

.sponsor-description li {
    margin: 10px 0;
}

.payment-methods {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0 20px;
}

.payment-method {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.payment-method h3 {
    color: #333;
    margin-bottom: 15px;
}

.qr-code-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: #666;
    background: #f1f3f4;
    border: 2px dashed #ddd;
}

.qr-code-placeholder.wechat {
    border-color: #2abb67;
    color: #2abb67;
}

.qr-code-placeholder.alipay {
    border-color: #1677ff;
    color: #1677ff;
}

/* 优化后的赞赏二维码样式 */
.sponsor-qrcode {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0; /* 移除内边距，让图片占满整个容器 */
}

.sponsor-qrcode:hover {
    transform: translateY(-5px);
}

.sponsor-qrcode {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.sponsor-qrcode::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.4));
    z-index: 1;
}

.sponsor-qrcode.wechat {
    border-top: 4px solid #2abb67;
}

.sponsor-qrcode.alipay {
    border-top: 4px solid #1677ff;
}

.sponsor-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 使用contain保持图片比例同时占满容器 */
    padding: 0;
    z-index: 2;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: bicubic;
}

.sponsor-qrcode .placeholder-text {
    font-weight: 600;
    font-size: 16px;
    z-index: 2;
    text-align: center;
    padding: 20px;
    display: none; /* 隐藏占位符文本，因为我们现在使用实际图片 */
}

.sponsor-qrcode.wechat .placeholder-text {
    color: #2abb67;
}

.sponsor-qrcode.alipay .placeholder-text {
    color: #1677ff;
}

.sponsor-note {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(241, 243, 244, 0.5);
    border-radius: 10px;
    font-weight: 500;
}

.sponsor-close {
    font-size: 30px;
    top: 15px;
    right: 15px;
    position: absolute;
    z-index: 1002;
}

/* 移动端适配 */
.sponsor-modal .modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    position: relative;
    overflow: hidden;
    margin: 1% auto;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

/* 确保此规则存在，使内容区域可滚动 */
.sponsor-modal-content {
    overflow-y: auto;
    flex: 1;
}

@media (max-width: 768px) {
    .sponsor-modal .modal-content {
        max-height: 85vh;
        padding: 20px 15px;
        margin: 1% auto;
    }
    
    .sponsor-modal h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .sponsor-description {
        margin-bottom: 20px;
    }
ao   
    .payment-methods {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .sponsor-modal .modal-content {
        width: 95%;
        max-height: 80vh;
        padding: 15px 10px;
        margin: 0.5% auto;
    }
    
    .sponsor-modal h2 {
        font-size: 1.3rem;
    }
    
    .sponsor-description p {
        font-size: 0.9rem;
    }
    
    .payment-method {
        min-width: auto;
    }
    
    .sponsor-qrcode {
        width: 120px;
        height: 120px;
    }
    
    .sponsor-note {
        font-size: 0.9rem;
    }
}

.sponsor-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff3333);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease-out;
}

.sponsor-button:hover {
    background: linear-gradient(135deg, #ff3333, #ff6b6b);
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.payment-method {
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease-out;
}

.payment-method:hover {
    background: #f8f9fa;
}

.sponsor-qrcode {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
}

.sponsor-note {
    font-size: 0.9rem;
    color: #555;
}

.no-history-message {
    width: 100%;
    height: 100%;
    padding: 20px;
    font-size: 1.2rem;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
}

.grid-container {
    min-height: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .sponsor-button {
        bottom: 80px;
        right: 20px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .payment-methods {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .payment-method {
        min-width: auto;
        width: 100%;
    }
    
    .sponsor-qrcode {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .sponsor-modal .modal-content {
        padding: 20px 15px;
    }
    
    .sponsor-modal h2 {
        font-size: 1.5rem;
    }
    
    .payment-method {
        min-width: auto;
    }
    
    .sponsor-qrcode {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 768px) {
    .no-history-message{
        width: 100%;
        height: 100%;
        padding: 15px;
        font-size: 1rem;
        min-height: 200px;
    }
    
    .grid-container {
        min-height: 200px;
    }
}

