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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: #2c1810;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.magazine-container {
    position: relative;
    width: 100%;
    height: 100vh;
    max-width: 100%;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    overflow: hidden;
    background-color: #fff;
}

.magazine {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1800px;
    overflow: hidden;
}

.page {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.15s ease-out;
    backface-visibility: hidden;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    display: none;
    opacity: 0;
}

.page.active {
    display: block;
    opacity: 1;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5c4 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(139, 69, 19, 0.2);
    border-top-color: #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    color: #8B4513;
    font-size: 16px;
}

.page-content {
    width: 100%;
    height: 100%;
    padding: 50px;
    /*display: flex;*/
    flex-direction: column;
    /*justify-content: space-between;*/
    align-items: center;
    text-align: center;
    position: relative;
}

/* 装饰元素 */
.page-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8B4513, #D2691E, #CD853F, #DEB887);
}

.page-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #DEB887, #CD853F, #D2691E, #8B4513);
}

/* 标题样式 */
.page-content h1 {
    font-size: 48px;
    margin-bottom: 25px;
    color: #8B4513;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 2px;
}

.page-content h2 {
    font-size: 32px;
    margin-bottom: 25px;
    color: #5D4037;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.page-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #8B4513, #D2691E);
    border-radius: 2px;
}

/* 正文样式 */
.page-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #3E2723;
    max-width: 700px;
    text-align: justify;
    text-indent: 2em;
}

/* 办刊宗旨样式 */
.mission-statement {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    text-indent: 0;
    margin-bottom: 35px;
    line-height: 1.6;
}

/* 图片说明文字样式 */
.image-caption {
    font-size: 16px;
    text-align: center;
    text-indent: 0;
    margin-top: 15px;
    margin-bottom: 20px;
    font-style: italic;
    color: #666;
}

/* 签名图片样式 */
.signature-image {
    max-width: 40%;
    max-height: 200px;
    box-shadow: none;
    float: right;
    margin: 0 0 20px 20px;
    border-radius: 0;
}

/* 图片样式 */
.page-content img {
    max-width: 85%;
    max-height: calc(100% - 250px);
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    margin: 20px 0;
}

.page-content img:hover {
    transform: scale(1.02);
}

/* 封面样式 */
.cover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf6 100%);
    background-image:
        radial-gradient(circle at 20% 80%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(210, 105, 30, 0.1) 0%, transparent 50%);
    position: relative;
}

.cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%238B4513" stroke-width="0.5" stroke-opacity="0.1"/></svg>');
    opacity: 0.3;
}

.cover h1 {
    font-size: 60px;
    margin-bottom: 15px;
    color: #8B4513;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.15);
    letter-spacing: 3px;
}

.cover p {
    font-size: 22px;
    margin-bottom: 20px;
    color: #5D4037;
    text-align: center;
    text-indent: 0;
}

/* 封底样式 */
.back-cover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.back-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%238B4513" stroke-width="0.5" stroke-opacity="0.1"/></svg>');
    opacity: 0.2;
}

/* 翻页动画效果 */
.page.flipped {
    opacity: 0;
}

/* 内容页样式 - 用于文章页面 */
.page-with-content {
    padding: 20px;
    justify-content: flex-start;
    overflow-y: auto;
    position: relative;
}

.content-top {
    text-align: center;
    margin-bottom: 15px;
}

.article-section {
    text-align: left;
    margin-bottom: 15px;
}

.article-section h3 {
    font-size: 18px;
    color: #8B4513;
    margin-bottom: 10px;
    font-weight: 600;
}

.article-content {
    font-size: 13px;
    line-height: 1.6;
    color: #3E2723;
    text-align: justify;
    text-indent: 2em;
    margin-bottom: 10px;
}

.content-bottom {
    text-align: center;
    position: relative;
}

.page-number {
    font-size: 16px;
    font-weight: 600;
    color: #D2691E;
}

.page-number-center {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 600;
    color: #D2691E;
}

.article-content-wrapper {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    margin-top: 10px;
}

.section-tag {
    position: absolute;
    top: 15px;
    right: 0px;
    display: flex;
    align-items: center;
    padding: 6px 10px 6px 0;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-right: none;
    border-radius: 4px 0 0 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tag-accent {
    width: 4px;
    height: 100%;
    background-color: #D2691E;
    margin-right: 10px;
    border-radius: 4px 0 0 4px;
}

.tag-text {
    font-size: 12px;
    color: #5D4037;
    white-space: nowrap;
}

.article-meta {
    font-size: 14px;
    color: #8B4513;
    text-align: center;
    margin: 5px auto 15px auto;
    text-indent: 0;
}

/* 可点击元素样式 */
.clickable {
    transition: all 0.2s ease;
}

.clickable:hover {
    background-color: rgba(139, 69, 19, 0.05);
    border-radius: 6px;
}

.clickable:active {
    transform: scale(0.98);
}

/* 目录页样式 */
.toc {
    width: 100%;
    max-width: 800px;
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: calc(100% - 120px);
    overflow-y: auto;
}

.chapter-block {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.chapter-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: rgba(139, 69, 19, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.section-title:hover {
    background-color: rgba(139, 69, 19, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.page-number {
    font-size: 16px;
    font-weight: 600;
    color: #D2691E;
}

.entries {
    margin-left: 20px;
    margin-top: 10px;
}

.entry {
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.entry:hover {
    transform: translateX(5px);
}

.entry-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(245, 245, 245, 0.8);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.entry-info:hover {
    background-color: rgba(230, 230, 230, 0.8);
}

.article-title {
    font-size: 14px;
    font-weight: 500;
    color: #3E2723;
    flex: 1;
    text-align: left;
}

.author {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-left: 15px;
    white-space: nowrap;
}

.events-list {
    margin-left: 20px;
    margin-top: 10px;
}

.event-item {
    margin-bottom: 8px;
    padding: 6px 12px;
    background-color: rgba(245, 245, 245, 0.8);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.event-item:hover {
    background-color: rgba(230, 230, 230, 0.8);
    transform: translateX(5px);
}

.event-item span {
    font-size: 14px;
    color: #3E2723;
}

/* 浮动导航栏样式 */
.floating-nav {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-nav.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.nav-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1001;
}

.nav-toggle:hover {
    background: linear-gradient(135deg, #D2691E, #8B4513);
    transform: scale(1.1);
}

.nav-icon {
    color: white;
    font-size: 26px;
    transition: transform 0.3s ease;
}

.nav-toggle.active .nav-icon {
    transform: rotate(90deg);
}

.nav-buttons {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.nav-buttons.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.nav-buttons .nav-btn {
    padding: 10px 15px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    width: 100%;
    text-align: center;
}

.nav-buttons .nav-btn:hover {
    background: linear-gradient(135deg, #D2691E, #8B4513);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-content {
    animation: fadeIn 0.2s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8B4513, #D2691E);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #D2691E, #8B4513);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .magazine-container {
        height: 100vh;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .loading-overlay {
        text-align: center;
        justify-content: center;
        align-items: center;
    }
    
    .magazine {
        height: 100%;
    }
    
    .page-content {
        padding: 30px;
    }
    
    .page-content h1 {
        font-size: 36px;
    }
    
    .page-content h2 {
        font-size: 24px;
    }
    
    .page-content p {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .page-content img {
        max-width: 100%;
        max-height: calc(100% - 200px);
    }

    .image-intro {
        font-size: 14px;
        color: #666;
        text-align: center;
        margin-top: 8px;
        margin-bottom: 15px;
        text-indent: 0;
    }
    
    .table-of-contents {
        padding: 15px;
        margin: 20px 0;
    }
    
    .table-of-contents a {
        font-size: 17px;
        padding: 8px 12px;
    }
    
    .floating-nav {
        bottom: 15px;
        right: 15px;
    }
    
    .nav-toggle {
        width: 50px;
        height: 50px;
    }
    
    .nav-icon {
        font-size: 22px;
    }
    
    .nav-buttons {
        bottom: 60px;
        padding: 12px;
        min-width: 100px;
    }
    
    .nav-buttons .nav-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 翻动提示样式 */
.swipe-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.swipe-hint.show {
    opacity: 1;
    pointer-events: all;
    animation: fadeInOut 4s ease-in-out forwards;
}

.swipe-hint-content {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.swipe-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    animation: bounce 1s ease-in-out infinite;
}

.swipe-hint-content p {
    color: white;
    font-size: 18px;
    margin: 0;
    text-indent: 0;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 0.7; }
    80% { opacity: 0.7; }
    100% { opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}