:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  background: #101010;
  color: #f7f7f7;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { -ms-overflow-style: none; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
body { margin: 0; background: #101010; }
body.video-open { overflow: hidden; overscroll-behavior: none; }
button { color: inherit; font: inherit; cursor: pointer; }

.app-shell {
  width: min(100%, 540px);
  min-height: 100vh;
  margin: auto;
  padding: 12px 14px 86px;
}

.topbar { display: flex; align-items: center; gap: 12px; }
.brand { display: block; flex: 0 0 auto; margin-left: auto; line-height: 0; }
.brand img { display: block; width: 106px; height: auto; }
.brand-mark, .mini-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #f4dc2f; color: #171717; font-size: 16px; }
.search-button { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: space-between; padding: 9px 11px; border: 1px solid #333; border-radius: 28px; background: #191919; color: #777; font-size: 12px; text-align: left; }
.search-button b { color: #aaa; font-size: 24px; line-height: 15px; }
.top-actions { display: flex; gap: 5px; margin-left: auto; }
.top-actions button { display: grid; gap: 2px; min-width: 39px; border: 1px solid #3a3620; border-radius: 16px; padding: 5px; background: #181715; color: #f4db38; font-size: 16px; }
.top-actions small { color: #c8c8c8; font-size: 11px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 14px; }
.section-heading h1, .section-heading h2 { margin: 0; padding-left: 11px; border-left: 4px solid #f5db34; font-size: 20px; }
.section-heading button { border: 0; background: transparent; color: #a5a5a5; }
.section-heading button span { color: #f5db34; font-size: 20px; }

.featured-track { display: block; }
.feature-card { display: grid; grid-template-columns: minmax(0, 1fr) 112px; min-height: 168px; overflow: hidden; border: 1px solid #5d541e; border-radius: 7px; background: #181818; }
.poster { position: relative; display: flex; min-height: 200px; flex-direction: column; align-items: flex-start; justify-content: flex-end; overflow: hidden; padding: 18px; background: linear-gradient(150deg, #6f5425, #2b1f17 52%, #111); isolation: isolate; }
.poster.has-image { background-position: center; background-repeat: no-repeat; background-size: cover; }
.poster::before { position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 73% 22%, rgb(255 255 255 / 42%), transparent 18%), linear-gradient(20deg, rgb(0 0 0 / 45%), transparent 55%); content: ""; }
.poster--rose { background: linear-gradient(150deg, #8e324f, #3b1726 52%, #111); }
.poster--blue { background: linear-gradient(150deg, #1d5f8e, #13283e 52%, #111); }
.poster--green { background: linear-gradient(150deg, #3f815e, #19362a 52%, #111); }
.poster--violet { background: linear-gradient(150deg, #6f4d91, #2a1b3d 52%, #111); }
.poster--orange { background: linear-gradient(150deg, #a05b22, #422410 52%, #111); }
.poster-glow { position: absolute; top: 24px; right: 24px; width: 84px; height: 84px; border: 2px solid rgb(255 255 255 / 60%); border-radius: 50%; box-shadow: 0 0 36px 14px rgb(255 255 255 / 17%); }
.poster-title { max-width: 95%; font-size: 27px; font-weight: 800; letter-spacing: 2px; text-shadow: 0 2px 5px #000; }
.poster-episodes { margin-top: 8px; color: #f1df5b; font-size: 13px; }
.feature-copy { display: flex; min-width: 0; flex-direction: column; padding: 13px 13px 12px; }
.feature-copy div { display: flex; gap: 5px; }
.feature-copy div span { padding: 2px 7px; border-radius: 4px; background: #2d2d2d; color: #c0c0c0; font-size: 11px; }
.feature-copy h3, .catalog-card h3 { margin: 8px 0 6px; font-size: 16px; }
.feature-description { display: -webkit-box; margin: 0; overflow: hidden; color: #b7b7b7; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.feature-action { margin: auto 0 0; color: #f1d936; font-size: 13px; }
.feature-action small { float: right; color: #aaa; }
.feature-card .poster { min-height: 168px; padding: 0; background-position: center; }
.feature-card .poster::before { background: linear-gradient(90deg, rgb(0 0 0 / 16%), transparent 42%); }
.feature-card .poster-glow, .feature-card .poster-title, .feature-card .poster-episodes { display: none; }

.catalog-section { margin-top: 22px; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.masonry-column { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.catalog-card { min-width: 0; }
.catalog-card .poster { min-height: 0; padding: 0; border: 0; border-radius: 5px; background: none; box-shadow: none; }
.catalog-card .poster::before { display: none; }
.catalog-card .poster img { display: block; width: 100%; height: auto; border-radius: 5px; }
.badge { display: inline-block; margin: 8px 0 0; padding: 3px 7px; border-radius: 4px; background: #45401b; color: #f2dd4d; font-size: 11px; }
.catalog-card h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metadata { margin: 0; color: #777; font-size: 12px; }

.floating-promo { display: none; }
.left-promo { left: max(15px, calc((100vw - 1180px) / 2 - 98px)); }
.right-promo { right: max(15px, calc((100vw - 1180px) / 2 - 98px)); }
.dismiss, .banner-close { position: absolute; z-index: 1; top: -9px; right: -9px; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #999; border-radius: 50%; background: #1d1d1d; color: #ddd; }
.promo-card { display: grid; width: 82px; height: 82px; place-content: center; gap: 2px; border: 1px solid #f4d531; border-radius: 13px; background: linear-gradient(145deg, #61531d, #1f1c12); color: #fff1a2; text-align: center; }
.promo-card span, .promo-card small { font-size: 10px; }
.promo-card strong { font-size: 15px; }
.support-button { display: grid; gap: 3px; width: 70px; margin: 14px auto 0; border: 1px solid #333; border-radius: 50%; aspect-ratio: 1; background: #202020; color: #f5d936; }
.support-button span { color: #ddd; font-size: 11px; }

.download-banner { position: fixed; z-index: 7; right: 0; bottom: 0; left: 0; display: flex; width: min(100%, 540px); align-items: center; gap: 12px; margin: auto; padding: 9px 18px max(9px, env(safe-area-inset-bottom)); border: 1px solid #312f20; border-radius: 12px 12px 0 0; background: #191919f2; }
.download-banner .mini-logo { width: 36px; height: 36px; font-size: 15px; }
.download-banner > span:not(.mini-logo) { flex: 1; color: #cfcfcf; font-size: 14px; }
.download-button { border: 0; border-radius: 20px; padding: 9px 17px; background: #f4d932; color: #292312; font-weight: 700; }
.banner-close { top: 50%; right: calc(100% + 10px); transform: translateY(-50%); }
.modal { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / 74%); }
.modal-content { position: relative; width: min(100%, 470px); overflow: visible; border-radius: 18px; }
.modal-slides { overflow: hidden; border-radius: 18px; }
.promotion-slide { display: none; min-height: 500px; flex-direction: column; justify-content: center; padding: 46px 38px; background: radial-gradient(circle at 75% 22%, #fff2a0, transparent 9%), linear-gradient(145deg, #14110b, #70541a 42%, #14110b); text-align: center; }
.promotion-slide.has-image { background-position: center; background-repeat: no-repeat; background-size: cover; }
.promotion-slide.is-visible { display: flex; }
.promotion-slide--rose { background: radial-gradient(circle at 75% 22%, #ffd7df, transparent 9%), linear-gradient(145deg, #291218, #7c2946 42%, #211015); }
.promotion-slide--blue { background: radial-gradient(circle at 75% 22%, #c5eaff, transparent 9%), linear-gradient(145deg, #0b1722, #1e5f8d 42%, #0c1823); }
.promotion-slide > span { color: #ffe46d; font-size: 18px; letter-spacing: 5px; }
.promotion-slide h2 { margin: 20px 0 13px; font-size: clamp(35px, 9vw, 58px); line-height: 1.1; text-shadow: 0 3px 2px #000; }
.promotion-slide p { margin: 0 auto 26px; max-width: 270px; color: #f1ead0; line-height: 1.6; }
.promotion-slide > button { width: 190px; margin: 0 auto; border: 1px solid #ffe37e; border-radius: 26px; padding: 11px; background: #f0cc39; color: #32250d; font-weight: 800; }
.modal-dots { display: flex; justify-content: center; gap: 8px; padding: 14px; }
.modal-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #736f60; }
.modal-dots button.is-active { width: 22px; border-radius: 5px; background: #f3d93e; }
.reminder { display: block; margin: 4px auto 8px; color: #ddd; text-align: center; }
.reminder input { accent-color: #f2d63a; }
.modal-close { display: grid; width: 46px; height: 46px; margin: 0 auto; place-items: center; border: 2px solid #ddd; border-radius: 50%; background: #242424; color: #eee; font-size: 35px; line-height: 20px; }

.video-modal { position: fixed; z-index: 20; inset: 0; overflow: hidden; display: grid; place-items: center; padding: 0; background: #000; }
.video-modal[hidden] { display: none; }
.video-dialog { position: relative; width: min(100%, 540px); height: 100dvh; overflow: hidden; background: #000; isolation: isolate; }
.video-background { position: absolute; z-index: 0; inset: -24px; background: center / cover no-repeat; filter: blur(22px) brightness(.45); transform: scale(1.04); }
.video-dialog .video-player, .video-dialog .video-player video-skin { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.video-dialog .video-player, .video-dialog .video-player video-skin, .video-dialog .video-player video { background-color: transparent; }
.video-dialog .video-player video { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-title-overlay { position: absolute; z-index: 3; right: 16px; bottom: calc(56px + env(safe-area-inset-bottom)); left: 16px; padding: 9px 12px; border-radius: 5px; background: rgb(0 0 0 / 65%); }
.video-title-overlay h2 { margin: 0; overflow: hidden; color: #fff; font-size: 16px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.video-close { position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: 14px; border: 1px solid rgb(255 255 255 / 55%); border-radius: 5px; padding: 7px 11px; background: rgb(0 0 0 / 70%); color: #fff; font-size: 14px; line-height: 1.2; }
.video-js { width: 100%; }

@media (max-width: 760px) {
  .download-banner { width: 100%; border-radius: 0; padding: 8px 17px max(8px, env(safe-area-inset-bottom)); }
  .banner-close { right: auto; left: 10px; top: -28px; transform: none; }
  .promotion-slide { min-height: 450px; padding: 34px 24px; }
}
