:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --text: #e8ecf1;
  --muted: #9aa4b2;
  --accent: #ff7a3d;
  --accent-2: #ffb27a;
  --line: #2a2f3a;
  --ok: #3ecf8e;
  --warn: #ffcc66;
  --err: #ff6b6b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(15,17,21,.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 1080px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 700; color: var(--text); white-space: nowrap; }
.brand span { color: var(--accent); font-weight: 500; font-size: 14px; margin-left: 6px; letter-spacing: .5px; }
.search-form { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.search-form input[type=search] {
  flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 15px;
}
.search-form select { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px; }
.search-form button {
  background: var(--accent); color: #1a1207; border: 0; border-radius: 10px; padding: 10px 18px;
  font-weight: 700; cursor: pointer;
}
.search-form button:hover { background: var(--accent-2); }

.hero { padding: 32px 0 8px; }
.hero h1 { font-size: 30px; margin: 0 0 12px; letter-spacing: -.5px; }
.hero .lead { font-size: 16px; color: #c9d2de; max-width: 820px; }
.block { margin-top: 32px; }
.block h2 { font-size: 18px; margin: 0 0 12px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.chip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 8px; font-size: 16px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

.results-head h1 { font-size: 22px; margin: 0 0 6px; }
.tabs { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.tab.active { background: var(--accent); color: #1a1207; border-color: var(--accent); font-weight: 700; }
.tab .count { opacity: .75; font-size: 12px; margin-left: 4px; }
.video-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.video-card { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.video-card .thumb { position: relative; flex: 0 0 200px; border-radius: 8px; overflow: hidden; background: #000; }
.video-card .thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-card .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.video-card .meta { min-width: 0; }
.video-card h3 { margin: 0 0 6px; font-size: 16px; line-height: 1.4; }
.video-card h3 a { color: var(--text); }
.badges { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); }
.tier-t1 { border-color: var(--ok); color: var(--ok); }
.tier-t1minus { border-color: var(--warn); color: var(--warn); }
.tier-t2 { border-color: #6aa9ff; color: #6aa9ff; }
.tier-t3 { border-color: var(--muted); color: var(--muted); }

.notice { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; color: var(--muted); }
.notice.error { border-color: var(--err); color: var(--err); }

.song h1 { font-size: 24px; margin: 0 0 6px; }
.player { position: relative; margin: 18px 0 10px; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-cover {
  all: unset; cursor: pointer; display: block; width: 100%; height: 100%; position: relative;
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.player-cover .play-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8);
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55));
}
.player-cover:hover img { opacity: .9; }
.version-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.version a { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); }
.version.current a { border-color: var(--accent); }
.version-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.attribution { margin-top: 24px; padding: 14px 16px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.attribution strong { color: var(--text); }
.prose { max-width: 780px; }
.prose h1 { font-size: 26px; }
.prose h2 { font-size: 18px; margin-top: 28px; }
.prose ul { padding-left: 20px; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 20px 40px; max-width: 1080px; margin: 0 auto; color: var(--muted); font-size: 13px; }
.site-footer p { margin: 6px 0; }

/* 播放失败提示（在播放器下方，不覆盖播放器） */
.player-error {
  margin: 8px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--err);
  border-radius: 8px;
  color: var(--err);
  font-size: 13px;
}
/* 播放器最小尺寸（合规：16:9 建议 ≥480×270） */
.player { min-width: 480px; min-height: 270px; }
@media (max-width: 760px) {
  .player { min-width: 0; min-height: 0; }
  .player iframe { min-width: 0 !important; min-height: 0 !important; }
}

/* 首页：市场切换 / 热门歌曲网格 / 场景与歌手 chips */
.market-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 4px; }
.market-tab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 14px;
}
.market-tab.active { background: var(--accent); border-color: var(--accent); color: #1a1207; font-weight: 700; }
.market-tab:hover { text-decoration: none; border-color: var(--accent); }

.song-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.song-card {
  display: flex; flex-direction: column; gap: 2px; min-height: 68px; justify-content: center;
  padding: 12px 14px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--line); color: var(--text);
}
.song-card:hover { border-color: var(--accent); text-decoration: none; }
.song-title { font-weight: 600; line-height: 1.35; }
.song-artist { color: var(--muted); }

.chip-scene { border-color: #4a3a2a; }
.chip-artist { border-color: #2f3f56; }
.chip-channel { border-color: #2c4a37; }
.tier-badge {
  display: inline-block; margin-left: 6px; font-size: 11px; padding: 0 5px;
  border-radius: 4px; background: rgba(255,255,255,.12); color: var(--muted);
}
.home-note { margin-top: 32px; }

/* 不可嵌入版本：外链播放卡片 + 卡片徽章 */
.player-external {
  position: relative; margin: 18px 0 10px; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.player-external img { width: 100%; max-width: 480px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; opacity: .85; }
.player-external p { margin: 0; }
.btn-primary {
  display: inline-block; padding: 9px 18px; border-radius: 10px;
  background: var(--accent); color: #1a1207; font-weight: 700; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-2); text-decoration: none; }
.player-actions { margin: 8px 0 0; }
.btn-link { font-size: 13px; color: var(--muted); }
.btn-link:hover { color: var(--accent-2); }
.badge-external { border-color: #6b5a2a; color: #d7c07a; }

/* 首页：频道区块按市场分行 */
.channel-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.channel-market { min-width: 42px; }

/* 版本标签（搜索结果卡片 / 详情页） */
.badge-version { border-color: #3a4a5c; color: #9db4cc; }

/* 顶部导航（频道 / 版本入口） */
.site-nav { display: flex; gap: 14px; margin-left: auto; font-size: 14px; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--accent-2); text-decoration: none; }
.header-inner { flex-wrap: wrap; }
