/* =========================================================
   天枢汇率网 - 全站统一样式（浅色主题）
   苏州老铁网络科技有限公司 | 天枢新闻站群
   浅色底 + 金色点缀 + 对称高端布局
   ========================================================= */

:root {
  --bg-deep: #f4f6fa;
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4fb;
  --gold: #c9a227;
  --gold-light: #b8860b;
  --gold-dark: #a8781f;
  --text-main: #1f2937;
  --text-sub: #4b5563;
  --text-muted: #9ca3af;
  --line: #e5e9f0;
  --up: #dc2626;
  --down: #16a34a;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(31,41,55,.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC","Microsoft YaHei","微软雅黑",-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: linear-gradient(160deg, var(--bg-deep) 0%, #eef2f8 55%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.7;
  min-height: 100vh;
}

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

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

/* ---------------- 头部 ---------------- */
.site-header {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(31,41,55,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { width: 40px; height: 40px; border-radius: 8px; }
.logo-text {
  font-size: 22px; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}
.main-nav ul { display: flex; list-style: none; gap: 6px; }
.main-nav a {
  display: block; padding: 8px 16px; border-radius: 8px;
  color: var(--text-sub); font-size: 15px;
}
.main-nav a:hover { color: var(--gold-dark); background: rgba(201,162,39,.08); }
.main-nav a.active { color: var(--gold-dark); background: rgba(201,162,39,.12); font-weight: 600; }

/* ---------------- 通用区块 ---------------- */
.page-wrap { padding: 30px 0 50px; }
.section { margin-bottom: 34px; }
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 700; margin-bottom: 18px;
  color: var(--gold-dark);
}
.section-title::before {
  content: ""; width: 6px; height: 24px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
}
.section-sub { color: var(--text-sub); font-size: 14px; margin-bottom: 18px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: transform .3s, box-shadow .3s, background .3s;
}
.card:hover { transform: translateY(-3px); background: var(--bg-card-hover); box-shadow: 0 12px 32px rgba(31,41,55,.12); }

/* ---------------- 首页 Hero / 换算器 ---------------- */
.hero {
  position: relative;
  padding: 44px 0 30px;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(201,162,39,.10), transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(70,120,200,.10), transparent 50%);
}
.hero h1 {
  font-size: 34px; font-weight: 800; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-main), var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--text-sub); font-size: 16px; max-width: 720px; margin: 0 auto 26px; }

.converter-card { max-width: 860px; margin: 0 auto; }
.converter-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.field { flex: 1; min-width: 200px; text-align: left; }
.field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.field select, .field input[type=number], .field input[type=text] {
  width: 100%; height: 50px; padding: 0 14px;
  background: var(--bg-main); color: var(--text-main);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; outline: none; transition: border .25s;
}
.field select:focus, .field input:focus { border-color: var(--gold); }
.swap-btn {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none; color: #ffffff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(201,162,39,.35);
  transition: transform .3s;
  margin-top: 24px;
}
.swap-btn:hover { transform: rotate(180deg) scale(1.05); }
.result-box {
  margin-top: 20px; padding: 18px; text-align: center;
  background: rgba(201,162,39,.06); border: 1px solid rgba(201,162,39,.3);
  border-radius: 10px;
}
.result-box .big { font-size: 30px; font-weight: 800; color: var(--gold-dark); }
.result-box .detail { color: var(--text-sub); font-size: 14px; margin-top: 6px; }
.result-box .rate { color: var(--gold); font-size: 15px; margin-top: 4px; }

/* ---------------- 汇率表格 ---------------- */
.rate-table-wrap { overflow-x: auto; }
table.rate-table { width: 100%; border-collapse: collapse; }
table.rate-table th, table.rate-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.rate-table th { color: var(--gold-dark); font-weight: 600; font-size: 14px; background: rgba(201,162,39,.06); }
table.rate-table tr:hover td { background: var(--bg-card-hover); }
.cur-cell { display: flex; align-items: center; gap: 10px; }
.flag { width: 28px; height: 20px; border-radius: 3px; object-fit: cover; box-shadow: 0 1px 4px rgba(31,41,55,.15); }
.flag-emoji { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 22px; font-size: 20px; line-height: 1; flex-shrink: 0; }
.cur-name { font-weight: 600; }
.cur-code { color: var(--text-muted); font-size: 12px; }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
.flat { color: var(--text-sub); }

/* ---------------- 货币网格 ---------------- */
.cur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cur-grid-item { display: flex; align-items: center; gap: 12px; }
.cur-grid-item .info { flex: 1; min-width: 0; }
.cur-grid-item .info .nm { font-weight: 600; font-size: 15px; }
.cur-grid-item .info .sub { color: var(--text-muted); font-size: 12px; }
.cur-grid-item .val { color: var(--gold-dark); font-weight: 700; font-size: 16px; }

/* ---------------- 新闻 ---------------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.news-item { display: flex; gap: 14px; align-items: flex-start; }
.news-thumb { width: 96px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg-deep); }
.news-item .t { font-size: 15px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .meta { color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-list-item { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.news-list-item .t { font-size: 15px; }
.news-list-item .d { color: var(--text-muted); font-size: 13px; white-space: nowrap; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  margin-top: 40px; padding: 30px 0;
  background: rgba(255,255,255,.95);
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.footer-links a { color: var(--text-sub); font-size: 14px; }
.footer-links a:hover { color: var(--gold-dark); }
.footer-links .dot { color: var(--line); }
.footer-copy { color: var(--text-sub); font-size: 14px; margin-bottom: 6px; }
.footer-beian a { color: var(--text-muted); font-size: 13px; }
.footer-tip { color: var(--text-muted); font-size: 12px; margin-top: 8px; }

.crumbs { padding: 14px 0; font-size: 14px; }
.crumbs a { color: var(--text-sub); }
.crumbs .sep { color: var(--text-muted); margin: 0 8px; }
.crumbs .cur { color: var(--gold-dark); }

/* ---------------- 工具按钮 ---------------- */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #ffffff; font-weight: 700; border: none; font-size: 15px;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,162,39,.35); color: #ffffff; }
.btn-mini { padding: 6px 14px; font-size: 13px; }
.gold-b { color: var(--gold-dark); font-weight: 700; }

/* ---------------- 文章页 ---------------- */
.article-body { line-height: 1.9; font-size: 16px; color: var(--text-main); }
.article-body h2 { color: var(--gold-dark); font-size: 22px; margin: 24px 0 12px; }
.article-body h3 { color: var(--gold-dark); font-size: 18px; margin: 18px 0 10px; }
.article-body p { margin-bottom: 14px; }
.article-body ul, .article-body ol { margin: 0 0 14px 22px; }
.article-body li { margin-bottom: 6px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 10px; }
  .main-nav ul { flex-wrap: wrap; justify-content: center; }
  .hero h1 { font-size: 26px; }
  .converter-row { flex-direction: column; }
  .swap-btn { margin-top: 0; }
  .cur-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ---------------- 动画 ---------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .6s ease both; }
.fade-up-1 { animation-delay: .05s; }
.fade-up-2 { animation-delay: .12s; }
.fade-up-3 { animation-delay: .2s; }
@keyframes shine { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* =========================================================
   金融行情风格扩展
   ========================================================= */

/* ---------------- 顶部滚动播报条 ---------------- */
.ticker-bar {
  background: linear-gradient(135deg, #ffffff, #f4f7fc);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker-track { display: inline-block; padding: 8px 0; animation: ticker-scroll 40s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 6px; margin: 0 22px; font-size: 13px; color: var(--text-sub); }
.ticker-item a { color: var(--text-sub); }
.ticker-item a:hover { color: var(--gold-dark); }
.ticker-item b { color: var(--gold-dark); font-weight: 700; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- 行情报价表 ---------------- */
.quote-table th, .quote-table td { white-space: nowrap; }
.row-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-ghost {
  background: transparent; color: var(--gold-dark);
  border: 1px solid var(--gold); box-shadow: none;
}
.btn-ghost:hover { background: rgba(201,162,39,.12); color: var(--gold-dark); }

/* ---------------- 交叉汇率矩阵 ---------------- */
.matrix-wrap { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
table.cross-table { border-collapse: collapse; font-size: 12px; }
table.cross-table th, table.cross-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: center; white-space: nowrap; }
table.cross-table thead th { position: sticky; top: 0; background: #f4f7fc; z-index: 2; color: var(--gold-dark); font-weight: 600; }
table.cross-table thead th a { color: var(--gold-dark); }
table.cross-table tbody th { position: sticky; left: 0; background: #eef2f8; color: var(--gold-dark); font-weight: 600; z-index: 1; min-width: 52px; }
table.cross-table thead th.corner { z-index: 3; }
table.cross-table td a { display: block; color: var(--text-sub); }
table.cross-table td a:hover { color: var(--gold-dark); background: rgba(201,162,39,.08); }
table.cross-table tr:nth-child(even) td { background: rgba(31,41,55,.02); }
table.cross-table tbody tr:hover td { background: rgba(201,162,39,.05); }

/* ---------------- 货币对标签云 ---------------- */
.pair-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pair-tags .pt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg-card); color: var(--text-sub); font-size: 13px;
  transition: all .25s;
}
.pair-tags .pt:hover { border-color: var(--gold); color: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(201,162,39,.25); }

/* ---------------- 国家分组网格 ---------------- */
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.country-card { padding: 16px; }
.country-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; }
.country-head a { color: var(--gold-dark); }
.country-head a:hover { color: var(--gold); }
.country-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.country-codes .cc {
  padding: 3px 8px; border-radius: 4px; font-size: 12px;
  background: var(--bg-deep); color: var(--text-sub); border: 1px solid var(--line);
}
.country-codes .cc:hover { color: var(--gold-dark); border-color: var(--gold); }

/* 新闻分栏同高 */
.news-cols .card { display: flex; flex-direction: column; }
.news-list { flex: 1; }

@media (max-width: 768px) {
  .ticker-item { margin: 0 14px; }
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}