* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 登录和注册容器 */
.login-container, .register-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.form-group {
    margin: 20px 0;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input, select, textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.login-btn, .register-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.login-btn:hover, .register-btn:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
}

.register-link, .login-link {
    text-align: center;
    margin-top: 20px;
}

.register-link a, .login-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover, .login-link a:hover {
    text-decoration: underline;
}

.status {
    padding: 15px;
    margin: 15px 0;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* 班级网格 */
.class-grid-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: white;
    padding: 10px;
    margin-top: 10px;
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.class-item-compact {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.class-item-compact:hover {
    border-color: #3498db;
    background: #f8fafc;
}

.class-item-compact.selected {
    border-color: #3498db;
    background: #e3f2fd;
}

.class-item-compact input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.class-name-main {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.approval-notice {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    color: #856404;
}

.approval-notice h3 {
    color: #856404;
    margin-bottom: 8px;
}

/* 主页面样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.tab-container {
    margin: 20px 0;
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
    border: 2px solid #e1e8ed;
    flex-wrap: wrap;
}

.tab-button {
    flex: 1;
    padding: 12px;
    border: none;
    background: #e9ecef;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #495057;
    margin: 2px;
    min-width: 120px;
}

.tab-button:hover {
    background: #dee2e6;
}

.tab-button.active {
    background: #007bff;
    color: white;
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
/* 年级班级容器 */
.grade-class-container {
    margin: 15px 0;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 15px;
    background: #f8f9fa;
}

.grade-selector {
    margin-bottom: 15px;
}

.class-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.header-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-all-box {
    justify-content: flex-start;
    min-width: 140px;
    flex-shrink: 0;
}

.online-stats-box {
    justify-content: flex-end;
    text-align: right;
    min-width: 140px;
    flex-shrink: 0;
}

.header-box label {
    margin: 0;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
    cursor: pointer;
    font-size: 14px;
}

.header-box .online-stats {
    margin: 0;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
    font-size: 14px;
}

.header-box input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .class-selection-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .header-box {
        padding: 6px 10px;
        min-width: 120px;
    }
    
    .header-box label {
        font-size: 13px;
    }
    
    .header-box .online-stats {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .class-selection-header {
        flex-direction: row;
        gap: 6px;
    }
    
    .header-box {
        padding: 5px 8px;
        min-width: 110px;
    }
    
    .header-box label {
        font-size: 12px;
    }
    
    .header-box .online-stats {
        font-size: 12px;
    }
    
    .header-box input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
}

/* 紧凑布局 */
.compact-layout {
    max-height: 200px;
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.class-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.class-status-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 16px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #28a745;
}

.status-dot.offline {
    background: #dc3545;
}

.status-text {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.class-item-compact.online {
    border-color: #28a745;
    background: #f8fff9;
}

.class-item-compact.offline {
    border-color: #e1e8ed;
    background: white;
}

/* 文件大小警告 */
.file-size-warning {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    text-align: center;
    color: #856404;
    font-weight: 600;
}

/* 文件列表 */
.file-list {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.file-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.file-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.file-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.file-size {
    color: #6c757d;
    font-size: 12px;
}

.progress-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
}

.file-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 60px;
}

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

.upload-status {
    margin: 10px 0;
    padding: 10px;
    border-radius: 6px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
}

/* 科目按钮 */
.subject-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.subject-btn {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: bold;
}

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

/* 作业编辑器 */
.homework-editor {
    width: 100%;
    height: 250px;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 1em;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.homework-editor:focus {
    outline: none;
    border-color: #007bff;
}

/* 作业预览 */
.homework-preview {
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.preview-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    border-left: 5px solid #3498db;
    transition: all 0.3s ease;
}

.preview-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.preview-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    font-size: 1.1em;
    margin: 0;
}

.preview-content {
    padding: 15px;
    min-height: 60px;
}

.preview-text {
    font-size: 1em;
    line-height: 1.5;
    color: #2c3e50;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
    font-style: italic;
}

/* 提醒列表 */
.reminder-list {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    max-height: 400px;
    overflow-y: auto;
}

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.reminder-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reminder-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.reminder-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reminder-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reminder-time {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
}

.reminder-class {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.reminder-message {
    color: #495057;
    line-height: 1.4;
    padding: 8px 0;
    word-wrap: break-word;
}

.reminder-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

/* 用户管理 */
.user-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 15px;
}

.user-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.user-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-basic-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
}

.user-real-name {
    color: #495057;
    font-size: 14px;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
}

.user-role {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.user-status {
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.user-status.approved {
    background: #d4edda;
    color: #155724;
}

.user-details-expanded {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.user-detail-row {
    display: flex;
    margin-bottom: 8px;
}

.user-detail-label {
    font-weight: bold;
    color: #2c3e50;
    min-width: 120px;
}

.user-detail-value {
    color: #495057;
    flex: 1;
}

.user-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.edit-btn, .approve-btn, .reject-btn, .delete-btn, .backup-btn {
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

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

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

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

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

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

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

.delete-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.backup-btn {
    background: #6f42c1;
    color: white;
}

.backup-btn:hover {
    background: #5a32a3;
    transform: translateY(-1px);
}

/* 模态框样式 - 修复居中问题 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 10001;
}

/* 当模态框显示时的样式 */
.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-overlay.active .modal {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e1e8ed;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 700;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 15px;
    flex-shrink: 0;
}

.modal-close:hover {
    color: #2c3e50;
    background: #f8f9fa;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 1px solid #e1e8ed;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

/* 特殊模态框样式 - 针对不同类型的模态框 */
.modal.large {
    max-width: 800px;
}

.modal.small {
    max-width: 400px;
}

.modal.full-height {
    max-height: 90vh;
}

/* 滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal {
        width: 95%;
        max-width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        padding: 15px 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-actions button {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .modal {
        width: 98%;
        margin: 5px;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.3em;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-actions {
        padding: 15px;
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

/* ─── 考试管理 ─── */
.exam-batch-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 10px 10px 0 0;
    font-size: 14px; color: #475569;
}
.exam-batch-bar label {
    display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none;
}
.exam-batch-bar input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: #6366f1; cursor: pointer;
}
.exam-manager .section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.exam-manager .section-header h3 {
    font-size: 20px; font-weight: 700; color: #1e293b; margin: 0;
}
.exam-manager .section-actions { display: flex; gap: 8px; }
.exam-manager .form-group {
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.exam-manager .form-group label {
    font-weight: 600; color: #475569; white-space: nowrap; margin: 0;
}
.exam-manager .form-select {
    padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 14px; background: #fff; max-width: 200px;
}
.exam-table-wrap {
    overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 12px;
}
.exam-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
}
.exam-table thead {
    background: #f8fafc; border-bottom: 2px solid #e2e8f0;
}
.exam-table th {
    padding: 10px 14px; text-align: left; font-weight: 600;
    color: #64748b; font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.exam-table td {
    padding: 10px 14px; border-bottom: 1px solid #f1f5f9; color: #334155;
}
.exam-table tbody tr:hover { background: #f8fafc; }
.exam-table tbody tr:last-child td { border-bottom: none; }
.exam-table .exam-tag {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 12px; font-weight: 600;
}
.exam-table .exam-tag-subject {
    background: #eef2ff; color: #4f46e5;
}
.exam-table .btn-sm {
    padding: 4px 10px; font-size: 12px; border: none; border-radius: 6px;
    cursor: pointer; transition: all 0.15s;
}
.exam-table .btn-danger {
    background: #fef2f2; color: #ef4444;
}
.exam-table .btn-danger:hover { background: #fee2e2; }
.exam-notice-cell {
    cursor: pointer; color: #6366f1; font-size: 13px;
    border-bottom: 1px dashed #c7d2fe; padding: 2px 0;
    display: inline-block; max-width: 140px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.exam-notice-cell:hover { color: #4f46e5; border-color: #6366f1; }
.exam-empty {
    text-align: center; padding: 40px; color: #94a3b8; font-size: 15px;
}

/* ─── 考试管理：批量创建 ─── */
.exam-modal { max-width: 780px !important; }
.exam-batch-form { display: flex; flex-direction: column; gap: 24px; }
.exam-section {
    background: #f8fafc; border-radius: 12px; padding: 20px;
    border: 1px solid #e9eef3;
}
.exam-section-title {
    font-size: 15px; font-weight: 700; color: #1e293b;
    margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.exam-section-desc { font-weight: 400; font-size: 13px; color: #94a3b8; }
.exam-input-wide {
    width: 100%; padding: 12px 16px; font-size: 16px;
    border: 2px solid #e2e8f0; border-radius: 10px; background: #fff;
    transition: border-color 0.2s;
}
.exam-input-wide:focus {
    border-color: #6366f1; outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.exam-grade-tabs {
    display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap;
}
.exam-grade-tab {
    padding: 5px 14px; font-size: 13px; font-weight: 600;
    border: 1px solid #e2e8f0; border-radius: 20px;
    background: #fff; cursor: pointer; color: #64748b;
    transition: all 0.15s;
}
.exam-grade-tab:hover {
    border-color: #6366f1; color: #6366f1; background: #eef2ff;
}
.exam-grade-tab.active {
    background: #6366f1; color: #fff; border-color: #6366f1;
}
.exam-grade-divider {
    grid-column: 1 / -1;
    font-size: 11px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 1px;
    padding: 6px 4px 2px; border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2px;
}
.exam-grade-gap {
    grid-column: 1 / -1; height: 4px;
}
.exam-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px; max-height: 210px; overflow-y: auto; padding: 4px 0;
}
.exam-class-item {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 10px; border-radius: 8px; cursor: pointer;
    font-size: 14px; color: #334155; user-select: none;
    transition: background 0.15s;
}
.exam-class-item:hover { background: #eef2ff; }
.exam-class-item input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: #6366f1;
    cursor: pointer; flex-shrink: 0;
}
.exam-class-actions {
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px; flex-wrap: wrap;
}
.exam-class-btn {
    padding: 5px 12px; font-size: 13px;
    border: 1px solid #cbd5e1; border-radius: 6px;
    background: #fff; cursor: pointer; color: #475569;
}
.exam-class-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.exam-class-count { font-size: 13px; color: #94a3b8; margin-left: auto; }
.exam-events-table {
    border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden;
}
.exam-events-header {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.9fr 0.9fr 36px;
    background: #f1f5f9; padding: 8px 12px;
    font-size: 12px; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
.exam-event-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.9fr 0.9fr 36px;
    padding: 6px 12px; align-items: center;
    border-bottom: 1px solid #f1f5f9; background: #fff;
}
.exam-event-row:last-child { border-bottom: none; }
.exam-event-row:hover { background: #fafbfc; }
.exam-event-row select, .exam-event-row input {
    width: 100%; padding: 7px 8px; font-size: 13px;
    border: 1px solid #e2e8f0; border-radius: 6px; background: #fff;
}
.exam-event-row select:focus, .exam-event-row input:focus {
    border-color: #6366f1; outline: none;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.1);
}
.exam-col-subject { padding-right: 6px; }
.exam-col-date, .exam-col-time { padding: 0 6px; }
.exam-col-action { display: flex; justify-content: center; padding-left: 4px; }
.exam-row-del {
    width: 28px; height: 28px; border: none; border-radius: 6px;
    background: transparent; color: #94a3b8; cursor: pointer;
    font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.exam-row-del:hover { background: #fef2f2; color: #ef4444; }
.exam-add-row-btn {
    margin-top: 8px; padding: 8px 16px; font-size: 13px;
    border: 1px dashed #cbd5e1; border-radius: 8px;
    background: transparent; cursor: pointer; color: #64748b; width: 100%;
}
.exam-add-row-btn:hover { background: #f8fafc; border-color: #6366f1; color: #6366f1; }
.exam-section-submit {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
    border-color: #c7d2fe;
}
.exam-submit-btn {
    padding: 12px 48px; font-size: 16px; font-weight: 700;
    border: none; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; cursor: pointer;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
    transition: all 0.2s;
}
.exam-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}
.exam-submit-btn:active { transform: translateY(0); }
.exam-submit-hint { font-size: 12px; color: #94a3b8; }

/* 动画效果 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay.active {
    animation: overlayFadeIn 0.3s ease;
}

.modal-overlay.active .modal {
    animation: modalFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 特殊模态框内容样式 */
.links-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e1e8ed;
}

.link-item {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.link-item:hover {
    border-color: #3498db;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.1);
}

.link-item strong {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.1em;
}

.link-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.link-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    word-break: break-all;
}

.copy-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}

/* 表单模态框样式 */
.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

.modal-body .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.modal-body .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* 配置开关样式 */
.approval-switch {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.switch-label {
    font-weight: bold;
    color: #2c3e50;
    min-width: 100px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #28a745;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.switch-status {
    font-size: 1em;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.switch-status.on {
    color: #28a745;
}

.switch-status.off {
    color: #dc3545;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 8px;
    height: 4px;
    border-radius: 2px;
    background: #e9ecef;
    overflow: hidden;
}

.password-strength-meter {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-meter.weak {
    width: 30%;
    background-color: #dc3545;
}

.password-strength-meter.medium {
    width: 60%;
    background-color: #ffc107;
}

.password-strength-meter.strong {
    width: 100%;
    background-color: #28a745;
}

/* 模态框中的按钮样式 */
.modal-actions .btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.modal-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.modal-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #343a40);
    transform: translateY(-2px);
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.modal-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
}

.modal-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.modal-actions .btn-success:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
}

/* 警告和提示信息 */
.modal-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
}

.modal-warning strong {
    display: block;
    margin-bottom: 5px;
    color: #856404;
}

/* 加载状态 */
.modal-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.modal-loading::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 审核开关 */
.approval-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.switch-label {
    font-weight: bold;
    color: #2c3e50;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #28a745;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch-status {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: bold;
}

.switch-status.on {
    color: #28a745;
}

.switch-status.off {
    color: #dc3545;
}

/* 链接控制 */
.link-controls {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.generated-link {
    margin-top: 12px;
    padding: 12px;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 6px;
    display: none;
}

.link-text {
    word-break: break-all;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2e7d32;
    font-size: 0.9em;
}

/* 数据统计 */
.data-stats {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

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

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

/* 用户信息 */
.user-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.user-details {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e1e8ed;
}

.user-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.user-detail-label {
    font-weight: bold;
    color: #2c3e50;
}

.user-detail-value {
    color: #495057;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

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

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

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

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

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

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

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

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

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}
.links-container {
    max-height: 400px;
    overflow-y: auto;
}

.link-item {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.link-input-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.link-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.copy-btn {
    padding: 8px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.user-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
}

.user-card.pending {
    border-left: 4px solid #ffc107;
}

.user-info {
    margin-bottom: 10px;
}

.user-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.pending-badge {
    background: #ffc107;
    color: #212529;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.user-real-name {
    color: #666;
    margin-bottom: 5px;
}

.user-role {
    color: #007bff;
    font-weight: bold;
    margin-bottom: 5px;
}

.user-classes {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.user-meta {
    font-size: 12px;
    color: #999;
}

.user-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.current-user {
    color: #6c757d;
    font-style: italic;
}
.user-details-view {
    margin: 15px 0;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.detail-row label {
    font-weight: bold;
    min-width: 100px;
    margin-right: 10px;
}

.detail-row span {
    flex: 1;
}

.modal-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px;
    margin: 15px 0;
    font-size: 14px;
}

.modal-note p {
    margin: 5px 0;
}

/* 文件上传进度条样式 */
.upload-status {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.upload-progress-container {
    width: 100%;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
}

#uploadProgressText {
    color: #2c3e50;
    font-size: 14px;
}

#uploadProgressPercent {
    color: #28a745;
    font-weight: bold;
    font-size: 14px;
}

.upload-progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.upload-progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 进度条动画效果 */
.upload-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.upload-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
}

#uploadFileInfo {
    flex: 1;
}

#uploadSpeed {
    font-weight: 500;
    color: #495057;
}

/* 不同状态下的进度条颜色 */
.upload-progress.uploading {
    background: linear-gradient(90deg, #007bff, #0056b3);
}

.upload-progress.success {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.upload-progress.error {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

.upload-progress.warning {
    background: linear-gradient(90deg, #ffc107, #e0a800);
}

/* 文件列表样式 */
.file-list {
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.file-item.invalid {
    background: #fff5f5;
    border-color: #dc3545;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
    margin-right: 10px;
    word-break: break-all;
}

.file-size {
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
}

.file-warning {
    color: #dc3545;
    font-size: 12px;
    margin-right: 10px;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
}

/* 文件大小警告样式 */
.file-size-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .upload-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .remove-file {
        align-self: flex-end;
    }
}

/* 上传按钮状态 */
#file button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#file button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#file button.uploading {
    background: #6c757d;
}

/* 上传状态动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.upload-status:not([style*="display: none"]) {
    animation: pulse 2s infinite;
}

/* 进度条分段颜色 */
.upload-progress.started {
    background: linear-gradient(90deg, #17a2b8, #138496);
}

.upload-progress.halfway {
    background: linear-gradient(90deg, #ffc107, #e0a800);
}

.upload-progress.almost-done {
    background: linear-gradient(90deg, #28a745, #20c997);
}
/* 班级管理样式优化 */
.management-section {
    padding: 20px 0;
}

.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.action-bar input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.classes-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.classes-list h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

#classesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 5px;
}

.class-management-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.class-management-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3498db;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.class-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    padding: 5px 0;
    flex: 1;
}

.class-management-item .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.class-management-item .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

/* 空状态样式优化 */
#classesContainer .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* 滚动条样式 */
#classesContainer::-webkit-scrollbar {
    width: 6px;
}

#classesContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#classesContainer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#classesContainer::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-bar input {
        max-width: none;
        min-width: auto;
    }
    
    #classesContainer {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .class-management-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .class-management-item .btn-danger {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .classes-list {
        padding: 15px;
    }
    
    .class-management-item {
        padding: 12px;
    }
    
    .class-name {
        font-size: 14px;
    }
}

/* 添加一些动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.class-management-item {
    animation: fadeInUp 0.3s ease;
}

/* 班级计数样式 */
#classesCount {
    color: #3498db;
    font-weight: bold;
    font-size: 1.1em;
}

/* 操作按钮组样式 */
.action-bar .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.action-bar .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.action-bar .btn-success:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.action-bar .btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.action-bar .btn-info:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}
.upload-progress {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.upload-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}
/* 系统状态页面样式 */
.status-section {
    padding: 20px 0;
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.status-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
}

.status-card-header h4 {
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 700;
    margin: 0;
}

.status-indicator {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.online {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.status-indicator.offline {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.status-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.status-item:hover {
    background: white;
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.status-item label {
    font-weight: 600;
    color: #495057;
    margin: 0;
    font-size: 0.95em;
}

.status-item span {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95em;
    text-align: right;
}

/* 特殊状态值的样式 */
.status-item span[style*="color"] {
    font-weight: 700;
}

/* 状态操作按钮 */
.status-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.status-actions .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

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

.status-actions .btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.status-actions .btn-warning:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
}

.status-actions .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.status-actions .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.status-actions .btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.status-actions .btn-info:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
}

.status-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.status-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
}

/* 状态消息样式 */
#statusMessage {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .status-cards {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .status-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .status-card {
        padding: 20px;
    }
    
    .status-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .status-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .status-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .status-section {
        padding: 15px 0;
    }
    
    .status-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .status-item {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .status-item span {
        text-align: left;
        font-size: 1.1em;
    }
}

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

.status-card {
    animation: fadeInUp 0.5s ease;
}

.status-card:nth-child(1) { animation-delay: 0.1s; }
.status-card:nth-child(2) { animation-delay: 0.2s; }
.status-card:nth-child(3) { animation-delay: 0.3s; }

/* 加载状态样式 */
.status-item.loading span {
    color: #6c757d;
    font-style: italic;
}

.status-item.loading::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 数据变化动画 */
.status-item.updated {
    animation: highlightUpdate 1s ease;
}

@keyframes highlightUpdate {
    0% {
        background: rgba(40, 167, 69, 0.1);
        border-color: #28a745;
    }
    100% {
        background: rgba(255, 255, 255, 0.7);
        border-color: #e9ecef;
    }
}

/* 数字值的特殊样式 */
.status-item span:contains-number {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* 服务器状态卡片特殊样式 */
#serverStatusCard {
    border-left: 5px solid #3498db;
}

#serverStatusCard::before {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

/* 数据统计卡片特殊样式 */
.status-card:nth-child(2) {
    border-left: 5px solid #28a745;
}

.status-card:nth-child(2)::before {
    background: linear-gradient(90deg, #28a745, #20c997);
}

/* 系统配置卡片特殊样式 */
.status-card:nth-child(3) {
    border-left: 5px solid #6f42c1;
}

.status-card:nth-child(3)::before {
    background: linear-gradient(90deg, #6f42c1, #5a32a3);
}
/* 用户信息页面样式 */
.user-info-section {
    padding: 25px 0;
    max-width: 800px;
    margin: 0 auto;
}

.user-info-section h3 {
    text-align: center;
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 30px;
    font-weight: 700;
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
}

.user-info-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.user-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2980b9, #6f42c1);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

.user-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #6f42c1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 auto 25px auto;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    border: 4px solid white;
    position: relative;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.4);
}

.user-avatar::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #3498db, #6f42c1) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.user-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-detail::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #3498db, #6f42c1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-detail:hover {
    background: white;
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
    transform: translateX(5px);
}

.user-detail:hover::before {
    opacity: 1;
}

.user-detail label {
    font-weight: 600;
    color: #495057;
    margin: 0;
    font-size: 0.95em;
    min-width: 120px;
}

.user-detail span {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1em;
    text-align: right;
    flex: 1;
    margin-left: 15px;
}

/* 特殊状态样式 */
.user-detail:has(span:empty) span {
    color: #6c757d;
    font-style: italic;
}

.user-detail:has(span:contains("超级管理员")) span {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.user-detail:has(span:contains("管理员")) span {
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.user-detail:has(span:contains("班主任")) span {
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.user-detail:has(span:contains("普通老师")) span {
    background: linear-gradient(135deg, #6c757d, #495057);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* 用户操作按钮 */
.user-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    border: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.user-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #6f42c1);
}

.user-actions .btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    position: relative;
    overflow: hidden;
}

.user-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

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

.user-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.user-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.user-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
}

.user-actions .btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.user-actions .btn-info:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
}

/* 用户信息状态消息 */
#userInfoStatus {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #0066cc;
}

#userInfoStatus.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

#userInfoStatus.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* 班级列表特殊样式 */
.user-detail:has(label:contains("管理的班级")) {
    grid-column: 1 / -1;
}

.user-detail:has(label:contains("管理的班级")) span {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    text-align: left;
    line-height: 1.5;
}

/* 时间信息样式 */
.user-detail:has(label:contains("时间")) span {
    color: #6c757d;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-info-section {
        padding: 15px;
    }
    
    .user-info-card {
        padding: 25px 20px;
        border-radius: 16px;
    }
    
    .user-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .user-detail {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .user-detail label {
        min-width: auto;
        font-size: 0.9em;
    }
    
    .user-detail span {
        text-align: left;
        margin-left: 0;
        font-size: 1.1em;
        width: 100%;
    }
    
    .user-actions {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }
    
    .user-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .user-info-section h3 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    
    .user-info-card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .user-detail {
        padding: 12px 15px;
    }
    
    .user-actions {
        padding: 15px;
    }
    
    .user-actions .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.user-info-card {
    animation: fadeInScale 0.6s ease;
}

.user-detail {
    animation: fadeInScale 0.6s ease;
    animation-fill-mode: both;
}

.user-detail:nth-child(1) { animation-delay: 0.1s; }
.user-detail:nth-child(2) { animation-delay: 0.2s; }
.user-detail:nth-child(3) { animation-delay: 0.3s; }
.user-detail:nth-child(4) { animation-delay: 0.4s; }
.user-detail:nth-child(5) { animation-delay: 0.5s; }
.user-detail:nth-child(6) { animation-delay: 0.6s; }

/* 加载状态 */
.user-info-card.loading {
    position: relative;
    overflow: hidden;
}

.user-info-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 数据更新动画 */
.user-detail.updated {
    animation: highlightPulse 1s ease;
}

@keyframes highlightPulse {
    0%, 100% {
        background: rgba(255, 255, 255, 0.8);
        border-color: #e9ecef;
    }
    50% {
        background: rgba(52, 152, 219, 0.1);
        border-color: #3498db;
    }
}

/* 特殊状态指示器 */
.user-status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: #28a745;
}

.user-status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
/* 教师喊话页面美化 */
.announcement-section {
    padding: 25px 0;
}

.announcement-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.announcement-header h3 {
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3498db, #6f42c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.announcement-subtitle {
    color: #6c757d;
    font-size: 1.1em;
    font-weight: 500;
}

/* 喊话内容卡片 */
.announcement-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8ed;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.announcement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2980b9, #6f42c1);
    background-size: 200% 100%;
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.announcement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

/* 班级选择区域美化 */
.announcement-class-selection {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    position: relative;
}

.announcement-class-selection::before {
    content: '📚 班级选择';
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 喊话设置区域 */
.announcement-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.setting-group {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.setting-group:hover {
    background: white;
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.setting-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.setting-group select,
.setting-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.setting-group select:focus,
.setting-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* 喊话内容输入区域 */
.announcement-content {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e1e8ed;
    position: relative;
}

.announcement-content::before {
    content: '💬 喊话内容';
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#message {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

#message:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

#message::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* 发送按钮美化 */
.announcement-actions {
    text-align: center;
    margin-top: 30px;
}

.announce-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

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

.announce-btn:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.4);
}

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

.announce-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.announce-btn:disabled {
    background: linear-gradient(135deg, #6c757d, #495057);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

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

/* 状态消息美化 */
#announceStatus {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #e7f3ff;
    border: 2px solid #b3d9ff;
    color: #0066cc;
}

#announceStatus:empty {
    display: none;
}

#announceStatus.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
    color: #155724;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

#announceStatus.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #dc3545;
    color: #721c24;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

#announceStatus.info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-color: #17a2b8;
    color: #0c5460;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.2);
}

/* 功能说明区域 */
.announcement-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    border: 1px solid #dee2e6;
}

.feature-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.feature-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

.feature-text {
    font-size: 0.9em;
    color: #495057;
    font-weight: 500;
}

/* 语音选择特殊样式 */
.voice-selection {
    position: relative;
}

.voice-preview {
    margin-top: 10px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #bbdefb;
    font-size: 0.85em;
    color: #1976d2;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-preview:hover {
    background: #bbdefb;
    transform: scale(1.02);
}

/* 发送者姓名特殊样式 */
.teacher-name-input {
    position: relative;
}

.teacher-name-input::after {
    content: '👨‍🏫';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .announcement-section {
        padding: 15px;
    }
    
    .announcement-header h3 {
        font-size: 1.8em;
    }
    
    .announcement-card {
        padding: 25px 20px;
        border-radius: 16px;
    }
    
    .announcement-settings {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .announcement-class-selection,
    .announcement-content {
        padding: 20px 15px;
    }
    
    .announce-btn {
        padding: 16px 30px;
        font-size: 1.1em;
        min-width: 180px;
    }
    
    .announcement-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .announcement-header h3 {
        font-size: 1.5em;
    }
    
    .announcement-card {
        padding: 20px 15px;
    }
    
    .announcement-settings {
        gap: 12px;
    }
    
    .setting-group {
        padding: 15px;
    }
    
    .announce-btn {
        padding: 14px 25px;
        font-size: 1em;
        width: 100%;
        min-width: auto;
    }
    
    .announcement-features {
        grid-template-columns: 1fr;
    }
    
    #message {
        min-height: 120px;
        padding: 15px;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-card {
    animation: slideInUp 0.6s ease;
}

.setting-group {
    animation: slideInUp 0.6s ease;
    animation-fill-mode: both;
}

.setting-group:nth-child(1) { animation-delay: 0.1s; }
.setting-group:nth-child(2) { animation-delay: 0.2s; }
.setting-group:nth-child(3) { animation-delay: 0.3s; }
.setting-group:nth-child(4) { animation-delay: 0.4s; }

/* 发送按钮动画 */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    }
    50% {
        box-shadow: 0 8px 30px rgba(52, 152, 219, 0.6);
    }
}

.announce-btn.pulse {
    animation: pulseGlow 2s infinite;
}

/* 输入框焦点动画 */
.setting-group input:focus,
.setting-group select:focus,
#message:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* 加载状态 */
.announcement-card.loading {
    position: relative;
    overflow: hidden;
}

.announcement-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 成功状态动画 */
.announcement-card.success {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% {
        border-color: #e1e8ed;
    }
    50% {
        border-color: #28a745;
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
    }
}

/* 字符计数器 */
.char-counter {
    text-align: right;
    margin-top: 8px;
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 500;
}

.char-counter.warning {
    color: #ffc107;
    font-weight: 600;
}

.char-counter.danger {
    color: #dc3545;
    font-weight: 700;
}

/* 快速模板按钮 */
.quick-templates {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.template-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #495057;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-1px);
}

/* 语音预览区域 */
.voice-preview-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.voice-preview-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.voice-preview-btn:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-1px);
}
/* 底部版权信息样式 */
.copyright-footer {
    text-align: center;
    padding: 15px 20px;
    margin-top: 30px;
    color: #6c757d;
    font-size: 14px;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    position: relative;
    bottom: 0;
    width: 100%;
}

.copyright-footer p {
    margin: 0;
}
/* 提醒头部样式 */
.reminder-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.reminder-time {
    background: #4a90e2;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.reminder-weekday {
    background: #e67e22;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.reminder-class {
    background: #2ecc71;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

/* 日历事件元数据行 */
.event-meta-row {
    display: flex;
    gap: 15px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.event-date {
    color: #e74c3c;
    font-weight: bold;
}

.event-class {
    color: #3498db;
    font-weight: bold;
}

/* 星期选项样式 */
.weekday-option {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.weekday-option:hover {
    background-color: #f5f5f5;
}

/* 日历班级选择器 */
.calendar-class-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
/* 操作日志样式 */
.log-controls {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.action-controls {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

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

.stats-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.stats-title {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.stats-value {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.logs-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.logs-header {
    display: flex;
    background: #343a40;
    color: white;
    font-weight: bold;
    padding: 12px 15px;
}

.log-header-item {
    padding: 0 5px;
}

.logs-list {
    max-height: 500px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.log-item:hover {
    background: #f8f9fa;
}

.log-cell {
    padding: 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.pagination select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

/* 日志详情样式 */
.log-details {
    max-width: 600px;
}

.detail-row {
    margin-bottom: 15px;
}

.detail-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
}

.detail-row span {
    display: block;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.detail-content {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: monospace;
}
/* AI生成按钮样式 */
#generateBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#generateBtn:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 生成状态文本 */
#generatingText {
    animation: pulse 1.5s infinite;
}

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

/* 年级选择器样式 */
#gradeSelection {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 安全提醒状态提示 */
.safety-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    font-size: 14px;
}

.safety-status.success {
    background: #e8f7ef;
    border-left-color: #27ae60;
}

.safety-status.error {
    background: #fdeded;
    border-left-color: #e74c3c;
}

.safety-status.warning {
    background: #fff8e6;
    border-left-color: #f39c12;
}
/* 学生选择相关样式 */
.student-selection-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#selectedStudentsCount {
    margin-left: auto;
    font-weight: bold;
    color: #2c3e50;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #f8f9fa;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: white;
}

.student-item:hover {
    background-color: #f1f3f4;
    border-color: #adb5bd;
}

.student-item.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.student-name {
    font-weight: bold;
    color: #2c3e50;
}

.announcement-student-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-id {
    font-size: 0.85em;
    color: #6c757d;
}

.student-gender {
    font-size: 0.85em;
    padding: 2px 6px;
    background-color: #e9ecef;
    border-radius: 4px;
    align-self: flex-start;
}

.student-checkbox {
    margin-left: 10px;
}

/* 学生管理相关样式 */
.student-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.student-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
}

.student-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: #f8f9fa;
}

.student-tab-content {
    display: none;
    padding: 20px 0;
}

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

.upload-instructions {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.upload-instructions h4 {
    margin-top: 0;
    color: #2c3e50;
}

.upload-instructions ul {
    margin: 10px 0 0 20px;
    color: #495057;
}

.upload-instructions li {
    margin-bottom: 5px;
}

.student-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.student-filters .form-group {
    flex: 1;
    min-width: 200px;
}

.students-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.class-group {
    margin-bottom: 30px;
}

.class-group h5 {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
    color: #2c3e50;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.student-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background-color: white;
    transition: all 0.3s;
}

.student-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #adb5bd;
}

.student-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.student-card .student-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.student-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    font-size: 0.9em;
    color: #495057;
}

.student-details div {
    display: flex;
    flex-direction: column;
}

.student-details strong {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 2px;
}

/* 统计信息样式 */
.student-stats {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.stat-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-title {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #007bff;
}

.class-stats-table {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.stats-table th,
.stats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.stats-table tr:hover {
    background-color: #f8f9fa;
}

.stats-table tr:last-child td {
    border-bottom: none;
}
.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.control-column {
    flex: 1;
    min-width: 250px;
}

.left-column, .middle-column, .right-column {
    /* 可以根据需要添加特定样式 */
}

.control-column label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.control-column select,
.control-column input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.compact-section-title {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.announcement-control-panel {
    margin-bottom: 12px;
}

.announcement-control-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.announcement-control-column {
    min-width: 0;
}

.announcement-control-column label {
    margin-bottom: 6px;
    font-size: 14px;
}

.announcement-control-column select,
.announcement-control-column input {
    min-width: 0;
}

/* 教师工作台布局覆盖 */
:root {
    --app-bg: #eef2f5;
    --app-panel: #ffffff;
    --app-panel-muted: #f7f9fb;
    --app-line: #d9e1ea;
    --app-text: #172033;
    --app-muted: #667085;
    --app-primary: #1d4ed8;
    --app-primary-dark: #153eaa;
    --app-success: #0f8a4b;
    --app-danger: #c83232;
    --app-warning: #b45f06;
}

body {
    background: var(--app-bg);
    color: var(--app-text);
    padding: 0;
}

#loginPage.active,
#registerPage.active {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-container,
.register-container {
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(23, 32, 51, 0.14);
}

.login-container h1,
.register-container h1 {
    font-size: 1.7rem;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: var(--app-bg);
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
    background: #162033;
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    border-radius: 8px;
    background: #ffffff;
    color: #162033;
    font-weight: 800;
}

.app-brand h1 {
    margin: 0;
    color: #ffffff;
    text-align: left;
    font-size: 1.15rem;
    line-height: 1.2;
}

.app-brand p {
    margin: 4px 0 0;
    color: #b9c4d3;
    font-size: 0.86rem;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #dbeafe;
    color: var(--app-primary);
    font-weight: 800;
}

.sidebar-user strong,
.sidebar-user span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong {
    color: #ffffff;
    font-size: 0.96rem;
}

.sidebar-user span {
    margin-top: 3px;
    color: #b9c4d3;
    font-size: 0.8rem;
}

.app-sidebar .tab-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.app-sidebar .tab-button {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    display: block;
    margin: 0;
    padding: 10px 12px;
    text-align: left;
    color: #d7deea;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: none;
}

.app-sidebar .tab-button span,
.app-sidebar .tab-button small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .tab-button span {
    font-size: 0.95rem;
    line-height: 1.25;
}

.app-sidebar .tab-button small {
    margin-top: 3px;
    color: #99a7ba;
    font-size: 0.76rem;
    font-weight: 500;
}

.app-sidebar .tab-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.app-sidebar .tab-button.active {
    color: #ffffff;
    background: var(--app-primary);
    border-color: var(--app-primary);
    box-shadow: none;
}

.app-sidebar .tab-button.active small {
    color: #dbeafe;
}

.app-sidebar .voice-action {
    margin-top: 8px;
}

.app-sidebar .voice-action small,
.app-sidebar .logout-action small {
    color: rgba(255, 255, 255, 0.78);
}

.app-sidebar .logout-action {
    color: #ffffff;
    background: #9f2f2f;
}

.workspace {
    min-width: 0;
    padding: 20px 24px 24px;
}

.workspace-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1320px;
    margin: 0 auto 16px;
    padding: 18px 20px;
    background: var(--app-panel);
    border: 1px solid var(--app-line);
    border-radius: 8px;
}

.topbar-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.workspace-topbar h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.45rem;
    line-height: 1.2;
}

.workspace-topbar p {
    margin: 6px 0 0;
    color: var(--app-muted);
    font-size: 0.92rem;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 8px;
    min-width: 300px;
}

.summary-item {
    padding: 10px 12px;
    background: var(--app-panel-muted);
    border: 1px solid var(--app-line);
    border-radius: 8px;
}

.summary-item span,
.summary-item small {
    display: block;
}

.summary-item span {
    color: var(--app-text);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.summary-item small {
    margin-top: 5px;
    color: var(--app-muted);
    font-size: 0.78rem;
}

.summary-online span {
    color: var(--app-success);
}

.summary-offline span {
    color: var(--app-danger);
}

.workspace .tab-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px;
    background: var(--app-panel);
    border: 1px solid var(--app-line);
    border-radius: 8px;
}

.workspace .tab-content h3,
.workspace .tab-content h4 {
    color: var(--app-text);
}

.workspace .form-group,
.workspace .grade-class-container,
.workspace .file-list,
.workspace .homework-preview,
.workspace .reminder-list,
.workspace .user-list,
.workspace .calendar-section,
.workspace .calendar-events-list,
.workspace .reminders-list {
    border-color: var(--app-line);
    border-radius: 8px;
    background: var(--app-panel-muted);
}

.workspace .form-group {
    padding: 14px;
    border: 1px solid var(--app-line);
}

.workspace .grade-class-container {
    padding: 14px;
    margin: 0 0 16px;
}

.workspace label {
    color: var(--app-text);
}

.workspace input,
.workspace select,
.workspace textarea,
.workspace .form-control {
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #ffffff;
    color: var(--app-text);
    font-size: 15px;
}

.workspace input:focus,
.workspace select:focus,
.workspace textarea:focus,
.workspace .form-control:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.workspace .class-grid-container {
    max-height: 240px;
    border-color: var(--app-line);
    border-radius: 8px;
}

.workspace .class-item-compact {
    border-radius: 6px;
    border-color: var(--app-line);
}

.workspace .class-item-compact:hover {
    border-color: var(--app-primary);
    background: #f0f6ff;
}

.workspace .header-box {
    border-color: #c7dbff;
    background: #eff6ff;
}

.workspace .btn,
.workspace .tab-content > button:not(.btn),
.workspace .login-btn,
.workspace .register-btn {
    border-radius: 6px;
    box-shadow: none;
}

.workspace .tab-content > button:not(.btn) {
    width: 100%;
    margin-top: 4px;
    padding: 12px 16px;
    border: 0;
    background: var(--app-primary);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.workspace .tab-content > button:not(.btn):hover {
    background: var(--app-primary-dark);
}

.workspace .btn-primary {
    background: var(--app-primary);
}

.workspace .btn-primary:hover {
    background: var(--app-primary-dark);
}

.workspace .btn-success {
    background: var(--app-success);
}

.workspace .btn-danger {
    background: var(--app-danger);
}

.workspace .btn-warning {
    background: var(--app-warning);
    color: #ffffff;
}

.workspace .preview-card,
.workspace .file-item,
.workspace .reminder-item,
.workspace .user-item,
.workspace .student-card,
.workspace .stat-card {
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid var(--app-line);
}

.workspace .preview-header {
    background: var(--app-primary);
}

.workspace .empty-state {
    color: var(--app-muted);
}

.copyright-footer {
    color: var(--app-muted);
}

.workspace .copyright-footer {
    max-width: 1320px;
    margin: 14px auto 0;
    text-align: center;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .app-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        padding: 14px;
    }

    .app-sidebar .tab-buttons {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: 0;
    }

    .app-sidebar .tab-button {
        width: 100%;
        flex: 0 0 auto;
    }

    .workspace {
        padding: 14px;
    }

    .workspace-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-summary {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .app-shell {
        display: block;
    }

    #loginPage.active,
    #registerPage.active {
        align-items: flex-start;
        padding: 18px 10px;
    }

    .login-container,
    .register-container {
        padding: 24px 18px;
    }

    .app-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding: 10px;
        position: sticky;
        top: 0;
        z-index: 20;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    }

    .app-brand {
        grid-column: 1;
        padding: 0 2px 8px;
        gap: 8px;
        border-bottom: 0;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        border-radius: 6px;
        font-size: 0.9rem;
    }

    .app-brand h1 {
        font-size: 1rem;
    }

    .app-brand p {
        display: none;
    }

    .sidebar-user {
        grid-column: 2;
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 2px 4px;
        background: transparent;
        border: 0;
    }

    .sidebar-avatar {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        border-radius: 6px;
        font-size: 0.82rem;
    }

    .sidebar-user strong {
        display: inline;
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .sidebar-user span {
        display: none;
    }

    .app-sidebar .tab-buttons {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        grid-column: 1 / -1;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding-top: 8px;
    }

    .app-sidebar .tab-button {
        width: auto;
        min-width: 92px;
        flex-basis: auto;
        padding: 8px 10px;
        text-align: center;
    }

    .app-sidebar .tab-button small {
        display: none;
    }

    .app-sidebar .voice-action,
    .app-sidebar .logout-action {
        margin-top: 0;
        min-width: 94px;
    }

    .workspace {
        padding: 8px;
    }

    .workspace-topbar {
        display: none;
    }

    .workspace .tab-container {
        padding: 10px;
    }

    .workspace .form-group,
    .workspace .grade-class-container {
        padding: 10px;
        margin-bottom: 10px;
    }

    #announcement .grade-selector {
        margin-bottom: 8px;
    }

    #announcement .grade-selector label,
    #announcement .class-selection-header {
        margin-bottom: 6px;
    }

    #announcement .class-grid-container {
        max-height: 128px;
        padding: 8px;
    }

    #announcement .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    #announcement .class-item-compact {
        padding: 6px 8px;
    }

    #announcement .online-stats-box {
        display: none;
    }

    .announcement-control-panel {
        padding: 10px;
    }

    .announcement-control-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .announcement-control-column label {
        margin-bottom: 4px;
        font-size: 13px;
    }

    .announcement-control-column select,
    .announcement-control-column input {
        padding: 8px;
        font-size: 14px;
    }

    #scrollTimesGroup label {
        margin-top: 6px;
    }

    #announcement .common-phrases-bar {
        gap: 6px !important;
        margin-bottom: 0 !important;
    }

    #announcement .common-phrases-bar + small {
        display: none !important;
    }

    #announcement .common-phrases-bar .btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        padding: 7px 6px;
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
    }

    #announcement #message {
        min-height: 96px;
        padding: 10px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .app-shell {
        display: grid !important;
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .app-sidebar {
        position: sticky !important;
        top: 0;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .app-sidebar .tab-buttons {
        flex: 1 1 auto !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        min-height: 0;
    }

    .app-sidebar .tab-button {
        width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        text-align: left !important;
    }

    .app-sidebar .tab-button small {
        display: block;
    }
}

@media (hover: hover) and (pointer: fine) and (max-width: 980px) {
    .app-shell {
        grid-template-columns: 220px minmax(0, 1fr) !important;
    }
}

/* 手机端兜底：覆盖桌面指针媒体查询，避免窄屏只显示页面中间一截 */
@media (max-width: 640px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    #mainPage,
    #mainPage.active,
    .app-shell,
    .workspace,
    .workspace .tab-container,
    .tab-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .app-shell {
        display: block !important;
        grid-template-columns: none !important;
    }

    .app-sidebar {
        position: sticky !important;
        top: 0;
        z-index: 20;
        width: 100%;
        height: auto !important;
        min-height: 0;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center;
        flex-direction: initial !important;
    }

    .app-sidebar .tab-buttons {
        flex: 0 1 auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-width: 100%;
        min-width: 0;
    }

    .app-sidebar .tab-button {
        width: auto !important;
        min-width: 92px !important;
        flex: 0 0 auto !important;
        text-align: center !important;
    }

    .app-sidebar .tab-button small {
        display: none !important;
    }

    .workspace {
        padding: 8px !important;
        overflow-x: hidden;
    }

    .workspace .tab-container {
        padding: 10px;
        overflow-x: hidden;
    }

    .class-selection-header,
    .control-row,
    .student-filters,
    .log-controls,
    .filter-controls,
    .action-controls {
        flex-wrap: wrap;
        min-width: 0;
    }

    .control-column,
    .student-filters .form-group {
        min-width: 0;
        flex: 1 1 100%;
    }

    .class-stats-table {
        max-width: 100%;
        overflow-x: auto;
    }

    .stats-table {
        min-width: 520px;
    }
}
