:root {
  --bg: #0e0e10;
  --bg-2: #141417;
  --card: #1b1b1f;
  --line: #2a2a30;
  --text: #f5f5f7;
  --muted: #9a9aa3;
  --accent: #f0262c;
  --accent-soft: rgba(240, 38, 44, .16);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
html[data-theme="light"] {
  --bg: #f4f4f6;
  --bg-2: #ffffff;
  --card: #ffffff;
  --line: #e2e2e8;
  --text: #17171b;
  --muted: #5d5d68;
  --accent: #d81f26;
  --accent-soft: rgba(216, 31, 38, .1);
  --shadow: 0 10px 30px rgba(20, 20, 30, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.utility-inner, .main-nav { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.utility-inner { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.brand svg { width: 28px; height: 28px; }
.brand-name { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: .5px; }
.brand .brand-name { font-size: 26px; line-height: 1; }
.brand-name em { font-style: normal; color: var(--accent); }

.loc { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 4px; }
.loc svg { width: 15px; height: 15px; }
.loc .chev { width: 12px; height: 12px; }

.brand-logo { height: 26px; width: auto; }

.auth { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border-radius: 4px; font-size: 14px; font-weight: 700; cursor: pointer; border: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-red { background: var(--accent); color: #fff; }
.btn-red:hover { filter: brightness(1.12); }
.btn-lg { padding: 12px 26px; font-size: 15px; }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 90;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 12px 18px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow); max-width: min(92vw, 480px);
}
.video-card { cursor: pointer; }
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .82); }
.lb-box {
  position: relative; width: min(860px, 100%); max-height: 92vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; box-shadow: var(--shadow);
}
.lb-close {
  position: absolute; top: 10px; right: 12px; z-index: 1; width: 34px; height: 34px;
  border-radius: 50%; border: 0; background: rgba(127, 127, 127, .35); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.lb-close:hover { background: var(--accent); }
.lb-stage {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 10%, hsl(var(--h, 215) 70% 46% / .85), transparent 60%),
    radial-gradient(120% 100% at 85% 90%, hsl(calc(var(--h, 215) + 40) 65% 38% / .8), transparent 65%),
    linear-gradient(140deg, hsl(var(--h, 215) 45% 16%), hsl(calc(var(--h, 215) + 30) 50% 10%));
}
.lb-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .5s; }
.lb-stage.ended img { filter: blur(16px); }
.lb-ended {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; gap: 6px;
  text-align: center; padding: 20px; background: rgba(0, 0, 0, .38);
  opacity: 0; pointer-events: none; transition: opacity .5s;
}
.lb-stage.ended .lb-ended { opacity: 1; }
.lb-ended strong { font-size: 20px; color: #fff; }
.lb-ended span { font-size: 13px; color: rgba(255, 255, 255, .82); }
.lb-progress { margin-top: 12px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.lb-progress i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--accent); }
.lb-progress.run i { animation: lb-progress 10s linear forwards; }
@keyframes lb-progress { from { width: 0; } to { width: 100%; } }
.lb-title { margin: 14px 0 4px; font-size: 18px; color: var(--text); }
.lb-dur { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.lb-tip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  font-size: 13px; color: var(--text);
}
.lb-tip svg { width: 18px; height: 18px; fill: var(--accent); flex: 0 0 auto; }
.lb-tip .btn { margin-left: auto; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; display: grid; place-items: center; }
.icon-btn:hover { color: var(--text); }
.i-sun { display: none; }
html[data-theme="light"] .i-sun { display: block; }
html[data-theme="light"] .i-moon { display: none; }

.main-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a, .nav-link {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--muted);
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.main-nav a:hover, .nav-link:hover { color: var(--text); background: var(--accent-soft); }
.main-nav svg { width: 16px; height: 16px; }
.chev { width: 12px; height: 12px; }
.red-chip { background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 3px; letter-spacing: .5px; }

/* ---------- language picker ---------- */
.lang-picker { position: relative; }
.lang-toggle .chev { transition: transform .15s; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 150px; padding: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  padding: 8px 12px; border: 0; background: none; color: var(--text); font: inherit;
  font-size: 13px; text-align: left; border-radius: 6px; cursor: pointer;
}
.lang-menu button:hover { background: var(--accent-soft); }
.lang-menu button.active { color: var(--accent); font-weight: 700; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(700px 340px at 12% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(560px 300px at 88% 10%, rgba(64, 84, 255, .14), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1280px; margin: 0 auto; padding: 72px 20px 60px; }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: 2px; font-size: 13px; margin: 0 0 14px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 900; letter-spacing: 1px; }
.hero .sub { color: var(--muted); max-width: 560px; margin: 18px 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; list-style: none; padding: 0; margin: 44px 0 0; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 26px; font-weight: 900; color: var(--text); }
.hero-stats span { color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.section { max-width: 1280px; margin: 0 auto; padding: 48px 20px 8px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.more { margin-left: auto; color: var(--accent); font-size: 14px; font-weight: 700; }
.more:hover { text-decoration: underline; }

.video-grid, .live-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.video-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: transform .18s, border-color .18s; }
.video-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.thumb {
  position: relative; aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 20% 10%, hsl(var(--h) 70% 46% / .85), transparent 60%),
    radial-gradient(120% 100% at 85% 90%, hsl(calc(var(--h) + 40) 65% 38% / .8), transparent 65%),
    linear-gradient(140deg, hsl(var(--h) 45% 16%), hsl(calc(var(--h) + 30) 50% 10%));
}
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 9px);
}
.thumb .play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); display: grid; place-items: center; opacity: 0; transition: opacity .18s;
}
.video-card:hover .play { opacity: 1; }
.thumb-img {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.thumb-img.show { opacity: 1; }
.thumb.has-img::after { display: none; }
.chip { position: absolute; top: 8px; left: 8px; z-index: 1; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 3px; }
.chip-tr { left: auto; right: 8px; }
.chip-red { background: var(--accent); }
.chip-live { background: var(--accent); display: flex; align-items: center; gap: 5px; }
.chip-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; background: rgba(0, 0, 0, .75); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.video-card h3 { font-size: 14.5px; font-weight: 700; padding: 12px 12px 4px; }
.video-card p { color: var(--muted); font-size: 12.5px; margin: 0; padding: 0 12px 14px; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 300px); gap: 18px; overflow-x: auto; padding-bottom: 12px; }
.section-red .section-head h2 { color: var(--accent); }

/* ---------- about / footer ---------- */
.about-inner { max-width: 760px; }
.about p { color: var(--muted); }
.site-footer { margin-top: 64px; background: var(--bg-2); border-top: 1px solid var(--line); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 44px 20px 20px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.f-col h3 { font-size: 13px; letter-spacing: 1px; color: var(--muted); margin-bottom: 10px; }
.f-col a { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; }
.f-col a:hover { color: var(--accent); }
.f-note { color: var(--muted); font-size: 13px; }
.copyright { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 20px 28px; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .video-grid, .live-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .utility-inner { gap: 10px; }
  .loc { display: none; }
  .video-grid, .live-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-inner { padding: 48px 20px 40px; }
}
@media (max-width: 460px) {
  .video-grid, .live-grid { grid-template-columns: repeat(2, 1fr); }
}
