/* ============================================================
   爱游戏 · 直播网站模板 共享样式（暗色霓虹风）
   换主题色只需修改 :root 变量；全站相对路径、零外链
   ============================================================ */
:root {
  --bg: #070a16;          /* 页面底色 */
  --panel: #0e1428;       /* 区块面板 */
  --card: #141c34;        /* 卡片底 */
  --line: #24304f;        /* 边框线 */
  --ink: #eaf0ff;         /* 主文字 */
  --muted: #8b9cc7;       /* 次文字 */
  --accent: #7b5cff;      /* 主强调（紫） */
  --accent-2: #21d4fd;    /* 副强调（青） */
  --live: #ff4d6d;        /* 直播红 */
  --gold: #ffc93d;        /* 榜黄金 */
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(7, 10, 22, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
}
.logo em { font-style: normal; color: var(--accent-2); font-size: 12px; letter-spacing: 2px; margin-left: 2px; }
.nav-links { display: flex; gap: 24px; font-size: 15px; color: var(--muted); }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-links a.on { position: relative; }
.nav-links a.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px;
  border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.nav-cta {
  margin-left: auto; padding: 8px 20px; border-radius: 999px; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 600;
}

/* ---------- 通用区块 ---------- */
.section { padding: 44px 0 10px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.section-head h2 { font-size: 22px; }
.section-head h2::before {
  content: ""; display: inline-block; width: 5px; height: 20px; margin-right: 10px;
  border-radius: 3px; vertical-align: -2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.section-more { margin-left: auto; font-size: 14px; color: var(--muted); }
.section-more:hover { color: var(--accent-2); }

/* ---------- Hero 聚焦直播间 ---------- */
.hero { padding-top: 36px; }
.hero-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); min-height: 380px;
  display: flex; align-items: flex-end;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,10,22,.05) 30%, rgba(7,10,22,.92)); }
.hero-info { position: relative; padding: 28px 32px; width: 100%; }
.hero-info h1 { font-size: 28px; margin: 10px 0 6px; }
.hero-info p { color: var(--muted); font-size: 14px; max-width: 640px; }
.hero-btn {
  display: inline-block; margin-top: 16px; padding: 11px 34px; border-radius: 999px;
  background: linear-gradient(135deg, var(--live), #ff7a5c); color: #fff; font-weight: 700; font-size: 15px;
}
.hero-stats { position: absolute; top: 20px; right: 24px; display: flex; gap: 10px; }
.hero-stats span {
  padding: 5px 14px; border-radius: 999px; font-size: 13px;
  background: rgba(7,10,22,.6); border: 1px solid var(--line); color: var(--ink);
}

/* ---------- 徽标 ---------- */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--live); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 1px;
}
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  background: rgba(123, 92, 255, .16); color: #b6a6ff; border: 1px solid rgba(123, 92, 255, .35);
}
.tag--c2 { background: rgba(33, 212, 253, .12); color: var(--accent-2); border-color: rgba(33, 212, 253, .3); }
.viewers { font-size: 12px; color: var(--muted); }
.viewers::before { content: "◉ "; color: var(--accent-2); }

/* ---------- 分类筛选条 ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 4px; }
.cat-chips a {
  padding: 7px 18px; border-radius: 999px; font-size: 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.cat-chips a:hover, .cat-chips a.on { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }

/* ---------- 直播间卡片网格 ---------- */
.home-layout { display: grid; grid-template-columns: 1fr 300px; gap: 26px; align-items: start; }
.live-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.live-grid--wide { grid-template-columns: repeat(3, 1fr); }
.live-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, border-color .2s;
}
.live-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.live-cover { position: relative; aspect-ratio: 16 / 9; }
.live-cover img { width: 100%; height: 100%; object-fit: cover; }
.live-cover .grad { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; color: rgba(255,255,255,.9); }
.live-cover .live-badge { position: absolute; top: 10px; left: 10px; }
.live-cover .viewers {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(7,10,22,.65); padding: 2px 10px; border-radius: 999px; color: #fff;
}
.live-card .info { padding: 12px 14px 14px; }
.live-card .info h3 {
  font-size: 15px; line-height: 1.45; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 43px;
}
.live-card .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.live-card .who .tag { margin-left: auto; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar--lg { width: 54px; height: 54px; font-size: 20px; }

/* ---------- 热榜侧栏 ---------- */
.rank-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.rank-panel h3 { font-size: 16px; margin-bottom: 14px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.rank-item:last-child { border-bottom: 0; }
.rank-num { width: 22px; text-align: center; font-weight: 700; font-style: italic; color: var(--muted); flex: none; }
.rank-item:nth-child(1) .rank-num { color: var(--gold); }
.rank-item:nth-child(2) .rank-num { color: #c9d6f5; }
.rank-item:nth-child(3) .rank-num { color: #d99a6c; }
.rank-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item:hover .t { color: var(--accent-2); }

/* ---------- 预告条 ---------- */
.sched-rows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sched-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
}
.sched-row:hover { border-color: var(--accent); }
.sched-time { font-size: 13px; color: var(--accent-2); font-weight: 700; width: 96px; flex: none; }
.sched-row .t { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-row .who { font-size: 13px; color: var(--muted); }
.remind { font-size: 13px; color: var(--gold); border: 1px solid rgba(255,197,61,.4); border-radius: 999px; padding: 3px 12px; flex: none; }

/* ---------- 直播间内页 ---------- */
.crumb { font-size: 13px; color: var(--muted); padding: 20px 0 0; }
.crumb a:hover { color: var(--accent-2); }
.room-layout { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; padding: 18px 0 30px; }
.player {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: radial-gradient(120% 120% at 50% 0%, #182041 0%, #070a16 70%);
}
.player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.player .play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(123, 92, 255, .85); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 12px rgba(123, 92, 255, .22);
}
.player .play-btn::after { content: ""; border-style: solid; border-width: 15px 0 15px 26px; border-color: transparent transparent transparent #fff; margin-left: 6px; }
.player .live-badge { position: absolute; top: 14px; left: 14px; }
.player .viewers { position: absolute; top: 14px; right: 14px; background: rgba(7,10,22,.65); padding: 3px 12px; border-radius: 999px; color: #fff; }
.room-head { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.room-head h1 { font-size: 20px; }
.room-head .who { font-size: 13px; color: var(--muted); }
.follow-btn {
  margin-left: auto; flex: none; padding: 9px 26px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.room-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; }
.room-panel h2 { font-size: 16px; margin-bottom: 10px; }
.room-panel .desc { font-size: 14px; color: var(--muted); }
.room-side { display: flex; flex-direction: column; gap: 16px; }
.chat-list { max-height: 420px; overflow-y: auto; }
.chat-item { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed rgba(36,48,79,.6); color: var(--muted); word-break: break-all; }
.chat-item b { color: var(--accent-2); font-weight: 600; margin-right: 6px; }
.chat-item.me { color: var(--ink); }
.chat-item .lv { color: var(--gold); font-size: 11px; margin-right: 4px; }
.chat-box { display: flex; gap: 8px; margin-top: 12px; }
.chat-box input {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; color: var(--ink); font-size: 13px; outline: none;
}
.chat-box button {
  border: 0; border-radius: 999px; padding: 8px 20px; font-size: 13px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}

/* ---------- 赛程表 ---------- */
.sched-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sched-table th, .sched-table td { padding: 13px 18px; font-size: 14px; text-align: left; border-bottom: 1px solid var(--line); }
.sched-table th { background: var(--card); color: var(--muted); font-weight: 600; }
.sched-table tr:last-child td { border-bottom: 0; }
.sched-table td.date { color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.status--live { color: var(--live); font-weight: 700; }
.status--soon { color: var(--gold); }
.status--end { color: var(--muted); }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; gap: 8px; padding: 30px 0; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.pager .on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 50px; border-top: 1px solid var(--line); background: var(--panel); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 40px; padding: 36px 0 26px; }
.foot-col h4 { font-size: 15px; margin-bottom: 12px; }
.foot-col a, .foot-col p { display: block; font-size: 13px; color: var(--muted); padding: 3px 0; }
.foot-col a:hover { color: var(--accent-2); }
.foot-brand { max-width: 300px; }
.foot-brand p { margin-top: 10px; }
.copyright { border-top: 1px solid var(--line); padding: 16px 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .live-grid { grid-template-columns: repeat(3, 1fr); }
  .home-layout, .room-layout { grid-template-columns: 1fr; }
  .rank-panel { order: 2; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .live-grid, .live-grid--wide { grid-template-columns: repeat(2, 1fr); }
  .sched-rows { grid-template-columns: 1fr; }
  .hero-card { min-height: 300px; }
  .hero-info h1 { font-size: 20px; }
  .hero-stats { display: none; }
}
