/* ============================================
   176精品传奇私服 - 全局样式
   ============================================ */

/* ---------- Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    background: #f5f0e8;
    background-image: linear-gradient(180deg, #f5f0e8 0%, #efe7d9 100%);
    min-height: 100vh;
}
a { color: #8b0000; text-decoration: none; transition: color .2s; }
a:hover { color: #ff6a00; text-decoration: underline; }
img { max-width: 100%; height: auto; border: 0; }
ul, ol { list-style: none; }
:focus { outline: none; }

/* ---------- 顶部工具条 ---------- */
.topbar {
    background: #1a1a1a;
    color: #c9a86a;
    font-size: 12px;
    border-bottom: 2px solid #8b0000;
}
.topbar .inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 6px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar a { color: #c9a86a; margin-left: 12px; }
.topbar a:hover { color: #ffd700; }

/* ---------- 头部 / Logo ---------- */
.header {
    background: linear-gradient(135deg, #2b0a0a 0%, #5c1010 60%, #8b0000 100%);
    padding: 22px 0;
    border-bottom: 4px solid #ffd700;
    box-shadow: 0 3px 12px rgba(0,0,0,.35);
}
.header .inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.logo {
    font-size: 30px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,.6), 0 0 18px rgba(255,215,0,.4);
    letter-spacing: 1px;
}
.logo small {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #f0e0b0;
    text-shadow: none;
    letter-spacing: 3px;
    margin-top: 4px;
}
.header-meta { text-align: right; color: #f5e9c8; font-size: 13px; }
.header-meta strong { color: #ffd700; }

/* ---------- 导航 ---------- */
.nav {
    background: #3a0d0d;
    border-bottom: 3px solid #ffd700;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav .inner { max-width: 1180px; margin: 0 auto; padding: 0 10px; }
.nav ul { display: flex; flex-wrap: wrap; }
.nav li { position: relative; }
.nav a {
    display: block;
    padding: 13px 20px;
    color: #f5e9c8;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    border-right: 1px solid rgba(255,255,255,.08);
}
.nav a:hover, .nav li.active > a {
    background: #8b0000;
    color: #fff;
    text-decoration: none;
}
.nav li:first-child a { border-left: 1px solid rgba(255,255,255,.08); }

/* ---------- 布局 ---------- */
.container {
    max-width: 1180px;
    margin: 20px auto;
    padding: 0 15px;
}
.wrap { display: flex; gap: 24px; align-items: flex-start; }
.main { flex: 1 1 auto; min-width: 0; }
.sidebar { flex: 0 0 320px; }

/* ---------- 通用面板 ---------- */
.panel {
    background: #fff;
    border: 1px solid #e0d3ba;
    border-radius: 6px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
}
.panel-head {
    background: linear-gradient(180deg, #8b0000 0%, #6e0000 100%);
    color: #ffd700;
    padding: 11px 16px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #ffd700;
}
.panel-head .more { font-size: 12px; font-weight: 400; color: #f5e9c8; }
.panel-head .more:hover { color: #fff; }
.panel-body { padding: 16px; }

/* ---------- Banner ---------- */
.banner {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 22px;
    border: 2px solid #8b0000;
    background: #1a1a1a;
}
.banner img { width: 100%; display: block; }
.banner .caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 24px 18px;
    color: #fff;
    background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 100%);
}
.banner .caption h2 { font-size: 24px; color: #ffd700; margin-bottom: 6px; }
.banner .caption p { font-size: 14px; color: #f5e9c8; }

/* ---------- 服务器状态表 ---------- */
.server-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.server-table th, .server-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.server-table th { background: #f7efdf; color: #8b0000; font-weight: 700; }
.server-table tr:hover td { background: #fffaf0; }
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: #fff;
    background: #52a64c;
}
.tag.hot { background: #d9382e; }
.tag.new { background: #e8890c; }

/* ---------- 列表 ---------- */
.list li {
    padding: 9px 4px;
    border-bottom: 1px dashed #e2d7c2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.list li:last-child { border-bottom: 0; }
.list a {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}
.list a:hover { color: #8b0000; }
.list .date { color: #999; font-size: 12px; flex: 0 0 auto; }
.list .dot::before {
    content: "▶";
    color: #c9a86a;
    font-size: 10px;
    margin-right: 8px;
}

/* ---------- 文章 ---------- */
.article { background: #fff; border-radius: 6px; padding: 28px 30px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.article h1 {
    font-size: 24px;
    color: #8b0000;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 14px;
}
.article .info {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
    margin-bottom: 22px;
}
.article .info span { margin: 0 8px; }
.article p { margin-bottom: 16px; text-indent: 2em; line-height: 2; font-size: 15px; color: #444; }
.article h2 {
    font-size: 19px;
    color: #8b0000;
    margin: 26px 0 12px;
    padding-left: 12px;
    border-left: 5px solid #ffd700;
}
.article h3 { font-size: 16px; color: #5c1010; margin: 18px 0 8px; }
.article ul, .article ol { margin: 0 0 16px 2em; }
.article li { list-style: disc; margin-bottom: 8px; }
.article ol li { list-style: decimal; }
.article .highlight {
    background: #fffaf0;
    border: 1px solid #f0e0b0;
    border-left: 4px solid #e8890c;
    padding: 14px 18px;
    margin: 18px 0;
    border-radius: 4px;
    color: #6b4a12;
}

/* ---------- 下载按钮 ---------- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(180deg, #ff8c00 0%, #d9382e 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(217,56,46,.4);
    transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(217,56,46,.5); color: #fff; text-decoration: none; }
.btn-block { display: block; text-align: center; width: 100%; }

/* ---------- 侧栏小组件 ---------- */
.widget { margin-bottom: 22px; background: #fff; border: 1px solid #e0d3ba; border-radius: 6px; overflow: hidden; }
.widget-head {
    background: #f7efdf;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #8b0000;
    border-bottom: 2px solid #e8890c;
}
.widget-body { padding: 14px; }

/* ---------- 翻页 ---------- */
.pager { text-align: center; margin: 26px 0; }
.pager a, .pager span {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 3px;
    border: 1px solid #d9c9a6;
    border-radius: 3px;
    color: #8b0000;
    background: #fff;
}
.pager .current, .pager a:hover { background: #8b0000; color: #fff; border-color: #8b0000; text-decoration: none; }

/* ---------- 面包屑 ---------- */
.crumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #eee;
}
.crumb a { color: #8b0000; }

/* ---------- 页脚 ---------- */
.footer {
    background: #1a1a1a;
    color: #c9a86a;
    padding: 30px 0 20px;
    margin-top: 30px;
    border-top: 4px solid #8b0000;
    font-size: 13px;
}
.footer .inner { max-width: 1180px; margin: 0 auto; padding: 0 15px; }
.footer .links { text-align: center; margin-bottom: 14px; }
.footer .links a { color: #c9a86a; margin: 0 10px; }
.footer .links a:hover { color: #ffd700; }
.footer .copy { text-align: center; color: #888; line-height: 2; }
.footer .copy a { color: #888; }

/* ---------- 首页特性 ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.feature {
    background: #fff;
    border: 1px solid #e0d3ba;
    border-radius: 6px;
    padding: 18px 14px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.feature .ico { font-size: 34px; margin-bottom: 8px; }
.feature h4 { color: #8b0000; margin-bottom: 6px; font-size: 15px; }
.feature p { font-size: 12px; color: #777; }

/* ---------- 新闻列表页 ---------- */
.news-list .item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed #e2d7c2;
}
.news-list .item:last-child { border-bottom: 0; }
.news-list .thumb {
    flex: 0 0 180px;
    height: 120px;
    background: #f5f0e8;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}
.news-list .txt { flex: 1; }
.news-list .txt h3 { font-size: 17px; margin-bottom: 6px; }
.news-list .txt h3 a { color: #8b0000; }
.news-list .txt .meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.news-list .txt .desc { font-size: 13px; color: #666; line-height: 1.7; }

/* ---------- 返回顶部 ---------- */
#toTop {
    position: fixed;
    right: 24px;
    bottom: 40px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: #8b0000;
    color: #ffd700;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
    z-index: 99;
}
#toTop:hover { background: #d9382e; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .wrap { flex-direction: column; }
    .sidebar { flex: 1 1 auto; width: 100%; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .news-list .thumb { flex: 0 0 120px; height: 80px; font-size: 30px; }
    .logo { font-size: 22px; }
    .header-meta { display: none; }
}
@media (max-width: 600px) {
    .topbar .inner { flex-direction: column; gap: 4px; }
    .nav a { padding: 10px 12px; font-size: 14px; }
    .article { padding: 18px 14px; }
    .article h1 { font-size: 19px; }
    .features { grid-template-columns: 1fr; }
    .news-list .item { flex-direction: column; }
    .news-list .thumb { flex: 1 1 auto; width: 100%; height: 100px; }
}

/* ---------- 站内搜索 ---------- */
.search-box { display: flex; }
.search-box input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d9c9a6;
    border-right: 0;
    border-radius: 3px 0 0 3px;
    font-size: 13px;
}
.search-box button {
    padding: 0 16px;
    background: #8b0000;
    color: #ffd700;
    border: 0;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    font-weight: 700;
}

/* ---------- 表格通用 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.table th, .table td { padding: 10px; border: 1px solid #e0d3ba; text-align: left; }
.table th { background: #f7efdf; color: #8b0000; }
.table tr:nth-child(even) td { background: #fdfaf4; }
