:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f2340;
  background: #f4f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f4f7fb;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f4f7fb;
}

.container {
  width: min(920px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid #d6deea;
  background: #ffffff;
}

.header-content {
  padding-block: 24px 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #0d1f3a;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.header-content p {
  margin-top: 8px;
  color: #50637e;
  font-size: 15px;
  line-height: 1.6;
}

.video-list {
  display: grid;
  gap: 18px;
  padding-block: 22px 36px;
}

.video-card {
  overflow: hidden;
  border: 1px solid #d4ddea;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(31 54 88 / 5%);
  padding: 15px 16px 16px;
}

.video-card h2 {
  margin-bottom: 12px;
  color: #0d1f3a;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.4;
}

.video-frame {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: #05080d;
}

.video-frame--portrait {
  justify-content: center;
  min-height: min(72vh, 720px);
}

.video-frame--portrait video {
  width: min(100%, 405px);
  max-height: min(72vh, 720px);
  aspect-ratio: 9 / 16;
}

.video-frame--landscape {
  aspect-ratio: 16 / 9;
}

.video-frame--landscape video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
}

video {
  display: block;
  border: 0;
  background: #05080d;
  object-fit: contain;
}

video:focus-visible {
  outline: 3px solid #2d6cdf;
  outline-offset: 3px;
}

.video-error {
  margin-top: 10px;
  border-radius: 6px;
  background: #fff2f0;
  color: #a61b1b;
  font-size: 14px;
  line-height: 1.55;
  padding: 10px 12px;
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 920px);
  }

  .header-content {
    padding-block: 20px 18px;
  }

  h1 {
    font-size: 26px;
  }

  .header-content p {
    font-size: 14px;
  }

  .video-list {
    gap: 14px;
    padding-block: 14px 24px;
  }

  .video-card {
    padding: 13px 12px 12px;
    border-radius: 8px;
  }

  .video-card h2 {
    margin-bottom: 10px;
    font-size: 17px;
  }

  .video-frame--portrait {
    min-height: 0;
  }

  .video-frame--portrait video {
    width: 100%;
    max-height: none;
  }
}
