:root {
  --bg: #fff;
  --text: #18191c;
  --muted: #9499a0;
  --soft: #f6f7f8;
  --line: #e6e7e9;
  --pink: #e87da1;
  --blue: #50addb;
  --shadow: 0 1px 7px #0000000d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
body.dark {
  --bg: #18191c;
  --text: #e5e5e8;
  --muted: #a3a6ae;
  --soft: #25262c;
  --line: #383941;
  --shadow: 0 1px 7px #0004;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 12px;
}
a:hover,
button:hover {
  color: var(--pink);
}
:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}
.header {
  height: 65px;
  display: flex;
  align-items: center;
  gap: 26px;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-left,
.header-right,
.top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-left {
  gap: 12px;
}
.logo {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -1.3px;
  color: var(--pink);
  white-space: nowrap;
}
.logo span {
  font-size: 13px;
  letter-spacing: -0.5px;
  margin-left: 3px;
}
.top-nav {
  margin-left: 14px;
  white-space: nowrap;
}
.icon-button {
  border: 0;
  background: none;
  padding: 5px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 32px;
}
#search {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  height: 40px;
  max-width: 500px;
  flex: 1;
  overflow: hidden;
}
#search:focus-within {
  box-shadow: inset 0 0 0 0.5px var(--pink);
}
#q {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  padding: 0 14px;
  font-size: 13px;
}
#search button {
  border: 0;
  background: none;
  border-radius: 0;
  width: 44px;
  flex-shrink: 0;
}
.header-right {
  gap: 18px;
}
.header-right > a {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  font-size: 12px;
  white-space: nowrap;
}
.header-right small:empty {
  display: none;
}
.header-right small {
  position: absolute;
  background: var(--pink);
  color: #fff;
  border-radius: 10px;
  right: -10px;
  top: -7px;
  padding: 0 4px;
  font-size: 10px;
}
#app {
  max-width: 1600px;
  min-height: calc(100vh - 180px);
  margin: auto;
  padding: 42px 5% 32px;
}
.sidebar {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.feed-tabs {
  display: flex;
  gap: 22px;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}
.feed-tabs a {
  font-size: 12px;
  min-width: 46px;
  text-align: center;
}
.feed-tabs b {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--pink);
  display: grid;
  place-items: center;
  color: white;
  margin-bottom: 5px;
}
.feed-tabs a:nth-child(2) b {
  background: #f7a13b;
}
.feed-tabs .selected {
  font-weight: 600;
}
.categories {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}
.categories a {
  padding: 5px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
  color: #73777e;
  min-width: 80px;
  text-align: center;
}
.categories small {
  font-size: 11px;
  margin-left: 3px;
  color: var(--muted);
}
.categories .selected,
.selected {
  color: var(--pink) !important;
}
.categories .selected {
  background: #fceff4;
  border-color: #fceff4;
}
.sidebar-hidden .sidebar {
  display: none;
}
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: flex-start;
  margin-bottom: 16px;
}
.section-heading h1,
.section-heading h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
}
.section-heading > span {
  color: var(--muted);
  font-size: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 38px 20px;
}
.card {
  min-width: 0;
}
.cover {
  display: block;
  position: relative;
  aspect-ratio: 1.6;
  overflow: hidden;
  border-radius: 7px;
  background: var(--soft);
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    opacity 0.22s,
    transform 0.22s;
}
.cover-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 17px 8px 6px;
  color: #fff;
  background: linear-gradient(transparent, #000a);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cover-stats svg {
  width: 15px;
  height: 15px;
}
.cover-stats time {
  margin-left: auto;
}
.card-title {
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 42px;
  margin: 9px 0 5px;
}
.quote {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}
.fresh {
  color: #d8963b;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.card-meta > a {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.pink {
  color: var(--pink);
  background: #fceff4;
  border-radius: 3px;
  padding: 0 3px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin: 36px 0;
}
.pagination a {
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.pagination span {
  color: var(--muted);
  font-size: 12px;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding: 22px;
  line-height: 2;
}
footer a {
  color: var(--pink);
}
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 30px;
}
.detail h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 5px;
}
.detail h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.video-meta {
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  margin: 0 0 16px;
}
.video-meta svg {
  width: 16px;
  height: 16px;
}
.video-meta span {
  margin-left: 8px;
}
.player {
  aspect-ratio: 16/9;
  position: relative;
  background: #111;
  border-radius: 3px;
  overflow: hidden;
}
.player > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}
.player > button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0009;
  border: 0;
  color: white;
}
.player > button svg {
  width: 36px;
  height: 36px;
}
.player iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.player-loading {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 4px;
  background: #000b;
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}
.playback-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.playback-options a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  font-size: 11px;
  color: var(--blue);
}
.playback-options a svg {
  width: 12px;
  height: 12px;
}
.quality {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0;
}
.quality span {
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 4px;
  padding: 3px 9px;
  margin: 0 12px;
}
.actions {
  display: flex;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.actions button,
.actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.actions button.active {
  color: var(--pink);
  border-color: var(--pink);
}
.primary,
.up-link {
  background: var(--blue);
  color: white !important;
  border-radius: 5px;
  padding: 8px 15px;
}
.primary {
  margin-left: auto;
}
.recommend-count {
  margin: 18px 0;
  font-size: 13px;
}
.recommend-count a {
  color: var(--blue);
  margin-left: 12px;
}
.description {
  margin: 18px 0 28px;
  padding: 14px;
  background: var(--soft);
  border-radius: 6px;
}
.description summary {
  cursor: pointer;
  font-size: 13px;
}
.description p {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.comments .section-heading {
  justify-content: space-between;
  align-items: center;
}
.comments .section-heading button {
  border: 0;
  background: none;
  padding: 5px 8px;
  font-size: 12px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.comment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #f5dfeb;
  color: #a75b7d;
  border-radius: 50%;
  font-size: 17px;
}
.comment strong {
  font-size: 13px;
  color: var(--pink);
}
.source {
  color: var(--muted);
  font-size: 11px;
  margin-left: 10px;
}
.comment p {
  margin: 8px 0;
  line-height: 1.9;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.comment .context {
  color: var(--muted);
  font-size: 12px;
}
.comment-meta {
  color: var(--muted);
  font-size: 11px;
}
.comment-meta a {
  margin-left: 20px;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.comment-meta svg {
  width: 12px;
  height: 12px;
}
.uploader {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uploader img {
  border-radius: 50%;
  object-fit: cover;
}
.uploader a {
  color: var(--pink);
}
.uploader p {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0;
}
.up-link {
  display: block;
  margin: 10px 0 20px 60px;
  text-align: center;
  padding: 5px;
}
.episodes {
  background: var(--soft);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.episodes h2 {
  margin-bottom: 8px;
}
.episodes small,
.related-heading small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.episodes > div {
  max-height: 300px;
  overflow-y: auto;
}
.episodes button {
  display: flex;
  gap: 12px;
  text-align: left;
  align-items: center;
  background: transparent;
  border: 0;
  width: 100%;
  font-size: 12px;
  padding: 8px;
}
.episodes button.selected {
  background: var(--bg);
}
.episodes button span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.episodes button > span:first-child {
  color: var(--muted);
  width: 30px;
}
.episodes time {
  font-size: 10px;
  color: var(--muted);
}
.related-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px !important;
}
.related {
  display: grid;
  gap: 16px;
}
.related .card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  column-gap: 10px;
}
.related .cover {
  grid-row: 1/4;
}
.related .cover-stats {
  font-size: 10px;
}
.related .cover-stats svg,
.related .quote {
  display: none;
}
.related .cover-stats {
  justify-content: end;
}
.related .cover-stats time {
  margin: 0;
}
.related .card-title {
  margin: 0;
  height: 36px;
  font-size: 12px;
}
.related .card-meta {
  display: block;
  white-space: normal;
}
.related .card-meta .pink {
  display: none;
}
.related .card-meta span:last-child {
  display: none;
}
.prose {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.9;
}
.prose h1 {
  font-size: 25px;
}
.prose a {
  color: var(--pink);
}
.empty {
  text-align: center;
  padding: 80px 15px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  padding: 28px;
  max-width: 460px;
}
dialog::backdrop {
  background: #0007;
}
dialog form {
  float: right;
}
dialog form button {
  padding: 3px;
  background: none;
  border: 0;
}
kbd {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 4px;
  padding: 3px 6px;
  min-width: 110px;
  margin-right: 12px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 7px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
}
.search-clear {
  margin-left: auto;
}
.error-cover {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.error-cover:before {
  content: "封面暂不可用";
  position: absolute;
}
.error-cover img {
  visibility: hidden;
}
@media (hover: hover) and (pointer: fine) {
  .cover:hover img {
    transform: scale(1.035);
  }
}
@media (min-width: 1500px) {
  .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .top-nav {
    display: none;
  }
  .header {
    gap: 16px;
  }
  .header-right {
    gap: 12px;
  }
  .categories a {
    padding: 5px 12px;
    min-width: 60px;
  }
  .sidebar {
    gap: 18px;
  }
  .detail {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 22px;
  }
  .related .card {
    grid-template-columns: 110px 1fr;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .header {
    height: auto;
    min-height: 106px;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }
  .header-left {
    flex: 1;
  }
  .logo {
    font-size: 23px;
  }
  .header-right {
    gap: 12px;
  }
  .header-right > a {
    font-size: 10px;
  }
  .header-right svg {
    width: 18px;
    height: 18px;
  }
  .header-right .icon-button {
    min-width: 22px;
    width: 24px;
    padding: 2px;
  }
  #search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    height: 34px;
  }
  #app {
    padding: 24px 16px;
  }
  .sidebar {
    display: block;
    margin-bottom: 22px;
  }
  .feed-tabs {
    border: 0;
    padding: 0;
    gap: 18px;
    margin-bottom: 16px;
    justify-content: flex-start;
  }
  .feed-tabs a {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .feed-tabs b {
    width: 32px;
    height: 32px;
    margin: 0;
  }
  .feed-tabs svg {
    width: 18px;
    height: 18px;
  }
  .categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 3px 0 8px;
    gap: 8px;
  }
  .categories a {
    font-size: 12px;
    padding: 5px 12px;
    min-width: auto;
  }
  .section-heading {
    display: block;
  }
  .section-heading h1 {
    font-size: 18px;
    margin-bottom: 4px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }
  .card-title {
    font-size: 13px;
    height: 39px;
  }
  .card-meta {
    font-size: 10px;
  }
  .card-meta span:last-child {
    display: none;
  }
  .cover-stats {
    font-size: 10px;
    padding: 14px 5px 4px;
    gap: 3px;
  }
  .cover-stats svg {
    width: 12px;
    height: 12px;
  }
  .quote {
    font-size: 11px;
    height: 35px;
  }
  .detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .detail h1 {
    font-size: 17px;
  }
  .video-meta {
    flex-wrap: wrap;
    font-size: 11px;
  }
  .video-meta span {
    margin: 0;
  }
  .quality {
    line-height: 2;
  }
  .actions {
    gap: 7px;
  }
  .actions button,
  .actions a {
    font-size: 12px;
    padding: 7px;
  }
  .actions svg {
    width: 17px;
    height: 17px;
  }
  .comments .section-heading {
    display: flex;
  }
  .comments .section-heading h2 {
    font-size: 14px;
  }
  .recommend-count {
    line-height: 2;
  }
  .related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .related .card {
    display: block;
  }
  .related .card-title {
    height: 36px;
    margin-top: 6px;
  }
  .related .card-meta {
    display: none;
  }
  .episodes > div {
    max-height: 240px;
  }
  .sidebar-hidden .sidebar {
    display: none;
  }
  .pagination {
    gap: 14px;
  }
  .pagination a {
    padding: 7px 12px;
  }
  footer {
    padding: 20px 16px;
    font-size: 11px;
  }
  .uploader {
    margin-top: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
.load-more {
  display: block;
  margin: 32px auto;
  padding: 9px 24px;
}
