:root {
  color-scheme: dark;
  --bg: #06070d;
  --panel: #121722;
  --panel-2: #171a24;
  --line: #2a2e3b;
  --muted: #9b9ba6;
  --text: #f7f7fb;
  --gold: #ffca28;
  --gold-2: #ffe692;
  --brown: #5c3417;
  --orange: #ff8435;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.phone {
  width: min(100vw, 430px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

@media (min-width: 520px) {
  body {
    padding: 18px 0;
  }

  .phone {
    min-height: 760px;
    border-radius: 26px;
  }
}

.home {
  padding-bottom: 28px;
}

.topbar {
  padding: 15px 18px 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px 92px 48px;
  gap: 7px;
  align-items: center;
  background: linear-gradient(100deg, #0c1e20 0%, #10111d 54%, #161d3a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.search {
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 18px;
  border: 1px solid #2b303d;
  background: rgba(16, 18, 27, 0.78);
  color: #aeb0b8;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
}

.search img,
.search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  object-fit: contain;
}

.search span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.round-action {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #323746;
  background: rgba(18, 21, 31, 0.9);
  color: var(--gold);
}

.round-action svg {
  width: 19px;
  height: 19px;
}

.coin-button {
  height: 32px;
  border-radius: 18px;
  background: linear-gradient(90deg, #514a3e, #5b5548);
  border: 1px solid rgba(255, 230, 146, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-weight: 950;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.coin-button .coin {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #60410d;
  font-size: 14px;
}

.language-switcher {
  min-width: 0;
  height: 32px;
  position: relative;
}

.language-switcher::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: currentColor;
  color: #f7f7fb;
  opacity: 0.92;
  pointer-events: none;
  -webkit-mask:
    radial-gradient(circle at 50% 50%, transparent 52%, #000 54% 70%, transparent 72%),
    linear-gradient(#000 0 0) center/12px 2px no-repeat,
    linear-gradient(#000 0 0) center/2px 12px no-repeat;
  mask:
    radial-gradient(circle at 50% 50%, transparent 52%, #000 54% 70%, transparent 72%),
    linear-gradient(#000 0 0) center/12px 2px no-repeat,
    linear-gradient(#000 0 0) center/2px 12px no-repeat;
}

.language-select {
  width: 100%;
  height: 32px;
  border: 1px solid #323746;
  border-radius: 17px;
  padding: 0 20px 0 27px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #d7d8df 50%) right 9px center/5px 5px no-repeat,
    linear-gradient(135deg, #d7d8df 50%, transparent 50%) right 5px center/5px 5px no-repeat,
    rgba(18, 21, 31, 0.9);
  color: #f7f7fb;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.language-select option {
  background: #10121a;
  color: #f7f7fb;
}

.channel-tabs {
  height: 46px;
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  padding: 7px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #10121a;
}

.channel {
  height: 32px;
  flex: 0 0 auto;
  padding: 0 18px;
  border-radius: 18px;
  background: #161922;
  border: 1px solid #2d3240;
  color: #aeb0b8;
  font-weight: 900;
}

.channel.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #4a2600;
}

.banner {
  margin: 14px 26px 0;
  height: 92px;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-head {
  margin: 17px 27px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 950;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(#ffe879, #ffc016);
}

.more {
  color: #989aa3;
  font-weight: 900;
  text-decoration: none;
}

.featured {
  margin: 0 27px;
  height: 191px;
  padding: 18px 160px 14px 14px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(176, 101, 28, 0.7);
  background:
    var(--featured-bg) center/cover no-repeat,
    radial-gradient(circle at 0% 100%, rgba(135, 89, 42, 0.55), transparent 52%),
    linear-gradient(110deg, rgba(54, 44, 34, 0.95), rgba(7, 8, 13, 0.88) 48%),
    #0a0b11;
  box-shadow: inset 0 0 22px rgba(255, 179, 68, 0.05);
}

.featured h1 {
  margin: 0 0 9px;
  color: #ffe47e;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 950;
}

.pills {
  display: flex;
  gap: 7px;
  margin-bottom: 11px;
}

.pill {
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255, 198, 57, 0.14);
  color: #d59c3d;
  font-weight: 900;
  font-size: 12px;
}

.pill.gray {
  color: #ced0d7;
  background: rgba(255, 255, 255, 0.16);
}

.featured p {
  margin: 0;
  color: #ffe37a;
  font-size: 13px;
  font-weight: 900;
}

.watch-now {
  position: absolute;
  left: 14px;
  bottom: 15px;
  min-width: 74px;
  height: 26px;
  padding: 0 12px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(90deg, #ffc414, #fff0a8);
  color: #682600;
  font-size: 13px;
  font-weight: 950;
}

.play-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6b2300;
  display: grid;
  place-items: center;
}

.play-dot::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #fff1b6;
  margin-left: 2px;
}

.featured-poster {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 133px;
  height: 162px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(255, 206, 49, 0.28);
}

.featured-poster img,
.poster-card img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-grid {
  margin: 14px 26px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.poster-card {
  position: relative;
  aspect-ratio: 9 / 16;
  min-height: 296px;
  overflow: hidden;
  border-radius: 7px;
  background: #151821;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.corner {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  min-width: 57px;
  display: grid;
  place-items: center;
  border-radius: 7px 0 7px 0;
  background: var(--gold);
  color: #522600;
  font-weight: 950;
  font-size: 14px;
}

.home-loader {
  height: 72px;
  margin: 8px 26px 30px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #aeb0b8;
  font-size: 13px;
  font-weight: 850;
}

.home-loader.active {
  display: flex;
}

.loader-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 202, 40, 0.22);
  border-top-color: var(--gold);
  animation: loader-spin 0.8s linear infinite;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.detail {
  min-height: 100svh;
  background: #080910;
}

.detail-hero {
  padding: 24px 33px 0;
  min-height: 251px;
  background:
    radial-gradient(circle at 75% 16%, rgba(38, 56, 96, 0.34), transparent 24%),
    linear-gradient(180deg, #1f0622 0 66px, #0b101b 66px, #07080d 100%);
}

.back {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #151b25;
  border: 1px solid #26303e;
  color: var(--gold);
}

.back svg {
  width: 23px;
  height: 23px;
}

.hero-info {
  margin-top: 21px;
  display: grid;
  grid-template-columns: 114px 1fr;
  gap: 17px;
}

.detail-poster {
  width: 114px;
  height: 153px;
  border-radius: 6px;
  overflow: hidden;
}

.detail-title {
  margin: 4px 0 12px;
  max-width: 220px;
  font-size: 23px;
  line-height: 1.15;
  font-weight: 950;
}

.tag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 198, 57, 0.18);
  color: #c79337;
  font-weight: 900;
  font-size: 13px;
}

.meta {
  margin-top: 14px;
  color: #93919d;
  font-size: 14px;
  font-weight: 850;
}

.comments {
  padding: 0 33px 0;
}

.comments .section-title {
  margin-bottom: 10px;
}

.comment-row {
  display: flex;
  gap: 10px;
  overflow: hidden;
}

.comment-card {
  flex: 0 0 227px;
  height: 72px;
  padding: 10px 11px;
  border-radius: 5px;
  background: #171a24;
}

.comment-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9799a4;
  font-size: 12px;
  font-weight: 800;
}

.avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe6d5, #6f5f73);
}

.comment-copy {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 950;
}

.episodes {
  margin-top: 23px;
}

.episode-tabs {
  height: 43px;
  padding: 0 34px;
  display: flex;
  align-items: flex-end;
  gap: 29px;
  border-bottom: 1px solid #2a2d36;
}

.episode-tab {
  position: relative;
  padding-bottom: 13px;
  color: #a6a6b0;
  font-size: 18px;
  font-weight: 950;
}

.episode-tab.active {
  color: #fff;
}

.episode-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gold);
}

.episode-list {
  padding: 24px 33px;
  display: grid;
  grid-template-columns: repeat(5, 52px);
  gap: 9px;
}

.episode-btn {
  position: relative;
  width: 52px;
  height: 43px;
  border-radius: 9px;
  border: 1px solid rgba(176, 145, 74, 0.75);
  background: #111721;
  color: #f8f8fb;
  font-size: 16px;
  font-weight: 950;
}

.episode-btn.free {
  background: #5a3218;
  border-color: #c84d42;
}

.episode-btn .vip {
  position: absolute;
  top: -6px;
  right: 0;
  height: 15px;
  min-width: 22px;
  padding: 0 4px;
  border-radius: 4px;
  background: #ffc46c;
  color: #6a3000;
  font-size: 10px;
  line-height: 15px;
}

.playing-bars {
  position: absolute;
  top: 11px;
  right: 10px;
  display: flex;
  gap: 2px;
  align-items: end;
}

.playing-bars i {
  width: 2px;
  height: 6px;
  background: #c05043;
  border-radius: 2px;
  animation: bar 0.9s infinite ease-in-out;
}

.playing-bars i:nth-child(2) {
  animation-delay: 0.14s;
}

.playing-bars i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes bar {
  50% {
    height: 12px;
  }
}

.player {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background: #000;
}

.player-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2) 55%, rgba(0, 0, 0, 0.75)),
    url("./assets/original-home/60_a9a26db077874745.png") center/cover no-repeat;
  filter: brightness(0.86);
}

.player.playing .player-bg {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.1) 58%, rgba(0, 0, 0, 0.72)),
    url("./assets/drama-poster.png") center/cover no-repeat;
  transform: scale(1.28);
  filter: brightness(0.78) blur(1px);
}

.player.has-video .player-bg {
  opacity: 0;
}

.player.has-video.landscape .player-bg {
  opacity: 0.36;
}

.video-player {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player.landscape .video-player {
  inset: auto 0;
  top: 50%;
  width: 100%;
  height: auto;
  max-height: calc(100svh - 170px);
  object-fit: contain;
  transform: translateY(-50%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
}

.fullscreen-toggle {
  position: absolute;
  z-index: 6;
  left: 26px;
  top: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 11, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
}

.fullscreen-toggle svg {
  width: 23px;
  height: 23px;
}

.player.landscape .fullscreen-toggle {
  top: 50%;
}

.play-all-button {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 92px;
  min-width: 150px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc414, #fff0a8);
  color: #542800;
  font-size: 17px;
  font-weight: 950;
  box-shadow: 0 12px 34px rgba(255, 196, 20, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.player.video-ended .play-all-button {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.player.landscape .play-all-button {
  bottom: 76px;
}

.player-top {
  position: relative;
  z-index: 4;
  padding: 22px 28px;
}

.player-back {
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  padding: 8px;
}

.player-back svg {
  width: 24px;
  height: 24px;
}

.side-actions {
  position: absolute;
  z-index: 4;
  right: 19px;
  bottom: 102px;
  display: grid;
  gap: 16px;
  color: rgba(255, 255, 255, 0.6);
}

.side-action {
  display: grid;
  justify-items: center;
  gap: 3px;
  font-weight: 850;
  font-size: 12px;
}

.side-action svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.7;
}

.player-caption {
  position: absolute;
  z-index: 4;
  left: 27px;
  right: 76px;
  bottom: 30px;
}

.player-caption h2 {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 950;
}

.player-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  font-weight: 900;
}

.playing-card {
  position: absolute;
  z-index: 5;
  left: 32px;
  right: 32px;
  bottom: 94px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(12, 13, 19, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  animation: playing-card-once 2.6s ease forwards;
  pointer-events: none;
}

@keyframes playing-card-once {
  0%,
  74% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
  }
}

.playing-card h1 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.18;
}

.progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.progress span {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--gold);
  animation: progress 7s linear infinite;
}

@keyframes progress {
  from {
    width: 8%;
  }
  to {
    width: 96%;
  }
}

.play-state {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d5d7de;
  font-weight: 850;
  font-size: 13px;
}

.pause {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #ffc414, #fff0a8);
}

.pause::before,
.pause::after {
  content: "";
  width: 4px;
  height: 16px;
  background: #5a2600;
  border-radius: 4px;
}

.pause {
  grid-template-columns: repeat(2, auto);
  gap: 4px;
}

.video-config-empty {
  position: absolute;
  z-index: 5;
  left: 32px;
  right: 32px;
  top: 42%;
  transform: translateY(-50%);
  padding: 22px 18px;
  border-radius: 12px;
  background: rgba(12, 13, 19, 0.82);
  border: 1px solid rgba(255, 202, 40, 0.22);
  text-align: center;
  backdrop-filter: blur(8px);
}

.video-config-empty h1 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 20px;
}

.video-config-empty p {
  margin: 0;
  color: #d8d9df;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 850;
}

.vip-mask {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 58px;
  background: rgba(0, 0, 0, 0.2);
}

.vip-dialog {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(138, 91, 43, 0.75);
  overflow: hidden;
  background: linear-gradient(180deg, #583518 0, #1a1b20 88px, #16171b 100%);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
}

.vip-title {
  height: 61px;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 18px;
  font-weight: 950;
}

.vip-title::before,
.vip-title::after {
  content: "◆";
  margin: 0 8px;
  color: var(--gold);
  font-size: 10px;
  opacity: 0.85;
}

.vip-copy {
  margin: 0 16px;
  height: 113px;
  border-radius: 9px;
  background: #222;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.45;
  font-size: 15px;
  font-weight: 950;
}

.vip-actions {
  padding: 13px 22px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.vip-actions button {
  height: 36px;
  border-radius: 20px;
  font-weight: 950;
}

.cancel {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.subscribe {
  background: linear-gradient(90deg, #ffc414, #fff0a8);
  color: #5a2600;
}

@media (max-width: 360px) {
  .topbar {
    grid-template-columns: 34px minmax(0, 1fr) 32px 84px 46px;
    padding-inline: 12px;
    gap: 5px;
  }

  .featured {
    margin-inline: 18px;
    padding-right: 146px;
  }

  .featured-poster {
    width: 118px;
    height: 158px;
  }

  .poster-grid,
  .banner,
  .home-loader {
    margin-inline: 18px;
  }

  .episode-list {
    grid-template-columns: repeat(5, 48px);
    padding-inline: 24px;
  }
}
