@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1628;
  --bg-card: #131c35;
  --bg-hover: #1a2545;
  --accent-gold: #c9a84c;
  --accent-gold-light: #e8c97a;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-primary: #e8eaf0;
  --text-secondary: #8892a4;
  --text-muted: #4a5568;
  --border: rgba(201,168,76,0.15);
  --border-hover: rgba(201,168,76,0.4);
  --shadow-gold: 0 0 30px rgba(201,168,76,0.1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: 'Noto Sans SC', sans-serif !important;
  font-weight: 300;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(59,130,246,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(201,168,76,0.04) 0%, transparent 50%);
}

/* 导航栏 */
#header {
  background: rgba(10,14,26,0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
}

#header .inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

#header h1 a, #header h1 a:hover {
  color: var(--accent-gold) !important;
  font-family: 'Noto Serif SC', serif !important;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: none !important;
}

#header h2 { color: var(--text-muted) !important; font-size: 0.85rem; }

#nav a {
  color: var(--text-secondary) !important;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
#nav a:hover { color: var(--accent-gold) !important; border-bottom-color: var(--accent-gold); }

/* 主体 */
#main { background: transparent !important; }
.outer { max-width: 1200px; margin: 0 auto; padding: 2.5rem 2rem; }

/* 文章卡片 */
.article {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 1.75rem 2rem !important;
  margin-bottom: 1.5rem !important;
  box-shadow: none !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}

.article::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-gold);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article:hover {
  border-color: var(--border-hover) !important;
  background: var(--bg-hover) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold) !important;
}

.article:hover::before { opacity: 1; }

.article:nth-child(1) { animation-delay: 0.05s; }
.article:nth-child(2) { animation-delay: 0.1s; }
.article:nth-child(3) { animation-delay: 0.15s; }
.article:nth-child(4) { animation-delay: 0.2s; }
.article:nth-child(5) { animation-delay: 0.25s; }

/* 文章标题 */
.article-title, .article-title a {
  font-family: 'Noto Serif SC', serif !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s;
}
.article-title a:hover { color: var(--accent-gold) !important; }

/* 文章元信息 */
.article-meta, .article-date, .article-category {
  color: var(--text-muted) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.75rem !important;
}

.article-meta a { color: var(--accent-gold) !important; }

/* 文章正文 */
.article-entry {
  color: var(--text-secondary) !important;
  font-size: 0.92rem;
  line-height: 1.8;
}

.article-entry h1, .article-entry h2, .article-entry h3 {
  font-family: 'Noto Serif SC', serif !important;
  color: var(--text-primary) !important;
}

.article-entry h2 {
  border-left: 3px solid var(--accent-gold);
  padding-left: 1rem;
  margin: 2rem 0 1rem;
}

.article-entry a { color: var(--accent-gold) !important; }

.article-entry blockquote {
  background: rgba(201,168,76,0.06) !important;
  border-left: 3px solid var(--accent-gold) !important;
  color: var(--text-secondary) !important;
  border-radius: 0 8px 8px 0;
}

.article-entry code {
  font-family: 'JetBrains Mono', monospace !important;
  background: var(--bg-primary) !important;
  color: var(--accent-gold-light) !important;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
}

.article-entry pre {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
}

/* 阅读更多按钮 */
.article-more-link a {
  background: transparent !important;
  border: 1px solid var(--accent-gold) !important;
  color: var(--accent-gold) !important;
  border-radius: 6px !important;
  padding: 0.4rem 1rem !important;
  font-size: 0.82rem !important;
  transition: all 0.2s;
}
.article-more-link a:hover {
  background: var(--accent-gold) !important;
  color: var(--bg-primary) !important;
}

/* 侧边栏 */
#sidebar {
  background: transparent !important;
  box-shadow: none !important;
}

.widget {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  box-shadow: none !important;
}

.widget-title {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold) !important;
  border-bottom: 1px solid var(--border) !important;
  padding-bottom: 0.75rem !important;
  margin-bottom: 1rem !important;
}

.widget ul { list-style: none !important; padding: 0 !important; }

.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary) !important;
  font-size: 0.88rem;
}

.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-secondary) !important; text-decoration: none; transition: color 0.2s; }
.widget ul li a:hover { color: var(--accent-gold) !important; }

/* 标签云 */
.tag-cloud a {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  color: var(--text-secondary) !important;
  padding: 0.2rem 0.6rem !important;
  margin: 0.2rem !important;
  font-size: 0.78rem !important;
  display: inline-block;
  transition: all 0.2s;
}
.tag-cloud a:hover {
  color: var(--accent-gold) !important;
  border-color: var(--accent-gold) !important;
}

/* 分页 */
#page-nav a, .page-number {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
  border-radius: 8px !important;
  font-family: 'JetBrains Mono', monospace !important;
  transition: all 0.2s;
}
#page-nav a:hover {
  border-color: var(--accent-gold) !important;
  color: var(--accent-gold) !important;
}
.current { background: var(--accent-gold) !important; color: var(--bg-primary) !important; border-color: var(--accent-gold) !important; }

/* 页脚 */
#footer {
  background: var(--bg-secondary) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

#footer a { color: var(--accent-gold) !important; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

/* 动画 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bloomberg-style inner-page brand line + transmission badge */
#qb-brand-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#qb-transmission-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 14px 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(114, 149, 219, 0.45);
  background: linear-gradient(112deg, rgba(196, 32, 48, 0.30) 0%, rgba(26, 42, 84, 0.42) 48%, rgba(31, 98, 178, 0.30) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 24px rgba(8,12,20,0.42);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: #f4f7ff !important;
  animation: qbTransmissionPulse 2.8s ease-in-out infinite;
}

#qb-transmission-badge::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255,255,255,0) 18%, rgba(255,255,255,0.24) 50%, rgba(255,255,255,0) 82%);
  transform: translateX(-118%);
  animation: qbTransmissionSweep 3.5s linear infinite;
  pointer-events: none;
}

#qb-transmission-badge:hover {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.11), 0 14px 30px rgba(8,12,20,0.56);
}

#qb-transmission-badge,
#qb-transmission-badge::before,
#qb-transmission-badge:hover {
  transition: transform .18s ease, box-shadow .2s ease;
}

#qb-transmission-badge .qb-badge-flow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

#qb-transmission-badge .qb-flag-chip {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 8px rgba(0,0,0,0.35);
}

#qb-transmission-badge .qb-flag-chip.us {
  background: linear-gradient(155deg, rgba(83,137,255,0.95) 0%, rgba(28,52,122,0.95) 100%);
}

#qb-transmission-badge .qb-flag-chip.cn {
  background: linear-gradient(155deg, rgba(244,88,98,0.95) 0%, rgba(148,20,30,0.95) 100%);
}

#qb-transmission-badge .qb-flow-track {
  width: 46px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(to right, rgba(74,158,255,0.92), rgba(232,160,32,0.98), rgba(232,64,64,0.92));
  position: relative;
  overflow: hidden;
}

#qb-transmission-badge .qb-flow-track::before,
#qb-transmission-badge .qb-flow-track::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -10px;
  width: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(248,251,255,0.95);
  box-shadow: 0 0 8px rgba(248,251,255,0.9);
}

#qb-transmission-badge .qb-flow-track::before {
  animation: qbTransmissionFlow 1.6s cubic-bezier(.2,.8,.2,1) infinite;
}

#qb-transmission-badge .qb-flow-track::after {
  animation: qbTransmissionFlow 1.6s cubic-bezier(.2,.8,.2,1) .8s infinite;
}

#qb-transmission-badge .qb-badge-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #f4f7ff;
  text-shadow: 0 1px 8px rgba(8,12,20,.6);
  position: relative;
  z-index: 1;
}

@keyframes qbTransmissionFlow {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateX(54px); opacity: 0; }
}

@keyframes qbTransmissionSweep {
  0% { transform: translateX(-118%); }
  100% { transform: translateX(118%); }
}

@keyframes qbTransmissionPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 24px rgba(8,12,20,0.42); }
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 14px 30px rgba(12,28,64,0.56); }
}

#qb-brand-sep {
  color: var(--accent-gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: .95rem;
  line-height: 1;
}

#subtitle-wrap,
#subtitle-wrap a {
  margin: 0;
  color: var(--text-secondary) !important;
  font-family: 'Noto Sans SC', sans-serif !important;
  font-size: .88rem !important;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: none;
}
/* Fixed disclaimer at bottom-right for inner pages */
.qb-fixed-disclaimer {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 999;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245,130,31,.45);
  background: rgba(10,10,10,.92);
  color: #f2f2f2;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

/* Bloomberg-like data media tuning for article pages */
.article-entry h1,
.article-entry h2,
.article-entry h3 { letter-spacing: .01em; }
.article-entry table th {
  background: #0a0a0a !important;
  color: #f0f0f0 !important;
  border-color: #2a2a2a !important;
}
.article-entry table td {
  background: #101826 !important;
  border-color: #22304a !important;
}

@media (max-width: 900px) {
  #qb-brand-line { gap: 6px; }

  #qb-transmission-badge {
    min-height: 32px;
    padding: 6px 10px 6px 8px;
    gap: 8px;
  }

  #qb-transmission-badge .qb-flag-chip {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  #qb-transmission-badge .qb-flow-track { width: 34px; }

  #qb-transmission-badge .qb-badge-label {
    font-size: 11px;
    letter-spacing: .06em;
  }

  #qb-brand-sep,
  #subtitle-wrap {
    display: none;
  }

  .qb-fixed-disclaimer {
    right: 10px;
    left: 10px;
    bottom: 70px;
    max-width: none;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #qb-transmission-badge,
  #qb-transmission-badge::before,
  #qb-transmission-badge .qb-flow-track::before,
  #qb-transmission-badge .qb-flow-track::after {
    animation: none !important;
  }
}
