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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #f5f0e6;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(
        to bottom,
        #e6d4b0 0%,
        #dcc99a 30%,
        #d6c28e 60%,
        #cfba82 100%
    );
    color: #4a3528;
    overflow-y: auto;
    flex-shrink: 0;
    border-right: 2px solid rgba(160, 110, 70, 0.3);
    box-shadow: inset -5px 0 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(to bottom, #dcc490 0%, #d0b67c 100%);
    border-bottom: 2px solid rgba(160, 110, 70, 0.4);
    position: relative;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    color: #5c4033;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
    font-weight: bold;
}

.sidebar-nav {
    padding: 15px 0;
    position: relative;
}

.category-title {
    padding: 12px 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b4a3c;
    font-weight: bold;
    background: rgba(160, 110, 70, 0.08);
    border-bottom: 1px solid rgba(160, 110, 70, 0.2);
}

.article-list {
    list-style: none;
}

.article-list li a {
    display: block;
    padding: 10px 20px 10px 55px;
    color: #5a4030;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    position: relative;
}

.article-list li a::before {
    content: '📜';
    position: absolute;
    left: 38px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
}

.article-list li a:hover {
    background: rgba(160, 110, 70, 0.15);
    color: #4a3020;
}

.article-list li a.active {
    background: rgba(160, 110, 70, 0.25);
    color: #3a2010;
    font-weight: bold;
    border-left: 3px solid rgba(160, 110, 70, 0.6);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 40px 80px 40px;
    background: linear-gradient(to bottom, #d4c4a8 0%, #c9b896 100%);
}

.parchment {
    width: 90%;
    max-width: none;
    min-height: calc(100vh - 80px);
    margin: 0 auto;
    background: linear-gradient(
        135deg,
        #f5e6c8 0%,
        #f0dca8 10%,
        #ead39f 20%,
        #e6ca96 40%,
        #e2c18d 60%,
        #ddd894 80%,
        #d8c88b 100%
    );
    padding: 60px 80px;
    border-radius: 8px;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.1),
        0 4px 8px rgba(0,0,0,0.12),
        0 8px 16px rgba(0,0,0,0.15),
        0 16px 32px rgba(0,0,0,0.18),
        inset 0 0 80px rgba(139, 90, 43, 0.12),
        inset 0 0 150px rgba(210, 180, 140, 0.25);
    position: relative;
    border: 1px solid rgba(160, 120, 80, 0.3);
}

.parchment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.12'/%3E%3C/svg%3E");
    pointer-events: none;
}

.parchment::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(139, 90, 43, 0.05) 60%,
        rgba(139, 90, 43, 0.1) 100%
    );
    pointer-events: none;
}

.article-title {
    font-size: 2.5rem;
    color: #5c4033;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(160, 110, 70, 0.4);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.article-content {
    line-height: 1.9;
    color: #4a3528;
    font-size: 1.15rem;
    text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.4);
}

.article-content h1 {
    font-size: 2rem;
    margin: 30px 0 15px;
    color: #5c4033;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.article-content h2 {
    font-size: 1.6rem;
    margin: 25px 0 12px;
    color: #6b4a3c;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
    color: #7a5a4a;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.article-content p {
    margin-bottom: 15px;
}

.article-content ul, .article-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.article-content li {
    margin: 8px 0;
}

.article-content code {
    background: rgba(160, 110, 70, 0.2);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #5c4033;
}

.article-content pre {
    background: rgba(160, 110, 70, 0.12);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid rgba(160, 110, 70, 0.25);
}

.article-content pre code {
    background: transparent;
    padding: 0;
}

.article-content blockquote {
    border-left: 4px solid rgba(160, 110, 70, 0.5);
    margin: 15px 0;
    padding: 10px 20px;
    background: rgba(160, 110, 70, 0.08);
    color: #6b4a3c;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    border: 2px solid rgba(160, 110, 70, 0.2);
}

.article-content hr {
    border: none;
    border-top: 2px solid rgba(160, 110, 70, 0.35);
    margin: 30px 0;
}

.article-content del {
    text-decoration: line-through;
    color: #8a7668;
}

.article-content a {
    color: #8b5a2b;
    text-decoration: underline;
}

.article-content a:hover {
    color: #5c3a1b;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(160, 110, 70, 0.3);
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.admin-link {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: #4a5568;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.admin-link:hover {
    background: #2d3748;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 70px;
    left: 15px;
    z-index: 10001;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #dcc490 0%, #d0b67c 100%);
    border: 2px solid rgba(160, 110, 70, 0.4);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: #5c4033;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(160, 110, 70, 0.2);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #5c4033;
    cursor: pointer;
    line-height: 1;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 10000;
        transition: left 0.3s ease;
        width: 260px;
        max-width: 85vw;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .mobile-close-btn {
        display: block;
    }
    
    .sidebar-header {
        padding: 50px 15px 15px;
    }
    
    .sidebar-header h1 {
        font-size: 1.3rem;
        padding-right: 40px;
    }
    
    .main-content {
        padding: 70px 15px 60px;
        min-height: 100vh;
    }
    
    .parchment {
        width: 100%;
        padding: 30px 20px;
        min-height: auto;
    }
    
    .article-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .article-content {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .article-content h1 {
        font-size: 1.5rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
    }
    
    .article-content h3 {
        font-size: 1.15rem;
    }
    
    /* 侧边栏遮罩 */
    .sidebar.open::after {
        content: '';
        position: fixed;
        left: 260px;
        top: 0;
        width: calc(100vw - 260px);
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* 平板设备 */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        padding: 30px 30px 70px;
    }
    
    .parchment {
        padding: 40px 50px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content {
        font-size: 1.05rem;
    }
}
