/*
Theme Name: 玛法史记
Theme URI: 
Author: 玛法史记编纂委员会
Description: 1.70魔神归来怀旧攻略站主题
Version: 1.0.0
*/

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #d4c8af;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><rect width="4" height="4" fill="%23d4c8af"/><rect width="1" height="1" fill="%23c8b898" opacity="0.3"/></svg>');
    color: #3a2e1f;
    font-family: 'Noto Serif SC', '宋体', 'SimSun', '微软雅黑', serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem;
}

/* ===== 主窗口 ===== */
.window-container {
    max-width: 1100px;
    width: 100%;
    background: #f5f0e0;
    border: 3px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 2px 2px 0 #404040;
}

/* ===== 标题栏 ===== */
.window-title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #ffffff;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: bold;
    font-family: '宋体', 'SimSun', sans-serif;
}
.window-title-bar .title-text {
    display: flex;
    align-items: center;
    gap: 6px;
}
.window-title-bar .title-icon {
    width: 20px;
    height: 20px;
    background: #c0c0c0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect x="2" y="3" width="12" height="10" fill="%23c0c0c0" stroke="%23808080" stroke-width="1"/><line x1="5" y1="1" x2="11" y2="1" stroke="%23808080" stroke-width="2"/></svg>');
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
}
.window-close-btn {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    color: #000;
    line-height: 1;
    padding: 0;
}
.window-close-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* ===== 导航栏 ===== */
.nav-menu-bar {
    background: #e8dcc8;
    border-bottom: 2px solid #808080;
    display: flex;
    flex-wrap: wrap;
    padding: 4px 8px;
    gap: 2px;
}
.nav-btn {
    padding: 6px 18px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    background: #c0c0c0;
    color: #2a2a2a;
    font-family: '宋体', 'SimSun', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 2px;
    display: inline-block;
}
.nav-btn:hover { background: #d4d0c8; }
.nav-btn:active,
.nav-btn.active {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #b0b0b0;
    padding: 7px 17px 5px 19px;
    color: #000;
}

/* ===== 主内容区 ===== */
.main-content {
    padding: 1rem 1.2rem;
}

/* ===== 面包屑 ===== */
.breadcrumb {
    font-size: 0.8rem;
    color: #666;
    padding: 0.4rem 0;
    margin-bottom: 0.6rem;
    font-family: '宋体', 'SimSun', sans-serif;
}
.breadcrumb a { color: #000080; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .separator { margin: 0 6px; color: #999; }
.breadcrumb .current { color: #333; font-weight: bold; }

/* ===== 页面标题栏 ===== */
.page-header {
    background: linear-gradient(90deg, #3a2e1f, #5a4a32);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.page-header h2 {
    color: #e8d48b;
    font-family: '宋体', 'SimSun', serif;
    font-size: 1.3rem;
    letter-spacing: 4px;
    font-weight: normal;
}
.page-header .article-count {
    color: #c0b080;
    font-size: 0.8rem;
    font-family: '宋体', 'SimSun', sans-serif;
}

/* ===== 两栏布局（公共） ===== */
.content-layout {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.sidebar-left {
    width: 240px;
    flex-shrink: 0;
}
.content-right {
    flex: 1;
    min-width: 300px;
}

/* ===== 侧边栏盒子（公共） ===== */
.info-box,
.filter-box,
.side-box {
    background: #faf5e8;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 1rem;
}
.info-box-title,
.filter-box-title,
.side-box-title {
    background: linear-gradient(90deg, #4a3810, #8b6914);
    color: #fffde0;
    padding: 5px 10px;
    font-family: '宋体', 'SimSun', sans-serif;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 2px;
}
.info-box-body,
.filter-box-body,
.side-box-body {
    padding: 0.8rem;
}
.info-box-body ul,
.side-box-body ul {
    list-style: none;
}
.info-box-body li,
.side-box-body li {
    padding: 0.4rem 0;
    border-bottom: 1px dotted #c8b898;
    font-size: 0.82rem;
}
.info-box-body li:last-child,
.side-box-body li:last-child {
    border-bottom: none;
}
.info-box-body a,
.side-box-body a {
    color: #000080;
    text-decoration: none;
}
.info-box-body a:hover,
.side-box-body a:hover {
    color: #cc0000;
    text-decoration: underline;
}

/* 筛选器公共样式 */
.filter-item {
    display: block;
    padding: 0.45rem 1rem;
    color: #3a2e1f;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px dotted #c8b898;
}
.filter-item:last-child { border-bottom: none; }
.filter-item:hover { background: #efe8d0; color: #000080; }
.filter-item.active {
    background: #e0d4b8;
    color: #000080;
    font-weight: bold;
    border-left: 3px solid #000080;
}
.filter-item .count {
    float: right;
    color: #999;
    font-size: 0.75rem;
}

/* 清除筛选按钮 */
.clear-filter {
    margin: -0.5rem 0 1rem;
}
.clear-filter a {
    display: block;
    padding: 0.3rem 0.8rem;
    background: #e8dcc8;
    border: 1px solid #b0a080;
    text-align: center;
    font-size: 0.8rem;
    color: #cc0000;
    text-decoration: none;
}
.clear-filter a:hover {
    background: #ddd0b8;
}

/* 工具栏公共样式 */
.list-toolbar {
    background: #e8dcc8;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.sort-group {
    display: flex;
    gap: 2px;
}
.sort-btn {
    padding: 3px 12px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    background: #c0c0c0;
    color: #2a2a2a;
    font-family: '宋体', 'SimSun', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
}
.sort-btn:active,
.sort-btn.active {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #b0b0b0;
}
.list-search {
    display: flex;
    gap: 4px;
}
.list-search input {
    padding: 3px 8px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background: #fff;
    font-family: '宋体', 'SimSun', sans-serif;
    font-size: 0.8rem;
    width: 160px;
}
.list-search button {
    padding: 3px 10px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    background: #c0c0c0;
    font-family: '宋体', 'SimSun', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
}

/* 分页公共样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    padding: 4px 12px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    background: #c0c0c0;
    color: #2a2a2a;
    font-size: 0.8rem;
    text-decoration: none;
    min-width: 32px;
    text-align: center;
}
.pagination .page-numbers:hover {
    background: #d4d0c8;
}
.pagination .page-numbers.current {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #b0b0b0;
}
.pagination a.page-numbers:active {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #b0b0b0;
}

/* 回到顶部 */
.back-to-top {
    text-align: center;
    margin-top: 0.5rem;
}
.back-to-top a {
    color: #000080;
    font-size: 0.8rem;
    text-decoration: none;
}

/* 底部栏 */
.footer-bar {
    background: #e8dcc8;
    border-top: 2px solid #808080;
    padding: 0.8rem 1.2rem;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    font-family: '宋体', 'SimSun', sans-serif;
}
.footer-bar a {
    color: #000080;
    text-decoration: underline;
}

/* ===== 响应式基础 ===== */
@media (max-width: 768px) {
    body { padding: 0.5rem; }
    .content-layout { flex-direction: column; }
    .sidebar-left { width: 100%; }
    .list-toolbar { flex-direction: column; align-items: stretch; }
    .list-search input { width: 100%; }
}

/* ===== 鼠标样式 ===== */
@media (hover: hover) {
    body {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="20" font-size="20">⚔️</text></svg>'), auto;
    }
    a, button, .nav-btn, .filter-item, .sort-btn, .page-numbers, .article-item, .info-card, .server-btn {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="20" font-size="20">⚔️</text></svg>'), pointer;
    }
}
/* 热门攻略列表样式 */
.hot-type-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 0.8rem;
}
/* 所有侧边栏统一 - 防止文字溢出 */
.side-box-body li,
.side-box-body .boss-item {
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

.side-box-body li a,
.side-box-body .boss-name a {
    word-break: break-word;
    white-space: normal;
}