/*
Theme Name: 站群模板
Theme URI: 
Author: 
Description: 基于配色+栏目动态配置的站群主题
Version: 1.0
*/

/* ===== 1. CSS变量 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --stn-primary: #d4a85c;
    --stn-secondary: #f0d6a8;
    --stn-button: #d4a85c;
    --stn-bg: #1a1510;
    --stn-card-bg: #2b231d;
    --stn-glow: rgba(212, 168, 92, 0.25);
    --stn-border: rgba(212, 168, 92, 0.2);
    --stn-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    --stn-text-body: #c9bcab;
    --stn-text-light: #eee5d8;
    --stn-text-muted: #8f8170;
    --font-serif: 'Cinzel', serif;
    --font-sans: 'Roboto', sans-serif;
    --header-height: 64px;
    --transition: all 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--stn-bg);
    background-image: radial-gradient(ellipse at 30% 20%, #2f241b 0%, var(--stn-bg) 80%);
    color: var(--stn-text-body);
    font-family: var(--font-sans);
    line-height: 1.6;
    padding-top: var(--header-height);
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 2. 顶部导航 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(26, 21, 16, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--stn-border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-serif);
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--stn-text-light);
    text-shadow: 0 0 16px var(--stn-glow);
    letter-spacing: 1px;
    flex-shrink: 0;
}
.logo i { font-size: 1.6rem; color: var(--stn-primary); }
.logo span {
    font-weight: 400;
    color: var(--stn-text-muted);
    font-size: 0.75rem;
    margin-left: 4px;
    letter-spacing: 0.5px;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-main a {
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--stn-text-body);
    border-radius: 4px;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}
.nav-main a:hover { color: var(--stn-text-light); background: rgba(212,168,92,0.08); }
.nav-main a.active { color: var(--stn-text-light); border-bottom-color: var(--stn-primary); }

.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stn-border);
    border-radius: 30px;
    padding: 2px 6px 2px 16px;
    transition: var(--transition);
}

/* 搜索框里的 form 占满宽度 */
.search-box form {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--stn-text-light);
    font-size: 0.85rem;
    padding: 6px 0;
    width: 130px;
    transition: var(--transition);
    flex: 1;
}

.search-box input::placeholder {
    color: var(--stn-text-muted);
    font-size: 0.75rem;
}

.search-box input:focus {
    width: 170px;
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--stn-primary);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 0.95rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--stn-text-body);
    transition: var(--transition);
    border-radius: 2px;
}

/* ===== 3. 面包屑 ===== */
.breadcrumb {
    padding: 20px 0 8px;
    font-size: 0.85rem;
    color: var(--stn-text-muted);
}
.breadcrumb a { color: var(--stn-primary); transition: var(--transition); }
.breadcrumb a:hover { color: var(--stn-secondary); }
.breadcrumb .sep { margin: 0 8px; color: #5a4f44; }
.breadcrumb .current { color: var(--stn-text-body); }

/* ===== 4. 页脚 ===== */
.footer {
    border-top: 1px solid var(--stn-border);
    padding: 20px 0 16px;
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.15);
}

/* 第一排：友情链接 - 靠左，主题色 */
.footer-links {
    display: flex;
    justify-content: flex-start;
    gap: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--stn-primary);
    transition: var(--transition);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--stn-secondary);
    opacity: 0.8;
}

/* 第二排：备案号 + 版权 - 居中，灰色 */
.footer-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--stn-text-muted);
    flex-wrap: wrap;
}

.footer-info span {
    color: var(--stn-text-muted);
}
/* ===== 5. 滚动条 ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--stn-bg); }
::-webkit-scrollbar-thumb { background: var(--stn-primary); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--stn-secondary); }

/* ===== 6. 响应式 ===== */
@media (max-width: 820px) {
    .nav-main {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: rgba(26,21,16,0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--stn-border);
        transform: translateY(-120%);
        transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
        box-shadow: 0 20px 40px rgba(0,0,0,0.6);
        align-items: stretch;
    }
    .nav-main.open { transform: translateY(0); }
    .nav-main a {
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.03);
        border-radius: 0;
        font-size: 1rem;
    }
    .nav-main a.active {
        border-left: 3px solid var(--stn-primary);
        border-bottom-color: transparent;
        background: rgba(212,168,92,0.05);
    }
    .hamburger { display: flex; }
    .header-tools .search-box input { width: 100px; }
    .header-tools .search-box input:focus { width: 130px; }
}

@media (max-width: 600px) {
    .container { padding: 0 14px; }
    .logo { font-size: 1.1rem; }
    .logo span { display: none; }
    .footer-inner { flex-direction: column; text-align: center; }
}
/* ===== 表格样式 ===== */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 24px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.article-body table thead {
    background: rgba(212, 168, 92, 0.12);
}

.article-body table th {
    padding: 12px 16px;
    text-align: left;
    color: var(--stn-text-light);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(212, 168, 92, 0.1);
}

.article-body table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.article-body table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.article-body table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 图片居中 ===== */
.article-body p img,
.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px auto;
}

/* ===== 图片描述（figcaption）居中 ===== */
.article-body figcaption,
.article-body .wp-block-image figcaption,
.article-body .wp-element-caption {
    text-align: center;
    color: var(--stn-text-muted);
    font-size: 0.85rem;
    margin-top: -8px;
    margin-bottom: 20px;
}

/* ===== 图片居中对齐类 ===== */
.article-body .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-body .alignleft {
    float: left;
    margin-right: 16px;
    margin-bottom: 12px;
}

.article-body .alignright {
    float: right;
    margin-left: 16px;
    margin-bottom: 12px;
}

/* ===== 响应式表格（小屏横向滚动） ===== */
@media (max-width: 600px) {
    .article-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}