/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

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

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--hover-color);
}

/* 基础样式重置 */
:root {
    --primary-bg: #f8f9fa;
    --container-bg: white;
    --header-bg: linear-gradient(135deg, #2980b9 0%, #1f6aa5 100%);
    --text-color: #333333;
    --primary-color: #3498db;
    --hover-color: #2980b9;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --table-header-bg: #2c3e50;
    --border-color: #ddd;
}

/* 可可棕主题 */
body.cocoa-brown-theme {
    --primary-bg: #8B5A2B;
    --container-bg: #A0522D;
    --header-bg: linear-gradient(135deg, #502215 0%, #6d441f 100%);
    --text-color: #000000;
    --primary-color: #652b1c;
    --hover-color: #8B4513;
    --table-header-bg: #652b1c;
    --border-color: #CD853F;
}

/* 灰灰灰主题 */
body.gray-gray-gray-theme {
    --primary-bg: #c4d7d6;
    --container-bg: #d9e6e4;
    --header-bg: linear-gradient(135deg, #a9c5c2 0%, #bed5d2 100%);
    --text-color: #000000;
    --primary-color: #c4d7d6;
    --hover-color: #a9c5c2;
    --table-header-bg: #c4d7d6;
    --border-color: #e8f0ef;
}

/* 淡菽红主题 */
body.light-red-bean-theme {
    --primary-bg: #ed4845;
    --container-bg: #f1706e;
    --header-bg: linear-gradient(135deg, #d6302d 0%, #e45c59 100%);
    --text-color: #000000;
    --primary-color: #ed4845;
    --hover-color: #d6302d;
    --table-header-bg: #ed4845;
    --border-color: #f59a99;
}

/* 蓝色主题 */
body.blue-theme {
    --primary-bg: #ebf8ff;
    --container-bg: #ffffff;
    --header-bg: linear-gradient(135deg, #2b6cb0 0%, #24578a 100%);
    --text-color: #2c5282;
    --primary-color: #3182ce;
    --hover-color: #2b6cb0;
}

/* 绿色主题 */
body.green-theme {
    --primary-bg: #f0fff4;
    --container-bg: #ffffff;
    --header-bg: linear-gradient(135deg, #2f855a 0%, #276e49 100%);
    --text-color: #22543d;
    --primary-color: #38a169;
    --hover-color: #2f855a;
}

/* 粉色主题 */
body.pink-theme {
    --primary-bg: #fff0f6;
    --container-bg: #ffffff;
    --header-bg: linear-gradient(135deg, #ed64a6 0%, #d53f8c 100%);
    --text-color: #97266d;
    --primary-color: #ed64a6;
    --hover-color: #d53f8c;
}

/* 摆摆棕主题 */
body.baibai-brown-theme {
    --primary-bg: #eba958;
    --container-bg: #cd9a2c;
    --header-bg: linear-gradient(135deg, #8B7355 0%, #705c40 100%);
    --text-color: #5D4037;
    --primary-color: #A9947A;
    --hover-color: #8B7355;
}

/* 导航样式 */
.nav-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    list-style-type: none;
    justify-content: center;
    padding: 0;
    margin: 0;
}

nav li {
    margin: 0 5px;
}

nav a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #3498db;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav a.active, nav a:hover {
    background-color: #3498db;
    color: white;
}

/* 内容区域样式 */
.content-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 考试安排样式 */
.exam-controls,
.assignment-controls {
    margin-bottom: 20px;
    text-align: right;
}

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

.exam-item,
.assignment-item {
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.assignment-item.completed {
    background-color: #e8f5e9;
    border-left-color: #2ecc71;
}

.assignment-item.completed h3 {
    text-decoration: line-through;
    color: #7f8c8d;
}

.complete-checkbox {
    margin-right: 10px;
}

.assignment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.exam-item h3,
.assignment-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.exam-item .exam-date,
.assignment-item .due-date {
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 5px;
}

/* 主题设置样式 */
.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.theme-option {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    margin-bottom: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-option:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.theme-option.active {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 5px 0;
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}

.theme-option[data-theme="default"] .theme-preview {
    background-image: url('danlanse.svg');
}

.theme-option[data-theme="dark"] .theme-preview {
    background-image: url('huise.svg');
}

.theme-option[data-theme="pink"] .theme-preview {
    background-color: #c2185b;
}

.theme-option[data-theme="purple"] .theme-preview {
    background-color: #7b1fa2;
}

.theme-option[data-theme="yellow"] .theme-preview {
    background-color: #f57f17;
}

.theme-option[data-theme="green"] .theme-preview {
    background-color: #27ae60;
}

.theme-option[data-theme="baibai"] .theme-preview {
    background-color: #8b5a2b;
}

.theme-option[data-theme="deepblue"] .theme-preview {
    background-color: #0d1b4d;
}

.theme-option[data-theme="gold"] .theme-preview {
    background-color: #ffd700;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #2d3436;
    line-height: 1.6;
    background-image: linear-gradient(to right, rgba(52, 152, 219, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(52, 152, 219, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 默认主题头部样式 */
.theme-default header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* 灰灰灰主题头部样式 */
.theme-dark header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

/* 芭比粉主题头部样式 */
.theme-pink header {
    background: linear-gradient(135deg, #ec407a 0%, #c2185b 100%);
}

/* 后妈紫主题头部样式 */
.theme-purple header {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

/* 太上黄主题头部样式 */
.theme-yellow header {
    background: linear-gradient(135deg, #ffeb3b 0%, #f57f17 100%);
}

/* 别蕉绿主题头部样式 */
.theme-green header {
    background: linear-gradient(135deg, #4caf50 0%, #27ae60 100%);
}

/* 摆摆棕主题头部样式 */
.theme-baibai header {
    background: linear-gradient(135deg, #d2b48c 0%, #8b5a2b 100%);
}

/* 深藏Blue主题头部样式 */
.theme-deepblue header {
    background: linear-gradient(135deg, #0d47a1 0%, #0a3d8c 100%);
}

/* 奖学金主题头部样式 */
.theme-gold header {
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
}

h1 {
    color: white;
    margin-bottom: 15px;
    font-size: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.time-display {
    font-size: 2.2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.reminder {
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 5px;
    background-color: #e74c3c;
    color: white;
    display: inline-block;
    margin-top: 10px;
}

/* 控制按钮样式 */
.schedule-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background-color: #3498db;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    font-weight: 500;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 课程表样式 */
.schedule-container {
    overflow-x: auto;
}

#schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

#schedule-table th, #schedule-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

#schedule-table th {
    background-color: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
}

#schedule-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#schedule-table tr:hover {
    background-color: #f1f1f1;
}

.class-cell {
    min-height: 80px;
    position: relative;
    cursor: pointer;
}

.class-item {
    background-color: #3498db;
    color: white;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #2980b9;
}

.class-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.class-item .delete-class {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #fff;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
    animation: modalFadeIn 0.3s ease forwards;
}@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

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

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #2ecc71;
}

/* 认证模态框样式 */
.auth-modal-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.auth-tabs button {
    flex: 1;
    background-color: transparent;
    color: #333;
    box-shadow: none;
    border-bottom: 3px solid transparent;
}

.auth-tabs button.active {
    border-bottom: 3px solid #3498db;
    color: #3498db;
}

.auth-tabs button:hover {
    background-color: #f5f5f5;
    transform: none;
}

/* 用户信息区域样式 */
.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: black;
}

#current-user-nickname {
    font-weight: bold;
}

#logout-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* 底部导入按钮样式 */
.import-container {
    text-align: center;
    margin: 30px 0;
}

#bottom-import-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background-color: #2ecc71;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
    font-weight: 500;
}

#bottom-import-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(46, 204, 113, 0.4);
}

/* 欢迎弹窗样式 */
.welcome-modal-content {
    text-align: center;
    padding: 30px;
}

.submit-btn:hover {
    background-color: #27ae60;
}

/* 主题样式扩展 */
/* 深色主题样式 */
.theme-dark .container,
.theme-dark .content-section,
.theme-dark .modal-content,
.theme-dark .auth-modal-content {
    background-color: #34495e;
    color: #ecf0f1;
}

.theme-dark .schedule-table th {
    background-color: #2c3e50;
}

.theme-dark .class-item {
    background-color: #3498db;
}

.theme-dark .current-class {
    background-color: #e74c3c;
}

.theme-dark .upcoming-class {
    background-color: #f39c12;
}

.theme-dark input,
.theme-dark select {
    background-color: #2c3e50;
    color: #ecf0f1;
    border-color: #7f8c8d;
}

/* 蓝色主题样式 */
.theme-blue .container,
.theme-blue .content-section,
.theme-blue .modal-content,
.theme-blue .auth-modal-content {
    background-color: #e3f2fd;
}

/* 绿色主题样式 */
.theme-green .container,
.theme-green .content-section,
.theme-green .modal-content,
.theme-green .auth-modal-content {
    background-color: #e8f5e9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
}

/* 正在上课的样式 */
.current-class {
    background-color: #e74c3c;
    animation: pulse 1.5s infinite;
}

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

/* 即将上课的样式 */
.upcoming-class {
    background-color: #f39c12;
}