:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: #0b0f14;
  --row: #0f141b;
  --line: rgba(160, 180, 205, .10);
  --text: #edf7ff;
  --muted: #758294;
  --soft: #9eacbd;
  --ice: #dff4ff;
  --sky: #63caff;
  --green: #67f4a9;
  --gold: #f6c75a;
  --red: #ff667a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% -10%, rgba(99, 202, 255, .12), transparent 24rem),
    linear-gradient(180deg, #040609, var(--bg));
  color: var(--text);
  font: 12px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
.terminal { width: min(980px, calc(100vw - 24px)); margin: 12px auto 40px; }

.topline {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 10px;
  background: rgba(5, 7, 10, .88);
  backdrop-filter: blur(16px);
}
.topline b { font-size: 13px; letter-spacing: -.01em; }
.topline span {
  margin-left: 9px;
  color: var(--sky);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.topline .bad { color: var(--red); }
input {
  width: min(320px, 45vw);
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0e1319;
  color: var(--text);
  padding: 0 10px;
  outline: none;
  font: inherit;
}
input:focus { border-color: rgba(99,202,255,.35); }

.claim-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-bottom: 9px;
  padding: 3px;
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 32px rgba(0,0,0,.26);
}
.claim-strip::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: max(120%, 540px);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  background: conic-gradient(from 0turn, transparent, rgba(223,244,255,.95), rgba(99,202,255,.55), transparent);
  filter: blur(1px);
  animation: spin 3s linear infinite;
}
.claim-strip::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 1px;
  border-radius: 9px;
  background: rgba(8, 12, 16, .94);
  border: 1px solid rgba(180, 205, 230, .14);
}
.claim-strip.first::before {
  background: conic-gradient(from 0turn, transparent, rgba(246,199,90,.96), rgba(251,146,60,.48), transparent);
}
.claim-strip.fresh { animation: pop .8s cubic-bezier(.2,.88,.2,1); }
.claim-hot,
.claim-history {
  position: relative;
  z-index: 2;
}
.claim-hot {
  min-width: 142px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(223,244,255,.20);
  border-radius: 7px;
  background: rgba(16, 23, 30, .86);
}
.claim-strip.first .claim-hot {
  border-color: rgba(246,199,90,.58);
  background: linear-gradient(180deg, rgba(70,48,18,.96), rgba(25,18,10,.94));
}
.claim-hot span { display: grid; gap: 1px; min-width: 0; }
.claim-hot b,
.claim-history span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.claim-hot b { color: white; font-size: 11px; }
.claim-hot em {
  color: var(--soft);
  font-style: normal;
  font-size: 10px;
}
.claim-history {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.claim-history a {
  height: 24px;
  max-width: 105px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 7px;
  color: #dcefff;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(223,244,255,.12);
}
.claim-history a.first {
  color: #ffe9a8;
  border-color: rgba(246,199,90,.36);
}
.claim-history b {
  color: var(--muted);
  font-size: 10px;
}

.stream-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.panel-head em {
  color: var(--sky);
  font-style: normal;
}
.stream-list { display: grid; }
.stream-row {
  display: grid;
  grid-template-columns: 38px minmax(250px, 1fr) 82px 86px 54px 58px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--row);
}
.stream-row:last-child { border-bottom: 0; }
.stream-row:hover {
  background: #141a22;
  box-shadow: inset 2px 0 0 rgba(99,202,255,.42);
}
.icon {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.08);
  background: #090d12;
}
.icon.fallback {
  display: grid;
  place-items: center;
  color: var(--sky);
  font-size: 10px;
  font-weight: 950;
  background: linear-gradient(145deg, rgba(99,202,255,.14), rgba(255,255,255,.025));
}
.main { min-width: 0; }
.title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.title b { font-size: 13px; font-weight: 950; letter-spacing: -.015em; }
.title span {
  min-width: 0;
  color: var(--soft);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.sub a { color: var(--sky); font-weight: 760; }
code {
  color: #7d8998;
  font: 10.5px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
mark {
  color: #d3f0ff;
  background: rgba(99,202,255,.09);
  border-left: 1px solid rgba(99,202,255,.20);
  padding: 0 0 0 7px;
}
.metric,
.time { text-align: right; font-variant-numeric: tabular-nums; }
.metric b {
  display: block;
  font-size: 12px;
  font-weight: 950;
}
.metric span,
.time {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.actions { display: flex; justify-content: flex-end; }
.actions a {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #dcf4ff;
  background: rgba(99,202,255,.07);
  box-shadow: inset 0 0 0 1px rgba(99,202,255,.15);
  font-size: 10.5px;
  font-weight: 850;
}
.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0turn); }
  to { transform: translate(-50%, -50%) rotate(1turn); }
}
@keyframes pop {
  0% { transform: translateY(-5px) scale(.985); filter: brightness(1.7); }
  22% { transform: translateY(-1px) scale(1.015); filter: brightness(1.3); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@media (max-width: 760px) {
  .topline { align-items: stretch; flex-direction: column; }
  input { width: 100%; }
  .stream-row {
    grid-template-columns: 34px minmax(0, 1fr) 70px;
    gap: 8px;
  }
  .stream-row .metric:nth-of-type(2),
  .time,
  .actions {
    grid-column: 2 / -1;
    text-align: left;
    justify-content: flex-start;
  }
}
