
* {
    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;
}

.books-container {
    text-align: center;
    font-size: 2.5em;
    font-weight: 600;
    background-color: #000000;
    padding: 15px;
    border-radius: 20px;
    margin-bottom: 40px;
}

.books-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    grid-auto-rows: 1fr;
    gap: 30px;
    padding: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.book-card {
    border-radius: 12px;
    background-color: #222222;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-card img {
    border-radius: 12px;
    width: 50%;
    height: 50%;
    object-fit: cover;
}

.book-card .book-info {
    flex: 1;
    padding: 0 10px;
}

.book-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

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

.book-card:hover::before {
    left: 100%;
}


.book-number {
    margin-top: 10px;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
}

.book-card:hover .book-number {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.book-subtitle {
    font-size: 12px;
    margin-bottom: 10px;
    color: #888888;
}

.lesson-count {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 10px;
    margin-bottom: 10px;
    color: #667eea;
}

.book-card:hover .lesson-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}


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);
    }
}

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

    .books-nav {
        grid-template-columns: 1fr;
    }

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

}
