/* main.css - SPA学习打卡平台样式 */
/* 版本: 1.1 - 整合dashboard、classrooms、tasks、points样式，支持深色模式 */

/* ==================== CSS变量定义 ==================== */
:root {
    /* 浅色模式 */
    --bg-color: #f5f7fa;
    --bg-gradient: #f5f7fa;
    --card-bg: white;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --header-bg: white;
    --nav-hover: #f8f9fa;
}

/* 深色模式变量 */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --bg-gradient: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --header-bg: #2d2d2d;
    --nav-hover: #3a3a3a;
}

/* 班级详情模态框样式 */
.detail-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-section h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 0.75rem;
    background: white;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.invite-code-display {
    font-family: monospace;
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: bold;
    color: #495057;
    border: 1px solid #dee2e6;
    display: inline-block;
    margin-right: 10px;
}

.invite-code-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.invite-code-buttons {
    display: flex;
    gap: 6px;
}

.invite-code-buttons .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.invite-code-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.invite-code-expire {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 8px;
    display: block;
    font-style: italic;
}

.students-list {
    display: grid;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.student-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.student-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.student-info {
    flex: 1;
}

.student-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.25rem;
}

.student-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.student-joined {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.student-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.student-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.student-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.detail-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: auto;
    padding: 1rem 2rem;
    border-top: 1px solid #e9ecef;
    background: white;
    flex-shrink: 0;
    border-radius: 0 0 10px 10px;
    width: 100%;
    box-sizing: border-box;
}

/* 班级详情模态框特殊样式 */
#classroomDetailModal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#classroomDetailModal .modal-header {
    flex-shrink: 0;
    background: white;
    z-index: 1001;
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    border-radius: 10px 10px 0 0;
}

#classroomDetailModal .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ==================== 从study.html提取的样式 ==================== */

/* 任务卡片样式 */
.task-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    position: relative;
    transition: transform 0.2s;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    overflow: hidden;
    grid-column: auto; /* 默认就行 */
}


.task-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.task-card.urgent {
    border-left-color: #dc3545;
}

.task-card.completed {
    border-left-color: #28a745;
    opacity: 0.8;
}

.task-card.overdue {
    border-left-color: #dc3545;
    background: #fff5f5;
    border: 1px solid #fed7d7;
}

/* 深色模式下的任务卡片渐变效果 */
[data-theme="dark"] .task-card.urgent {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d2d2d 100%);
}

[data-theme="dark"] .task-card.completed {
    background: linear-gradient(135deg, #2d2d2d 0%, #2d3d2d 100%);
}

[data-theme="dark"] .task-card.overdue {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d2d 100%);
    border: 1px solid #4d1f1f;
}

/* ==================== 通知栏样式 ==================== */

/* 通知栏容器 */
.classroom-notice-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.classroom-notice-bar:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* 通知栏头部 */
.notice-bar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

/* 阅读全部按钮样式 */
.btn-read-all {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.btn-read-all:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.notice-bar-header::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 ease;
}

.classroom-notice-bar:hover .notice-bar-header::before {
    left: 100%;
}

/* 通知项容器 */
.notice-items {
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.notice-items::-webkit-scrollbar {
    width: 4px;
}

.notice-items::-webkit-scrollbar-track {
    background: transparent;
}

.notice-items::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.notice-items::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 通知项样式 */
.notice-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
    background: white;
    cursor: pointer;
}

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

.notice-item:hover {
    background: #f8f9fa;
    padding-left: 1.25rem;
}

.notice-item.pinned {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #f39c12;
    font-weight: 500;
}

.notice-item.pinned::before {
    content: '📌';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 通知内容样式 */
.notice-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notice-content {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.notice-time {
    opacity: 0.8;
}

.notice-author {
    font-weight: 500;
    color: #495057;
}

/* 空状态样式 */
.notice-item.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 1.5rem;
    background: transparent;
    cursor: default;
}

.notice-item.empty-state:hover {
    background: transparent;
    padding-left: 1rem;
}

/* 加载状态样式 */
.notice-item.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    background: transparent;
    cursor: default;
}

.notice-item.loading:hover {
    background: transparent;
    padding-left: 1rem;
}

.notice-item.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 深色模式适配 */
[data-theme="dark"] .classroom-notice-bar {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .notice-item {
    background: #2d2d2d;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .notice-item:hover {
    background: #3a3a3a;
}

[data-theme="dark"] .notice-item.pinned {
    background: linear-gradient(135deg, #3d3520 0%, #4a4020 100%);
    border-left-color: #f39c12;
}

[data-theme="dark"] .notice-items::-webkit-scrollbar-thumb {
    background: #4a5568;
}

[data-theme="dark"] .notice-items::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .classroom-notice-bar {
        margin: 0.75rem 0;
        border-radius: 8px;
    }
    
    .notice-bar-header {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .notice-item {
        padding: 0.6rem 0.8rem;
    }
    
    .notice-title {
        font-size: 0.85rem;
    }
    
    .notice-content {
        font-size: 0.75rem;
    }
    
    .notice-meta {
        font-size: 0.65rem;
    }
}

/* 动画效果 */
.notice-item {
    animation: slideInFromLeft 0.3s ease-out;
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 通知栏展开/收起动画 */
.classroom-notice-bar {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 通知管理模态框样式 ==================== */

/* 通知管理模态框特定样式 */
#manageClassroomNoticesModal .modal-content {
    width: 90vw;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#manageClassroomNoticesModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

#manageClassroomNoticesModal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

#manageClassroomNoticesModal .modal-header:hover::before {
    left: 100%;
}

#manageClassroomNoticesModal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#manageClassroomNoticesModal .modal-header h2::before {
    content: '📢';
    font-size: 1.25rem;
}

#manageClassroomNoticesModal .modal-header .close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#manageClassroomNoticesModal .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#manageClassroomNoticesModal .modal-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--card-bg);
}

/* 通知创建区域样式 */
.notice-create {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.notice-create::before {
    content: '✏️ 发布新通知';
    position: absolute;
    top: -16px;
    left: 1rem;
    background: var(--card-bg);
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    z-index: 100;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notice-create .form-group {
    margin-bottom: 1.25rem;
}

.notice-create .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.notice-create label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.notice-create input[type="text"],
.notice-create textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.notice-create input[type="text"]:focus,
.notice-create textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.notice-create textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

/* 复选框容器样式 - 移动端优化 */
.notice-create .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* 复选框标签样式 */
.notice-create .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 0;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    min-height: 44px; /* 确保足够的触摸区域 */
    flex: 1;
    justify-content: center;
    font-size: 0.9rem;
}

.notice-create .checkbox-label:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.notice-create .checkbox-label:active {
    transform: translateY(0);
}

.notice-create .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
    margin: 0;
}

/* 深色模式适配 */
[data-theme="dark"] .notice-create .checkbox-label {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .notice-create .checkbox-label:hover {
    /* background: rgba(102, 126, 234, 0.15); */
    border-color: rgba(102, 126, 234, 0.3);
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .notice-create .checkbox-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .notice-create .checkbox-label {
        flex: none;
        width: 100%;
        padding: 1rem;
        min-height: 48px; /* 移动端更大的触摸区域 */
        font-size: 1rem;
        justify-content: flex-start;
    }
    
    .notice-create .checkbox-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
}

/* 小屏幕设备优化 */
@media (max-width: 480px) {
    .notice-create .checkbox-group {
        gap: 0.4rem;
    }
    
    .notice-create .checkbox-label {
        padding: 0.875rem 0.75rem;
        min-height: 50px;
        border-radius: 6px;
    }
}

/* 超小屏幕设备优化 */
@media (max-width: 360px) {
    .notice-create .checkbox-label {
        font-size: 0.95rem;
        padding: 0.8rem 0.6rem;
    }
}

/* 发布按钮样式 */
.notice-create .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.notice-create .btn-primary::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 ease;
}

.notice-create .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.notice-create .btn-primary:hover::before {
    left: 100%;
}

.notice-create .btn-primary:active {
    transform: translateY(0);
}

/* 分隔线样式 */
#manageClassroomNoticesModal hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2rem 0;
}

/* 通知列表容器 */
#noticeListContainer {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: visible;
    position: relative;
    margin-top: 1rem;
}

#noticeListContainer::before {
    content: '📋 通知列表';
    position: absolute;
    top: -16px;
    left: 1rem;
    background: var(--card-bg);
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    z-index: 100;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 通知项行样式 */
.notice-item-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    background: white;
}

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

.notice-item-row:hover {
    background: #f8f9fa;
    padding-left: 1.5rem;
}

.notice-item-row.pinned {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #f39c12;
}

.notice-item-row.pinned:hover {
    background: linear-gradient(135deg, #ffecb3 0%, #ffe082 100%);
}

.notice-row-main {
    flex: 1;
    min-width: 0;
}

.notice-item-row .notice-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.notice-item-row .notice-content {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-item-row .notice-meta {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.notice-row-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

/* 通知操作按钮统一基础样式 */
.notice-row-actions .btn {
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

/* 隐藏/启用按钮样式 */
.notice-row-actions .btn-toggle-active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
}

.notice-row-actions .btn-toggle-active:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.35);
}

.notice-row-actions .btn-toggle-active:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
}

/* 置顶按钮样式 */
.notice-row-actions .btn-toggle-pinned {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #212529;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}

.notice-row-actions .btn-toggle-pinned:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e09900 100%);
    color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.35);
}

.notice-row-actions .btn-toggle-pinned:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}

/* 删除按钮样式 */
.notice-row-actions .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

.notice-row-actions .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.35);
}

.notice-row-actions .btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

/* 按钮点击波纹效果 */
.notice-row-actions .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.notice-row-actions .btn:active::before {
    width: 300px;
    height: 300px;
}

/* 深色模式适配 */
[data-theme="dark"] .notice-row-actions .btn-toggle-active {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
}

[data-theme="dark"] .notice-row-actions .btn-toggle-active:hover {
    background: linear-gradient(135deg, #157347 0%, #1ea085 100%);
}

[data-theme="dark"] .notice-row-actions .btn-toggle-pinned {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #000;
}

[data-theme="dark"] .notice-row-actions .btn-toggle-pinned:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e09900 100%);
    color: #000;
}

[data-theme="dark"] .notice-row-actions .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

[data-theme="dark"] .notice-row-actions .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* 空状态样式 */
#noticeListContainer .empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--card-bg);
}

#noticeListContainer .empty-state::before {
    content: '📭';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 错误状态样式 */
#noticeListContainer .error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    margin: 1rem;
}

/* 模态框底部样式 */
#manageClassroomNoticesModal .modal-footer {
    background: #f8f9fa;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

#manageClassroomNoticesModal .modal-footer .btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#manageClassroomNoticesModal .modal-footer .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 深色模式适配 */
[data-theme="dark"] .notice-create {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .notice-create input[type="text"],
[data-theme="dark"] .notice-create textarea {
    background: #2d2d2d;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .notice-create input[type="text"]:focus,
[data-theme="dark"] .notice-create textarea:focus {
    border-color: #667eea;
    background: #3a3a3a;
}

[data-theme="dark"] .notice-item-row {
    background: #2d2d2d;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .notice-item-row:hover {
    background: #3a3a3a;
}

[data-theme="dark"] .notice-item-row.pinned {
    background: linear-gradient(135deg, #3d3520 0%, #4a4020 100%);
}

[data-theme="dark"] #manageClassroomNoticesModal .modal-footer {
    background: #2d2d2d;
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #noticeListContainer .error {
    background: #3d2d2d;
    border-color: #4d1f1f;
    color: #ff6b6b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #manageClassroomNoticesModal .modal-content {
        width: 95vw;
        max-height: 90vh;
        margin: 1rem;
    }
    
    #manageClassroomNoticesModal .modal-header {
        padding: 1rem 1.5rem;
    }
    
    #manageClassroomNoticesModal .modal-header h2 {
        font-size: 1.25rem;
    }
    
    #manageClassroomNoticesModal .modal-body {
        padding: 1.5rem;
    }
    
    .notice-create {
        padding: 1rem;
    }
    
    .notice-item-row {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .notice-row-actions {
        align-self: flex-end;
    }
    
    .notice-create .btn-primary {
        width: 100%;
        padding: 0.875rem;
    }
    
    #manageClassroomNoticesModal .modal-footer {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    #manageClassroomNoticesModal .modal-content {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    #manageClassroomNoticesModal .modal-header h2 {
        font-size: 1.125rem;
    }
    
    .notice-create::before,
    #noticeListContainer::before {
        font-size: 0.8rem;
        padding: 0 0.5rem;
    }
}



.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.task-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}


.task-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.task-status.status-draft {
    background: #e9ecef;
    color: #6c757d;
}

.task-status.status-published {
    background: #d4edda;
    color: #155724;
}

.task-status.status-completed {
    background: #cce5ff;
    color: #004085;
}

.task-status.status-overdue {
    background: #f8d7da;
    color: #721c24;
}

/* 深色模式下的任务状态样式 */
[data-theme="dark"] .task-status.status-draft {
    background: #3a3a3a;
    color: #b0b0b0;
}

[data-theme="dark"] .task-status.status-published {
    background: #1e4d2b;
    color: #90ee90;
}

[data-theme="dark"] .task-status.status-completed {
    background: #1e3a5f;
    color: #87ceeb;
}

[data-theme="dark"] .task-status.status-overdue {
    background: #4d1f1f;
    color: #ffb3b3;
}

/* 任务内容样式 */
.task-content {
    background: var(--card-bg);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 3px solid #007bff;
    color: var(--text-color);
}

.submission-item{
    border: 1px solid #ddd; 
    border-radius: 8px; 
    padding: 15px; 
    margin-bottom: 15px; 
    background: var(--card-bg);
}

/* 深色模式下的任务内容样式 */
[data-theme="dark"] .task-content {
    background: #3a3a3a;
    border-left-color: #4299e1;
    color: var(--text-color);
}

.status-draft {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-published {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-overdue {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.task-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    /* background: #0056b3; */
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    /* background: #1e7e34; */
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    /* background: #e0a800; */
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    /* background: #c82333; */
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    /* background: #138496; */
}

/* 任务网格布局 */
.tasks-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
    padding: 20px 0 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tasks-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 16px 0 !important;
    }
    
    .task-card {
        padding: 20px;
    }
    
    .task-title {
        font-size: 18px;
    }
    
    .task-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .task-card {
        padding: 16px;
    }
    
    .task-meta {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .task-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-color);
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
     0% { transform: rotate(0deg); }
     100% { transform: rotate(360deg); }
 }

 /* 模态框样式 */
 .modal {
     display: none;
     position: fixed;
     z-index: 1000;
     left: 0;
     top: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(0,0,0,0.5);
     backdrop-filter: blur(5px);
 }

 .modal.show {
     display: flex;
     align-items: center;
     justify-content: center;
 }

.modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

/* ===== 防止模态框打开时背景滚动与触摸穿透 ===== */
/* 当 main.html 的自定义模态框打开时（JS 会给 body 加上 modal-open），锁定页面滚动 */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    overscroll-behavior: none; /* 阻止滚动链到页面 */
}

/* 让模态框内容滚动不向外传播，避免边界时触发背景滚动（移动端） */
.modal-content {
    overscroll-behavior: contain; /* 防止滚动链穿透到 body */
}

 @keyframes modalSlideIn {
     from {
         opacity: 0;
         transform: translateY(-50px) scale(0.9);
     }
     to {
         opacity: 1;
         transform: translateY(0) scale(1);
     }
 }

 .modal-header {
     padding: 20px 24px 0;
     border-bottom: 1px solid var(--border-color);
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .modal-title {
     font-size: 20px;
     font-weight: 600;
     color: var(--text-color);
     margin: 0;
 }

 .modal-close {
     background: none;
     border: none;
     font-size: 24px;
     cursor: pointer;
     color: var(--text-secondary);
     padding: 0;
     width: 30px;
     height: 30px;
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: 50%;
     transition: all 0.2s ease;
 }

 .modal-close:hover {
     background: var(--nav-hover);
     color: var(--text-color);
 }

 .modal-body {
     padding: 24px;
 }

 .modal-footer {
     padding: 0 24px 24px;
     display: flex;
     gap: 12px;
     justify-content: flex-end;
 }

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

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

 .form-group input,
 .form-group select,
 .form-group textarea {
     width: 100%;
     padding: 10px 12px;
     border: 1px solid var(--border-color);
     border-radius: 6px;
     font-size: 14px;
     background: var(--card-bg);
     color: var(--text-color);
     transition: border-color 0.2s ease;
 }

 .form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* 深色模式下的表单焦点状态 */
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66,153,225,0.25);
}

 .form-group textarea {
     resize: vertical;
     min-height: 80px;
 }

 .form-row {
     display: flex;
     gap: 16px;
 }

 .form-row .form-group {
     flex: 1;
 }

 /* 统计网格样式 */
 .stats-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     gap: 16px;
     margin-bottom: 24px;
 }

 .stat-card {
     background: var(--card-bg);
     padding: 20px;
     border-radius: 12px;
     text-align: center;
     box-shadow: var(--shadow);
     transition: transform 0.2s ease;
 }

 .stat-card:hover {
     transform: translateY(-2px);
 }

 .stat-number {
     font-size: 32px;
     font-weight: 700;
     color: #007bff;
     margin-bottom: 8px;
 }

 .stat-label {
     font-size: 14px;
     color: var(--text-secondary);
     font-weight: 500;
 }

 



 /* 移动端样式 */
 @media (max-width: 768px) {
     .modal-content {
         margin: 20px;
         max-width: calc(100vw - 40px);
     }

     .form-row {
         flex-direction: column;
         gap: 0;
     }

     /* 移动端统计信息2行2列布局 */
     .stats-grid {
         grid-template-columns: repeat(2, 1fr) !important;
         gap: 12px !important;
         margin-bottom: 16px !important;
         max-width: 100% !important;
     }

     .stat-card {
         padding: 16px 12px !important;
         border-radius: 10px !important;
         min-height: 80px !important;
         display: flex !important;
         flex-direction: column !important;
         justify-content: center !important;
         align-items: center !important;
     }

     .stat-number {
         font-size: 24px !important;
         margin-bottom: 6px !important;
         font-weight: 700 !important;
     }

     .stat-label {
         font-size: 12px !important;
         line-height: 1.3 !important;
         text-align: center !important;
         font-weight: 500 !important;
     }

     .task-actions {
         flex-wrap: wrap;
     }
 }

 /* 超小屏幕优化 */
 @media (max-width: 480px) {
     /* 超小屏幕保持2行2列布局 */
     .stats-grid {
         grid-template-columns: repeat(2, 1fr) !important;
         gap: 10px !important;
         margin-bottom: 12px !important;
     }

     .stat-card {
         padding: 14px 10px !important;
         border-radius: 8px !important;
         min-height: 75px !important;
     }

     .stat-number {
         font-size: 22px !important;
         margin-bottom: 4px !important;
     }

     .stat-label {
         font-size: 11px !important;
         line-height: 1.2 !important;
     }
 }

#classroomDetailModal .modal-body-content {
    padding: 1rem 2rem;
    overflow-y: auto;
    flex: 1;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --bg-gradient: #1a1a1a;
        --card-bg: #2d2d2d;
        --text-color: #ffffff;
        --text-secondary: #cccccc;
        --border-color: rgba(255, 255, 255, 0.1);
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        --header-bg: #2d2d2d;
        --nav-hover: #3d3d3d;
    }
    
    /* 强制模态框深色模式 */
    .modal-content {
        background: #2d2d2d !important;
        color: #ffffff !important;
    }
    
    .modal-header {
        background: #2d2d2d !important;
        border-bottom-color: rgba(255, 255, 255, 0.1) !important;
        color: #ffffff !important;
    }
    
    .modal-body {
        background: #2d2d2d !important;
        color: #ffffff !important;
    }
    
    .modal-footer {
        background: #2d2d2d !important;
        border-top-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .close {
        color: #cccccc !important;
    }
    
    .close:hover {
        color: #ffffff !important;
    }
    
    /* 班级详情模态框深色模式 */
    #classroomDetailModal .detail-section {
        background: #2d3748 !important;
    }
    
    #classroomDetailModal .detail-section h3 {
        color: #e2e8f0 !important;
    }
    
    #classroomDetailModal .info-item {
        background: #4a5568 !important;
        border-left-color: #667eea !important;
    }
    
    #classroomDetailModal .info-grid {
        background: transparent !important;
    }
    
    #classroomDetailModal .invite-code-display {
        background: #4a5568 !important;
        color: #e2e8f0 !important;
        border-color: #718096 !important;
    }
    
    #classroomDetailModal .invite-code-container {
        background: transparent !important;
    }
    
    /* 任务卡片深色模式样式 */
    .task-scripture {
        background: #3d3d3d !important;
        border-left-color: #667eea !important;
        color: #ffffff !important;
    }
    
    .task-title {
        color: #ffffff !important;
    }
    
    .task-subtitle {
        color: #cccccc !important;
    }
    
    #classroomDetailModal .student-item {
        background: #4a5568 !important;
    }
    
    #classroomDetailModal .student-name {
        color: #e2e8f0 !important;
    }
    
    #classroomDetailModal .student-email {
        color: #a0aec0 !important;
    }
    
    #classroomDetailModal .student-joined {
        color: #718096 !important;
    }
    
    #classroomDetailModal .detail-actions {
        background: #2d3748 !important;
        border-top-color: #4a5568 !important;
    }
    
    #classroomDetailModal .modal-header {
        background: #2d3748 !important;
        border-bottom-color: #4a5568 !important;
    }
    
    #classroomDetailModal .modal-body-content {
        background: #1a202c !important;
    }
    
    /* detail-actions区域按钮深色模式 */
    #classroomDetailModal .detail-actions .btn {
        background: #4a5568 !important;
        color: #e2e8f0 !important;
        border-color: #718096 !important;
    }
    
    #classroomDetailModal .detail-actions .btn:hover {
        background: #667eea !important;
        color: #ffffff !important;
        border-color: #667eea !important;
    }
    
    #classroomDetailModal .detail-actions .btn-success {
        background: #38a169 !important;
        border-color: #38a169 !important;
    }
    
    #classroomDetailModal .detail-actions .btn-success:hover {
        background: #2f855a !important;
        border-color: #2f855a !important;
    }
    
    #classroomDetailModal .detail-actions .btn-info {
        background: #3182ce !important;
        border-color: #3182ce !important;
    }
    
    #classroomDetailModal .detail-actions .btn-info:hover {
        background: #2c5aa0 !important;
        border-color: #2c5aa0 !important;
    }
    
    #classroomDetailModal .detail-actions .btn-secondary {
        background: #718096 !important;
        border-color: #718096 !important;
    }
    
    #classroomDetailModal .detail-actions .btn-secondary:hover {
        background: #4a5568 !important;
        border-color: #4a5568 !important;
    }
    
    /* Toast组件深色模式 */
    .toast.success {
        background: #38a169 !important;
    }
    
    .toast.error {
        background: #e53e3e !important;
    }
    
    .toast.warning {
        background: #d69e2e !important;
        color: #1a202c !important;
    }
    
    .toast.info {
        background: #3182ce !important;
    }
    
    /* 班级列表邀请码深色模式 */
    .invite-code-list {
        background: #4a5568 !important;
        border-color: #718096 !important;
        color: #e2e8f0 !important;
    }
    
    .invite-code-list:hover {
        background: #667eea !important;
        border-color: #667eea !important;
        color: #ffffff !important;
    }
    
    .invite-code-list.expired {
        background: #742a2a !important;
        border-color: #e53e3e !important;
        color: #fed7d7 !important;
    }
    
    .invite-code-list.expired:hover {
         background: #e53e3e !important;
         border-color: #e53e3e !important;
         color: #ffffff !important;
     }
     
     .invite-code-list .invite-code-expire {
         color: #a0aec0 !important;
     }
     
     .invite-code-list.expired .invite-code-expire {
         color: #fed7d7 !important;
     }
}

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== 头部样式 ==================== */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-details h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.user-details p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.logout-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* ==================== 主容器样式 ==================== */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    padding-bottom: 100px; /* 为底部导航留空间 */
}

/* ==================== 标签页内容样式 ==================== */
.tab-content {
    display: none;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* ==================== 欢迎卡片样式 ==================== */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.welcome-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==================== 操作区域样式 ==================== */
.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.679rem 1rem;
}

/* 深色模式下的按钮 */
[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b5b95 100%);
    padding: 0.679rem 1rem;
}

[data-theme="dark"] .btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    padding: 0.679rem 1rem;
}

[data-theme="dark"] .btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

[data-theme="dark"] .btn-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

[data-theme="dark"] .btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

[data-theme="dark"] .btn-secondary {
    background: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #2d3748;
}

/* 深色模式下的积分排行榜样式 */
[data-theme="dark"] .ranking-header {
    color: var(--text-color);
}

[data-theme="dark"] .ranking-title {
    color: var(--text-color);
}

[data-theme="dark"] .filter-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .filter-item label {
    color: var(--text-color);
}

[data-theme="dark"] .filter-item select {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-item select:focus {
    border-color: #5a6fd8;
    box-shadow: 0 0 0 3px rgba(90, 111, 216, 0.15);
}

[data-theme="dark"] .ranking-stats {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .ranking-count {
    color: var(--text-secondary);
}

[data-theme="dark"] .ranking-count strong {
    color: #5a6fd8;
}

[data-theme="dark"] .table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .btn-refresh {
    background: #48bb78;
}

[data-theme="dark"] .btn-refresh:hover {
    background: #38a169;
}

[data-theme="dark"] .btn-export {
    background: #4299e1;
}

[data-theme="dark"] .btn-export:hover {
    background: #3182ce;
}

/* 深色模式下的表格优化样式 */
[data-theme="dark"] .ranking-table {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .ranking-table th {
    background: var(--avatar-bg);
}

[data-theme="dark"] .ranking-table tbody tr:hover {
    background: rgba(66, 153, 225, 0.1);
}

[data-theme="dark"] .ranking-table .points-value {
    color: #4299e1;
}

[data-theme="dark"] .ranking-table .streak-days {
    color: #38a169;
}

/* 深色模式下的标签按钮样式 */
[data-theme="dark"] .tab-button {
    border-color: #9f7aea;
    background: linear-gradient(135deg, transparent, rgba(159, 122, 234, 0.1));
    color: #9f7aea;
    box-shadow: 0 2px 8px rgba(159, 122, 234, 0.2);
}

[data-theme="dark"] .tab-button.active,
[data-theme="dark"] .tab-button:hover {
    background: linear-gradient(135deg, #9f7aea, #667eea);
    color: white;
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    padding: 0.679rem 1rem;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.679rem 1rem;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 0.679rem 1rem;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 0.679rem 1rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 0.679rem 1rem;
}

.btn-admin {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

/* ==================== 统计网格样式 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-card .label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==================== 卡片网格样式 ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* ==================== 班级卡片样式 ==================== */
.classroom-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* 移除班级卡片悬停效果 */

.classroom-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.classroom-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.invite-code {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
}

.classroom-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ==================== 任务卡片样式 ==================== */
.task-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

/* 移除任务卡片悬停效果 */

.task-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.task-title-row {
    flex: 1;
    margin-right: 1rem;
}

.task-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.task-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}



.task-scripture {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    font-size: 0.95rem;
    line-height: 1.4;
}

.task-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    background: #e4f4ff;
    color: #555555;
}

.task-status.active {
    background: hsl(72, 100%, 85%);
    color: #1976d2;
}

.task-status.draft {
    background: #e1e1e1;
    color: #787878;
}

.task-status.completed {
    background: #e8f5e8;
    color: #2e7d32;
}

.task-status.overdue {
    background: #ffebee;
    color: #c62828;
}

.task-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.task-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ==================== 空状态样式 ==================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-secondary);
}

/* ==================== 加载和错误状态 ==================== */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

.success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

/* ==================== 模态框样式 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
}

/* 老师复选框列表样式 */
.teachers-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    background: var(--card-bg);
}

.teacher-checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.teacher-checkbox-item:hover {
    background: var(--nav-hover);
}

.teacher-checkbox-item input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    cursor: pointer;
}

.teacher-checkbox-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    font-weight: normal;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* 深色模式下的表单焦点状态 */
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66,153,225,0.25);
}

/* ==================== 积分榜样式 ==================== */
.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.points-tabs {
    display: flex;
    gap: 0.5rem;
}

.points-tabs button {
    padding: 0.75rem 1.5rem;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.points-tabs button.active,
.points-tabs button:hover {
    background: #667eea;
    color: white;
}

/* 积分排行标签按钮样式 */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border: 2px solid #667eea;
    background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.1));
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.94rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.tab-button::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 ease;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button.active,
.tab-button:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tab-button:active {
    transform: translateY(0);
}

.points-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.points-controls select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
}

/* 新增的积分排行榜布局样式 */
.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.ranking-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.ranking-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ranking-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-refresh {
    background: #28a745;
    color: white;
}

.btn-refresh:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-export {
    background: #17a2b8;
    color: white;
}

.btn-export:hover {
    background: #138496;
    transform: translateY(-1px);
}

.filter-group {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.filter-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.filter-item select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-item select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

.ranking-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.ranking-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ranking-count strong {
    color: #667eea;
    font-weight: 600;
}

.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.points-tab-content {
    display: none;
}

.points-tab-content.active {
    display: block;
}

/* ==================== 表格样式 ==================== */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.ranking-table th,
.ranking-table td {
    padding: 1.2rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
}

.ranking-table th {
    background: var(--avatar-bg);
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.ranking-table tbody tr:hover {
    background: var(--nav-hover);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.ranking-table tbody tr {
    transition: all 0.2s ease;
}

.rank-number {
    font-weight: 700;
    text-align: center;
    width: 70px;
    font-size: 1.1rem;
}

.rank-1 {
    color: #ffd700;
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    color: #c0c0c0;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    color: #cd7f32;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

/* 学生姓名样式优化 */
.ranking-table .student-name {
    font-weight: 500;
    font-size: 1.05rem;
}

/* 积分数值样式优化 */
.ranking-table .points-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: #667eea;
}

/* 连续天数样式优化 */
.ranking-table .streak-days {
    font-weight: 600;
    font-size: 1.1rem;
    color: #28a745;
}

/* ==================== 个人资料样式 ==================== */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.profile-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.profile-info h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

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

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-stat {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.profile-stat .number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.profile-stat .label {
    color: #666;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== 底部导航样式 ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-tab.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.nav-tab .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-tab .label {
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-section {
    background:var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
    white-space: nowrap;
}

.filter-section select {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: var(--card-bg);
    font-size: 1rem;
    color: var(--text-color);
    min-width: 120px;
    transition: all 0.3s ease;
}

.filter-section select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-section .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    white-space: nowrap;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .header {
        padding-top: 2px;
        padding-bottom: 2px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
        padding-bottom: 100px;
    }
    
    .tab-content {
        padding: 1rem;
        border-radius: 15px;
        background: var(--card-bg);
        color: var(--text-color);
    }
    
    .welcome-card {
        padding: 1.5rem;
    }
    
    .welcome-card h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .points-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .points-controls {
        justify-content: center;
    }
    
    .points-controls select {
        background: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }
    
    .ranking-table {
        font-size: 0.9rem;
        background: var(--card-bg);
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.75rem 0.5rem;
        color: var(--text-color);
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 0;
        max-width: none;
        width: calc(100% - 1rem);
        max-height: 95vh;
        background: var(--card-bg);
        color: var(--text-color);
    }
    
    .modal-header {
        padding: 1rem;
        background: var(--card-bg);
        color: var(--text-color);
    }
    
    .modal-body {
        padding: 1rem;
        background: var(--card-bg);
        color: var(--text-color);
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        background: var(--card-bg);
    }
    
    .teachers-checkbox-list {
        max-height: 150px;
        overflow-y: auto;
        background: var(--card-bg);
        border-color: var(--border-color);
    }
    
    .teacher-checkbox-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .teacher-checkbox-item:hover {
        background: var(--nav-hover);
    }
    
    .teacher-checkbox-item label {
        font-size: 0.9rem;
        line-height: 1.3;
        color: var(--text-color);
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .task-card {
        background: var(--card-bg);
        color: var(--text-color);
    }

    .filter-section {
        padding: 1rem;
        gap: 0.75rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    /* 移动端筛选器行布局优化 */
    .filter-row {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .filter-row:first-child {
        margin-bottom: 1rem;
    }
    
    .filter-row label {
        font-size: 0.9rem !important;
        margin-bottom: 0 !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .filter-row select {
        flex: 1;
        min-width: 100px;
        font-size: 0.9rem !important;
        padding: 0.6rem 0.8rem !important;
    }
    
    .filter-section label {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        text-align: center;
        color: #667eea;
    }
    
    .filter-section select {
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 10px;
        border: 2px solid #e1e5e9;
        min-width: auto;
        width: 100%;
        text-align: center;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 12px;
        padding-right: 3rem;
    }
    
    .filter-section select:focus {
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    }
    
    .filter-section .btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        border-radius: 10px;
        margin-top: 0.5rem;
        font-weight: 600;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        transition: all 0.3s ease;
    }
    
    .filter-section .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
}

@media (max-width: 480px) {
    .user-info {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .user-details {
        flex: 1;
        min-width: 0;
    }
    
    .user-details h3 {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-role {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logout-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .nav-tab .icon {
        font-size: 1.3rem;
    }
    
    .nav-tab .label {
        font-size: 0.7rem;
    }
    
    /* 小屏幕筛选器进一步优化 */
    .filter-row label {
        font-size: 0.8rem !important;
    }
    
    .filter-row select {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.6rem !important;
        min-width: 80px;
    }
    
    .task-count-info {
        font-size: 0.8rem !important;
        margin-top: 0.5rem;
        width: 100%;
        text-align: center;
    }
    
    .ranking-table {
        font-size: 0.8rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.5rem 0.25rem;
        font-size: 12px;
    }
    
    .modal {
        padding: 0.25rem;
    }
    
    .modal-content {
        touch-action: pan-y;  /* 只允许纵向手势 */
  overscroll-behavior-x: none; /* 禁止横向回弹 */
  overflow-x: hidden;
        width: calc(100% - 0.5rem);
        max-height: 92vh;
        margin-top: 5vh;
        margin-left: 0.2rem;
        
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .teachers-checkbox-list {
        max-height: 120px;
    }
    
    .teacher-checkbox-item {
        padding: 0.4rem;
        margin-bottom: 0.4rem;
    }
    
    .teacher-checkbox-item label {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* ==================== 动画效果 ==================== */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* ==================== 打印样式 ==================== */
@media print {
    .header,
    .bottom-nav,
    .actions,
    .btn {
        display: none !important;
    }
    
    .main-container {
        margin: 0;
        padding: 0;
    }
    
    .tab-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==================== 辅助类 ==================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* ==================== Toast 提示组件 ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 250px;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

.toast.info {
    background: #17a2b8;
}

.toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* 复制按钮状态样式 */
.btn-copying {
    position: relative;
    pointer-events: none;
}

.btn-copying::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 班级列表邀请码样式 */
.invite-code-list {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #495057;
    user-select: none;
}

.invite-code-list:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.invite-code-list.expired {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.invite-code-list.expired:hover {
    background: #f1b0b7;
    border-color: #dc3545;
    color: #dc3545;
}

.invite-code-list .invite-code-expire {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.invite-code-list.expired .invite-code-expire {
    color: #721c24;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.rounded {
    border-radius: 8px;
}

.rounded-lg {
    border-radius: 15px;
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* 控制卡片样式 */
.controls-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

/* 过滤器网格布局 */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* 过滤器标签样式 */
.filter-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* 过滤器选择框样式 */
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.filter-select:hover {
    border-color: var(--primary-color);
}

/* 深色模式样式 */
[data-theme="dark"] .controls-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-label {
    color: var(--text-color);
}

[data-theme="dark"] .filter-label i {
    color: #9f7aea;
}

[data-theme="dark"] .filter-select {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .filter-select:focus {
    border-color: #9f7aea;
    box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.2);
}

[data-theme="dark"] .filter-select:hover {
    border-color: #9f7aea;
}

/* ==================== 紧凑筛选器样式 ==================== */
.compact-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.compact-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.85rem;
    min-width: 100px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.compact-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

.compact-select:hover {
    border-color: var(--primary-color);
}

/* 深色模式 */
[data-theme="dark"] .compact-filters {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .compact-select {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .compact-select:focus {
    border-color: #9f7aea;
    box-shadow: 0 0 0 2px rgba(159, 122, 234, 0.2);
}

[data-theme="dark"] .compact-select:hover {
    border-color: #9f7aea;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .compact-filters {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .compact-select {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        min-width: 80px;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .compact-filters {
        gap: 0.4rem;
        padding: 0.4rem;
        flex-wrap: wrap;
    }
    
    .compact-select {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        min-width: 70px;
        flex: 1;
    }
}

/* ==================== 分页控件样式 ==================== */
.pagination-controls {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-size-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-size-control label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.page-size-control select {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-size-control select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.task-count-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--card-bg);
    color: var(--text-secondary);
}

.pagination-prev,
.pagination-next {
    padding: 0.6rem 1.2rem;
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 0.6rem 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 深色模式分页样式 */
[data-theme="dark"] .pagination-controls {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .page-size-control label {
    color: var(--text-secondary);
}

[data-theme="dark"] .page-size-control select {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .page-size-control select:focus {
    border-color: #9f7aea;
    box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.2);
}

[data-theme="dark"] .task-count-info {
    color: var(--text-secondary);
}

[data-theme="dark"] .pagination-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
    background: #9f7aea;
    border-color: #9f7aea;
    color: white;
}

[data-theme="dark"] .pagination-btn.active {
    background: #9f7aea;
    border-color: #9f7aea;
    color: white;
}

[data-theme="dark"] .pagination-btn:disabled {
    background: var(--card-bg);
    color: var(--text-secondary);
}

[data-theme="dark"] .pagination-ellipsis {
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pagination-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .pagination-container {
        gap: 0.3rem;
    }
}

/* 移动端统计信息强制2行2列布局 - 最高优先级 */
@media (max-width: 768px) {
    .stats-section .stats-grid,
    .dashboard-content .stats-grid,
    .tasks-content .stats-grid,
    div.stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto auto !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .stats-section .stat-card,
    .dashboard-content .stat-card,
    .tasks-content .stat-card,
    div.stats-grid .stat-card {
        padding: 16px 12px !important;
        border-radius: 10px !important;
        min-height: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .stats-section .stats-grid,
    .dashboard-content .stats-grid,
    .tasks-content .stats-grid,
    div.stats-grid {
        gap: 10px !important;
        margin-bottom: 12px !important;
    }
    
    .stats-section .stat-card,
    .dashboard-content .stat-card,
    .tasks-content .stat-card,
    div.stats-grid .stat-card {
        padding: 14px 10px !important;
        border-radius: 8px !important;
        min-height: 75px !important;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .pagination-prev,
    .pagination-next {
        padding: 0.5rem 1rem;
    }
}

/* ==================== 头像上传样式 ==================== */
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-preview:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    padding: 0 10px;
}

.avatar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 深色模式下的头像样式 */
[data-theme="dark"] .avatar-preview {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .avatar-preview:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

/* ==================== 头像裁切功能样式 ==================== */
.avatar-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.avatar-crop-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.crop-preview-area {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.crop-image {
    position: absolute;
    cursor: move;
    user-select: none;
    transition: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-left: -100px;
    margin-top: -100px;
    border: 2px solid #007bff;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crop-zoom-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crop-zoom-control label {
    font-weight: 500;
    min-width: 60px;
}

.crop-zoom-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.crop-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

.crop-zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}

.crop-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.crop-reset-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.crop-reset-btn:hover {
    background: #5a6268;
}

.crop-confirm-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.crop-confirm-btn:hover {
    background: #0056b3;
}

.crop-cancel-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.crop-cancel-btn:hover {
    background: var(--hover-bg);
}

/* 深色模式下的裁切样式 */
[data-theme="dark"] .crop-preview-area {
    background: #2d3748;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .crop-zoom-slider {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .crop-reset-btn {
    background: #4a5568;
}

[data-theme="dark"] .crop-reset-btn:hover {
    background: #2d3748;
}

/* ==================== 提交记录模态框样式 ==================== */

/* 模态框背景 */
.submission-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框内容容器 */
.submission-modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

/* 模态框头部 */
.submission-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1001;
    border-radius: 12px 12px 0 0;
}

.submission-modal-title {
    margin: 0;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
}

.submission-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.submission-modal-close:hover {
    background-color: var(--nav-hover);
}

/* 模态框主体 */
.submission-modal-body {
    padding: 20px;
    min-height: 200px;
}

/* 提交项容器 */
.submission-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.submission-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

/* 提交项头部 */
.submission-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.submission-item-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.submission-item-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.submission-item-status {
    text-align: right;
}

/* 状态标签 */
.submission-status-badge {
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.submission-status-badge.scored {
    background: #28a745;
}

.submission-status-badge.submitted {
    background: #ffc107;
    color: #212529;
}

.submission-status-badge.late {
    background: #dc3545;
    margin-top: 2px;
    display: inline-block;
}

/* 已批改状态样式 */
.submission-status.status-graded {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* 提交内容区域 */
.submission-content-section {
    margin: 10px 0;
}

.submission-content-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    display: block;
}

.submission-content-text {
    margin: 5px 0;
    padding: 8px;
    background: var(--bg-color);
    border-radius: 4px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* 文件展示区域 */
.submission-file-section {
    margin: 10px 0;
}

.submission-file-preview {
    margin-top: 5px;
}

.submission-file-image {
    max-width: 300px;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.submission-file-image:hover {
    transform: scale(1.02);
}

.submission-file-video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    width: 100%;
    display: block;
    margin: 0 auto;
}

.submission-file-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.submission-file-link:hover {
    text-decoration: underline;
}

.submission-file-size {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 5px 0;
}

/* 评分和反馈区域 */
.submission-feedback-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.submission-score-display {
    margin-bottom: 10px;
}

.submission-score-label {
    font-weight: 600;
    color: var(--text-color);
}

.submission-score-stars {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
    margin-left: 8px;
}

.submission-feedback-display {
    margin-top: 10px;
}

.submission-feedback-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    display: block;
}

.submission-feedback-text {
    margin: 5px 0;
    padding: 8px;
    background: #e8f5e8;
    border-radius: 4px;
    border-left: 4px solid #28a745;
    color: var(--text-color);
}

/* 空状态显示 */
.submission-empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}

/* ==================== 深色模式样式 ==================== */

[data-theme="dark"] .submission-modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .submission-file-image {
    box-shadow: 0 2px 4px rgba(255,255,255,0.1);
}

[data-theme="dark"] .submission-feedback-text {
    background: #1e3a1e;
    border-left-color: #4caf50;
    color: var(--text-color);
}

[data-theme="dark"] .submission-status-badge.submitted {
    background: #e6a700;
    color: #000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .submission-modal-content {
        max-width: 95%;
        max-height: 95%;
        margin: 10px;
    }
    
    .submission-modal-header {
        padding: 15px;
    }
    
    .submission-modal-body {
        padding: 15px;
    }
    
    .submission-item {
        padding: 12px;
    }
    
    .submission-item-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .submission-item-status {
        text-align: left;
    }
    
    .submission-file-image {
        max-width: 100%;
    }
}

/* ==================== 上传进度条样式 ==================== */

/* 进度条容器 */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

/* 进度条填充 */
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

/* 进度条动画效果 */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 进度文本 */
#progressText {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
}

/* 上传进度区域 */
#uploadProgress {
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 10px;
}

/* 深色模式样式 */
[data-theme="dark"] .progress-bar {
    background-color: #3a3a3a;
}

[data-theme="dark"] .progress-fill {
    background: linear-gradient(90deg, #0d6efd, #084298);
}

[data-theme="dark"] #uploadProgress {
    background: var(--card-bg);
    border-color: var(--border-color);
}

/* ==================== 录制界面样式 ==================== */

/* 提交方式选择标签 */
.submission-type-tabs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.tab-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

/* 提交区域 */
.submission-section {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

/* 录制控制区域 */
.recording-controls {
    text-align: center;
    padding: 16px;
}

.recording-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
    flex-wrap: wrap;
}

.recording-buttons .btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 录制状态显示 */
.recording-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    margin-top: 16px;
}

#recordingTime {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
}

.recording-indicator {
    color: #dc3545;
    font-weight: 500;
    animation: recording-pulse 1.5s infinite;
}

@keyframes recording-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 视频预览容器 */
.video-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    min-height: 120px;
    max-height: 320px;
    overflow: hidden;
}

/* 录制预览视频 */
#recordingPreview {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #000;
    max-height: 300px;
    object-fit: contain;
}

/* 前置摄像头镜像效果 */
.front-camera-mirror {
    transform: scaleX(-1);
}

/* 录制质量选择 */
#recordingQuality {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
}

/* 深色模式适配 */
[data-theme="dark"] .tab-btn {
    border-color: var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .tab-btn:hover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

[data-theme="dark"] .tab-btn.active {
    border-color: #0d6efd;
    background: #0d6efd;
    color: white;
}

[data-theme="dark"] .submission-section {
    border-color: var(--border-color);
    background: var(--card-bg);
}

[data-theme="dark"] .recording-status {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
}

[data-theme="dark"] .video-preview-container {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] #recordingPreview {
    border-color: var(--border-color);
}

[data-theme="dark"] #recordingQuality {
    border-color: var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
}

/* ==================== 录制窗口样式 ==================== */
.recording-window-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.recording-window-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.recording-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.recording-window-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.recording-window-header .btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.recording-window-header .btn-close:hover {
    background-color: var(--nav-hover);
    color: var(--text-color);
}

.recording-quality-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.recording-quality-section select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.recording-quality-section select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.recording-preview-section {
    text-align: center;
    margin-bottom: 20px;
}

#recordingWindowPreview {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    display: none;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

/* 录制窗口预览视频镜像效果 */
#recordingWindowPreview.front-camera-mirror {
    transform: scaleX(-1);
}

.recording-controls-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.recording-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.recording-buttons .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 120px;
}

.recording-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.recording-buttons .btn-success {
    background: #28a745;
    color: white;
}

.recording-buttons .btn-success:hover {
    background: #218838;
}

.recording-buttons .btn-danger {
    background: #dc3545;
    color: white;
}

.recording-buttons .btn-danger:hover {
    background: #c82333;
}

.recording-buttons .btn-secondary {
    background: #6c757d;
    color: white;
}

.recording-buttons .btn-secondary:hover {
    background: #5a6268;
}

.recording-buttons .btn-primary {
    background: #007bff;
    color: white;
}

.recording-buttons .btn-primary:hover {
    background: #0056b3;
}

#recordingWindowStatus {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--nav-hover);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

/* 深色模式下的录制窗口样式调整 */
[data-theme="dark"] .recording-window-overlay {
    background: rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .recording-quality-section select {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .recording-quality-section select option {
    background: var(--card-bg);
    color: var(--text-color);
}

/* 深色模式下的摄像头选择控件样式 */
[data-theme="dark"] .camera-selection-section label {
    color: var(--text-color);
}

[data-theme="dark"] .camera-selection-section select {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .camera-selection-section select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

[data-theme="dark"] .camera-selection-section select:hover {
    border-color: var(--primary-color);
}

[data-theme="dark"] .camera-selection-section select option {
    background: var(--card-bg);
    color: var(--text-color);
}

/* 深色模式下的摄像头切换按钮样式 */
[data-theme="dark"] #switchCameraWindowBtn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] #switchCameraWindowBtn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] #switchCameraWindowBtn svg .st0 {
    fill: var(--text-color) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .submission-type-tabs {
        flex-direction: column;
    }
    
    .recording-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .recording-buttons .btn {
        width: 100%;
        max-width: 200px;
    }
    
    #recordingPreview {
        max-width: 100%;
    }
    
    .recording-window-content {
        width: 95%;
        padding: 15px;
        max-height: 90vh;
    }
    
    .recording-window-header h3 {
        font-size: 1.1rem;
    }
    
    .recording-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .recording-buttons .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* ==================== 主要功能区域样式 ==================== */

.main-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* ==================== 快速操作区域样式 ==================== */

.quick-actions {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.quick-actions:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.quick-actions h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 深色模式适配 */
[data-theme="dark"] .quick-actions {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .quick-actions:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* ==================== 视频学习模块样式 ==================== */

.videos-section {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.videos-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.videos-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.videos-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.videos-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.videos-card:hover::before {
    opacity: 1;
}

.videos-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.videos-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.videos-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

.videos-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.4;
}

.videos-link-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.videos-link-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
    color: white;
    text-decoration: none;
}

.videos-link-btn .arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.videos-link-btn:hover .arrow {
    transform: translateX(4px);
}

/* 深色模式适配 */
[data-theme="dark"] .videos-section {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .videos-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* ==================== 游戏选择界面样式 ==================== */

.games-section {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.games-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.game-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.game-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-color);
}

.game-card.disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--border-color);
}

.game-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.game-card.tree-planting .game-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.game-card.millionaire .game-icon {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.game-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 1rem;
}

.game-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-status.enabled {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.game-status.disabled {
    background: rgba(158, 158, 158, 0.1);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.2);
}

.game-play-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.game-play-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.game-play-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 深色模式适配 */
[data-theme="dark"] .games-section {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .game-card {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .game-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .game-card.disabled {
    background: var(--bg-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-features {
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .quick-actions {
        padding: 1rem;
    }
    
    .quick-actions h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .videos-section {
        padding: 1rem;
    }
    
    .videos-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.25rem;
    }
    
    .videos-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .videos-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .videos-info h4 {
        font-size: 1.2rem;
    }
    
    .videos-info p {
        font-size: 0.9rem;
    }
    
    .videos-link-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .games-section {
        padding: 1rem;
    }
    
    .game-card {
        padding: 1.25rem;
    }
    
    .game-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .game-title {
        font-size: 1.1rem;
    }
    
    .game-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .main-features {
        gap: 1rem;
        margin-top: 0.75rem;
    }
    
    .quick-actions {
        padding: 0.75rem;
    }
    
    .quick-actions h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .videos-section {
        padding: 0.75rem;
    }
    
    .videos-card {
        padding: 1rem;
        gap: 1rem;
    }
    
    .videos-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .videos-info h4 {
        font-size: 1.1rem;
    }
    
    .videos-info p {
        font-size: 0.85rem;
    }
    
    .videos-link-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .games-section {
        padding: 0.75rem;
    }
    
    .game-card {
        padding: 1rem;
    }
}

/* ==================== 发送验证码按钮样式 ==================== */
.btn-send-code {
    white-space: nowrap;
    min-width: 80px;
    max-width: 150px;
    flex-shrink: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .btn-send-code {
        min-width: 70px;
        max-width: 150px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .btn-send-code {
        min-width: 60px;
        max-width: 100px;
    }
}

/* 深色模式下的发送验证码按钮 */
[data-theme="dark"] .btn-send-code {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .btn-send-code:hover {
    background-color: var(--nav-hover);
    border-color: var(--border-color);
}

/* ==================== 查看大家提交功能样式 ==================== */
.public-submission {
    border-left: 4px solid #17a2b8;
}

.submission-like-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.like-btn:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.2);
}

.like-btn.liked {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.like-btn.liked:hover {
    background: rgba(255, 107, 107, 0.2);
}

.like-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.like-btn:hover .like-icon {
    transform: scale(1.2);
}

.like-count {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* 深色模式下的点赞按钮样式 */
[data-theme="dark"] .like-btn {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .like-btn:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

[data-theme="dark"] .like-btn.liked {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

[data-theme="dark"] .like-btn.liked:hover {
    background: rgba(255, 107, 107, 0.25);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .like-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .like-icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .submission-like-section {
        justify-content: center;
    }
    
    .like-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .like-icon {
        font-size: 1rem;
    }
}

/* 校通知全部显示模态框样式 */
#allSchoolNoticesModal .modal-content {
    /* width: 90vw; */
    max-width: 800px;
}

.all-notices-container {
    padding: 1rem 0;
}

.full-notice-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.full-notice-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.full-notice-item.pinned {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #f39c12;
    position: relative;
}

.full-notice-item.pinned::before {
    content: '📌 置顶';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f39c12;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.full-notice-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.full-notice-content {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.full-notice-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
}

.full-notice-author {
    font-weight: 500;
    color: #495057;
}

.full-notice-time {
    opacity: 0.8;
}

.no-notices-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* 深色模式适配 */
[data-theme="dark"] .full-notice-item.pinned {
    background: linear-gradient(135deg, #3d3d00 0%, #5d4e00 100%);
    border-left-color: #f39c12;
}

[data-theme="dark"] .full-notice-item.pinned::before {
    background: #f39c12;
}

/* 移动端优化 */
@media (max-width: 768px) {
    #allSchoolNoticesModal .modal-content {
             margin-top: 80px;
        margin-left: 2vw;
        margin-right: 2vw;
        width: 95vw;
    }
    
    .full-notice-item {
        padding: 1rem;
    }
    
    .full-notice-title {
        font-size: 1rem;
    }
    
    .full-notice-content {
        font-size: 0.9rem;
    }
    
    .full-notice-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    /* 手机端"阅读全部"按钮优化 */
    .btn-read-all {
        /* padding: 0.3rem 0.6rem; */
        /* font-size: 0.7rem; */
        border-radius: 16px;
        min-width: auto;
        max-width: 40vw;
    }
    

}

/* ==================== Android应用下载卡片样式 ==================== */
.android-download-section {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.download-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    gap: 1rem;
    flex-direction: column;
}

.download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .download-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.download-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 50%;
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.download-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.download-btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: scale(1.05);
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .android-download-section {
        padding: 0 0.5rem;
    }
    
    .download-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .download-icon {
        width: 40px;
        height: 40px;
    }
    
    .download-icon i {
        font-size: 20px !important;
    }
    
    .download-info h4 {
        font-size: 0.9rem;
    }
    
    .download-info p {
        font-size: 0.8rem;
    }
    
    .download-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ==================== 推送通知设置样式 ==================== */
.push-notification-settings {
    max-width: 500px;
    margin: 0 auto;
}

.notification-status {
    margin-bottom: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.status-item:hover {
    background: var(--nav-hover);
}

.status-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.status-value {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.status-supported {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-not-supported {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-granted {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-denied {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-default {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-subscribed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-not-subscribed {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.notification-controls {
    margin-bottom: 1.5rem;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-buttons .btn {
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.control-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .control-buttons .btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-enable-push {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-enable-push:hover {
    background: #218838;
    border-color: #1e7e34;
    color: white;
}

.btn-disable-push {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-disable-push:hover {
    background: #c82333;
    border-color: #bd2130;
    color: white;
}

.btn-test-push {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-test-push:hover {
    background: #0056b3;
    border-color: #004085;
    color: white;
}

.notification-guide {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.notification-guide h6 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.guide-section {
    margin-bottom: 1rem;
}

.guide-section:last-child {
    margin-bottom: 0;
}

.guide-section h6 {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-section ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.guide-section li {
    margin-bottom: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .push-notification-settings {
        max-width: 100%;
    }
    
    .status-item {
        padding: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .status-label {
        font-size: 0.9rem;
    }
    
    .status-value {
        font-size: 0.8rem;
        align-self: flex-end;
    }
    
    .control-buttons .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .notification-guide {
        padding: 0.75rem;
    }
    
    .guide-section h6 {
        font-size: 0.85rem;
    }
    
.guide-section ul {
    font-size: 0.8rem;
}
}

/* 顶部右侧点赞角标样式 */
.submission-item {
    position: relative; /* 允许右上角绝对定位 */
}

.submission-like-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.submission-like-badge .like-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-secondary);
    box-shadow: var(--shadow);
}

.submission-like-badge .like-btn:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.submission-like-badge .like-btn.liked {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

[data-theme="dark"] .submission-like-badge .like-btn {
    border-color: var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
}

[data-theme="dark"] .submission-like-badge .like-btn:hover {
    background: rgba(255, 107, 107, 0.15);
}

[data-theme="dark"] .submission-like-badge .like-btn.liked {
    background: rgba(255, 107, 107, 0.15);
}

@media (max-width: 480px) {
    .submission-like-badge {
        top: 8px;
        right: 8px;
    }
    .submission-like-badge .like-btn {
        padding: 3px 8px;
        font-size: 0.85rem;
    }
}
