:root {
  --bg: #080b12;
  --panel: rgba(14, 20, 33, 0.88);
  --panel-strong: rgba(21, 31, 49, 0.94);
  --ink: #f3f7ff;
  --muted: #93a1b7;
  --line: rgba(148, 163, 184, 0.22);
  --blue: #38bdf8;
  --blue-dark: #0f5f86;
  --red: #fb5168;
  --amber: #f6c453;
  --green: #34d399;
  --violet: #9b7cff;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, #080b12 0%, #111827 44%, #1b1023 100%);
  background-size: 40px 40px, 40px 40px, auto;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 120px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(100deg, rgba(56, 189, 248, 0.14), rgba(251, 81, 104, 0.12)),
    rgba(8, 11, 18, 0.82);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--red), var(--amber), var(--green));
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-asset {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 36px rgba(56, 189, 248, 0.16);
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
  color: #ffffff;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
}

.topbar-tools {
  display: grid;
  justify-items: end;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  color: #b8ffe4;
  font-size: 13px;
  font-weight: 900;
}

.live-badge span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.chip {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0 13px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(135deg, var(--red), #ff8a4c);
  color: #fff;
  box-shadow: 0 12px 26px rgba(251, 81, 104, 0.25);
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
  color: #c9efff;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: #e8eef9;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.signal-card {
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(14, 20, 33, 0.86);
  box-shadow: var(--shadow);
}

.signal-card span,
.signal-card small {
  display: block;
  color: var(--muted);
}

.signal-card strong {
  display: block;
  margin: 4px 0;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.signal-card.highlight {
  border-color: rgba(246, 196, 83, 0.5);
  background:
    linear-gradient(135deg, rgba(246, 196, 83, 0.18), rgba(251, 81, 104, 0.14)),
    rgba(14, 20, 33, 0.9);
}

.dashboard {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.control-panel,
.feed-panel,
.insight-panel > section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.control-panel,
.feed-panel,
.brief-card,
.detail-card,
.platform-card {
  padding: 18px;
}

.insight-panel {
  display: grid;
  gap: 18px;
}

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

.section-heading.compact {
  margin-bottom: 12px;
}

.date-pill,
.result-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span,
.filter-title {
  color: #d8e2f2;
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 10, 20, 0.72);
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.filter-block {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 34px;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: #d9e4f5;
}

.chip.active {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.18);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.stats-grid div {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.stats-grid strong {
  display: block;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.1;
}

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

.add-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.full-button {
  width: 100%;
}

.topic-list {
  display: grid;
  gap: 12px;
}

.topic-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 46px;
  gap: 12px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(15, 23, 42, 0.84);
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), transparent);
}

.topic-card.rank-1 {
  border-color: rgba(246, 196, 83, 0.56);
}

.topic-card.rank-1::before {
  background: linear-gradient(180deg, var(--amber), var(--red));
}

.topic-card.rank-2::before {
  background: linear-gradient(180deg, var(--blue), var(--violet));
}

.topic-card.rank-3::before {
  background: linear-gradient(180deg, var(--green), var(--blue));
}

.topic-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.rank {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(251, 81, 104, 0.26), rgba(246, 196, 83, 0.18));
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.topic-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.topic-head span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.platform {
  background: rgba(56, 189, 248, 0.14);
  color: #bcecff;
}

.category {
  background: rgba(246, 196, 83, 0.14);
  color: var(--amber);
}

.time {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.topic-main p {
  margin-bottom: 10px;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-row span {
  background: rgba(52, 211, 153, 0.11);
  color: var(--green);
}

.heat-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
}

.heat-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.heat-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.heat-line strong {
  color: #ffd0d7;
  text-align: right;
}

.topic-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.icon-button {
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: #e8eef9;
}

.icon-button.active {
  border-color: var(--red);
  background: rgba(251, 81, 104, 0.16);
  color: var(--red);
}

.brief-output {
  display: block;
  min-height: 230px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(251, 81, 104, 0.06)),
    #070b13;
  color: #edf3fb;
  white-space: pre-wrap;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 14px;
}

.detail-box {
  color: var(--muted);
}

.detail-box h3 {
  color: #ffffff;
}

.detail-box dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.detail-box div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-box dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-box dd {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
}

.detail-advice {
  margin-bottom: 0;
  color: var(--green);
}

.platform-bars {
  display: grid;
  gap: 10px;
}

.platform-bar {
  display: grid;
  gap: 6px;
}

.platform-bar div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.platform-bar strong {
  color: var(--ink);
}

.platform-bar i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .dashboard {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .insight-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-tools {
    justify-items: start;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .dashboard,
  .insight-panel,
  .signal-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1380px);
    padding-top: 12px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-asset {
    width: 50px;
    height: 50px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .two-col,
  .stats-grid,
  .detail-box dl {
    grid-template-columns: 1fr;
  }

  .topic-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .rank {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .topic-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 42px);
    justify-content: end;
  }

  .topbar-actions button {
    flex: 1 1 130px;
  }
}

/* Neon club upgrade: more theatrical color and a glowing animated top headline. */
:root {
  --bg: #06030f;
  --panel: rgba(17, 12, 35, 0.88);
  --panel-strong: rgba(30, 18, 56, 0.94);
  --ink: #fff7ff;
  --muted: #b7a8ce;
  --line: rgba(255, 255, 255, 0.16);
  --blue: #22d3ee;
  --blue-dark: #0e7490;
  --red: #ff3d81;
  --amber: #ffd166;
  --green: #2df8a9;
  --violet: #a855f7;
  --pink: #ff4fd8;
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 79, 216, 0.26), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 70% 82%, rgba(255, 209, 102, 0.16), transparent 24%),
    linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(135deg, #05020c 0%, #150827 43%, #2a0b33 100%);
}

.topbar {
  background:
    linear-gradient(100deg, rgba(168, 85, 247, 0.22), rgba(255, 61, 129, 0.18), rgba(34, 211, 238, 0.14)),
    rgba(8, 11, 18, 0.82);
  box-shadow: 0 22px 66px rgba(255, 79, 216, 0.14), var(--shadow);
}

.topbar::after {
  background: linear-gradient(90deg, var(--blue), var(--pink), var(--amber), var(--green), var(--violet));
  box-shadow: 0 0 22px rgba(255, 79, 216, 0.8);
}

.brand-asset {
  box-shadow: 0 0 24px rgba(255, 79, 216, 0.38), 0 18px 36px rgba(34, 211, 238, 0.16);
}

h1 {
  text-shadow: 0 0 18px rgba(255, 79, 216, 0.45), 0 0 32px rgba(34, 211, 238, 0.24);
}

.primary-button {
  background: linear-gradient(135deg, var(--pink), var(--red), #ff9f1c);
  box-shadow: 0 0 22px rgba(255, 79, 216, 0.32), 0 12px 26px rgba(251, 81, 104, 0.25);
}

.live-badge {
  border-color: rgba(45, 248, 169, 0.38);
  background: linear-gradient(135deg, rgba(45, 248, 169, 0.12), rgba(255, 79, 216, 0.1));
}

.signal-card,
.control-panel,
.feed-panel,
.insight-panel > section {
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.08), 0 22px 56px rgba(0, 0, 0, 0.38);
}

.signal-card.highlight {
  border-color: rgba(255, 209, 102, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(255, 79, 216, 0.16)),
    rgba(14, 20, 33, 0.9);
}

.chip.active {
  background: linear-gradient(135deg, var(--blue), var(--violet), var(--pink));
  box-shadow: 0 0 18px rgba(255, 79, 216, 0.3), 0 10px 22px rgba(34, 211, 238, 0.18);
}

.topic-card {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(15, 23, 42, 0.84);
}

.topic-card.rank-1 {
  min-height: 190px;
  border-color: rgba(255, 209, 102, 0.82);
  background:
    linear-gradient(115deg, rgba(255, 209, 102, 0.16), rgba(255, 79, 216, 0.18), rgba(34, 211, 238, 0.1)),
    rgba(23, 10, 36, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 30px rgba(255, 79, 216, 0.38),
    0 0 58px rgba(255, 209, 102, 0.2),
    var(--shadow);
  animation: headlinePulse 2.4s ease-in-out infinite;
}

.topic-card.rank-1::before {
  width: 6px;
  background: linear-gradient(180deg, var(--amber), var(--pink), var(--blue));
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.9);
}

.topic-card.rank-1::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -24%;
  width: 32%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: headlineSweep 3.6s ease-in-out infinite;
  pointer-events: none;
}

.rank-1 .rank {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #ffd166, #ff4fd8 52%, #22d3ee);
  color: #19061e;
  font-size: 25px;
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.55), 0 0 34px rgba(255, 79, 216, 0.42);
  animation: rankGlow 1.8s ease-in-out infinite alternate;
}

.headline-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 209, 102, 0.58);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.22), rgba(255, 79, 216, 0.18));
  color: #fff8db;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.34);
}

.headline-badge i {
  font-style: normal;
  color: #bff7ff;
  font-size: 11px;
  text-transform: uppercase;
}

.rank-1 h3 {
  padding-right: 120px;
  color: #ffffff;
  font-size: 22px;
  text-shadow: 0 0 18px rgba(255, 79, 216, 0.38);
}

.heat-track span {
  background: linear-gradient(90deg, var(--amber), var(--pink), var(--blue));
  box-shadow: 0 0 16px rgba(255, 79, 216, 0.42);
}

.rank-1 .heat-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.rank-1 .heat-track span {
  animation: heatFlicker 1.4s ease-in-out infinite alternate;
}

@keyframes headlinePulse {
  0%, 100% {
    transform: translateY(0);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-2px);
    filter: saturate(1.24);
  }
}

@keyframes headlineSweep {
  0% {
    left: -34%;
    opacity: 0;
  }
  18% {
    opacity: 0.85;
  }
  48% {
    left: 110%;
    opacity: 0;
  }
  100% {
    left: 110%;
    opacity: 0;
  }
}

@keyframes rankGlow {
  from {
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.42), 0 0 30px rgba(255, 79, 216, 0.28);
  }
  to {
    box-shadow: 0 0 28px rgba(255, 209, 102, 0.76), 0 0 52px rgba(255, 79, 216, 0.5);
  }
}

@keyframes heatFlicker {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.32);
  }
}

@media (max-width: 620px) {
  .topic-card.rank-1 {
    min-height: 220px;
  }

  .rank-1 .rank {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .rank-1 h3 {
    padding-right: 0;
    padding-top: 38px;
    font-size: 20px;
  }

  .headline-badge {
    left: 12px;
    right: auto;
  }
}
