/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 封面样式 */
.cover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}

.cover::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.main-title {
    font-size: 4em;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.sub-title {
    font-size: 1.8em;
    font-weight: 300;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    opacity: 0.95;
}

.cover-decoration {
    font-size: 3em;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.cover-decoration .emoji {
    display: inline-block;
    margin: 0 15px;
    animation: float 3s ease-in-out infinite;
}

.cover-decoration .emoji:nth-child(2) {
    animation-delay: 0.5s;
}

.cover-decoration .emoji:nth-child(3) {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* 目录样式 */
.catalog {
    padding: 60px 40px;
}

.catalog-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    color: #667eea;
    font-weight: 700;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.catalog-item {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.catalog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.item-number {
    font-size: 1.5em;
    font-weight: 700;
    margin-right: 15px;
    color: #667eea;
    min-width: 45px;
    transition: color 0.3s ease;
}

.catalog-item:hover .item-number {
    color: white;
}

.item-title {
    font-size: 1.1em;
    font-weight: 500;
    flex: 1;
}

/* 页面容器样式 */
.page-container {
    padding: 40px;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 30px;
    font-size: 0.95em;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #764ba2;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* 文章样式 */
.content-article {
    background: white;
    border-radius: 15px;
}

.article-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    margin-bottom: 40px;
}

.article-number {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-weight: 500;
}

.article-title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
}

.article-content {
    padding: 0 40px 40px;
    font-size: 1.1em;
    line-height: 1.8;
}

.article-content h3 {
    color: #667eea;
    font-size: 1.6em;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.article-content h4 {
    color: #764ba2;
    font-size: 1.3em;
    margin: 25px 0 12px;
}

.article-content p {
    margin-bottom: 15px;
    color: #555;
    text-align: justify;
}

/* 图片样式 */
.image-container {
    margin: 30px 0;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.content-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* 页面导航 */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    margin-top: 40px;
    border-top: 2px solid #f0f0f0;
    gap: 15px;
}

.nav-btn {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 180px;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.prev-btn {
    justify-content: flex-start;
}

.next-btn {
    justify-content: flex-end;
}

.home-btn {
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.nav-arrow {
    font-size: 1.2em;
    margin: 0 8px;
}

.nav-text {
    font-size: 1em;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    color: #666;
    font-size: 0.95em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-title {
        font-size: 2.5em;
    }

    .sub-title {
        font-size: 1.3em;
    }

    .catalog {
        padding: 40px 20px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .page-container {
        padding: 20px;
    }

    .article-content {
        padding: 0 20px 30px;
    }

    .image-container {
        padding: 15px;
        margin: 20px 0;
    }

    .page-nav {
        flex-direction: column;
        padding: 20px;
    }

    .nav-btn {
        max-width: 100%;
        width: 100%;
    }

    .article-title {
        font-size: 1.8em;
    }
}