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

:root {
    --primary: #c9a227;
    --primary-dark: #8b7210;
    --secondary: #1a1a2e;
    --accent: #e94560;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --text-light: #eaeaea;
    --text-gray: #999;
    --border-color: #2a2a4a;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========== 顶部公告 ========== */
.top-bar {
    background: linear-gradient(90deg, #0a0a14, #1a1a2e, #0a0a14);
    padding: 8px 0;
    text-align: center;
    font-size: 13px;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
}

/* ========== 头部 ========== */
.header {
    padding: 20px 0;
    background: var(--secondary);
    border-bottom: 2px solid var(--primary-dark);
}

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

.logo h1 a {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo h1 a span {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 400;
}

.search-box form {
    display: flex;
    gap: 0;
}

.search-box input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    color: var(--text-light);
    border-radius: 4px 0 0 4px;
    width: 250px;
    outline: none;
    font-size: 14px;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    padding: 10px 20px;
    border: none;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ========== 导航 ========== */
.nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav ul {
    display: flex;
    gap: 0;
}

.nav ul li a {
    display: block;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 500;
    position: relative;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav ul li a:hover::after,
.nav ul li.active a::after {
    width: 80%;
}

.nav ul li.active a {
    color: var(--primary);
}

/* ========== 轮播Banner ========== */
.banner {
    position: relative;
    margin: 20px 0;
}

.banner-slider {
    position: relative;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-item.active {
    opacity: 1;
}

.banner-item:nth-child(1) {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.banner-item:nth-child(2) {
    background: linear-gradient(135deg, #2d1b69 0%, #11052c 50%, #4a2d8f 100%);
}

.banner-item:nth-child(3) {
    background: linear-gradient(135deg, #4a044e 0%, #2a001e 50%, #6b0f6b 100%);
}

.banner-content {
    text-align: center;
    z-index: 2;
}

.banner-content h2 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    padding: 12px 35px;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 16px;
}

.btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 162, 39, 0.4);
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--primary);
}

/* ========== 通用Section ========== */
.section {
    padding: 40px 0;
}

.section.bg-light {
    background: rgba(255,255,255,0.02);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 22px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 .icon {
    font-size: 24px;
}

.more {
    color: var(--text-gray);
    font-size: 14px;
}

.more:hover {
    color: var(--primary);
}

/* ========== 开服列表 ========== */
.server-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.server-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.server-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.server-tag {
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 15px;
    min-width: 45px;
    text-align: center;
}

.server-tag.hot {
    background: var(--accent);
    color: #fff;
}

.server-tag.new {
    background: #4caf50;
    color: #fff;
}

.server-info {
    flex: 1;
}

.server-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-light);
}

.server-info p {
    font-size: 13px;
    color: var(--text-gray);
}

.server-btn {
    padding: 8px 20px;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.server-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ========== 文章网格 ========== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.article-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.article-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.article-thumb {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.article-body {
    padding: 15px;
}

.article-body h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-body h3 a:hover {
    color: var(--primary);
}

.article-meta {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.article-desc {
    font-size: 13px;
    color: #bbb;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 下载区 ========== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.download-item {
    text-align: center;
    padding: 25px 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.download-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.download-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.download-item h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.download-item p {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.dl-btn {
    display: inline-block;
    padding: 8px 25px;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.dl-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ========== 页脚 ========== */
.footer {
    background: var(--secondary);
    padding: 40px 0 20px;
    margin-top: 40px;
    border-top: 2px solid var(--primary-dark);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 15px;
}

.footer-col p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    font-size: 13px;
    color: var(--text-gray);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-gray);
}

.footer-bottom a {
    color: var(--primary);
}

/* ========== 栏目页通用 ========== */
.page-header {
    background: linear-gradient(135deg, var(--secondary), var(--bg-card));
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 28px;
    color: var(--primary);
}

.page-header p {
    color: var(--text-gray);
    margin-top: 10px;
}

.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ========== 文章列表页 ========== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-list-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.article-list-item:hover {
    border-color: var(--primary);
}

.article-list-thumb {
    width: 180px;
    height: 120px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.article-list-body {
    flex: 1;
}

.article-list-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.article-list-body h3 a:hover {
    color: var(--primary);
}

.article-list-body .article-meta {
    margin-bottom: 10px;
}

.article-list-body .article-desc {
    font-size: 14px;
    -webkit-line-clamp: 2;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a {
    display: inline-block;
    padding: 8px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-light);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* ========== 文章详情页 ========== */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-detail-header h1 {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-detail-body {
    font-size: 16px;
    line-height: 1.9;
}

.article-detail-body p {
    margin-bottom: 18px;
    color: #d0d0d0;
}

.article-detail-body h2 {
    font-size: 20px;
    color: var(--primary);
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 4px solid var(--primary);
}

.article-detail-body h3 {
    font-size: 18px;
    color: var(--text-light);
    margin: 25px 0 12px;
}

.article-detail-body ul,
.article-detail-body ol {
    margin-bottom: 18px;
    padding-left: 25px;
}

.article-detail-body li {
    margin-bottom: 8px;
    color: #d0d0d0;
    list-style: disc;
}

.article-detail-body strong {
    color: var(--primary);
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-widget ul li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-widget ul li a {
    font-size: 14px;
    color: var(--text-light);
}

.sidebar-widget ul li a:hover {
    color: var(--primary);
}

.sidebar-widget ul li span {
    font-size: 12px;
    color: var(--text-gray);
    display: block;
    margin-top: 3px;
}

/* ========== 布局 ========== */
.layout-with-sidebar {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.layout-with-sidebar .main-content {
    flex: 1;
}

/* ========== 搜索页 ========== */
.search-result-item {
    padding: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.search-result-item h3 a {
    color: var(--primary);
}

.search-result-item p {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .search-box input {
        width: 200px;
    }

    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .banner-slider {
        height: 250px;
    }

    .banner-content h2 {
        font-size: 24px;
    }

    .layout-with-sidebar {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .article-list-item {
        flex-direction: column;
    }

    .article-list-thumb {
        width: 100%;
        height: 100px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
