/* Cowstock Member — 量化身份中心首页（纯 CSS 绘图） */

.home-page {
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --gold: #f0b90b;
  --gold-soft: rgba(240, 185, 11, 0.18);
  --up: #0ecb81;
  --dn: #f6465d;
  --glass: rgba(18, 22, 28, 0.72);
  --line: rgba(240, 185, 11, 0.22);
  overflow-x: hidden;
  position: relative;
}

.home-page .site-header {
  background: rgba(11, 14, 17, 0.78);
  border-bottom-color: rgba(240, 185, 11, 0.16);
}

.home-page .brand-mark {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0 18%, var(--dn) 18% 28%, transparent 28% 100%),
    linear-gradient(180deg, transparent 0 38%, var(--up) 38% 72%, transparent 72% 100%),
    linear-gradient(180deg, transparent 0 22%, var(--gold) 22% 58%, transparent 58% 100%),
    linear-gradient(135deg, #1a1404, #3a2e08);
  background-size: 3px 100%, 3px 100%, 3px 100%, 100% 100%;
  background-position: 6px 0, 12px 0, 18px 0, 0 0;
  background-repeat: no-repeat;
  box-shadow: 0 0 16px rgba(240, 185, 11, 0.28);
}

/* —— 舞台背景：透视网格 + 光晕 + 扫描线 —— */
.home-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 18% -10%, rgba(240, 185, 11, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 45% at 92% 8%, rgba(14, 203, 129, 0.08), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(246, 70, 93, 0.05), transparent 45%);
}

.home-grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -38%;
  height: 78%;
  background-image:
    linear-gradient(rgba(240, 185, 11, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 185, 11, 0.09) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: center top;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 78%);
  animation: grid-drift 28s linear infinite;
}

.home-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}

.home-orb-a {
  width: 280px;
  height: 280px;
  top: 8%;
  right: 12%;
  background: rgba(240, 185, 11, 0.22);
  animation: orb-float 9s ease-in-out infinite;
}

.home-orb-b {
  width: 220px;
  height: 220px;
  top: 42%;
  left: 6%;
  background: rgba(14, 203, 129, 0.16);
  animation: orb-float 11s ease-in-out infinite reverse;
}

.home-orb-c {
  width: 160px;
  height: 160px;
  bottom: 12%;
  right: 28%;
  background: rgba(246, 70, 93, 0.1);
}

.home-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(255, 255, 255, 0.012) 3px 4px
  );
}

.home-page .site-header,
.home-page .market-ticker,
.home-page .home-main {
  position: relative;
  z-index: 1;
}

/* —— 行情跑马灯 —— */
.market-ticker {
  border-bottom: 1px solid rgba(240, 185, 11, 0.12);
  background: rgba(8, 10, 14, 0.7);
  overflow: hidden;
  height: 36px;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}

.ticker-row {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #b7bdc6;
  white-space: nowrap;
}

.ticker-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  height: 36px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ticker-row b {
  color: var(--gold);
  font-weight: 600;
}

.ticker-row .up {
  color: var(--up);
  font-style: normal;
}

.ticker-row .dn {
  color: var(--dn);
  font-style: normal;
}

/* —— 主布局 —— */
.home-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 40px;
  align-items: center;
}

.home-kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.home-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.home-copy h1 span {
  color: var(--gold);
  text-shadow: 0 0 28px rgba(240, 185, 11, 0.28);
}

.home-lead {
  margin: 0 0 28px;
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.home-page .hero-actions {
  justify-content: flex-start;
}

.home-page .hero-actions .btn {
  min-width: 112px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.home-page .btn-gold {
  color: var(--gold);
  border-color: rgba(240, 185, 11, 0.55);
}

.home-page .btn-gold:hover {
  border-color: var(--gold);
  color: var(--accent-hover);
  background: rgba(240, 185, 11, 0.08);
}

.home-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.home-pills li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #9aa3af;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

/* —— 交易终端 HUD —— */
.terminal {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(240, 185, 11, 0.07), transparent 28%),
    var(--glass);
  border: 1px solid rgba(240, 185, 11, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 48px rgba(240, 185, 11, 0.08);
  backdrop-filter: blur(16px);
}

.hud {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold);
  border-style: solid;
  pointer-events: none;
}

.hud-tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.hud-tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.hud-bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.hud-br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.terminal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 10px var(--up);
  animation: live-blink 1.6s ease-in-out infinite;
}

.term-title {
  color: #d8dde6;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.term-live {
  margin-left: auto;
  color: var(--up);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.terminal-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.terminal-price strong {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.terminal-price span {
  font-family: var(--mono);
  color: var(--up);
  font-size: 13px;
}

/* K 线盘面 */
.chart-board {
  position: relative;
  height: 196px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 203, 129, 0.05), transparent 40%),
    #0c1016;
}

.chart-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 24.5px, 32px 100%;
}

.ma-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px currentColor);
}

.ma5 {
  top: 0;
  height: 100%;
  background: var(--gold);
  opacity: 0.9;
  clip-path: polygon(
    0 74%, 6% 70%, 12% 76%, 18% 64%, 24% 68%, 30% 58%,
    36% 62%, 42% 50%, 48% 54%, 54% 44%, 60% 48%, 66% 36%,
    72% 40%, 78% 30%, 84% 34%, 90% 24%, 100% 22%,
    100% 24%, 90% 26%, 84% 36%, 78% 32%, 72% 42%, 66% 38%,
    60% 50%, 54% 46%, 48% 56%, 42% 52%, 36% 64%, 30% 60%,
    24% 70%, 18% 66%, 12% 78%, 6% 72%, 0 76%
  );
}

.ma20 {
  top: 0;
  height: 100%;
  background: #5b8def;
  opacity: 0.7;
  clip-path: polygon(
    0 78%, 10% 76%, 20% 74%, 30% 70%, 40% 68%, 50% 62%,
    60% 58%, 70% 52%, 80% 48%, 90% 42%, 100% 38%,
    100% 40%, 90% 44%, 80% 50%, 70% 54%, 60% 60%,
    50% 64%, 40% 70%, 30% 72%, 20% 76%, 10% 78%, 0 80%
  );
}

.crosshair::before,
.crosshair::after {
  content: "";
  position: absolute;
  background: rgba(240, 185, 11, 0.28);
}

.crosshair::before {
  left: 72%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.crosshair::after {
  top: 28%;
  left: 0;
  right: 0;
  height: 1px;
}

.price-tag {
  position: absolute;
  top: calc(28% - 9px);
  right: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: #0b0e11;
  background: var(--gold);
  padding: 2px 6px;
  border-radius: 2px 0 0 2px;
}

.kline {
  position: absolute;
  inset: 10px 8px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 1;
}

.k {
  position: relative;
  width: 7px;
  height: var(--h);
  flex: 0 0 7px;
}

.k::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: currentColor;
}

.k::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--t);
  height: var(--b);
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 0 8px currentColor;
}

.k.up { color: var(--up); }
.k.dn { color: var(--dn); }

.k.pulse {
  animation: candle-live 2.4s ease-in-out infinite;
}

.volume {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 36px;
  margin: 8px 8px 0;
  padding: 0 0 0;
}

.v {
  width: 7px;
  height: var(--h);
  border-radius: 1px 1px 0 0;
  opacity: 0.55;
}

.v.up { background: var(--up); }
.v.dn { background: var(--dn); }

.terminal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: #8b93a0;
}

.terminal-meta span:first-child { color: var(--gold); }
.terminal-meta span:nth-child(2) { color: #5b8def; }

/* —— 下游站点卡片 —— */
.home-sites {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.site-tile {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px 18px 18px 16px;
  border-radius: 12px;
  color: inherit;
  background: rgba(18, 22, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.site-tile:hover {
  color: inherit;
  border-color: rgba(240, 185, 11, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 0 24px rgba(240, 185, 11, 0.08);
}

.tile-body h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--gold);
}

.tile-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--mono);
}

.tile-body small {
  display: block;
  margin-top: 6px;
  color: #9aa3af;
  font-size: 12px;
}

.tile-ico {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  position: relative;
  background: #10151c;
  border: 1px solid rgba(240, 185, 11, 0.18);
  overflow: hidden;
}

/* 量化：迷你 K 线 */
.ico-quant span {
  position: absolute;
  bottom: 10px;
  width: 5px;
  background: var(--up);
  border-radius: 1px;
}

.ico-quant span:nth-child(1) { left: 12px; height: 16px; background: var(--dn); }
.ico-quant span:nth-child(2) { left: 21px; height: 22px; }
.ico-quant span:nth-child(3) { left: 30px; height: 18px; background: var(--dn); }
.ico-quant span:nth-child(4) { left: 39px; height: 28px; box-shadow: 0 0 8px var(--up); }

.ico-quant span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  height: calc(100% + 12px);
  width: 1px;
  transform: translateX(-50%);
  background: currentColor;
  color: inherit;
  background: inherit;
}

/* 财务：柱状资金图 */
.ico-finance span {
  position: absolute;
  bottom: 12px;
  width: 8px;
  border-radius: 2px 2px 0 0;
}

.ico-finance span:nth-child(1) { left: 12px; height: 16px; background: rgba(240, 185, 11, 0.45); }
.ico-finance span:nth-child(2) { left: 24px; height: 26px; background: var(--gold); }
.ico-finance span:nth-child(3) { left: 36px; height: 20px; background: rgba(240, 185, 11, 0.7); }

/* 竞赛：领跑条 */
.ico-comp span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.ico-comp span::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: var(--gold);
}

.ico-comp span:nth-child(1) { top: 14px; }
.ico-comp span:nth-child(1)::after { width: 86%; }
.ico-comp span:nth-child(2) { top: 25px; }
.ico-comp span:nth-child(2)::after { width: 62%; background: #c9a227; }
.ico-comp span:nth-child(3) { top: 36px; }
.ico-comp span:nth-child(3)::after { width: 44%; background: #8a7318; }

/* 营销：雷达波 */
.ico-market span {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(240, 185, 11, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ico-market span:nth-child(1) { width: 14px; height: 14px; background: var(--gold); box-shadow: 0 0 10px var(--gold); border: 0; }
.ico-market span:nth-child(2) { width: 28px; height: 28px; animation: radar 2.8s ease-out infinite; }
.ico-market span:nth-child(3) { width: 42px; height: 42px; animation: radar 2.8s ease-out infinite 0.6s; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 56px, 56px 0; }
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-18px, 14px); }
}

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes candle-live {
  0%, 100% { transform: scaleY(1); transform-origin: bottom; }
  50% { transform: scaleY(1.08); transform-origin: bottom; }
}

@keyframes radar {
  0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.7); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-page .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .home-sites {
    grid-template-columns: 1fr;
  }

  .home-copy h1 {
    font-size: 32px;
  }

  .home-page .hero-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .home-grid-floor,
  .home-orb,
  .k.pulse,
  .term-dot,
  .ico-market span {
    animation: none;
  }
}
