/* ============================================
   比特币价格网 btbjg.com - 全站样式
   主色：比特币橙 #f7931a | 红涨绿跌（中文习惯）
   ============================================ */
:root {
  --orange: #f7931a;
  --orange-dark: #d97e0f;
  --orange-light: #fff4e5;
  --dark: #14171f;
  --dark2: #1d2230;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #23262f;
  --muted: #6b7280;
  --up: #e0342f;      /* 涨-红 */
  --up-bg: #fdecec;
  --down: #17a05c;    /* 跌-绿 */
  --down-bg: #e8f7ef;
  --border: #e6e8ec;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 23, 31, .06), 0 4px 16px rgba(20, 23, 31, .05);
  --maxw: 1160px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}
a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; vertical-align: middle; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo .logo-sub { font-size: 12px; font-weight: 400; color: #9aa1b0; margin-left: 2px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: #cfd4de;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 15px;
  white-space: nowrap;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.main-nav a.active { color: var(--orange); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1a1d28 0%, #2a2136 55%, #3d2a14 100%);
  color: #fff;
  padding: 52px 0 46px;
  text-align: center;
}
.hero h1 { font-size: 30px; font-weight: 700; margin-bottom: 8px; }
.hero .hero-desc { color: #aab1c0; max-width: 720px; margin: 0 auto; font-size: 15px; }
.price-hero-main {
  font-size: clamp(40px, 8vw, 66px);
  font-weight: 800;
  letter-spacing: 1px;
  margin: 22px 0 4px;
  font-variant-numeric: tabular-nums;
}
.price-hero-unit { font-size: 20px; color: var(--orange); font-weight: 600; margin-right: 8px; }
.price-hero-cny { font-size: 17px; color: #c4cad6; margin-bottom: 14px; }
.price-hero-cny strong { color: #fff; font-variant-numeric: tabular-nums; }
.hero-meta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 14px; color: #9aa1b0; }
.hero-meta .update-time { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--down); display: inline-block; animation: pulse 1.6s infinite; }
.dot.live { background: #35d07f; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.chg-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 15px;
}
.chg-up { background: var(--up); color: #fff; }
.chg-down { background: var(--down); color: #fff; }

/* ---------- 通用 Section ---------- */
.section { padding: 44px 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 23px; font-weight: 700; position: relative; padding-left: 14px; }
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px;
  background: var(--orange); border-radius: 3px;
}
.section-head .more { font-size: 14px; color: var(--muted); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card { text-align: left; padding: 18px 20px; }
.stat-card .stat-label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-card .stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.num { font-variant-numeric: tabular-nums; }
.c-up { color: var(--up); }
.c-down { color: var(--down); }

/* ---------- 双币种入口卡 ---------- */
.fx-card { display: flex; flex-direction: column; gap: 6px; transition: transform .15s, box-shadow .15s; }
.fx-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(20,23,31,.12); text-decoration: none; }
.fx-card .fx-head { display: flex; justify-content: space-between; align-items: center; }
.fx-card .fx-name { font-weight: 700; font-size: 16px; color: var(--text); }
.fx-card .fx-tag { font-size: 12px; color: var(--orange-dark); background: var(--orange-light); padding: 2px 10px; border-radius: 999px; }
.fx-card .fx-price { font-size: 30px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.fx-card .fx-price small { font-size: 15px; color: var(--muted); font-weight: 400; margin-right: 6px; }
.fx-card .fx-foot { font-size: 13px; color: var(--muted); }

/* ---------- 快捷入口 ---------- */
.quick-item { display: flex; gap: 14px; align-items: flex-start; transition: transform .15s; }
.quick-item:hover { transform: translateY(-3px); text-decoration: none; }
.quick-item .q-icon {
  width: 42px; height: 42px; flex: none; border-radius: 10px;
  background: var(--orange-light); display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.quick-item h3 { font-size: 16px; color: var(--text); margin-bottom: 2px; }
.quick-item p { font-size: 13px; color: var(--muted); }

/* ---------- 资讯列表 ---------- */
.news-item { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.news-item:hover { transform: translateY(-3px); }
.news-item .n-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); }
.news-item .n-cate { color: var(--orange-dark); background: var(--orange-light); padding: 1px 9px; border-radius: 999px; }
.news-item h3 { font-size: 16.5px; line-height: 1.5; }
.news-item h3 a { color: var(--text); }
.news-item h3 a:hover { color: var(--orange-dark); }
.news-item p { font-size: 13.5px; color: var(--muted); }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 16px 0 0; font-size: 13.5px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--orange-dark); }
.breadcrumb .sep { margin: 0 7px; color: #c3c8d1; }

/* ---------- 页面头部（内页） ---------- */
.page-head { padding: 30px 0 8px; }
.page-head h1 { font-size: 27px; font-weight: 700; margin-bottom: 6px; }
.page-head .page-desc { color: var(--muted); font-size: 14.5px; max-width: 780px; }

/* ---------- 行情详情卡 ---------- */
.price-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: stretch; }
.pd-main .pd-price { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pd-main .pd-price small { font-size: 20px; color: var(--muted); font-weight: 500; margin-right: 6px; }
.pd-main .pd-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; flex-wrap: wrap; }
.pd-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; align-content: center; }
.pd-list .kv { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding-bottom: 8px; font-size: 14px; }
.pd-list .kv b { font-variant-numeric: tabular-nums; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th { background: #fafbfc; color: var(--muted); font-weight: 600; font-size: 13px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fdfaf5; }
.data-table td.num, .data-table th.num { text-align: right; }

/* ---------- 文章 ---------- */
.article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow); }
.article .art-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.article h2 { font-size: 21px; margin: 30px 0 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.article h2:first-of-type { border-top: 0; padding-top: 0; }
.article h3 { font-size: 17px; margin: 20px 0 8px; }
.article p { margin-bottom: 14px; color: #33363f; }
.article ul, .article ol { margin: 0 0 14px 22px; }
.article li { margin-bottom: 6px; }
.article blockquote {
  border-left: 4px solid var(--orange); background: var(--orange-light);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 14.5px; color: #7a5210;
}
.article table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.article table th, .article table td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.article table th { background: #fafbfc; }
.article .tip-box { background: #f0f6ff; border-left: 4px solid #3b82f6; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 14.5px; }
.article .warn-box { background: #fff7ed; border-left: 4px solid var(--orange); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 14.5px; }

/* 目录 */
.toc { margin: 18px 0 6px; background: #fafbfc; border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; }
.toc b { display: block; margin-bottom: 8px; font-size: 14px; }
.toc ol { margin-left: 18px; font-size: 14px; columns: 2; column-gap: 40px; }
.toc a { color: #444b58; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  cursor: pointer; padding: 15px 4px; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--orange); font-size: 20px; font-weight: 400; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 4px 16px; color: var(--muted); font-size: 14.5px; }

/* ---------- 图表 ---------- */
.chart-box { padding: 20px; }
.chart-box canvas { width: 100%; height: 320px; display: block; }
.chart-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chart-tabs button {
  border: 1px solid var(--border); background: #fff; padding: 7px 18px; border-radius: 999px;
  cursor: pointer; font-size: 14px; color: var(--muted);
}
.chart-tabs button.active { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }

/* ---------- 工具表单 ---------- */
.tool-form { display: grid; gap: 14px; }
.tool-form label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 5px; }
.tool-form input, .tool-form select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text);
}
.tool-form input:focus, .tool-form select:focus { outline: 2px solid var(--orange); outline-offset: -1px; border-color: var(--orange); }
.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn {
  display: inline-block; background: var(--orange); color: #fff; border: 0; cursor: pointer;
  padding: 12px 30px; border-radius: 9px; font-size: 15.5px; font-weight: 600; font-family: inherit;
  transition: background .15s; text-align: center;
}
.btn:hover { background: var(--orange-dark); text-decoration: none; }
.btn-block { width: 100%; }
.result-box { background: var(--orange-light); border: 1px dashed var(--orange); border-radius: 10px; padding: 18px 20px; margin-top: 6px; }
.result-box .r-main { font-size: 28px; font-weight: 800; color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.result-box .r-sub { font-size: 13px; color: #7a5210; margin-top: 4px; }

/* ---------- 404 ---------- */
.err-page { text-align: center; padding: 70px 20px 90px; }
.err-page .err-code { font-size: 90px; font-weight: 800; color: var(--orange); line-height: 1; }
.err-page h1 { font-size: 24px; margin: 14px 0 8px; }
.err-page p { color: var(--muted); margin-bottom: 26px; }
.err-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.err-links a { background: #fff; border: 1px solid var(--border); padding: 9px 20px; border-radius: 999px; font-size: 14px; color: var(--text); }
.err-links a:hover { border-color: var(--orange); color: var(--orange-dark); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #9aa1b0; margin-top: 60px; padding: 44px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 34px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-grid a { color: #9aa1b0; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--orange); }
.footer-about p { font-size: 13.5px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid #2a2f3d; padding: 16px 0; text-align: center; font-size: 13px; color: #6b7280; }
.footer-bottom a { color: #8b93a3; }

/* ---------- 站点地图页 ---------- */
.sitemap-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sitemap-cols .card h3 { font-size: 16px; margin-bottom: 10px; color: var(--orange-dark); }
.sitemap-cols ul { list-style: none; }
.sitemap-cols li { margin-bottom: 7px; font-size: 14px; }
.sitemap-cols li a { color: var(--text); }
.sitemap-cols li span { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* ---------- 交易所评分 ---------- */
.rate { font-size: 14px; letter-spacing: 1px; }
.rate .star { color: var(--orange); }
.rate .star-off { color: #d8dbe1; }
.ex-name { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ex-logo { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 22px; bottom: 30px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--dark); color: #fff; border: 0; cursor: pointer; font-size: 18px;
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.back-top.show { opacity: .85; pointer-events: auto; }
.back-top:hover { opacity: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .price-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sitemap-cols { grid-template-columns: repeat(2, 1fr); }
  .article { padding: 24px 20px; }
  .toc ol { columns: 1; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--dark); flex-direction: column; align-items: stretch;
    padding: 10px 16px 16px; gap: 2px; border-top: 1px solid #2a2f3d;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; }
  .hero { padding: 36px 0 34px; }
  .hero h1 { font-size: 24px; }
  .section { padding: 34px 0 8px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .tool-row { grid-template-columns: 1fr; }
  .pd-main .pd-price { font-size: 34px; }
  .pd-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sitemap-cols { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
}
