/* history.html 样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    overflow-y: scroll;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.back-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: white;
    color: #FF5722;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

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

.semester-container {
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.semester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f8f8;
    cursor: pointer;
    transition: background 0s ease;
}

.semester-header:hover {
    background: #f0f0f0;
}

.semester-title {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

body.dark-mode .semester-title {
    color: #e0e0e0;
}

body.dark-mode .semester-header {
    background: #3a3a3a;
}

.toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.semester-content {
    padding: 20px;
    display: none;
}

.semester-content.expanded {
    display: block;
}

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

.week-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.week-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.week-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #2575fc;
}

.download-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.download-link {
    flex: 1;
    padding: 8px 15px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    text-align: center;
}

.download-link:hover {
    background: #45a049;
}

.download-link.pdf {
    background: #2196F3;
}

.download-link.pdf:hover {
    background: #0b7dda;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 15px;
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .weeks-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* 暗黑模式样式 */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .semester-container,
body.dark-mode .week-card {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .semester-header {
    background: #3a3a3a;
}

body.dark-mode .semester-header:hover {
    background: #444;
}

body.dark-mode .week-title {
    color: #4a90e2;
}

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

body.dark-mode .dark-mode-toggle {
    background: rgba(0, 0, 0, 0.2);
    color: #ffa500;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}