/* ================= 基础变量 ================= */
:root {
  --primary: #D93838;
  --primary-soft: #FFF0F0;
  --bg: #E9ECEF;
  --card: #FFFFFF;
  --card-inner: #F8F9FA;
  --text: #222222;
  --text-muted: #666666;
  --line: #E0E0E0;
  --green: #28A745;
  --gold: #D4AF37;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 17px;
  font-weight: 500;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

#fireworks-canvas {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 9999;
}

.main-container { max-width: 1000px; margin: 0 auto; padding: 24px 16px 60px; }

.fade-in-up { animation: fadeInUp 0.6s ease-out forwards; opacity: 0; transform: translateY(20px); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* ================= 头部（黑金） ================= */
.hero-header {
  background: linear-gradient(135deg, #1A1A1A 0%, #2C2C2C 100%);
  border-radius: 16px; padding: 40px 32px; margin-bottom: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 24px;
}
.hero-header::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 60%);
  animation: rotateLight 15s linear infinite; pointer-events: none;
}
@keyframes rotateLight { 100% { transform: rotate(360deg); } }

@media (min-width: 768px) {
  .hero-header { flex-direction: row; align-items: center; justify-content: space-between; padding: 48px 40px; }
}

.hero-left { position: relative; z-index: 1; flex: 1; }
.hero-badge {
  display: inline-block; padding: 6px 14px; background: rgba(212, 175, 55, 0.15);
  color: var(--gold); font-size: 13px; font-weight: 700; border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3); margin-bottom: 16px;
}
.hero-left h1 { font-size: 32px; font-weight: 900; color: #fff; line-height: 1.3; margin-bottom: 12px; letter-spacing: 0.5px; }
.hero-left h1 span {
  background: linear-gradient(90deg, #F5E4A5, #D4AF37);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-left p { color: #A0A0A0; font-size: 15px; }

.hero-right {
  position: relative; z-index: 1; display: flex; gap: 16px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; padding: 20px 24px; backdrop-filter: blur(10px);
}
.data-item { text-align: center; }
.data-val { font-size: 28px; font-weight: 900; color: #fff; font-family: "Courier New", monospace; line-height: 1.2; }
.data-val span { color: var(--gold); font-size: 18px; }
.data-label { font-size: 13px; color: #888; margin-top: 4px; }
.data-divider { width: 1px; background: rgba(255,255,255,0.1); }

/* ================= 公告区 ================= */
.notice-box { background: var(--card); border-left: 5px solid var(--primary); border-radius: 8px; padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.notice-box p { font-size: 17px; margin-bottom: 12px; font-weight: 500; color: var(--text); }
.notice-box p:last-child { margin-bottom: 0; }
.notice-box strong { color: var(--text); font-weight: 800; }
.notice-box i { color: var(--primary); }

/* ================= 通用卡片 ================= */
.card-wrapper { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 32px; margin-bottom: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.section-title { font-size: 24px; font-weight: 900; color: var(--text); margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 6px; height: 24px; background: var(--primary); border-radius: 3px; }
.section-title i { color: var(--text); }

/* ================= 分栏与列表 ================= */
.split-layout { display: flex; gap: 32px; align-items: center; }
.split-left { width: 55%; min-width: 0; }
.split-right { width: 45%; flex-shrink: 0; }
.split-right-col { display: flex; flex-direction: column; align-items: center; width: 100%; }

.img-placeholder {
  width: 100%; height: 520px; background: #F8F9FA; border: 2px dashed #CCCCCC; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 15px; text-align: center; padding: 16px;
}
.img-placeholder i { font-size: 60px; color: var(--primary); opacity: 0.8; margin-bottom: 16px; }

.full-img { width: 100%; height: auto; display: block; }
.img-caption {
  font-size: 16px; font-weight: 900; color: var(--primary); margin-top: 16px;
  text-align: center; letter-spacing: 1px;
}

.muted-text { color: var(--text-muted); font-size: 15px; }

.rate-list { list-style: none; margin-top: 20px; background: #F8F9FA; padding: 16px 20px; border-radius: 8px; border: 1px solid var(--line); }
.rate-list li { padding: 12px 0; border-bottom: 1px dashed #E0E0E0; font-size: 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.rate-list li:last-child { border-bottom: none; }
.rate-list li strong { color: var(--primary); font-size: 19px; font-weight: 900; }
.latest-note { color: var(--primary); font-size: 15px; }

.rate-notes { margin-top: 24px; font-size: 16px; line-height: 1.8; }
.rate-notes .highlight-line { margin-bottom: 12px; color: var(--primary); font-weight: 900; font-size: 18px; }
.rate-notes .strong-line { margin-bottom: 10px; color: #111111; font-weight: 600; }
.rate-notes .strong-line.last { margin-bottom: 0; color: #333333; }
.primary-strong { color: var(--primary); font-weight: 900; }

/* ================= 券商折叠 ================= */
.broker-wrapper { margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: all 0.3s ease; }
.broker-wrapper:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(217, 56, 56, 0.08); }
.broker-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; cursor: pointer; background: #fff; user-select: none; }
.broker-title-group { display: flex; align-items: center; gap: 12px; }
.broker-name { font-size: 22px; font-weight: 900; color: var(--text); }
.broker-tag { font-size: 13px; background: var(--primary-soft); color: var(--primary); padding: 4px 10px; border-radius: 4px; font-weight: 700; }
.broker-desc { font-size: 15px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.toggle-icon { color: var(--primary); font-size: 20px; transition: transform 0.3s ease; }
.broker-wrapper.active .toggle-icon { transform: rotate(180deg); }

.broker-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; border-top: 1px solid transparent; background: var(--card-inner); }
.broker-wrapper.active .broker-content { border-top-color: var(--line); }
.broker-content-inner { padding: 20px 24px; }
.rate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.rate-item { background: #fff; padding: 16px; border-radius: 8px; border: 1px solid var(--line); }
.rate-label { font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.rate-value { font-size: 20px; font-weight: 900; color: var(--primary); }
.rate-value span { font-size: 15px; margin-left: 4px; }
.broker-footer { font-size: 15px; color: var(--text-muted); background: #fff; padding: 16px; border-radius: 8px; border: 1px solid var(--line); }
.broker-footer p { margin-bottom: 8px; }
.broker-footer p:last-child { margin-bottom: 0; }
.broker-footer strong { color: var(--text); font-weight: 800; }

/* ================= 科普与表格 ================= */
.edu-text p { margin-bottom: 16px; color: var(--text); }
.edu-text strong { color: var(--primary); font-weight: 900; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 16px; text-align: center; margin-top: 20px; }
.compare-table th { background: var(--primary-soft); color: var(--text); padding: 14px 10px; font-weight: 800; border-bottom: 2px solid var(--primary); }
.compare-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); font-weight: 500; }
.compare-table tr:last-child td { border-bottom: none; }
.text-gray { color: var(--text-muted); }
.text-red { color: var(--primary); font-weight: 900; font-size: 18px; }
.text-green { color: var(--green); font-weight: 900; font-size: 18px; }
.compare-conclusion { font-size: 15px; color: var(--primary); font-weight: bold; margin-top: 16px; text-align: right; }

/* ================= FAQ ================= */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--text); user-select: none; }
.faq-question:hover { color: var(--primary); }
.faq-question i { color: var(--primary); font-size: 16px; transition: transform 0.3s; }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; color: var(--text-muted); font-size: 16px; }
.faq-item.active .faq-answer { padding-bottom: 18px; }

/* ================= 交割单与联系 ================= */
.jiaoge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.jiaoge-item { padding: 0; overflow: hidden; border-radius: 8px; }
.jiaoge-item img { width: 100%; height: auto; display: block; }

.contact-section { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--primary); border-radius: 12px; padding: 32px; margin-top: 40px; box-shadow: 0 8px 24px rgba(217, 56, 56, 0.06); }
.contact-right { text-align: left; }
.contact-right h2 { font-size: 26px; font-weight: 900; color: var(--text); margin-bottom: 24px; }
.contact-right h2 span { color: var(--primary); }
.contact-info { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.contact-item { background: var(--primary-soft); border: 1px dashed var(--primary); padding: 12px 24px; border-radius: 8px; font-size: 20px; font-weight: 900; color: var(--primary); display: inline-flex; align-items: center; gap: 12px; width: 100%; }
.contact-item i { font-size: 24px; }
.qr-hint { margin-top: 16px; font-size: 15px; color: var(--text-muted); }

/* 底部二维码区 */
.qr-flex-wrap {
  padding: 12px; overflow: hidden; height: 280px;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: clamp(16px, 6vw, 80px); flex-wrap: wrap;
}
.qr-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-item img {
  width: 120px; height: 120px; max-width: 100%;
  object-fit: contain; display: block; border-radius: 6px;
}
.qr-item span { font-size: 14px; font-weight: 700; color: var(--text); }

/* ================= 手机端适配 ================= */
@media (max-width: 768px) {
  .split-layout { flex-direction: column; gap: 16px; margin: 0; }
  .split-left { width: 100% !important; }
  .split-right { width: 100% !important; order: -1; margin-bottom: 10px; }
  .split-right .img-placeholder { height: auto !important; }

  .rate-grid { grid-template-columns: 1fr; }
  .broker-name { font-size: 18px; }
  .contact-item { font-size: 16px; padding: 10px 16px; }
  .contact-right h2 { font-size: 20px; }
  .contact-section { padding: 24px 20px; }
  .compare-table th, .compare-table td { padding: 8px 4px; font-size: 14px; }
  .text-red, .text-green { font-size: 15px; }
  .hero-left h1 { font-size: 26px; }
  .hero-right { flex-direction: column; gap: 12px; padding: 16px; }
  .data-divider { width: 100%; height: 1px; }

  .card-wrapper { padding: 16px !important; }
  .rate-list { padding: 12px 0 !important; background: transparent !important; border-left: 0; border-right: 0; border-radius: 0; }
  .rate-list li { display: flex; justify-content: space-between; align-items: flex-start; }
  .rate-list li span { flex-shrink: 0; white-space: nowrap; }
  .rate-list li strong { text-align: right; font-size: 17px; white-space: nowrap; }
  .rate-list li strong span { display: none; }

  .qr-flex-wrap { gap: 16px !important; padding: 10px !important; }
}