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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    min-height: 100vh;
    color: #ffffff;
    background-color: #222222;
}

hr{
    margin: 5px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    padding: 20px 0;
}

.header h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
}

.header p {
    font-size: 1.3em;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}


.book-container {
    background: #000000;
    border-radius: 20px;
    padding: 10px;
    margin-top: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: none;
    animation: slideInUp 0.5s ease-out;
    margin-bottom: 40px;
}

.book-container.active {
    display: block;
}

.book-header {
    text-align: center;
    margin: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.book-header img{
    max-width: 100px;
    border-radius: 12px;
}

.book-title {
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.book-title p{
    font-size: 12px;
    color: #888888;
}

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

.lesson-item {
    display: block;
    padding: 10px;
    background: #222222;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: #aaaaaa;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lesson-item:hover {
    transform: translateX(8px);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.lesson-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.lesson-item:hover::before {
    transform: scaleY(1);
}

.lesson-number {
    font-weight: 700;
    margin-left: 10px;
}

.lesson-title {
    font-weight: 500;
}

footer {
    /* 这里是头部和底部的样式，它们的高度是固定的 */
    padding: 10px;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0; /* 防止头部和底部在空间不足时收缩 */
}

footer > p {
    font-size: 12px;
    color: #888888;
}

footer a {
    color: #888888;
    font-size: 12px;
}

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

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

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

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5em;
    }

    .lessons-grid {
        grid-template-columns: 1fr;
    }

}