:root {
  --shell: 960px;
  --ink: #222;
  --muted: #999;
  --line: #222;
  --rose: #c97f73;
  --green: #0ffb01;
}

* {
  box-sizing: border-box;
}

html {
  background: #e5c3b8;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #e5c3b8 url("../images/bg_4.png") center top / cover fixed no-repeat;
  font: 14px/1.5 Arial, "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.fixed-figure {
  position: fixed;
  z-index: 0;
  bottom: 0;
  width: 350px;
  height: 350px;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

.fixed-figure-left {
  left: 0;
  background-image: url("../images/sub_5.png");
}

.fixed-figure-right {
  right: 0;
  background-image: url("../images/sub_6.png");
  transform: scaleX(-1);
}

.site-shell,
.footer-portals,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(100%, var(--shell));
  margin-inline: auto;
}

.site-header {
  height: 70px;
  background: #000;
  text-align: center;
}

.site-logo {
  display: inline-flex;
  width: 210px;
  height: 70px;
  align-items: center;
  justify-content: center;
}

.site-logo img {
  width: 210px;
  height: 70px;
  object-fit: contain;
}

.page-main,
.home-top,
.category-search {
  background: #fff;
}

.home-top {
  border-top: 5px solid rgba(255, 255, 255, .75);
}

.partner-block,
.tag-block {
  padding: 0 0 4px;
  background: rgba(255, 255, 255, .94);
}

.block-caption {
  margin: 0;
  padding: 0 4px;
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 2px;
}

.partner-link {
  min-width: 0;
  height: 30px;
  overflow: hidden;
  border-radius: 3px;
  color: #fff;
  background: var(--rose);
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-block {
  border-top: 5px solid #eee;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 1px 1px;
}

.tag-grid a {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--green);
  border-radius: 5px;
  background: #fff;
  color: #111;
  line-height: 28px;
  white-space: nowrap;
}

.category-search {
  padding: 4px;
  border-top: 5px solid rgba(255, 255, 255, .7);
}

.category-row {
  display: grid;
  min-height: 56px;
  grid-template-columns: 105px repeat(8, minmax(0, 1fr));
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: #666;
}

.category-row > a {
  min-width: 0;
  overflow: hidden;
  padding: 0 5px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-row > a:first-child {
  border-right: 1px solid #777;
  color: #222;
  font-size: 15px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 265px;
  gap: 18px;
  padding-top: 10px;
}

.search-form input,
.search-form button {
  height: 38px;
  border: 1px solid #222;
  border-radius: 0;
  background: #fff;
  font: inherit;
}

.search-form input {
  min-width: 0;
  padding: 0 8px;
}

.search-form button {
  border-radius: 5px;
  color: #fff;
  background: #000;
  font-weight: 700;
  cursor: pointer;
}

.video-section,
.related-section,
.detail-panel,
.player-panel,
.playlist-section,
.list-panel,
.breadcrumb {
  background: #fff;
}

.video-section,
.related-section,
.list-panel {
  margin-top: 5px;
  padding: 4px;
}

.section-heading {
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.section-heading h2 {
  margin: 0;
  padding-left: 15px;
  border-left: 4px solid #111;
  font-size: 20px;
  line-height: 22px;
  letter-spacing: 0;
}

.section-heading .more-link {
  padding-right: 10px;
  border-right: 4px solid #111;
  font-size: 20px;
  font-weight: 700;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 20px;
  padding-top: 10px;
}

.video-card {
  min-width: 0;
}

.video-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 220 / 145;
  background: #eee;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card h3 {
  height: 24px;
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card p {
  height: 20px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb {
  margin-top: 5px;
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.detail-panel {
  display: grid;
  min-height: 330px;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  padding: 20px 5px;
}

.detail-poster {
  aspect-ratio: 350 / 195;
  overflow: hidden;
  background: #eee;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 5px 0 14px;
  font-size: 14px;
  font-weight: 400;
}

.detail-copy p {
  margin: 0 0 10px;
  color: #666;
}

.playlist-section {
  padding: 10px 5px 15px;
  border-top: 1px solid #ddd;
}

.playlist-section h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.play-line + .play-line {
  margin-top: 8px;
}

.play-line h3 {
  margin: 0 0 6px;
  color: #666;
  font-size: 13px;
  font-weight: 400;
}

.episode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.episode-grid a,
.primary-play {
  display: inline-flex;
  min-width: 110px;
  height: 38px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  background: #fff;
}

.player-panel {
  padding: 0 5px 10px;
}

.player-box {
  width: 100%;
  height: 405px;
  overflow: hidden;
  background: #000;
}

.player-box iframe,
.player-box video,
.player-box object,
.player-box embed {
  width: 100% !important;
  height: 100% !important;
}

.list-panel {
  min-height: 500px;
}

.result-summary {
  padding: 12px 4px 4px;
  color: #777;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 15px 0;
}

.pager a,
.pager span {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #ddd;
  background: #fff;
  line-height: 30px;
  text-align: center;
}

.footer-portals {
  padding-top: 6px;
}

.footer-portals .partner-block {
  background: transparent;
}

.footer-portals .partner-link {
  background: #333;
}

.footer-portals-home .partner-link {
  background: var(--rose);
}

.site-footer {
  margin-top: 18px;
  padding: 25px 20px 22px;
  color: #fff;
  background: #000;
  text-align: center;
}

.site-footer p {
  margin: 2px 0;
}

.mac-flink-native {
  display: none;
}

@media (max-width: 960px) {
  body {
    background: #e5c3b8;
  }

  .fixed-figure {
    display: none;
  }

  .site-shell,
  .footer-portals,
  .site-footer {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .partner-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }

  .partner-link {
    font-size: 12px;
  }

  .tag-grid a {
    height: 29px;
    padding: 0 8px;
    line-height: 27px;
  }

  .category-row {
    min-height: 55px;
    grid-template-columns: 80px repeat(4, minmax(0, 1fr));
  }

  .category-row > a {
    padding: 2px 3px;
  }

  .category-row > a:first-child {
    grid-row: span 2;
    height: 100%;
    padding-top: 18px;
  }

  .search-form {
    grid-template-columns: 1fr 98px;
    gap: 7px;
  }

  .video-section,
  .related-section,
  .list-panel {
    padding: 4px 8px;
  }

  .section-heading {
    height: 40px;
  }

  .section-heading h2,
  .section-heading .more-link {
    font-size: 17px;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .detail-panel {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .detail-copy h1 {
    margin-top: 0;
  }

  .player-box {
    height: min(56.25vw, 405px);
    min-height: 220px;
  }

  .site-footer {
    margin-top: 8px;
    padding: 20px 10px;
    font-size: 12px;
  }
}
