:root {
  color-scheme: dark;
  --bg: #071011;
  --panel: #0f1c1e;
  --panel-2: #132326;
  --text: #f4f1e8;
  --muted: #aeb9b7;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #d59b4e;
  --accent-strong: #efb766;
  --danger: #e47769;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  font-family: "Microsoft YaHei", "微软雅黑", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(57, 101, 101, 0.20), transparent 32rem),
    linear-gradient(180deg, #081214 0%, #061011 100%);
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 34px 0 22px;
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}

.brand-kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 10px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: .01em;
}

.site-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.network-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(213, 155, 78, .45);
  border-radius: 999px;
  color: #f2cf9b;
  background: rgba(213, 155, 78, .08);
  font-size: 13px;
  white-space: nowrap;
}

.network-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #53c98c;
  box-shadow: 0 0 0 4px rgba(83, 201, 140, .12);
}

main { padding: 34px 0 56px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(19, 35, 38, .96), rgba(12, 24, 26, .96));
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(213, 155, 78, .5);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #030708;
}

.card-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .35s ease;
}
.video-card:hover .card-poster img { transform: scale(1.018); }

.play-circle {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1b1710;
  background: rgba(239, 183, 102, .94);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .38);
}
.play-circle::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid currentColor;
}

.card-duration {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .78);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.card-body { padding: 22px; }
.card-body h2 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.45;
}
.card-body p {
  min-height: 56px;
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.meta-chip {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #cad2d0;
  font-size: 12px;
}

.primary-link,
.secondary-link,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.primary-link {
  color: #21180f;
  background: var(--accent-strong);
}
.primary-link:hover { filter: brightness(1.06); }
.secondary-link,
.action-button {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, .04);
}
.secondary-link:hover,
.action-button:hover { border-color: rgba(213, 155, 78, .55); }

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.back-link {
  color: #d9dfdd;
  text-decoration: none;
}
.back-link:hover { color: var(--accent-strong); }

.player-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #020506;
  box-shadow: var(--shadow);
}

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

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

.player-info {
  padding: 24px;
  background: linear-gradient(180deg, rgba(18, 33, 35, .98), rgba(12, 24, 26, .98));
}

.player-info h1 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 34px);
}

.player-description {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  color: #c9d1cf;
  background: rgba(255, 255, 255, .04);
  font-size: 14px;
  line-height: 1.7;
}

.error-box {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(228, 119, 105, .45);
  border-radius: 10px;
  color: #ffd2cc;
  background: rgba(228, 119, 105, .08);
  line-height: 1.7;
}
.error-box.is-visible { display: block; }

.site-footer {
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: #859390;
  font-size: 13px;
  text-align: center;
}

.config-warning {
  margin-bottom: 24px;
  padding: 15px 17px;
  border: 1px solid rgba(228, 119, 105, .45);
  border-radius: 12px;
  color: #ffd5cf;
  background: rgba(228, 119, 105, .08);
  line-height: 1.75;
}

@media (max-width: 1080px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .brand-row { flex-direction: column; }
  .video-grid { grid-template-columns: 1fr; }
  .card-body p { min-height: auto; }
  .network-badge { align-self: flex-start; }
}

@media (max-width: 520px) {
  .site-shell { width: min(100% - 20px, 1240px); }
  .site-header { padding-top: 24px; }
  main { padding-top: 24px; }
  .card-body, .player-info { padding: 18px; }
  .page-toolbar { align-items: flex-start; flex-direction: column; }
  .primary-link, .secondary-link, .action-button { width: 100%; }
  .player-actions { flex-direction: column; }
}
