/* ============================================================
   战场兄弟攻略站 - 全站统一样式
   主题：暗金佣兵风
   ============================================================ */

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

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #1a1a1a;
    color: #e0d5c1;
    line-height: 1.7;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- 顶部导航 ---------- */
.header {
    background: #2a1f14;
    padding: 18px 0;
    border-bottom: 3px solid #8b4513;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 22px;
    color: #d4a853;
}

.logo p {
    font-size: 12px;
    color: #b4794f;
}

.nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nav a {
    font-size: 14px;
    color: #e0d5c1;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}

.nav a:hover {
    background: #8b4513;
    color: #fff;
}

.nav a.active {
    background: #8b4513;
    color: #fff;
}

/* 下载按钮 - 导航里最显眼的 */
.nav a.nav-download {
    background: #d4a853;
    color: #1a1a1a;
    font-weight: bold;
}

.nav a.nav-download:hover {
    background: #e6c06a;
    color: #1a1a1a;
}

/* 汉堡菜单按钮（手机端才显示） */
.menu-btn {
    display: none;
    background: none;
    border: 1px solid #8b4513;
    color: #d4a853;
    font-size: 22px;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* ---------- 首页横幅 ---------- */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)), url('../images/hero-battle.jpg') center/cover no-repeat, #000;
    padding: 110px 0;
    text-align: center;
    border-bottom: 2px solid #8b4513;
}

.hero h2 {
    font-size: 42px;
    color: #d4a853;
    margin-bottom: 18px;
}

.hero p {
    font-size: 17px;
    color: #e0d5c1;
    max-width: 640px;
    margin: 0 auto 30px;
}

/* ---------- 首页站内搜索 ---------- */
.home-search {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.home-search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #8b4513;
    background: rgba(20, 15, 10, 0.85);
    color: #e8e2d8;
    box-sizing: border-box;
}

.home-search-input:focus {
    outline: none;
    border-color: #d4a853;
    background: rgba(15, 12, 8, 0.95);
}

.home-search-suggest {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #262120;
    border: 1px solid #444242;
    border-radius: 6px;
    max-height: 340px;
    overflow-y: auto;
    text-align: left;
    z-index: 50;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.home-search-suggest.show {
    display: block;
}

.search-hit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #e0d5c1;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #35302c;
}

.search-hit:last-child {
    border-bottom: none;
}

.search-hit:hover {
    background: #3a322b;
    color: #d4a853;
}

.search-hit small {
    color: #8a8278;
    font-size: 12px;
}

.search-hit.empty {
    color: #8a8278;
    cursor: default;
}

.search-badge {
    flex: 0 0 auto;
    background: #4a3520;
    color: #d4a853;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
}

.search-badge.guide {
    background: #2d4a2d;
    color: #c9e8c9;
}

/* ---------- 分类卡片 ---------- */
.features {
    padding: 60px 0 70px;
    background: #232323;
}

.section-title {
    text-align: center;
    color: #d4a853;
    font-size: 30px;
    margin-bottom: 10px;
}

.section-sub {
    text-align: center;
    color: #b4794f;
    font-size: 14px;
    margin-bottom: 40px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: #2d2d2d;
    border-radius: 5px;
    border: 1px solid #444242;
    padding: 30px 25px;
    text-decoration: none;
    display: block;
    transition: transform 0.3s, border 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border: 1px solid #8b4513;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.card-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 10px;
}

.card h3 {
    color: #d4a853;
    font-size: 22px;
    margin-bottom: 8px;
}

.card p {
    color: #e0d5c1;
    font-size: 14px;
}

/* ---------- 内页（分类页）横幅 ---------- */
.page-hero {
    background: #000000c5;
    padding: 55px 0;
    text-align: center;
    border-bottom: 2px solid #8b4513;
}

.page-hero h2 {
    font-size: 34px;
    color: #d4a853;
    margin-bottom: 10px;
}

.page-hero p {
    font-size: 15px;
    color: #e0d5c1;
    max-width: 620px;
    margin: 0 auto;
}

/* ---------- 文章内容区 ---------- */
.content {
    max-width: 820px;
    margin: 0 auto;
    padding: 50px 20px 60px;
}

.content h2 {
    color: #d4a853;
    font-size: 26px;
    margin: 40px 0 15px;
    padding-left: 12px;
    border-left: 4px solid #8b4513;
}

.content h2:first-child {
    margin-top: 0;
}

.content h3 {
    color: #e6c06a;
    font-size: 19px;
    margin: 25px 0 10px;
}

.content p {
    margin-bottom: 14px;
    font-size: 15px;
}

.content ul, .content ol {
    margin: 0 0 16px 22px;
}

.content li {
    margin-bottom: 6px;
    font-size: 15px;
}

/* 提示框：内容待补充 */
.todo {
    background: #2d2d2d;
    border: 1px dashed #8b4513;
    border-radius: 5px;
    padding: 14px 18px;
    color: #b4794f;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ---------- 来源块：署名区 ---------- */
.source {
    max-width: 820px;
    margin: 0 auto 50px;
    padding: 20px 25px;
    background: #2d2d2d;
    border: 1px solid #444242;
    border-left: 4px solid #8b4513;
    border-radius: 5px;
}

.source h4 {
    color: #d4a853;
    font-size: 16px;
    margin-bottom: 10px;
}

.source p {
    color: #e0d5c1;
    font-size: 14px;
    margin-bottom: 8px;
}

.source ul {
    list-style: none;
    margin-bottom: 10px;
}

.source ul li {
    margin-bottom: 6px;
}

.source ul li a {
    color: #b4794f;
    text-decoration: none;
    font-size: 14px;
}

.source ul li a:hover {
    color: #d4a853;
    text-decoration: underline;
}

.source .source-note {
    font-size: 12px;
    color: #8f8a80;
    margin-bottom: 0;
}

/* ---------- 下载页 ---------- */
.download-box {
    max-width: 720px;
    margin: 0 auto;
    padding: 50px 20px 60px;
    text-align: center;
}

.download-box .version {
    font-size: 52px;
    color: #d4a853;
    font-weight: bold;
    margin: 20px 0 10px;
}

.download-box .version small {
    font-size: 16px;
    color: #b4794f;
    display: block;
    margin-top: 6px;
}

.download-info {
    background: #2d2d2d;
    border: 1px solid #444242;
    border-radius: 6px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.download-info h3 {
    color: #d4a853;
    margin-bottom: 12px;
}

.download-info ul {
    margin-left: 20px;
}

.download-info li {
    margin-bottom: 8px;
    font-size: 15px;
}

.notice {
    font-size: 12px;
    color: #8f8a80;
    line-height: 1.8;
    margin-top: 25px;
}

/* ---------- 页脚 ---------- */
.footer {
    background: #111;
    padding: 30px 20px;
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: #8f8a80;
    margin-bottom: 5px;
}

/* ---------- 返回顶部按钮 ---------- */
.back-top {
    display: none;
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #8b4513;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 99;
    transition: background 0.3s;
}

.back-top:hover {
    background: #d4a853;
    color: #1a1a1a;
}

/* ---------- 人物属性页 ---------- */
.attr-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.attr-image {
    flex: 0 0 320px;
    background: #2d2d2d;
    border: 1px solid #444242;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 90px;
}

.attr-image img {
    width: 100%;
    height: auto;
    display: block;
}

.attr-image-cap {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    color: #8f8a80;
    text-align: center;
    border-top: 1px solid #3a3a3a;
}

.attr-list {
    flex: 1;
    min-width: 0;
}

.attr-group {
    margin-bottom: 26px;
}

.attr-group h3 {
    color: #e6c06a;
    font-size: 17px;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid #8b4513;
}

.attr-item {
    background: #2d2d2d;
    border: 1px solid #444242;
    border-left: 3px solid #d4a853;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.attr-item .attr-name {
    color: #d4a853;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
}

.attr-item .attr-desc {
    color: #e0d5c1;
    font-size: 14px;
}

/* ---------- 数据表 ---------- */
.table-wrap {
    overflow-x: auto;
    margin-bottom: 10px;
    border-radius: 6px;
}

.table-wrap .data-table {
    margin-bottom: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #2d2d2d;
    border: 1px solid #444242;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.data-table th {
    background: #3a2a18;
    color: #d4a853;
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
    border-bottom: 2px solid #8b4513;
}

.data-table td {
    padding: 9px 12px;
    font-size: 14px;
    border-bottom: 1px solid #3a3a3a;
    color: #e0d5c1;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .todo-cell {
    color: #8f8a80;
    font-style: italic;
}

/* ---------- 武器截图 ---------- */
.weapon-figure {
    background: #2d2d2d;
    border: 1px solid #444242;
    border-radius: 6px;
    padding: 14px;
    margin: 18px 0;
    text-align: center;
}

.weapon-figure img {
    display: block;
    margin: 0 auto;
    max-height: 420px;
}

.weapon-figure figcaption {
    margin-top: 10px;
    font-size: 12px;
    color: #8f8a80;
}

/* ---------- 攻击技能卡片 ---------- */
.attack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 18px 0;
}

.attack-card {
    background: #2d2d2d;
    border: 1px solid #444242;
    border-radius: 6px;
    padding: 14px;
}

.attack-card img {
    display: block;
    margin: 0 auto 10px;
    max-height: 180px;
}

.attack-card h4 {
    color: #d4a853;
    font-size: 16px;
    margin-bottom: 8px;
}

.attack-card h4 small {
    color: #b4794f;
    font-size: 12px;
    margin-left: 6px;
}

.attack-card p {
    font-size: 13px;
    color: #e0d5c1;
    margin-bottom: 8px;
}

.attack-card ul {
    margin-left: 18px;
    font-size: 13px;
}

.attack-card li {
    margin-bottom: 3px;
}

/* ---------- 装备卡片 ---------- */
.equip-card {
    display: flex;
    gap: 20px;
    background: #2d2d2d;
    border: 1px solid #444242;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 20px;
}

.equip-img {
    flex: 0 0 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f1f1f;
    border-radius: 4px;
    padding: 10px;
}

.equip-img img {
    width: 100%;
    height: auto;
}

.equip-img img:first-child {
    max-height: 240px;
    width: auto;
    margin-bottom: 8px;
}

.equip-info {
    flex: 1;
    min-width: 0;
}

.equip-info h3 {
    color: #d4a853;
    font-size: 18px;
    margin-bottom: 10px;
}

.equip-info h3 small {
    color: #b4794f;
    font-size: 12px;
    margin-left: 8px;
}

.equip-info p {
    font-size: 14px;
    margin-bottom: 8px;
}

.equip-info .data-table {
    margin-bottom: 10px;
}

/* ---------- 装备图鉴（数据驱动版） ---------- */
.equip-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.equip-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: #2d2d2d;
    border: 1px solid #444242;
    color: #c9c2b8;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.filter-btn:hover {
    border-color: #d4a853;
}

.filter-btn.active {
    background: #d4a853;
    color: #1f1a10;
    border-color: #d4a853;
    font-weight: bold;
}

.equip-search {
    flex: 1;
    min-width: 200px;
    background: #1f1f1f;
    border: 1px solid #444242;
    color: #e8e2d8;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.equip-filters-wtype {
    border-top: 1px dashed #3a3a3a;
    padding-top: 10px;
}

.wtype-label {
    color: #b4794f;
    font-size: 13px;
    font-weight: bold;
    align-self: center;
}

.equip-search:focus {
    outline: none;
    border-color: #d4a853;
}

.equip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.equip-grid .equip-card {
    margin-bottom: 0;
}

.named-badge {
    display: inline-block;
    background: #7a1f1f;
    color: #ffd9a0;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: 1px;
}

.wtype-badge {
    display: inline-block;
    background: #2d4a2d;
    color: #c9e8c9;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: 1px;
}

.equip-info .acquire {
    color: #a8a096;
    font-size: 12px;
    line-height: 1.6;
}

.equip-noimg {
    color: #555;
    font-size: 13px;
}

/* ---------- 手机端适配 ---------- */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }

    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #2a1f14;
        padding: 10px 0;
        border-top: 1px solid #8b4513;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 10px 14px;
    }

    .hero {
        padding: 65px 0;
    }

    .hero h2 {
        font-size: 28px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .page-hero {
        padding: 40px 0;
    }

    .page-hero h2 {
        font-size: 26px;
    }

    .attr-layout {
        flex-direction: column;
    }

    .attack-grid {
        grid-template-columns: 1fr;
    }

    .equip-card {
        flex-direction: column;
    }

    .equip-img {
        flex: none;
    }

    .attr-image {
        flex: none;
        width: 100%;
        min-height: 220px;
        position: static;
    }

    .download-box .version {
        font-size: 40px;
    }
}
