:root {
  --bg: #05070b;
  --bg-soft: #0b1018;
  --panel: rgba(9, 13, 20, 0.68);
  --panel-strong: rgba(12, 17, 25, 0.84);
  --line: rgba(150, 255, 219, 0.12);
  --line-strong: rgba(150, 255, 219, 0.2);
  --text: #eef4ff;
  --muted: #a6b2c6;
  --dim: #7a8498;
  --mint: #8af7c8;
  --cyan: #74c8ff;
  --violet: #8c7cff;
  --amber: #f3c96b;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
}

.bg-base,
.bg-grid,
.bg-orb,
.bg-scan,
.bg-noise,
.pointer-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-base {
  background:
    radial-gradient(circle at 18% 18%, rgba(67, 214, 255, 0.12), transparent 22%),
    radial-gradient(circle at 78% 16%, rgba(128, 116, 255, 0.16), transparent 24%),
    radial-gradient(circle at 50% 72%, rgba(78, 255, 191, 0.08), transparent 30%),
    linear-gradient(180deg, #04060a 0%, #06090e 46%, #05070b 100%);
}

.bg-grid {
  inset: -8%;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(131, 239, 203, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(131, 239, 203, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(1400px) rotateX(74deg) scale(1.8) translateY(18%);
  transform-origin: center bottom;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.9) 18%, rgba(255,255,255,0.18) 64%, transparent 100%);
}

.bg-orb {
  filter: blur(86px);
  opacity: 0.42;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb-a {
  inset: auto auto -12% -10%;
  width: 42vw;
  height: 42vw;
  max-width: 560px;
  max-height: 560px;
  background: radial-gradient(circle, rgba(98, 214, 255, 0.38), transparent 68%);
}

.orb-b {
  inset: -8% -6% auto auto;
  width: 34vw;
  height: 34vw;
  max-width: 460px;
  max-height: 460px;
  background: radial-gradient(circle, rgba(138, 124, 255, 0.34), transparent 70%);
  animation-duration: 21s;
}

.orb-c {
  inset: 28% auto auto 34%;
  width: 28vw;
  height: 28vw;
  max-width: 380px;
  max-height: 380px;
  background: radial-gradient(circle, rgba(117, 255, 191, 0.2), transparent 72%);
  animation-duration: 24s;
}

.bg-scan {
  opacity: 0.32;
  background:
    linear-gradient(110deg, transparent 18%, rgba(255,255,255,0.03) 34%, rgba(120, 228, 255, 0.09) 42%, transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 46%);
  mix-blend-mode: screen;
  animation: sweep 15s linear infinite;
}

.bg-noise {
  opacity: 0.08;
  background-image: radial-gradient(rgba(255,255,255,0.55) 0.72px, transparent 0.8px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.7), rgba(255,255,255,0.16));
}

.pointer-glow {
  inset: -18%;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 32%), rgba(110, 247, 208, 0.12), transparent 18%),
    radial-gradient(circle at calc(var(--mx, 50%) + 12%) calc(var(--my, 32%) + 10%), rgba(101, 188, 255, 0.12), transparent 24%);
}

.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 24px clamp(18px, 2.4vw, 36px) 36px;
}

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: linear-gradient(180deg, rgba(12, 17, 25, 0.84), rgba(9, 13, 19, 0.64));
  border: 1px solid rgba(176, 242, 224, 0.12);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(110%);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

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

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.status-pill,
.ghost-btn,
.nav-chip,
.count-chip,
.tag,
.stat-card,
.channel-pill,
.meta-badge,
.inline-chip {
  border: 1px solid rgba(176, 242, 224, 0.14);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(13, 18, 26, 0.62);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 14px rgba(138, 247, 200, 0.7);
}

.ghost-btn {
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(10, 14, 21, 0.58);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.28);
  background: rgba(13, 18, 27, 0.82);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.95fr);
  gap: 22px;
  padding: clamp(24px, 3vw, 34px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  color: var(--mint);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.sidebar-card h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4.1vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-lead {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.75;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  border-radius: 20px;
  padding: 16px 18px;
  background: rgba(13, 18, 27, 0.68);
}

.stat-card .label {
  color: var(--dim);
  font-size: 0.84rem;
}

.stat-card .value {
  margin-top: 8px;
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  font-weight: 700;
}

.stat-card .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 18px 18px;
}

.nav-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.nav-row::-webkit-scrollbar {
  display: none;
}

.nav-chip {
  border-radius: 999px;
  background: rgba(11, 16, 24, 0.58);
  color: var(--muted);
  padding: 11px 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.nav-chip strong {
  color: inherit;
  font-size: 0.96rem;
}

.nav-chip span {
  font-size: 0.84rem;
  color: var(--dim);
}

.nav-chip.active {
  border-color: rgba(255,255,255,0.22);
  color: var(--text);
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.92), rgba(10, 15, 23, 0.78));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 0 1px rgba(255,255,255,0.04);
}

.nav-chip.active span {
  color: var(--mint);
}

.nav-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  background: rgba(12, 17, 24, 0.72);
  border: 1px solid rgba(176, 242, 224, 0.12);
  padding: 0 14px;
  min-height: 52px;
}

.search-label {
  color: var(--dim);
  font-size: 0.9rem;
  white-space: nowrap;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 14px 0;
}

.filter-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.feed-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.section-head h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.count-chip {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: rgba(11, 16, 23, 0.62);
  white-space: nowrap;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-card {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.76), rgba(8, 11, 17, 0.58));
  border: 1px solid rgba(176, 242, 224, 0.12);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.feed-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feed-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(13, 18, 27, 0.88), rgba(9, 12, 18, 0.72));
}

.feed-card:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(11, 16, 24, 0.58);
}

.score-pill {
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(12, 17, 26, 0.74);
  border: 1px solid rgba(255,255,255,0.1);
  text-align: right;
}

.score-pill strong {
  display: block;
  color: var(--mint);
  font-size: 1.18rem;
}

.score-pill span {
  color: var(--dim);
  font-size: 0.78rem;
}

.feed-card h3 {
  margin: 14px 0 0;
  font-size: clamp(1.14rem, 1.7vw, 1.45rem);
  line-height: 1.45;
}

.card-summary {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.78;
}

.card-reason {
  margin: 12px 0 0;
  color: #d9e8ff;
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.inline-chip,
.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(14, 20, 29, 0.62);
  color: var(--muted);
}

.card-footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(14, 20, 30, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  padding: 18px;
}

.sidebar-card h3 {
  margin-top: 8px;
  font-size: 1.08rem;
}

.mini-stats,
.channel-overview,
.pipeline-snapshot {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(12, 17, 25, 0.62);
  border: 1px solid rgba(176, 242, 224, 0.08);
}

.sidebar-stat .name,
.pipeline-row .name {
  color: var(--muted);
  font-size: 0.9rem;
}

.sidebar-stat .val,
.pipeline-row .val {
  color: var(--text);
  font-weight: 700;
}

.channel-pill {
  justify-content: space-between;
}

.channel-pill.active {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

.pipeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(12, 17, 25, 0.62);
  border: 1px solid rgba(176, 242, 224, 0.08);
}

.empty-state,
.loading-state {
  padding: 28px 20px;
  border-radius: 22px;
  color: var(--muted);
  background: rgba(12, 17, 25, 0.62);
  border: 1px solid rgba(176, 242, 224, 0.08);
}

@keyframes sweep {
  0% {
    transform: translateX(-18%) translateY(0%);
  }
  100% {
    transform: translateX(18%) translateY(1%);
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2.5%, -2%, 0) scale(1.06);
  }
}

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

  .sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .app-shell {
    padding: 14px 14px 24px;
  }

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

  .top-actions {
    justify-content: space-between;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .feed-card,
  .sidebar-card {
    padding: 18px;
  }

  .card-top {
    flex-direction: column;
  }

  .score-pill {
    align-self: flex-start;
    text-align: left;
  }

  .card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .card-link {
    justify-content: center;
  }
}
