:root {
  --bg: #06080d;
  --panel: rgba(9, 15, 22, 0.82);
  --panel-strong: rgba(10, 20, 29, 0.96);
  --ink: #e9fff8;
  --muted: #8aa39b;
  --line: rgba(42, 255, 210, 0.22);
  --line-strong: rgba(42, 255, 210, 0.46);
  --green: #2affd2;
  --red: #ff476f;
  --amber: #ffca5f;
  --violet: #8f6dff;
  --shadow: 0 0 36px rgba(42, 255, 210, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    linear-gradient(rgba(42, 255, 210, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 255, 210, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 10% 12%, rgba(255, 71, 111, 0.18), transparent 28rem),
    radial-gradient(circle at 78% 18%, rgba(42, 255, 210, 0.14), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(143, 109, 255, 0.12), transparent 26rem),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto, auto, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 8px
  );
  opacity: 0.25;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 54px;
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  width: 100%;
  min-width: 0;
}

.ai-rail {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 44px);
  padding: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(42, 255, 210, 0.08), transparent 220px),
    var(--panel);
  box-shadow: var(--shadow);
}

.ai-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-brand span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #03100d;
  background: var(--green);
  font-weight: 900;
}

.ai-brand strong {
  color: var(--ink);
  font-size: 18px;
}

.ai-model {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(42, 255, 210, 0.16);
  background: rgba(2, 9, 13, 0.54);
}

.ai-model span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ai-model b {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-size: 15px;
}

.ai-form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.ai-form textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 13px;
  border: 1px solid rgba(42, 255, 210, 0.22);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
  font: inherit;
  line-height: 1.55;
}

.ai-form textarea:focus {
  border-color: var(--line-strong);
}

.ai-form button {
  height: 46px;
  border: 0;
  color: #03100d;
  background: linear-gradient(135deg, var(--green), #a6ffef);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.ai-form button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.ai-status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.ai-answer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 255, 210, 0.16);
  color: #d7e8e1;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(42, 255, 210, 0.55);
  background: #fff;
  box-shadow: 0 0 22px rgba(255, 71, 111, 0.3), 0 0 18px rgba(42, 255, 210, 0.22);
}

.brand span {
  font-size: 18px;
  color: var(--green);
  text-shadow: 0 0 18px rgba(42, 255, 210, 0.45);
}

.topbar nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  color: #b7cbc4;
  font-size: 14px;
}

.topbar nav a:hover {
  color: var(--green);
}

.hero {
  min-height: 560px;
  padding: clamp(46px, 7vw, 86px) 0 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.55fr);
  align-items: center;
  gap: clamp(26px, 5vw, 64px);
}

.hero-copy {
  position: relative;
}

.hero-copy::before {
  content: "NF-MARKET//LIVE";
  position: absolute;
  left: 0;
  top: -48px;
  color: rgba(42, 255, 210, 0.08);
  font-size: clamp(42px, 8vw, 118px);
  font-weight: 900;
  line-height: 0.9;
  pointer-events: none;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 11px;
  color: var(--green);
  border: 1px solid var(--line);
  background: rgba(42, 255, 210, 0.06);
  font-size: 12px;
  font-weight: 900;
}

h1 {
  margin: 0;
  max-width: 760px;
  color: #f4fffb;
  font-size: clamp(58px, 9vw, 112px);
  line-height: 0.94;
  letter-spacing: 0;
  font-weight: 900;
  text-shadow: 0 0 26px rgba(42, 255, 210, 0.14);
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.search {
  width: min(760px, 100%);
  margin-top: 34px;
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 10, 16, 0.82);
  box-shadow: var(--shadow);
}

.search input,
.search button,
#loadHot {
  height: 52px;
  border: 0;
  border-radius: 0;
  font: inherit;
}

.search input {
  min-width: 0;
  padding: 0 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.search button,
#loadHot {
  color: #03100d;
  background: linear-gradient(135deg, var(--green), #a6ffef);
  cursor: pointer;
  font-weight: 900;
}

.status {
  min-height: 24px;
  margin: 16px 0 0;
  color: #b7cbc4;
}

.hero-panel {
  min-height: 330px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(42, 255, 210, 0.07), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hero-panel strong {
  margin-top: 22px;
  color: var(--green);
  font-size: 74px;
  line-height: 1;
  text-shadow: 0 0 30px rgba(42, 255, 210, 0.38);
}

.hero-panel small {
  margin-top: 20px;
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.hidden {
  display: none;
}

.summary-grid,
.content-grid,
.hot-grid {
  display: grid;
  gap: 16px;
}

.summary-grid {
  grid-template-columns: 1.5fr repeat(3, minmax(160px, 1fr));
  margin-bottom: 16px;
}

.content-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.65fr) minmax(260px, 0.65fr);
}

.card,
.hot-section {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card {
  padding: 20px;
}

.main-card {
  background: linear-gradient(135deg, rgba(42, 255, 210, 0.09), rgba(255, 71, 111, 0.04)), var(--panel);
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.card h2,
.card h3,
.card p {
  margin: 0;
}

.card h2 {
  margin-top: 10px;
  color: var(--ink);
  font-size: 28px;
}

.card strong {
  display: block;
  margin-top: 10px;
  color: var(--green);
  font-size: 30px;
}

.main-card p {
  margin-top: 8px;
  color: var(--muted);
}

.section-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head h3 {
  color: var(--ink);
  font-size: 18px;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
}

.chart-card img {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #fff;
}

.wide {
  grid-column: 1 / -1;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: #d7e8e1;
  line-height: 1.75;
}

.risk {
  color: #ff9cac;
}

.indicators,
.patterns,
.details {
  display: grid;
  gap: 12px;
}

.indicators {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.indicator-card {
  min-height: 150px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(42, 255, 210, 0.18);
  background: rgba(2, 9, 13, 0.62);
}

.indicator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.indicator-head strong {
  color: #dffdf5;
  font-size: 14px;
}

.indicator-head span {
  min-width: 58px;
  padding: 5px 9px;
  color: #06100d;
  background: #8aa39b;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.indicator-card.good .indicator-head span {
  background: var(--green);
}

.indicator-card.risk .indicator-head span {
  color: #fff;
  background: var(--red);
}

.indicator-card.watch .indicator-head span {
  background: var(--amber);
}

.indicator-main {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
}

.indicator-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.indicator-card small {
  margin-top: auto;
  color: #b2c7c0;
  font-size: 12px;
}

.indicator-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.indicator-summary span,
.detail,
.pattern {
  padding: 10px 12px;
  border: 1px solid rgba(42, 255, 210, 0.16);
  color: #d7e8e1;
  background: rgba(2, 9, 13, 0.54);
  line-height: 1.65;
}

.hot-section {
  margin-top: 18px;
  padding: 22px;
}

.hot-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hot-item {
  padding: 12px;
  border: 1px solid rgba(42, 255, 210, 0.18);
  color: var(--ink);
  background: rgba(2, 9, 13, 0.62);
  cursor: pointer;
  text-align: left;
}

.hot-item strong,
.hot-item span {
  display: block;
}

.hot-item span {
  margin-top: 8px;
  font-weight: 900;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .ai-rail {
    position: static;
    min-height: 0;
  }

  .hero,
  .summary-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 28px, 1440px);
    padding-top: 14px;
  }

  .topbar {
    height: auto;
    padding-bottom: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .search {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 54px;
  }
}
