:root {
  --navy: #003366;
  --navy-header: #003366;
  --paper: #ffffff;
  --soft: #ebebeb;
  --ink: #000000;
  --muted: #6b798e;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-page {
  width: 100%;
  overflow: hidden;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 88px;
  padding: 0 20px;
  background: var(--navy-header);
  border-bottom: 3px solid #f1e7e8;
}

.site-logo {
  color: #fff;
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}

.search-box {
  display: flex;
  width: 165px;
  height: 39px;
  padding: 3px;
  border-radius: 12px;
  background: #fff;
}

.search-box input {
  min-width: 0;
  width: 100%;
  padding: 0 9px;
  border: 0;
  outline: 0;
  color: #555;
  background: transparent;
  font-size: 13px;
}

.search-box button {
  flex: 0 0 61px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
}

.source-navigation,
.source-links,
.page-main {
  width: 100%;
  padding: 0 3px;
}

.page-main {
  padding-right: 0;
  padding-left: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 3px 3px;
}

.category-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 40px;
  padding: 4px 5px;
  overflow: hidden;
  border-radius: 10px;
  color: #000;
  background: var(--soft);
  box-shadow: 1px 1px var(--navy);
  font-size: 16px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.source-block-title {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 8px;
  font-size: 16px;
}

.source-block-title strong {
  font-size: 18px;
}

.friend-matrix {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}

.friend-matrix a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 38px;
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background: var(--navy);
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.friend-matrix .engine-flink {
  display: none !important;
}

.premium-tags,
.keyword-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px;
  padding: 2px 0 8px;
}

.premium-tags a,
.keyword-grid a {
  display: block;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 10px;
  color: #000;
  background: var(--soft);
  box-shadow: 1px 1px var(--navy);
  font-size: 15px;
  line-height: 22px;
}

.keyword-panel {
  margin-top: 6px;
}

.video-section {
  margin-top: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 4px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.section-title > a {
  color: #555;
  font-size: 14px;
}

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

.video-card {
  min-width: 0;
}

.video-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #c6c6c6;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-date {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 12px;
}

.video-card h3 {
  min-height: 42px;
  margin: 5px 2px 10px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
}

.video-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.breadcrumb {
  min-height: 40px;
  padding: 10px 4px;
  color: #333;
  font-size: 14px;
}

.listing-main,
.detail-main,
.play-main {
  margin-top: 8px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 18px 5px 24px;
}

.pagination a,
.pagination span,
.pagination strong {
  min-width: 35px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  color: #fff;
  background: var(--navy);
  font-size: 14px;
  text-align: center;
}

.empty-result {
  padding: 45px 10px;
  color: #666;
  text-align: center;
}

.detail-panel {
  display: flex;
  min-height: 340px;
  padding: 20px;
  color: #fff;
  background: #000;
}

.detail-cover {
  flex: 0 0 40%;
  height: 300px;
  margin-right: 50px;
  overflow: hidden;
  border-radius: 10px;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  min-width: 0;
  padding-top: 10px;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.45;
}

.detail-info p {
  margin: 10px 0;
  font-size: 16px;
}

.play-lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 6px;
  padding: 30px 6px;
  background: #000;
}

.play-lines a {
  min-width: 200px;
  padding: 9px 22px;
  border-radius: 10px;
  color: #fff;
  background: var(--navy);
  font-weight: 700;
  text-align: center;
}

.player-shell {
  width: 100%;
  min-height: 550px;
  overflow: hidden;
  background: #000;
}

.player-shell .MacPlayer,
.player-shell iframe,
.player-shell video {
  width: 100% !important;
  min-height: 550px;
  border: 0;
}

.episode-lines {
  justify-content: flex-start;
  padding: 15px 6px;
}

.episode-lines a {
  min-width: 88px;
  padding: 8px 14px;
}

.related-section {
  margin-top: 12px;
}

.source-links-end {
  margin-top: 22px;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80%;
  min-height: 160px;
  margin: 0 auto;
  padding: 20px 5px;
  gap: 12px;
  background: #fff;
  font-size: 12px;
  text-align: center;
}

.sitemap-label {
  color: var(--muted);
}

.back-top {
  position: fixed;
  right: 11%;
  bottom: 35px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
  background: rgba(0, 51, 102, 0.78);
  font-size: 24px;
}

@media (max-width: 760px) {
  .site-header {
    height: 81px;
    padding: 0 14px;
  }

  .site-logo {
    font-size: 26px;
  }

  .search-box {
    width: 160px;
    height: 39px;
  }

  .search-box button {
    flex-basis: 58px;
  }

  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .category-grid a {
    height: 35px;
    padding: 3px 2px;
    font-size: 14px;
  }

  .source-block-title {
    gap: 5px;
    font-size: 14px;
  }

  .source-block-title strong {
    font-size: 17px;
  }

  .friend-matrix {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .friend-matrix a {
    height: 34px;
    font-size: 14px;
  }

  .premium-tags a,
  .keyword-grid a {
    min-height: 33px;
    padding: 5px 8px;
    font-size: 14px;
    line-height: 21px;
  }

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

  .video-card h3 {
    min-height: 42px;
    margin-bottom: 8px;
    font-size: 14px;
  }

  .detail-panel {
    flex-direction: column;
    min-height: 0;
    padding: 15px;
  }

  .detail-cover {
    flex-basis: auto;
    width: 100%;
    height: auto;
    margin: 0 0 15px;
    aspect-ratio: 16 / 9;
  }

  .detail-info h1 {
    font-size: 18px;
  }

  .play-lines {
    justify-content: flex-start;
    padding: 15px 6px;
  }

  .play-lines a {
    min-width: 80px;
    padding: 8px 9px;
    font-size: 14px;
  }

  .player-shell,
  .player-shell .MacPlayer,
  .player-shell iframe,
  .player-shell video {
    min-height: 220px;
  }

  .site-footer {
    width: 96%;
    min-height: 154px;
    gap: 10px;
    line-height: 1.8;
  }

  .back-top {
    right: 18px;
    bottom: 38px;
  }
}

@media (max-width: 370px) {
  .site-logo {
    font-size: 23px;
  }

  .search-box {
    width: 145px;
  }
}

/* 2026-09-25: keep the desktop site framed and the detail view on white. */
@media (min-width: 761px) {
  body { background: #f5f7fb; }
  .site-page {
    width: calc(100% - 40px);
    max-width: 1680px;
    min-height: calc(100vh - 32px);
    margin: 16px auto;
    border: 1px solid #d6e0ed;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(12, 38, 77, .08);
  }
}
.source-links-top { padding-top: 8px; padding-bottom: 8px; }
.detail-main .detail-panel {
  color: #1b2432;
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
}
.detail-main .play-lines { background: #fff; }
