:root {
  --bg: #0b1020;
  --bg-2: #121a33;
  --card: #172142;
  --card-2: #1e2b52;
  --line: #2a3767;
  --text: #e8ecf8;
  --muted: #93a1c9;
  --accent: #4f8cff;
  --accent-2: #22d3a6;
  --danger: #ff5c7a;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 20% -10%, #1a2750 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 32, .75);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 18px; margin: 0; letter-spacing: .5px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2);
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.tag {
  font-size: 12px; color: var(--accent-2);
  border: 1px solid rgba(34,211,166,.35);
  background: rgba(34,211,166,.08);
  padding: 2px 8px; border-radius: 999px;
}
.status { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; background: var(--bg-2);
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px;
  padding: 30px 22px 10px; max-width: 1280px; margin: 0 auto;
}
.hero-left h2 { margin: 4px 0 12px; font-size: 28px; }
.hero-left p { color: var(--muted); line-height: 1.75; margin: 0 0 18px; }
.hero-left b { color: var(--accent-2); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.meta { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.9; }

.btn {
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); padding: 9px 16px; border-radius: 10px;
  font-size: 14px; cursor: pointer; transition: .18s;
}
.btn:hover { background: var(--card-2); border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #3b6fe0); border: none; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 播放器 ---------- */
.hero-player { display: flex; flex-direction: column; gap: 10px; }
.player-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line); aspect-ratio: 16 / 9;
}
.player-wrap video { width: 100%; height: 100%; display: block; background: #000; }
.player-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(6,10,22,.72); color: var(--muted); font-size: 14px;
  pointer-events: none; transition: opacity .25s;
}
.player-overlay.hide { opacity: 0; }
.now { font-size: 14px; color: var(--accent-2); min-height: 20px; }
.lines { display: flex; gap: 8px; flex-wrap: wrap; }
.line-btn {
  font-size: 12px; padding: 5px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer;
}
.line-btn.active { border-color: var(--accent-2); color: var(--accent-2); background: rgba(34,211,166,.1); }
.hint { font-size: 12px; color: #ffcf5c; min-height: 0; line-height: 1.6; }

/* ---------- 频道网格 ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 10px 22px 40px; }
.section-title { font-size: 16px; margin: 22px 0 14px; color: var(--text); }
.section-title span { font-size: 12px; color: var(--muted); font-weight: normal; margin-left: 8px; }
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; cursor: pointer; transition: .2s;
  display: flex; flex-direction: column; gap: 10px;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 26px rgba(0,0,0,.35); }
.card.active { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2) inset; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-logo {
  font-size: 13px; font-weight: 700; color: #fff;
  min-width: 40px; height: 34px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f8cff, #2a53b8);
  letter-spacing: .5px;
  font-family: "Segoe UI", Arial, sans-serif;
}
.card-name { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 12px; color: var(--muted); }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 11px; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted); background: var(--bg-2);
}
.badge.ok { color: var(--accent-2); border-color: rgba(34,211,166,.4); }
.badge.warn { color: #ffcf5c; border-color: rgba(255,207,92,.4); }
.badge.bad { color: var(--danger); border-color: rgba(255,92,122,.4); }
.card-foot { display: flex; gap: 8px; margin-top: auto; }
.mini {
  font-size: 11px; padding: 4px 8px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted);
}
.mini:hover { color: var(--text); border-color: var(--accent); }

/* ---------- 其他 ---------- */
footer {
  max-width: 1280px; margin: 0 auto; padding: 18px 22px 40px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.9;
}
footer .warn { color: #ffb4c3; }
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--card-2); border: 1px solid var(--accent); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-left h2 { font-size: 22px; }
}
