/* 全局样式 */
body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f5f5f5;
}

.container {
    padding: 20px;
}

/* 页面标题 */
.page-header {
    margin: 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    background: #fff;
    border-radius: 8px;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.card .card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.card .card-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.card .card-body {
    padding: 1.5rem;
}

.card.mb-4 {
    margin-bottom: 2rem !important;
}

/* 价格卡片样式 */
.price-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.price-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.price-title {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 500;
}

.price-value {
    margin-bottom: 10px;
}

.current-price {
    font-size: 24px;
    font-weight: bold;
}

.unit {
    color: #666;
    margin-left: 5px;
}

.price-change {
    font-size: 14px;
    margin-bottom: 5px;
}

.price-prev {
    color: #666;
    font-size: 13px;
}

/* 涨跌颜色 */
.text-success {
    color: #52c41a !important;
}

.text-danger {
    color: #f5222d !important;
}

/* 友情链接样式 */
.friend-links {
    background-color: #f8f9fa;
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.friend-links .links-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid #FF8C00;
    line-height: 1;
}

.friend-links .links-content {
    line-height: 1.8;
}

.friend-links .links-content a {
    display: inline-block;
    color: #666;
    font-size: 12px;
    margin: 0 12px 3px 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.friend-links .links-content a:hover {
    color: #FF8C00;
}

/* 原有页脚样式保持不变 */
.footer {
    background-color: #1c1c1c;
    padding: 20px 0;
    color: #999;
    font-size: 14px;
    line-height: 1.8;
    margin-top: 0;
    /* 由于上面有友情链接，这里margin设为0 */
}

.footer .disclaimer-text {
    margin-bottom: 15px;
    padding: 0 15px;
}

.footer .copyright {
    color: #666;
    font-size: 13px;
}

.footer .icp {
    color: #666;
    font-size: 13px;
    margin: 10px 0 0 0;
}

.footer .icp a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer .icp a:hover {
    color: #FF8C00;
}

/* 新增友情链接和备案号样式 */
.footer .links {
    margin: 15px 0;
}

.footer .links a {
    display: inline-block;
    color: #666;
    font-size: 14px;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer .links a:hover {
    color: #FF8C00;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card {
        border-radius: 6px;
    }

    .card .card-header {
        padding: 1rem;
    }

    .card .card-body {
        padding: 1rem;
    }

    .price-card {
        margin-bottom: 15px;
    }

    .current-price {
        font-size: 20px;
    }

    .price-change {
        font-size: 12px;
    }

    .price-prev {
        font-size: 12px;
    }
}

@media (max-width: 767.98px) {
    .footer {
        padding: 15px 0;
        font-size: 12px;
    }

    .footer .copyright {
        font-size: 12px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

.loading:after {
    content: "...";
    animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: ".";
    }

    40% {
        content: "..";
    }

    60% {
        content: "...";
    }

    80%,
    100% {
        content: "";
    }
}

/* 期货代码查询表单 */
.form-inline {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.form-inline .form-group {
    margin-right: 15px;
}

.form-inline label {
    margin-right: 10px;
}

/* 期货实时数据 */
.futures-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.futures-price {
    font-size: 24px;
    font-weight: bold;
}

.futures-change {
    font-size: 16px;
    margin-left: 10px;
}

.price-up {
    color: #f5222d;
}

.price-down {
    color: #52c41a;
}

.futures-detail {
    color: #666;
    font-size: 14px;
}

/* K线图容器 */
.k-line-chart {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
}

.ma-display {
    position: absolute;
    top: 5px;
    left: 50px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 2px;
    z-index: 1;
}

/* 数据表格 */
.table-responsive {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table {
    margin-bottom: 0;
    font-size: 14px;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 500;
}

.table td {
    vertical-align: middle;
}

/* 按钮样式 */
.btn-primary {
    background-color: #1890ff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* 输入框样式 */
.form-control:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 工具提示样式 */
.tooltip {
    font-size: 12px;
}

/* 按钮组样式 */
.btn-group {
    margin-bottom: 15px;
}

.btn-group .btn {
    min-width: 80px;
}

/* 水印图片样式 */
.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

/* 导航栏样式 */
.top-nav {
    background-color: #2c2c2c;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

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

.nav-logo a {
    display: flex;
    align-items: center;
    color: #ffd700;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.logo-img {
    height: 50px;
    margin-right: 10px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0 15px;
    font-size: 16px;
    line-height: 60px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffd700;
    background-color: #3c3c3c;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #fff;
    transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #2c2c2c;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
    }

    .nav-menu a {
        padding: 10px 20px;
        line-height: 1.5;
        border-top: 1px solid #3c3c3c;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* 添加移动端菜单切换的JavaScript */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 最新文章样式 */
.latest-articles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-articles li {
    padding: 0;
    border-bottom: 1px dashed #eee;
}

.latest-articles li:last-child {
    border-bottom: none;
}

.latest-articles a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.latest-articles a:hover {
    color: #ffd700;
    background-color: #f8f9fa;
}

.latest-articles .fa {
    flex-shrink: 0;
    margin-right: 8px;
    color: #ffd700;
    font-size: 12px;
}

.article-title {
    font-size: 14px;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .latest-articles a {
        padding: 8px;
    }

    .article-title {
        font-size: 13px;
    }

    .gold-brands {
        gap: 6px;
    }

    .brand-item {
        padding: 6px 5px;
        font-size: 12px;
    }
}

/* 实物黄金品牌样式 */
.gold-brands {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 5px;
}

.brand-item {
    color: #666;
    text-decoration: none;
    padding: 8px 5px;
    border-radius: 4px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-item:hover {
    color: #fff;
    background: #ffd700;
    transform: translateY(-2px);
}

/* 容器宽度 */

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}


@media (min-width: 1400px) {
    .container {
        max-width: 1340px;
    }
}

/* 文章列表样式 */
.article-list-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.article-list-item:hover {
    background-color: #f8f9fa;
}

.article-list-item:last-child {
    border-bottom: none;
}

.article-thumb {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.article-thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.article-title {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.article-title a {
    color: #333;
    text-decoration: none;
}

.article-title a:hover {
    color: #007bff;
}

.article-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-meta {
    font-size: 13px;
    color: #999;
}

.article-meta span {
    margin-right: 15px;
}

.meta-category {
    color: #007bff;
}

.meta-date:before {
    content: "\f017";
    font-family: "Font Awesome 5 Free";
    margin-right: 5px;
}

.meta-views:before {
    content: "\f06e";
    font-family: "Font Awesome 5 Free";
    margin-right: 5px;
}

/* 面包屑导航样式 */
.breadcrumb-container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    padding-top: 10px;
    padding-bottom: 0;
}

@media (min-width: 576px) {
    .breadcrumb-container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .breadcrumb-container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .breadcrumb-container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .breadcrumb-container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .breadcrumb-container {
        max-width: 1340px;
    }
}

.breadcrumb-wrapper {
    margin-bottom: 0;
}

.breadcrumb-card {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    padding: 0.5rem 1.25rem;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    display: flex;
    align-items: center;
}

.breadcrumb-item {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #ffd700;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #e6c200;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    color: #6c757d;
    padding: 0 0.5rem;
}

/* 文章样式 */
.article-container {
    padding: 2rem !important;
}

.article-header {
    margin-bottom: 25px;
    text-align: center;
}

/* 文章主标题样式 */
.post-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.post-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, #007bff, #00a0ff);
    border-radius: 3px;
}

.article-meta {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 50px;
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
}

.article-meta span {
    position: relative;
    margin: 0 15px;
}

.article-meta span:not(:last-child):after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background: rgba(0, 0, 0, 0.1);
}

.article-meta i {
    color: #007bff;
    margin-right: 5px;
}

/* 阅读权限提示 */
.read-permission {
    margin: 20px 0;
}

.read-permission .alert {
    display: flex;
    align-items: center;
    justify-content: center;
}

.read-permission .fa-lock {
    margin-right: 10px;
    font-size: 16px;
}

/* 文章内容 */
.article-content {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 1em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 4px;
}

/* 文章内容中的标题样式 */
.article-content h1 {
    font-size: 24px;
    margin: 1.8em 0 1em;
    color: #2c3e50;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.article-content h2 {
    font-size: 22px;
    margin: 1.6em 0 1em;
    color: #2c3e50;
    font-weight: bold;
}

.article-content h3 {
    font-size: 20px;
    margin: 1.4em 0 1em;
    color: #2c3e50;
    font-weight: bold;
}

.article-content h4 {
    font-size: 18px;
    margin: 1.2em 0 1em;
    color: #2c3e50;
    font-weight: bold;
}

.article-content h5 {
    font-size: 16px;
    margin: 1em 0;
    color: #2c3e50;
    font-weight: bold;
}

.article-content h6 {
    font-size: 15px;
    margin: 1em 0;
    color: #2c3e50;
    font-weight: bold;
}

.article-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px dashed #007bff;
}

.article-content a:hover {
    color: #0056b3;
    border-bottom-style: solid;
}

/* 分页样式 */
.article-page {
    margin: 30px 0;
    text-align: center;
}

/* 文章标签 */
.article-tags {
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tags-title {
    color: #666;
    margin-right: 10px;
}

.tag-item {
    display: inline-block;
    padding: 2px 10px;
    margin: 0 5px 5px 0;
    color: #666;
    background: #f8f9fa;
    border-radius: 3px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-item:hover {
    color: #fff;
    background: #007bff;
    text-decoration: none;
}

/* 上一篇下一篇导航 */
.article-nav {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nav-item {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.nav-label {
    color: #333;
    font-weight: bold;
    margin-right: 10px;
}

.nav-item a {
    color: #666;
    text-decoration: none;
}

.nav-item a:hover {
    color: #007bff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .article-container {
        padding: 1.5rem !important;
    }

    .post-title {
        font-size: 22px;
    }

    .article-meta {
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px 12px;
    }

    .article-meta span {
        margin: 5px 10px;
    }

    .article-meta span:not(:last-child):after {
        display: none;
    }

    .article-content {
        font-size: 15px;
    }

    .article-content h1 {
        font-size: 20px;
    }

    .article-content h2 {
        font-size: 19px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .article-content h4 {
        font-size: 17px;
    }

    .article-content h5 {
        font-size: 16px;
    }

    .article-content h6 {
        font-size: 15px;
    }

    .nav-item {
        font-size: 13px;
    }
}

/* 金价表格专用样式 */
.gold-price-table {
    width: 98%;
    padding: 0;
    margin: 0 auto 30px;
    border-top: 1px solid #CFB53B;
    border-left: 1px solid #CFB53B;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    position: relative;
}

.gold-price-table caption {
    width: 100%;
    background: #CFB53B;
    color: #FFFFFF;
    padding: 10px 0;
    text-align: center;
    font-size: 16px;
    caption-side: top;
    border-bottom: none;
}

.gold-price-table tbody {
    border-top: none;
}

.gold-price-table td {
    padding: 12px;
    text-align: center;
    border-right: 1px solid #CFB53B;
    border-bottom: 1px solid #CFB53B;
    color: #333;
    background: #fff;
}

.gold-price-table tr:first-child td {
    background: #fff9f2;
    font-weight: bold;
}

.price-note {
    color: #999;
    text-align: center;
    margin: 10px 0 20px;
    font-size: 12px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .gold-price-table {
        width: 100%;
    }

    .gold-price-table td {
        padding: 8px;
        font-size: 14px;
    }

    .gold-price-table caption {
        font-size: 14px;
        padding: 8px 0;
    }
}

/* 最新文章列表样式 */
.latest-article-item {
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.latest-article-item:first-child {
    padding-top: 0;
}

.latest-article-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.latest-article-thumb {
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.latest-article-thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.latest-article-thumb:hover img {
    transform: scale(1.05);
}

.latest-article-title {
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.latest-article-title a:hover {
    color: #007bff !important;
}

.latest-article-desc {
    margin-top: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

/* 首页最新文章列表独特样式 */
.home-latest-articles {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.home-article-block {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.home-article-block:last-child {
    border-bottom: none;
}

.home-article-image {
    width: 200px;
    height: 120px;
    margin-right: 20px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.home-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.home-article-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.home-article-title {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.home-article-title a {
    color: #333;
    text-decoration: none;
}

.home-article-title a:hover {
    color: #007bff;
}

.home-article-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 10px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-article-footer {
    color: #999;
    font-size: 13px;
}

.home-article-footer span {
    margin-right: 15px;
}

.home-article-category {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .home-article-image {
        width: 120px;
        height: 90px;
        margin-right: 15px;
    }

    .home-article-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .home-article-desc {
        font-size: 13px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .home-article-footer {
        font-size: 12px;
    }

    .home-article-footer span {
        margin-right: 10px;
    }
}