/* ===== CSS变量定义 ===== */
:root {
    --primary-color: #8B4513;
    --primary-light: #A0522D;
    --secondary-color: #D2B48C;
    --accent-color: #CD853F;
    --background-light: #FDF5E6;
    --text-dark: #5D4037;
    --text-light: #8D6E63;
    --white: #FFFFFF;
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    height: 100%;
}

body {
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    border-top: 5px solid var(--primary-color);
    padding: 0 20px 0 270px;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-light);
}

/* ===== 动画定义 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ===== 侧边栏样式 ===== */
aside {
    position: fixed;
    top: 5px;
    left: 20px;
    width: 240px;
    height: calc(100vh - 20px);
    background: linear-gradient(to bottom, var(--background-light), #F5F5DC);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.1);
    overflow-y: auto;
    padding: 15px;
    z-index: 100;
}

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

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

aside::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

aside::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== PC端语言切换 ===== */
.pc-language-icon {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 101;
}

.language-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 0 0 10px 0;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.language-icon-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.language-icon-btn i {
    font-size: 1.6rem;
}

.pc-language-popup {
    position: absolute;
    top: 36px;
    left: 0;
    background: var(--white);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 102;
    display: none;
    min-width: 110px;
    border: 1px solid var(--secondary-color);
    border-top: none;
}

.pc-language-popup.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.pc-language-popup .language-switcher {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pc-language-popup .language-switcher button {
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
    text-align: left;
}

.pc-language-popup .language-switcher button.active {
    background: var(--primary-color);
    color: var(--white);
}

.pc-language-popup .language-switcher button:hover:not(.active) {
    background: rgba(139, 69, 19, 0.1);
}
/* 更多语言按钮样式 */
.more-languages-btn {
    background: rgba(139, 69, 19, 0.1) !important;
    color: var(--primary-color) !important;
    font-size: 1.1rem !important;
   /* border: 1px dashed var(--primary-color) !important; */
}

.more-languages-btn:hover {
    background: var(--primary-color) !important;
    color: var(--white) !important;
}

/* 完整语言列表弹窗样式 */
.full-language-popup {
    padding: 10px;
}

.full-language-popup h4 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.6rem;
}

.language-group {
    margin-bottom: 20px;
}

.group-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.language-item {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    background: var(--white);
    margin: 5px;
}


.language-item:hover {
    background: rgba(139, 69, 19, 0.1);
    border-color: var(--primary-color);
}

.language-item.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ===== 首页区域样式 ===== */
.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--secondary-color);
    position: relative;
    margin-top: 30px;
}

.logo-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.2);
}

.logo {
    font-size: 3rem;
    color: var(--white);
}

.site-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.site-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ===== 导航样式 ===== */
.main-nav {
    margin-bottom: 25px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.nav-links a {
    background: var(--white);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--secondary-color);
}

.nav-links a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: var(--primary-color);
    color: var(--white);
}

.external-links-container {
    margin-top: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

/* ===== 小部件样式 ===== */
.widget {
    margin-bottom: 20px;
}

.widget h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
}

.widget h4 i {
    margin-right: 8px;
    font-size: 1.6rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    /*margin-bottom: 6px;
    padding-left: 5px;
    border-left: 2px solid transparent; */
    transition: all 0.3s ease;
}

.widget li:hover {
    border-left: 2px solid var(--primary-color);
    padding-left: 8px;
}

.widget li a {
    display: block;
    padding: 4px 6px;
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.widget li a:hover {
    background: rgba(139, 69, 19, 0.1);
    color: var(--primary-color);
}

/* ===== 文章相关样式 ===== */
.article-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.article-picurl {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.article-picurl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
}

.article-picurl:hover img {
    transform: scale(1.1);
}

.article-picurl:not(.loaded) {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    animation: pulse 1.5s ease-in-out infinite;
}

.article-picurl:not(.loaded)::before {
    content: "图";
    color: #999;
    font-size: 1.4rem;
    font-weight: 500;
}

/* 文章图片变体 */
.article-picurl.small {
    width: 30px;
    height: 30px;
    margin-right: 12px;
}

.article-picurl.large {
    width: 50px;
    height: 50px;
    margin-right: 18px;
}

.article-picurl.xlarge {
    width: 60px;
    height: 60px;
    margin-right: 20px;
}

.article-picurl.square {
    border-radius: 8px;
}

.article-picurl.rounded {
    border-radius: 12px;
}

.article-picurl.bordered {
    border: 3px solid var(--primary-color);
    padding: 2px;
}

.article-picurl.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 文章页脚 */
.article-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tags a {
    background: rgba(139, 69, 19, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.article-tags a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.article-share {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* 文章动画 */
.article-item {
    animation: fadeIn 0.4s ease forwards;
}

.article-item:nth-child(2) { animation-delay: 0.05s; }
.article-item:nth-child(3) { animation-delay: 0.1s; }
.article-item:nth-child(4) { animation-delay: 0.15s; }
.article-item:nth-child(5) { animation-delay: 0.2s; }
.article-item:nth-child(6) { animation-delay: 0.25s; }

/* ===== 翻页样式 ===== */
.pagination {
    padding: 30px 0 0 0;
    text-align: center;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.pagination ul li {
    display: inline;
}

.pagination ul li a,
.pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 7px 14px;
    background-color: var(--white);
    border: 1px solid var(--secondary-color);
    font-size: 1.3rem;
    color: var(--text-dark);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination ul li a:hover {
    color: var(--white);
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.pagination ul li.active span {
    color: var(--white);
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(139, 69, 19, 0.3);
}

.pagination ul li.page_disabled span {
    color: var(--text-light);
    background-color: rgba(210, 180, 140, 0.3);
    border: 1px solid var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===== 筛选器样式 ===== */
.video-filter-container {
    background: var(--white);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--secondary-color);
    animation: fadeInUp 0.5s ease forwards;
}

.filter-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 500;
    white-space: nowrap;
}

.filter-label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.select-wrapper {
    position: relative;
    min-width: 150px;
}

.filter-select {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 1.3rem;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.select-wrapper:hover .select-arrow {
    color: var(--primary-color);
}

.filter-select:hover {
    border-color: var(--primary-light);
}

/* ===== 移动端样式 ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 15px;
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-logo {
    display: flex;
    align-items: center;
}

.mobile-logo i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 10px;
}

.mobile-logo span {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.mobile-nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-language-switcher {
    display: flex;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 20px;
    padding: 3px;
}

.mobile-language-switcher button {
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.mobile-language-switcher button.active {
    background: var(--primary-color);
    color: var(--white);
}

.mobile-nav-toggle {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.mobile-sidebar {
    position: fixed;
    top: 56px;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 10ex;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    display: none;
}

.mobile-sidebar-overlay.active {
    display: block;
}

.mobile-sidebar::-webkit-scrollbar {
    width: 6px;
}

.mobile-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.mobile-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.mobile-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== 页脚样式 ===== */
footer {
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    color: var(--text-light);
    font-size: 1.1rem;
    border-top: 1px solid var(--secondary-color);
}

/* ===== 响应式设计 ===== */
@media screen and (max-width: 1024px) {
    body {
        padding: 0 15px 0 260px;
    }
    
    aside {
        width: 230px;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 70px 10px 10px;
    }
    
    .pc-language-icon {
        display: none;
    }
    
    .mobile-header {
        display: block;
    }
    
    aside {
        display: none;
    }
    
    .mobile-language-switcher {
        display: flex;
    }
    
    .home {
        padding-right: 0;
    }
    .language-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }
    
    .language-item {
        padding: 6px 8px;
        font-size: 1.1rem;
        margin: 5px;
    }
    /* 移动端文章图片调整 */
    .article-picurl {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .article-picurl.large {
        width: 44px;
        height: 44px;
    }
    
    /* 移动端筛选器调整 */
    .video-filter-container {
        padding: 12px 15px;
        margin-bottom: 20px;
    }
    
    .filter-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .select-wrapper {
        width: 100%;
    }
    
    .filter-select {
        font-size: 1.4rem;
    }
    
    /* 移动端翻页调整 */
    .pagination ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
    }
    
    .pagination ul li a,
    .pagination ul li span {
        min-width: 32px;
        height: 32px;
        padding: 5px 10px;
        font-size: 1.2rem;
    }
    
    .pagination ul li:first-child a,
    .pagination ul li:last-child a,
    .pagination ul li:nth-last-child(2) a {
        font-size: 0;
        position: relative;
    }
    
    .pagination ul li:first-child a::before {
        content: "«";
        font-size: 1.3rem;
    }
    
    .pagination ul li:nth-last-child(2) a::before {
        content: "›";
        font-size: 1.3rem;
    }
    
    .pagination ul li:last-child a::before {
        content: "»";
        font-size: 1.3rem;
    }
    
    .pagination ul li.page_disabled:first-child span,
    .pagination ul li.page_disabled:nth-last-child(2) span {
        font-size: 0;
        position: relative;
    }
    
    .pagination ul li.page_disabled:first-child span::before {
        content: "«";
        font-size: 1.3rem;
    }
    
    .pagination ul li.page_disabled:nth-last-child(2) span::before {
        content: "›";
        font-size: 1.3rem;
    }
}