/* ===== 全站布局 V3.2 ===== */

/* 主容器 - 三栏网格 */
.main-container {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 24px;
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 20px;
}

/* 左侧栏 */
.left-sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.left-sidebar-container {
    width: 100%;
}

/* 侧边栏模块 */
.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sections-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
    transition: background 0.2s ease;
}

.section-item:hover {
    background: rgba(255,255,255,0.15);
}

.section-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    flex-shrink: 0;
    margin-right: 12px;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
}

.section-content {
    flex: 1;
    min-width: 0;
}

.section-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.section-link {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

/* 中间主内容区 */
.main-content {
    min-height: auto;
    position: relative;
}

/* 右侧栏 */
.right-sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.right-sidebar-container {
    width: 100%;
}

/* 搜索模块 */
.search-box {
    margin-top: 8px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    font-size: 12px;
    background: rgba(255,255,255,0.95);
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    min-height: 40px;
}

.search-input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    padding: 10px 16px;
    background: #8E44AD;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    min-height: 40px;
}

.search-button:hover {
    background: #7D3C98;
}

/* 最新更新模块 */
.recent-updates-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.update-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.update-item:last-child {
    border-bottom: none;
}

.update-item a {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    display: block;
    line-height: 1.4;
}

.update-item a:hover {
    text-decoration: underline;
}

.update-date {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    margin-top: 2px;
    display: block;
}

/* 访问统计模块 */
.stats-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stats-row:last-of-type {
    border-bottom: none;
}

.stats-label {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.stats-value {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.stats-update-note {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    text-align: center;
    margin-top: 4px;
}

/* -------------------- 底栏布局 -------------------- */
.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 220px 1fr 240px;
        gap: 16px;
        padding: 0 16px;
    }
    
    .left-sidebar,
    .right-sidebar {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 12px;
    }
    
    .left-sidebar,
    .right-sidebar {
        width: 100%;
        border-radius: 8px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 8px;
    }
    
    .left-sidebar,
    .right-sidebar {
        border-radius: 0;
        padding: 12px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-button {
        width: 100%;
    }
}

/* ===== 主页中间栏模块标题（V3.3） ===== */
.latest-section .section-title,
.featured-section .section-title,
.sections-overview .section-title {
    color: #333;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #8E44AD;
}




/* 标签样式 */
.article-tags {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.article-tags h4 {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    font-weight: 600;
    margin-right: 0.3rem;
}
a.tag {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: 1px solid #764ba2;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
a.tag:hover {
    opacity: 0.85;
}
