* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #121212; /* 改为深黑背景 */
    font-size: 14px;
    line-height: 1.8;
    color: #e0e0e0; /* 改为浅灰色文字，避免纯白刺眼 */
    font-family: Arial, Helvetica, sans-serif;
}

a {
    text-decoration: none;
    color: #c89b3c; /* 默认链接带点金 */
    transition: all .3s ease;
}

a:hover {
    color: #f1d592; /* 悬停时变为亮金 */
}

ul {
    list-style: none;
}

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

.container {
    width: 980px;
    margin: 0 auto;
}

/* 头部导航区域 */
.top {
    width: 100%;
    background: #1d1d1d; /* 保持深黑 */
    border-bottom: 3px solid #c89b3c; /* 标志性金边 */
}

.header-wrap {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 58px;
}

.nav ul {
    display: flex;
    align-items: center;
}

.nav li {
    margin-left: 12px;
}

.nav a {
    display: block;
    padding: 10px 18px;
    color: #e0e0e0;
    font-size: 15px;
    border-radius: 4px;
}

.nav a:hover,
.nav a.active {
    background: #c89b3c;
    color: #121212; /* 激活时字变暗，对比度更好 */
    font-weight: bold;
}

.main {
    padding: 12px 0 25px;
}

/* 轮播图区域 */
.banner {
    margin-bottom: 18px;
}

.banner-box {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(200, 155, 60, 0.15); /* 金色微光阴影 */
}

.banner-box img {
    width: 100%;
    height: 456px;
    object-fit: cover;
}

/* 卡片区域 */
.card-list {
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
}

.card {
    position: relative;
    width: 32%;
    height: 370px;
    overflow: hidden;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
    border: 1px solid #2a2a2a;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(200, 155, 60, 0.3); /* 鼠标悬停金色光晕 */
    border-color: #c89b3c;
}

.card1 { background-image: url("../images/abg1.jpg"); }
.card2 { background-image: url("../images/abg2.jpg"); }
.card3 { background-image: url("../images/abg3.jpg"); }

.card-mask {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 25px 20px;
    background: linear-gradient(
        to top,
        rgba(18,18,18,0.95), /* 渐变改为黑色 */
        rgba(18,18,18,0)
    );
    color: #fff;
}

.card-mask h2 {
    font-size: 24px;
    margin-bottom: 6px;
    color: #c89b3c; /* 标题用金字 */
}

.card-mask p {
    font-size: 14px;
    color: rgba(255,255,255,.85);
}

/* 简介区域 */
.intro {
    padding: 28px;
    background: #3f3f3f; /* 改为深灰黑色背景 */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    border: 1px solid #2a2a2a;
}

.intro h1 {
    margin-bottom: 18px;
    font-size: 30px;
    color: #c89b3c; /* 改为金字 */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.intro p {
    margin-bottom: 16px;
    color: #ccc;
    line-height: 2;
    text-indent: 2em;
}

/* 页脚区域 */
.footer {
    padding: 30px 0;
    background: #0a0a0a; /* 更深的纯黑 */
    border-top: 1px solid #2a2a2a;
}

.footer-banner {
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #c89b3c; /* 给页脚广告图描金边 */
}

.footer-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-text {
    text-align: center;
}

.footer-text p {
    margin-bottom: 8px;
    color: rgba(255,255,255,.6);
    font-size: 13px;
    line-height: 24px;
}

.footer-text a {
    color: #c89b3c;
}

/* 移动端响应式 (1024px) */
@media screen and (max-width: 1024px) {
    .container { width: 94%; }
    .header-wrap {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }
    .nav li { margin: 5px; }
    .card-list { flex-direction: column; }
    .card { width: 100%; margin-bottom: 15px; }
    .intro h1 { font-size: 24px; }
}

/* 文章详情页样式 */
.article-page {
    margin-bottom: 30px;
    margin-top: 20px;
}

.article-box {
    background: #3f3f3f; /* 改为深灰色 */
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    border: 1px solid #2a2a2a;
    margin-bottom: 25px;
}

.article-title, .article-box h1 {
    font-size: 34px;
    color: #c89b3c; /* 改为金字 */
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.article-meta {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 35px;
}

.article-content {
    font-size: 17px;
    color: #dcdcdc; /* 提亮正文字体 */
    line-height: 2.1;
}

.article-content h2 {
    font-size: 24px;
    color: #c89b3c;
    margin-top: 30px;
    margin-bottom: 18px;
    border-left: 5px solid #c89b3c;
    padding-left: 12px;
}

.article-content p {
    margin-bottom: 22px;
    text-indent: 2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px auto;
    display: block;
    border: 1px solid #333;
}

.article-image {
    margin: 30px 0;
    overflow: hidden;
    border-radius: 8px;
}

.article-image img {
    width: 100%;
    height: auto;
    transition: transform .4s ease;
}

.article-image img:hover {
    transform: scale(1.02);
}

/* 列表/详情响应式 (768px) */
@media screen and (max-width: 768px) {
    .article-box { padding: 22px; }
    .article-box h1, .article-title { font-size: 26px; }
    .article-content h2 { font-size: 20px; }
    .article-content { font-size: 16px; }
}

/* 轮播图控制元素 */
.banner-slider {
    position: relative;
    width: 100%;
    height: 456px;
    overflow: hidden;
    border-radius: 8px;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 456px;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid #c89b3c; /* 按钮加金边 */
    border-radius: 50%;
    background: rgba(18,18,18,0.7); /* 暗色底 */
    color: #c89b3c; /* 金色箭头 */
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    transition: .3s;
}

.slider-btn:hover {
    background: #c89b3c;
    color: #121212;
}

.prev { left: 15px; }
.next { right: 15px; }

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

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

.dot.active {
    background: #c89b3c; /* 激活点变金 */
    transform: scale(1.2);
}

.slide-content {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 35px 40px;
    background: linear-gradient(
        to top,
        rgba(18,18,18,0.9),
        rgba(18,18,18,0)
    );
    color: #fff;
    z-index: 5;
}

.slide-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #c89b3c; /* 轮播标题金字 */
}

.slide-content p {
    font-size: 15px;
    color: rgba(255,255,255,.86);
    line-height: 1.8;
}

/* 列表与侧边栏 */
.article-layout { margin-top: 20px; }
.article-list { width: 100%; }

.post-item {
    display: flex;
    gap: 20px;
    background: #3f3f3f; /* 深黑灰 */
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
    border: 1px solid #2a2a2a;
    transition: .3s;
}

.post-item:hover {
    transform: translateY(-4px);
    border-color: #c89b3c;
    box-shadow: 0 4px 12px rgba(200, 155, 60, 0.15);
}

.post-thumb {
    width: 260px;
    flex-shrink: 0;
}

.post-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
}

.post-content { flex: 1; }
.post-content h2 { margin-bottom: 10px; }
.post-content h2 a {
    font-size: 24px;
    color: #e0e0e0;
}

.post-content h2 a:hover { color: #c89b3c; }
.post-meta {
    margin-bottom: 12px;
    font-size: 13px;
    color: #777;
}

.post-content p {
    color: #aaa;
    line-height: 1.9;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    padding: 8px 18px;
    background: #c89b3c;
    color: #121212;
    border-radius: 4px;
    font-weight: bold;
}

.read-more:hover { opacity: .9; background: #f1d592; }

/* 分页组件 */
.pagination {
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    background: #1d1d1d; /* 深色底 */
    border-radius: 4px;
    color: #ccc;
    border: 1px solid #2a2a2a;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.pagination a:hover {
    border-color: #c89b3c;
    color: #c89b3c;
}

.pagination .now-page {
    background: #c89b3c;
    color: #121212;
    font-weight: bold;
    border-color: #c89b3c;
}

/* 侧边栏盒子 */
.side-box {
    background: #3f3f3f;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
    border: 1px solid #2a2a2a;
}

.side-box h3 {
    margin-bottom: 18px;
    font-size: 24px;
    color: #c89b3c; /* 金色标题 */
    border-left: 5px solid #c89b3c;
    padding-left: 12px;
}

.random-list li {
    margin-bottom: 14px;
    line-height: 1.9;
}

.random-list li a {
    color: #ccc;
}

.random-list li a:hover {
    color: #c89b3c;
}

.side-date {
    display: inline-block;
    margin-right: 10px;
    color: #666;
    font-size: 13px;
}

/* 标签云与文章标签 */
.tag-cloud, .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.article-tags {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #2a2a2a;
}

.article-tags span {
    font-weight: bold;
    color: #c89b3c;
}

.tag-cloud a, .article-tags a {
    display: inline-block;
    padding: 8px 14px;
    background: #252525; /* 深色标签底 */
    border-radius: 4px;
    color: #aaa;
    border: 1px solid #333;
    transition: .3s;
}

.tag-cloud a:hover, .article-tags a:hover {
    background: rgba(200, 155, 60, 0.1);
    border-color: #c89b3c;
    color: #c89b3c;
}

/* 上一篇下一篇 */
.article-prev-next {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #2a2a2a;
    color: #888;
}

.article-prev-next div {
    margin-bottom: 14px;
    font-size: 16px;
    line-height: 1.8;
}

.article-prev-next a { color: #c89b3c; }
.article-prev-next a:hover { text-decoration: underline; color: #f1d592; }

/* 响应式适配 */
@media screen and (max-width: 768px){
    .post-item, .article-layout { flex-direction: column; }
    .post-thumb, .article-list, .sidebar { width: 100%; }
}

/* 最新文章区域 (首页专用) */
.latest-posts {
    margin-top: 28px;
    margin-bottom: 35px;
}

.section-title { margin-bottom: 22px; }
.section-title h2 {
    position: relative;
    font-size: 30px;
    color: #c89b3c; /* 主页“最新文章”标题改金 */
    padding-left: 16px;
}

.section-title h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 6px;
    height: 34px;
    background: #c89b3c;
    border-radius: 3px;
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.latest-item {
    background:#3f3f3f; /* 改为深色底 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
    border: 1px solid #2a2a2a;
    transition: .3s;
}

.latest-item:hover {
    transform: translateY(-5px);
    border-color: #c89b3c;
    box-shadow: 0 4px 12px rgba(200, 155, 60, 0.2);
}

.latest-thumb { overflow: hidden; }
.latest-thumb img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform .4s ease;
}

.latest-item:hover img { transform: scale(1.05); }
.latest-item h3 { padding: 18px; line-height: 1.8; }
.latest-item h3 a {
    font-size: 20px;
    color: #e0e0e0;
}

.latest-item h3 a:hover { color: #c89b3c; }

@media screen and (max-width:768px){
    .latest-grid { grid-template-columns: 1fr; }
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #1d1d1d;
    border-radius: 8px;
    font-size: 14px;
    color: #888;
    border: 1px solid #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.breadcrumb a { color: #c89b3c; }