:root {
  --bg: #0b0d12;
  --card: #12151d;
  --card-2: #171b25;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef1f7;
  --muted: #9aa3b5;
  --accent: #6ea8ff;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.glow {
  position: fixed;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(110, 168, 255, 0.20), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 头部 ---------- */
.site-header {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 20px 8px;
}

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

.logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #2b6cff, #6ea8ff);
  color: #fff;
  box-shadow: 0 6px 20px rgba(43, 108, 255, 0.35);
  flex: none;
}

.site-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- 布局 ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 40px;
  flex: 1;
}

/* ---------- 播放器 ---------- */
.player-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  margin-bottom: 40px;
}

.player-stage {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* 嵌入模式（B站 / YouTube / 任意 iframe） */
.embed-wrap {
  position: absolute;
  inset: 0;
  background: #000;
}

.embed-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: #cdd4e2;
  font-size: 14px;
  line-height: 1.7;
  background: rgba(8, 10, 15, 0.88);
}

.player-hint code {
  color: #ffd07a;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 5px;
  word-break: break-all;
}

.player-meta {
  padding: 18px 22px 20px;
}

.player-meta h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.muted {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- 列表 ---------- */
.list-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.list-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.count {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  all: unset;
  cursor: pointer;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 168, 255, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 30px rgba(0, 0, 0, 0.45);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #1c2333, #101420 60%, #1a2233);
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb .play-dot {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
}

.card.active .play-dot {
  background: var(--accent);
}

.card-body {
  padding: 12px 13px 14px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 28px 0;
}

.empty code {
  color: #ffd07a;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 20px 34px;
  color: #6b7488;
  font-size: 12.5px;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .site-header { padding: 32px 16px 4px; }
  .site-header h1 { font-size: 21px; }
  .wrap { padding: 18px 16px 32px; }
  .player-meta { padding: 15px 16px 17px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card-body { padding: 10px 11px 12px; }
}
