/* MyOK 跟单社区 · 官网 */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+SC:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');
@import '../assets/themes.css';

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--app-bg);
  background-image: var(--app-bg-grad);
  color: var(--text);
  font-family: 'IBM Plex Sans SC', 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.display {
  font-family: 'Space Grotesk', 'IBM Plex Sans SC', sans-serif;
  letter-spacing: -0.03em;
}
.mono { font-variant-numeric: tabular-nums; font-family: 'Space Grotesk', ui-monospace, monospace; }
.up { color: var(--success); }
.down { color: var(--danger); }
.dim { color: var(--text-dim); }

/* —— Nav —— */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.88);
  backdrop-filter: blur(14px);
}
@media (min-width: 768px) { .site-nav { padding: 14px 40px; } }
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.nav-brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: #fff;
  overflow: hidden; flex-shrink: 0;
}
.nav-brand .mark.has-img {
  background: transparent;
  border: 1px solid var(--border);
}
.nav-brand .mark img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.nav-links {
  display: none; align-items: center; gap: 4px;
  font-size: 14px; color: var(--text-muted);
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  transition: .15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.active {
  color: var(--nav-active-text, var(--accent));
  background: var(--nav-active-bg, var(--accent-soft));
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent; color: var(--text);
}
@media (min-width: 768px) { .nav-toggle { display: none; } }
.nav-drawer {
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.96);
}
.nav-drawer.open { display: flex; }
@media (min-width: 768px) { .nav-drawer { display: none !important; } }
.nav-drawer a {
  padding: 12px 14px; border-radius: 8px;
  color: var(--text-muted); font-size: 14px;
}
.nav-drawer a.active, .nav-drawer a:hover {
  color: var(--text); background: rgba(255,255,255,.05);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; transition: .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }

/* —— Disclaimer —— */
.risk-bar {
  padding: 10px 20px;
  font-size: 12px; line-height: 1.55;
  color: var(--text-dim);
  background: rgba(245, 158, 11, 0.06);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  text-align: center;
}
@media (min-width: 768px) { .risk-bar { padding: 10px 40px; } }

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(78dvh, 640px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px 20px 52px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero { padding: 64px 40px 72px; justify-content: center; min-height: min(82dvh, 700px); }
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 50% at 72% 18%, rgba(74, 163, 240, 0.16), transparent 55%),
    radial-gradient(ellipse 45% 35% at 8% 85%, rgba(34, 211, 238, 0.07), transparent 50%),
    linear-gradient(180deg, #0b0e14 0%, #0b0e14 100%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.2; pointer-events: none;
  background-image:
    linear-gradient(rgba(74,163,240,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,163,240,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 25%, transparent 92%);
}
.hero-chart {
  position: absolute; right: -2%; top: 18%; width: min(52vw, 520px); height: 280px;
  opacity: 0.35; pointer-events: none;
  animation: drift 12s ease-in-out infinite;
}
.hero-chart svg { width: 100%; height: 100%; }
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1120px; width: 100%; margin: 0 auto;
}
.brand-hero {
  font-size: clamp(2.5rem, 7.5vw, 4.25rem);
  font-weight: 700; line-height: 1.05; margin: 0 0 16px;
  background: linear-gradient(120deg, #fff 18%, #7ec4f8 65%, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fadeUp .65s ease both;
}
.hero-lead {
  margin: 0 0 26px; max-width: 32rem;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--text-muted); line-height: 1.7;
  animation: fadeUp .65s ease .06s both;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 10px;
  animation: fadeUp .65s ease .12s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* —— Layout —— */
.page-wrap {
  max-width: 1120px; margin: 0 auto;
  padding: 36px 20px 64px;
}
@media (min-width: 768px) { .page-wrap { padding: 48px 40px 80px; } }
.page-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700;
}
.page-desc {
  margin: 0 0 28px; font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 40rem;
}
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px; margin-bottom: 20px;
}
.section-head h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.7rem); font-weight: 700; }
.section-head p { margin: 6px 0 0; font-size: 13px; color: var(--text-dim); max-width: 34rem; line-height: 1.55; }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.toolbar .search {
  flex: 1; min-width: 180px;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--input-bg, rgba(18,23,34,.7));
  color: var(--text); font-size: 14px;
}
.toolbar .search:focus {
  outline: none; border-color: var(--accent-border);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: 13px;
}
.filters button.active {
  background: var(--nav-active-bg, var(--accent-soft));
  border-color: var(--accent-border);
  color: var(--nav-active-text, var(--accent));
}
.sort-select {
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--input-bg, rgba(18,23,34,.7));
  color: var(--text); font-size: 13px;
}

/* —— Signal list (xinhaofx-style metrics rows) —— */
.signal-list {
  display: flex; flex-direction: column; gap: 10px;
}
.signal-row {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg, rgba(18,23,34,.72));
  transition: border-color .15s, background .15s;
  animation: fadeUp .45s ease both;
  cursor: pointer;
}
.signal-row:hover {
  border-color: var(--accent-border);
  background: rgba(22, 28, 40, 0.9);
}
@media (min-width: 900px) {
  .signal-row {
    grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(90px, 1fr)) auto;
    align-items: center;
  }
}
.signal-row .info .name {
  margin: 0; font-size: 1.02rem; font-weight: 700;
}
.signal-row .info .meta {
  margin: 5px 0 0; font-size: 12px; color: var(--text-dim); line-height: 1.45;
}
.signal-row .metric .k {
  font-size: 11px; color: var(--text-dim); margin-bottom: 4px;
}
.signal-row .metric .v {
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.signal-row .actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
@media (max-width: 899px) {
  .signal-row .metrics-m {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  }
  .signal-row .actions { margin-top: 4px; }
}
@media (min-width: 900px) {
  .signal-row .metrics-m { display: contents; }
}
.list-head {
  display: none;
  gap: 14px; padding: 0 18px 8px;
  font-size: 12px; color: var(--text-dim); font-weight: 500;
}
@media (min-width: 900px) {
  .list-head {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(90px, 1fr)) auto;
  }
}
.list-empty {
  text-align: center; padding: 48px 16px; color: var(--text-dim); font-size: 14px;
}

/* Featured on home */
.feat-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
.feat-card {
  padding: 18px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg, rgba(18,23,34,.72));
  transition: border-color .15s;
  animation: fadeUp .5s ease both;
}
.feat-card:hover { border-color: var(--accent-border); }
.feat-card .name { margin: 0; font-size: 1.05rem; font-weight: 700; }
.feat-card .meta { margin: 4px 0 14px; font-size: 12px; color: var(--text-dim); }
.feat-card .stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 480px) {
  .feat-card .stats { grid-template-columns: repeat(4, 1fr); }
}
.feat-card .stats .k { font-size: 11px; color: var(--text-dim); }
.feat-card .stats .v { font-size: 14px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* —— Detail —— */
.detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted); margin-bottom: 18px;
}
.detail-back:hover { color: var(--accent); }
.detail-hero {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.detail-hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
.detail-hero .sub { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.detail-hero .desc { margin: 10px 0 0; font-size: 14px; color: var(--text-muted); max-width: 36rem; line-height: 1.65; }

.kpi-grid {
  display: grid; gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 22px;
}
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi {
  padding: 16px; border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(18, 23, 34, 0.55);
}
.kpi .k { font-size: 12px; color: var(--text-dim); margin: 0 0 6px; }
.kpi .v { margin: 0; font-size: clamp(1.15rem, 2.5vw, 1.45rem); font-weight: 700; font-variant-numeric: tabular-nums; }

.acct-bar {
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  padding: 12px 16px; margin-bottom: 18px;
  border-radius: 10px; border: 1px solid var(--border);
  background: rgba(0,0,0,.15);
  font-size: 13px; color: var(--text-muted);
}
.acct-bar strong { color: var(--text); font-weight: 600; }

.detail-tabs {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.detail-tabs button {
  padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
}
.detail-tabs button.active {
  background: var(--nav-active-bg, var(--accent-soft));
  border-color: var(--accent-border);
  color: var(--nav-active-text, var(--accent));
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
table.data {
  width: 100%; border-collapse: collapse; min-width: 720px;
  font-size: 13px;
}
table.data th, table.data td {
  padding: 11px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  font-size: 12px; font-weight: 500; color: var(--text-dim);
  background: rgba(0,0,0,.2); white-space: nowrap;
}
table.data tr:last-child td { border-bottom: none; }
table.data td.mono { font-size: 12.5px; }

/* —— How —— */
.how {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how-step {
  padding: 22px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(18, 23, 34, 0.5);
}
.how-step .n {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 700; color: var(--accent);
  margin-bottom: 10px;
}
.how-step h3 { margin: 0 0 8px; font-size: 16px; }
.how-step p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.65; }

.cta-band {
  margin-top: 40px;
  padding: 36px 24px;
  border-radius: 14px;
  border: 1px solid var(--accent-border);
  background:
    radial-gradient(500px 180px at 12% 0%, rgba(74,163,240,.12), transparent 60%),
    linear-gradient(180deg, #161c2a, #121722);
  text-align: center;
}
.cta-band h2 { margin: 0 0 10px; font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
.cta-band p { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; }

.home-block { padding: 48px 20px; max-width: 1120px; margin: 0 auto; }
@media (min-width: 768px) { .home-block { padding: 56px 40px; } }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px; color: var(--text-dim);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.badge-live {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 26%, transparent);
}
.badge-hot {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: pulse 1.6s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* H5 / 手机自适应补强（注册页 / 旧 community 壳） */
@media (max-width: 767px) {
  .site-nav { padding: 12px 14px; gap: 8px; }
  .page-wrap { padding: 24px 14px 48px; }
  .auth-card, .register-card, .card {
    padding: 20px 16px !important;
    border-radius: 16px;
  }
  .btn, .nav-toggle, .site-nav .btn {
    min-height: 44px;
  }
  input, select, textarea {
    font-size: 16px;
    min-height: 44px;
  }
  .kpi-grid { grid-template-columns: 1fr 1fr !important; }
  .feat-grid { grid-template-columns: 1fr !important; }
  .how { grid-template-columns: 1fr !important; }
  .home-hero h1 { font-size: clamp(28px, 10vw, 42px) !important; }
  .risk-bar { text-align: left; line-height: 1.45; }
}
