/*
Theme Name: 国内炒黄金正规平台榜单
Theme URI: https://guoneichaohuangjin.com.cn/
Author: site
Author URI: https://guoneichaohuangjin.com.cn/
Description: 围绕"国内炒黄金的正规平台"关键词的 SEO 科普主题：首页正规渠道榜单、文章列表、文章详情，墨绿+金色视觉，百度收录友好。
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.2
License: GNU General Public License v2 or later
Text Domain: guoneichaohuangjin
*/

/* ===== 变量与基础 ===== */
:root {
    --gold: #c9a227;
    --gold-dark: #a8861d;
    --gold-light: rgba(201, 162, 39, 0.12);
    --deep: #14332a;
    --deep-2: #0e2b22;
    --cream: #f4f5ef;
    --cream-2: #fafbf6;
    --text: #2b2b2b;
    --muted: #6b7280;
    --border: #e7e8e0;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Tahoma, Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    font-size: 15px;
}

a { color: var(--deep); text-decoration: none; transition: color .25s; }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; }

/* ===== 顶部行情条 ===== */
.top-ticker {
    background: linear-gradient(90deg, #a8861d, var(--gold), #e2c463);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    padding: 7px 0;
    letter-spacing: .4px;
}
.top-ticker .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 18px; }
.top-ticker i { margin-right: 5px; opacity: .92; }

/* ===== 导航 ===== */
.navbar { background: var(--deep); box-shadow: 0 2px 12px rgba(14, 43, 34, .28); padding: 12px 0; }
.navbar-brand { color: var(--gold) !important; font-weight: 800; font-size: 1.28rem; letter-spacing: .4px; }
.navbar-brand small { display: block; font-size: .66rem; color: rgba(255,255,255,.5); font-weight: 400; letter-spacing: 2.5px; }
.navbar .nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; font-size: .93rem; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--gold) !important; }
.btn-gold {
    background: linear-gradient(135deg, #ddbc4f, var(--gold));
    border: none; color: #1c1c1c; font-weight: 700; padding: 9px 24px;
    border-radius: 6px; box-shadow: 0 4px 14px rgba(201,162,39,.35); transition: all .3s;
}
.btn-gold:hover { transform: translateY(-2px); color: #1c1c1c; box-shadow: 0 8px 20px rgba(201,162,39,.45); }
.btn-outline-gold {
    border: 1.5px solid var(--gold); color: var(--gold-dark); background: transparent;
    font-weight: 600; padding: 6px 18px; border-radius: 6px; transition: all .3s;
}
.btn-outline-gold:hover { background: var(--gold); color: #1c1c1c; }

/* ===== Hero ===== */
.hero-banner {
    background: linear-gradient(135deg, var(--deep) 0%, var(--deep-2) 55%, #1c4a3a 100%);
    color: #fff; text-align: center; padding: 66px 0 60px; position: relative; overflow: hidden;
}
.hero-banner::before {
    content: ''; position: absolute; top: -110px; left: 50%; transform: translateX(-50%);
    width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle, rgba(201,162,39,.18) 0%, transparent 68%);
}
.hero-banner .container { position: relative; z-index: 2; }
.hero-title { font-size: 2.35rem; font-weight: 800; line-height: 1.4; margin-bottom: 14px; }
.hero-title .hl { color: var(--gold); }
.hero-sub { color: rgba(255,255,255,.8); font-size: 1.02rem; margin-bottom: 22px; }
.hero-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.hero-badge {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
    border-radius: 30px; padding: 5px 15px; font-size: .82rem; color: rgba(255,255,255,.92);
}
.hero-badge i { color: var(--gold); margin-right: 5px; }

/* ===== 区块通用 ===== */
.section-title {
    font-size: 1.32rem; font-weight: 800; color: var(--deep);
    padding: 10px 0 10px 16px; margin-bottom: 20px; position: relative;
}
.section-title::before {
    content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--gold), var(--gold-dark));
}
.bg-gold-light { background: linear-gradient(160deg, #fbf7ea, #f6efd8); }

/* ===== 榜单卡 ===== */
.card-platform { border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 2px 10px rgba(20,51,42,.05); transition: all .3s; }
.card-platform:hover { box-shadow: 0 10px 24px rgba(20,51,42,.12); transform: translateY(-3px); }
.platform-header-left { display: flex; align-items: center; gap: 14px; }
.top-badge { border-radius: 8px; padding: 7px 13px; font-weight: 800; font-size: .82rem; letter-spacing: .6px; }
.top-badge.rank-1 { background: linear-gradient(135deg, #e7c65a, #c9a227); color: #3a2f06; box-shadow: 0 4px 12px rgba(201,162,39,.4); }
.top-badge.rank-2 { background: linear-gradient(135deg, #cfd3d0, #aab2ae); color: #333; }
.top-badge.rank-3 { background: linear-gradient(135deg, #e3b184, #c98a4b); color: #3f2410; }
.top-badge.rank-normal { background: #eef0ea; color: #5c615b; }
.platform-logo-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;              /* 关键：让图片也被裁成圆形 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5efe0;           /* logo 透明背景时兜底色 */
    flex-shrink: 0;
}

.platform-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;             /* 关键：等比填充，不变形 */
    display: block;
}

.platform-logo-circle.lg-1 { background: linear-gradient(135deg, #1f5c46, #0e2b22); }
.platform-logo-circle.lg-2 { background: linear-gradient(135deg, #c9a227, #8a6c14); }
.platform-logo-circle.lg-3 { background: linear-gradient(135deg, #3d6b8f, #1c3f5c); }
.platform-logo-circle.lg-4 { background: linear-gradient(135deg, #7a5aa8, #4a3380); }
.platform-logo-circle.lg-5 { background: linear-gradient(135deg, #b0603c, #7a3c22); }

.platform-name { font-size: 1.18rem; font-weight: 800; color: var(--deep); }
.rating-stars { color: var(--gold); font-size: .92rem; letter-spacing: 2px; }
.rating-stars .far { color: #cfd3c8; }
.platform-desc { color: #4b5563; font-size: .93rem; }
.platform-meta { font-size: .86rem; color: var(--muted); }
.platform-meta strong { color: var(--deep); }
.hl-dot { color: var(--gold); font-weight: 700; }

/* ===== FAQ ===== */
.faq-list .faq-item { padding: 16px 4px; border-bottom: 1px dashed var(--border); }
.faq-list .faq-item:last-child { border-bottom: none; }
.faq-question { font-weight: 700; color: var(--deep); cursor: pointer; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.faq-q-num {
    width: 24px; height: 24px; line-height: 24px; text-align: center; flex-shrink: 0;
    background: var(--gold-dark); color: #fff; border-radius: 50%; font-weight: 700; font-size: 12px;
}
.faq-answer { color: #4b5563; font-size: .92rem; padding-left: 32px; }

/* ===== 侧边栏 ===== */
.right-sidebar-card {
    background: var(--white); border: 1px solid var(--border); border-radius: 14px;
    padding: 22px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(20,51,42,.04);
}
.right-sidebar-card h4 { font-size: 1.02rem; font-weight: 800; color: var(--deep); margin-bottom: 14px; }
.right-sidebar-card .small, .right-sidebar-card small { font-size: .85rem; }
.news-item { padding: 9px 0; border-bottom: 1px dashed var(--border); }
.news-item:last-child { border-bottom: none; }
.news-item a { font-weight: 600; color: #222; font-size: .9rem; line-height: 1.5; display: block; }
.news-item a:hover { color: var(--gold-dark); }
.news-item .small { color: var(--muted); font-size: .78rem; }
.cat-item { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.cat-item a { font-weight: 600; color: #222; }
.cat-item a:hover { color: var(--gold-dark); }
.cat-item .badge { background: var(--gold-light); color: var(--gold-dark); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    background: var(--cream); border: 1px solid var(--border); border-radius: 20px;
    padding: 4px 13px; font-size: .8rem; color: #4b5563; transition: all .25s;
}
.tag-cloud a:hover { background: var(--gold); color: #1c1c1c; border-color: var(--gold); }

/* ===== 文章列表页 ===== */
.post-card {
    background: var(--white); border: 1px solid var(--border); border-radius: 12px;
    padding: 22px; margin-bottom: 18px; transition: all .3s;
}
.post-card:hover { box-shadow: 0 8px 20px rgba(20,51,42,.1); transform: translateY(-3px); }
.post-card .post-title { font-size: 1.14rem; font-weight: 800; color: var(--deep); margin-bottom: 8px; }
.post-card .post-title a { color: var(--deep); }
.post-card .post-title a:hover { color: var(--gold-dark); }
.post-meta { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.post-meta .sep { margin: 0 6px; color: #c9cec4; }
.post-card .post-excerpt { color: #4b5563; font-size: .9rem; margin-bottom: 12px; }
.post-card .read-more { font-size: .86rem; font-weight: 700; color: var(--gold-dark); }
.post-card .read-more:hover { color: var(--deep); }
.post-thumb { border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.post-thumb img { width: 100%; display: block; }

/* 分页 */
.pagination { justify-content: center; margin-top: 26px; }
.pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 10px; margin: 0 4px;
    border: 1px solid var(--border); border-radius: 8px; color: var(--deep); font-weight: 600;
}
.pagination .page-numbers.current { background: var(--gold); color: #1c1c1c; border-color: var(--gold); }
.pagination a.page-numbers:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ===== 文章内容页 ===== */
.breadcrumb-bar { font-size: .84rem; color: var(--muted); margin: 18px 0 8px; }
.breadcrumb-bar a { color: var(--muted); }
.breadcrumb-bar a:hover { color: var(--gold-dark); }
.breadcrumb-bar .sep { margin: 0 7px; color: #c9cec4; }
.single-header { padding-bottom: 18px; border-bottom: 2px solid var(--border); margin-bottom: 22px; }
.single-header h1 { font-size: 1.7rem; font-weight: 800; color: var(--deep); line-height: 1.45; }
.single-meta { font-size: .83rem; color: var(--muted); }
.single-meta .cat-badge { background: var(--gold-light); color: var(--gold-dark); padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.single-content { color: #333; font-size: .97rem; line-height: 1.9; }
.single-content h2 { font-size: 1.32rem; font-weight: 800; color: var(--deep); margin: 30px 0 14px; padding-left: 14px; border-left: 5px solid var(--gold); }
.single-content h3 { font-size: 1.12rem; font-weight: 800; color: var(--deep); margin: 24px 0 10px; }
.single-content p { margin-bottom: 16px; }
.single-content ul, .single-content ol { margin-bottom: 16px; padding-left: 24px; }
.single-content li { margin-bottom: 6px; }
.single-content blockquote {
    background: var(--cream); border-left: 5px solid var(--gold); border-radius: 0 8px 8px 0;
    padding: 16px 20px; margin: 20px 0; color: #4b5563;
}
.single-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .9rem; }
.single-content table th { background: var(--deep); color: #fff; padding: 10px 14px; text-align: left; }
.single-content table td { border: 1px solid var(--border); padding: 10px 14px; }
.single-content img { border-radius: 10px; margin: 10px 0; }
.single-tags { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.single-tags a { background: var(--cream); border: 1px solid var(--border); border-radius: 20px; padding: 4px 13px; font-size: .8rem; color: #4b5563; }
.single-tags a:hover { background: var(--gold); color: #1c1c1c; }
.post-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .88rem; }
.post-nav a { font-weight: 600; color: var(--deep); }
.post-nav a:hover { color: var(--gold-dark); }
.related-title { font-size: 1.1rem; font-weight: 800; color: var(--deep); margin: 30px 0 16px; }
.news-section .news-card{transition:transform .2s ease,box-shadow .2s ease;}
.news-section .news-card:hover{transform:translateY(-4px);box-shadow:0 .6rem 1.2rem rgba(201,162,39,.18)!important;}
.news-section .news-thumb{height:130px;position:relative;overflow:hidden;}
.news-section .news-thumb.t-1{background:linear-gradient(135deg,#c9a227 0%,#f0d674 100%);}
.news-section .news-thumb.t-2{background:linear-gradient(135deg,#8a6d1b 0%,#c9a227 100%);}
.news-section .news-thumb.t-3{background:linear-gradient(135deg,#b8860b 0%,#e8c25a 100%);}
.news-section .news-thumb.t-4{background:linear-gradient(135deg,#6b5413 0%,#a98523 100%);}
.news-section .news-thumb.t-5{background:linear-gradient(135deg,#c9a227 0%,#ffe9a8 100%);}
.news-section .news-thumb.t-6{background:linear-gradient(135deg,#7a6112 0%,#c9a227 100%);}
.news-section .news-thumb .news-thumb-icon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:38px;color:rgba(255,255,255,.85);}
.news-section .news-tag{display:inline-block;font-size:11px;font-weight:600;color:#fff;background:#c9a227;padding:2px 9px;border-radius:10px;margin-bottom:8px;}
.news-section .news-title{font-size:15px;font-weight:700;color:#2b2b2b;line-height:1.45;margin-bottom:6px;}
.news-section .news-title:hover{color:#c9a227;}
.news-section .news-desc{font-size:13px;color:#6c757d;line-height:1.6;margin-bottom:10px;}
.news-section .news-meta{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:#9aa0a6;}
.news-section .news-meta i{margin-right:3px;}
.news-section .news-more{text-align:center;margin-top:8px;}
.news-section .news-more a{display:inline-block;padding:8px 26px;border:1px solid #c9a227;color:#c9a227;border-radius:22px;font-size:13px;font-weight:600;text-decoration:none;transition:all .2s ease;}
.news-section .news-more a:hover{background:#c9a227;color:#fff;}
/* ===== 页脚 ===== */
.site-footer { background: var(--deep-2); color: rgba(255,255,255,.72); padding: 46px 0 0; }
.site-footer h5 { color: var(--gold); font-size: .98rem; font-weight: 700; margin-bottom: 16px; letter-spacing: 1px; }
.site-footer a { color: rgba(255,255,255,.72); font-size: .88rem; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { color: var(--gold) !important; font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; }
.footer-desc { font-size: .86rem; color: rgba(255,255,255,.52); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding: 20px 0;
    text-align: center; font-size: .8rem; color: rgba(255,255,255,.45);
}
.footer-bottom a { display: inline; margin: 0 8px; font-size: .8rem; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.08); margin-top: 20px; padding: 16px 0; font-size: .76rem; color: rgba(255,255,255,.4); text-align: center; }

  .chart-section { padding: 48px 0 56px; }
  .container-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

  /* 标题区 */
  .section-head { text-align: center; margin-bottom: 30px; }
  .section-head h2 { font-size: 30px; font-weight: 700; color: #1a202c; letter-spacing: 1px; }
  .section-head p { color: #718096; font-size: 14px; margin-top: 8px; }

  /* 连接状态指示 */
  .status-bar {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #eee;
    padding: 6px 14px; border-radius: 999px; font-size: 12px;
    color: #999; margin-top: 14px;
  }
  .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e0; }
  .status-dot.connecting { background: #d69e2e; animation: pulse 1.2s infinite; }
  .status-dot.live { background: #38a169; box-shadow: 0 0 8px rgba(56,161,105,0.6); }
  .status-dot.fallback { background: #ed8936; }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

  /* 实时价格头 */
  .price-head {
    display: flex; align-items: baseline; justify-content: center; gap: 14px;
    margin-bottom: 24px; flex-wrap: wrap;
  }
  .price-now { font-size: 44px; font-weight: 800; color: #1a202c; font-variant-numeric: tabular-nums; }
  .price-now.up { color: #e53e3e; }
  .price-now.down { color: #3182ce; }
  .price-chg { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: #718096; }
  .price-chg.up { color: #e53e3e; }
  .price-chg.down { color: #3182ce; }

  /* 行情图表容器 */
  .chart-main {
    width: 100%;
    height: 420px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 16px;
    position: relative;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  }
  .chart-main #chart-container { width: 100%; height: 100%; }
  .chart-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #a0aec0; font-size: 14px; pointer-events: none;
  }
  .chart-loading.hide { display: none; }
/* ========== 黄金行情统计卡片样式 ========== */
.chart-stats{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap:20px;
    margin-top:30px;
}
.stat-card{
    background:#fff;
    border-radius:12px;
    padding:26px 20px;
    text-align:center;
    box-shadow:0 2px 12px rgba(0,0,0,0.04);
    border:1px solid #eee;
    transition: 0.25s ease;
}
.stat-card:hover{
    transform: translateY(-4px);
    box-shadow:0 8px 20px rgba(0,0,0,0.06);
}
.stat-label{
    font-size:15px;
    color:#666;
    margin-bottom:12px;
}
.stat-value{
    font-size:28px;
    font-weight:bold;
    margin-bottom:6px;
}
.stat-desc{
    font-size:13px;
    color:#999;
}
/* 涨跌颜色 */
.stat-value.up{
    color:#e53e3e;
}
.stat-value.down{
    color:#3182ce;
}
.stat-value.high{
    color:#d69e2e;
}
.stat-value.low{
    color:#2f855a;
}

/* 行情图表容器间距 */
.chart-main{
    width:100%;
    height:420px;
    background:#fff;
    border-radius:12px;
    border:1px solid #eee;
}

/* ========== 行情板块响应式适配 ========== */
@media(max-width:992px){
    .chart-stats{
        grid-template-columns: repeat(2,1fr);
    }
}
@media(max-width:768px){
    /* 【重点修改】只隐藏行情图表，不要全部mobile-hide隐藏！ */
    .chart-main{
        height:320px;
    }
}
@media(max-width:480px){
    .chart-stats{
        grid-template-columns: 1fr;
    }
}
/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .hero-title { font-size: 1.85rem; }
    .platform-header-left { flex-wrap: wrap; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 1.55rem; }
    .card-platform .d-flex { gap: 10px; }
}
