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

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


hr{
    margin: 5px;
}

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

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

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

/* 确保header中的链接保持白色 */
.header a {
    color: inherit;
    text-decoration: none;
}

.header a:hover {
    color: #cccccc;
    transition: color 0.3s ease;
}

.header a h1,
.header a p {
    color: white;
}

.book-container {
    background-color: #000000;
    border-radius: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;

    animation: slideInUp 1s ease-out 0.3s both;
}

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

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

/* 导航链接样式 */
.book-footer-links, .lesson-footer-links, .guide-links, .faq-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.book-footer-links a, .lesson-footer-links a, .guide-links a, .faq-links a {
    padding: 8px 15px;
    background-color: #333333;
    color: #cccccc;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.book-footer-links a:hover, .lesson-footer-links a:hover, .guide-links a:hover, .faq-links a:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-2px);
}


@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: 1.5em;
    }

    /* 移动端 body 布局调整 */
    body {
        min-height: 100vh;
        display: block;
    }

    /* 确保 footer 在移动端可见 */
    footer {
        position: relative;
        z-index: 10;
        background-color: #222222;
        margin-top: 20px;
    }

    /* 播放器在移动端的优化 */
    #player {
        width: 100%;
        max-width: 90%;
        margin: 10px auto;
        position: sticky;
        bottom: 0;
        background: #222222;
        z-index: 100;
    }
}