:root {
  --bg: #090a10;
  --bg2: #12141d;
  --bg3: #1b1e2b;
  --line: #262a3b;
  --text: #eef0f7;
  --muted: #8d93a8;
  --pink: #ff4f81;
  --violet: #7c5cff;
  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --gold: #ffc93c;
  --radius: 12px;
  --header-h: 64px;
  --pad: clamp(14px, 2.4vw, 48px);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.55 "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(124, 92, 255, .16), transparent 60%),
    radial-gradient(700px 420px at 0% 0%, rgba(255, 79, 129, .12), transparent 60%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pink); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
code { background: var(--bg3); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.container { width: 100%; max-width: 1840px; margin: 0 auto; padding: 0 var(--pad); }
main.container { flex: 1; padding-top: calc(var(--header-h) + 18px); padding-bottom: 50px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 50;
  background: rgb(9, 10, 16); border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 22px; letter-spacing: -.3px; white-space: nowrap; }
.logo:hover { color: inherit; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 18px rgba(255, 79, 129, .4); }
.logo-text b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav > a, .dd-btn {
  padding: 8px 11px; border-radius: 999px; font-size: 14px; font-weight: 500; color: #d7daea;
  background: none; border: 0; cursor: pointer; white-space: nowrap; font-family: inherit;
}
.nav > a:hover, .dd-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav > a.active { color: #fff; background: var(--grad); }
.dropdown { position: relative; }
.dd-menu {
  display: none; position: absolute; top: 100%; left: 0; width: 470px; max-width: 92vw;
  background: rgba(18, 20, 29, .98); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; grid-template-columns: repeat(3, 1fr); gap: 2px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}
.dropdown:hover .dd-menu, .dropdown.open .dd-menu { display: grid; }
.dd-menu a { padding: 7px 10px; border-radius: 8px; font-size: 14px; }
.dd-menu a:hover { background: var(--bg3); color: #fff; }
.icon-btn { background: none; border: 0; color: var(--text); font-size: 24px; cursor: pointer; display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search { position: relative; display: flex; }
.search input {
  width: 240px; padding: 9px 38px 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(27, 30, 43, .8); color: var(--text); outline: none; font-size: 14px; transition: .2s;
}
.search input:focus { border-color: var(--pink); width: 300px; box-shadow: 0 0 0 3px rgba(255, 79, 129, .18); }
.search input::placeholder { color: var(--muted); }
.search button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 15px; padding: 4px 8px; }
.pill { padding: 8px 13px; border-radius: 999px; background: rgba(27, 30, 43, .8); border: 1px solid var(--line); font-size: 13.5px; white-space: nowrap; }
.pill:hover { border-color: var(--pink); color: #fff; }
.suggest {
  position: absolute; top: calc(100% + 10px); right: 0; width: 360px; max-width: 92vw; background: rgba(18, 20, 29, .98);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}
.suggest a { display: flex; gap: 10px; padding: 8px 12px; align-items: center; }
.suggest a:hover { background: var(--bg3); color: #fff; }
.suggest img { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--bg3); flex: none; }
.suggest span { display: flex; flex-direction: column; min-width: 0; }
.suggest b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .all { justify-content: center; color: var(--pink); font-weight: 600; border-top: 1px solid var(--line); }
.suggest .none { padding: 16px; color: var(--muted); text-align: center; }

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 999px;
  background: var(--bg3); color: var(--text); border: 1px solid var(--line); cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px; transition: .18s; white-space: nowrap;
}
.btn:hover { border-color: var(--pink); color: #fff; transform: translateY(-1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgba(255, 79, 129, .35); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: rgba(255, 255, 255, .08); }
.btn.lg { padding: 12px 26px; font-size: 15.5px; }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn.on { color: var(--pink); border-color: var(--pink); }
.btn.disabled { opacity: .35; pointer-events: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 16px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.chip:hover { border-color: var(--pink); color: #fff; background: var(--bg3); }
.chip.yellow { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.chip.teal { background: #1fb5a3; color: #052; border-color: #1fb5a3; font-weight: 700; }
.chip.yellow:hover, .chip.teal:hover { color: #000; filter: brightness(1.1); }

/* ---------- Hero ---------- */
.dedication {
  position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 52px 14px 18px;
  border-radius: 16px; border: 1px solid rgba(255, 79, 129, .45); animation: ded-in .5s ease;
  background: linear-gradient(120deg, rgba(255, 79, 129, .22), rgba(124, 92, 255, .22));
}
.ded-ico { font-size: 28px; animation: beat 1.6s ease-in-out infinite; }
.ded-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ded-text b { font-size: 16.5px; }
.ded-text span { color: #d9dcec; font-size: 14px; }
.ded-close { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; font-size: 13px; }
.ded-close:hover { background: rgba(255, 255, 255, .22); }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes ded-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Hero ---------- */
.hero { position: relative; height: clamp(380px, 52vw, 560px); border-radius: 20px; overflow: hidden; margin-bottom: 18px; background: var(--bg2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center 22%; opacity: 0; transition: opacity .7s; pointer-events: none; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 10, 16, .96) 8%, rgba(9, 10, 16, .6) 50%, rgba(9, 10, 16, .05)), linear-gradient(0deg, rgba(9, 10, 16, .95), transparent 45%); }
.slide-info { position: absolute; left: clamp(20px, 4vw, 52px); bottom: clamp(60px, 9vw, 90px); max-width: min(620px, 86%); }
.slide-info h1 { font-size: clamp(26px, 4vw, 44px); letter-spacing: -.5px; margin: 12px 0 4px; text-shadow: 0 4px 24px rgba(0, 0, 0, .6); }
.slide-orig { color: var(--gold); font-size: 14.5px; font-weight: 500; }
.slide-info p { color: #cfd3e4; margin: 14px 0 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 3px 11px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 7px; font-size: 12.5px; background: rgba(0, 0, 0, .25); }
.tag.hot { background: var(--grad); border-color: transparent; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.thumbs { position: absolute; right: 22px; bottom: 20px; display: flex; gap: 8px; }
.thumbs button {
  width: 46px; height: 64px; border-radius: 9px; border: 2px solid transparent; background-size: cover; background-position: center;
  cursor: pointer; opacity: .55; transition: .2s; padding: 0;
}
.thumbs button:hover { opacity: 1; }
.thumbs button.active { opacity: 1; border-color: var(--pink); transform: translateY(-6px) scale(1.08); }

/* ---------- Sections / cards ---------- */
.section { margin-bottom: 34px; content-visibility: auto; contain-intrinsic-size: auto 380px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 21px; letter-spacing: -.2px; }
.more { color: var(--muted); font-size: 13.5px; }
.more:hover { color: var(--pink); }
.row { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.row .card { flex: 0 0 176px; scroll-snap-align: start; }
.row::-webkit-scrollbar { height: 7px; }
.row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 24px 16px; }
.card { display: block; min-width: 0; }
.card-img { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg3); transition: transform .2s; }
.card:hover .card-img { transform: translateY(-4px); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.08); }
.card-hover { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(0deg, rgba(9, 10, 16, .75), rgba(9, 10, 16, .15)); opacity: 0; transition: .25s; }
.card:hover .card-hover { opacity: 1; }
.play { width: 52px; height: 52px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 18px; padding-left: 3px; box-shadow: 0 8px 24px rgba(255, 79, 129, .55); transform: scale(.8); transition: .25s; color: #fff; }
.card:hover .play { transform: scale(1); }
.badge { position: absolute; left: 7px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; border-radius: 6px; max-width: calc(100% - 14px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; z-index: 1; }
.b-ep { top: 7px; background: var(--grad); color: #fff; }
.b-q { bottom: 7px; background: rgba(0, 0, 0, .72); color: #fff; }
.card-title { margin-top: 9px; font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .card-title { color: var(--pink); }
.card-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sk { background: linear-gradient(100deg, var(--bg2) 30%, var(--bg3) 50%, var(--bg2) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
.sk-card { pointer-events: none; }
.sk-line { height: 12px; border-radius: 6px; margin-top: 10px; }
.sk-line.short { width: 60%; }
.hero.sk { box-shadow: none; }
@keyframes shimmer { to { background-position: -300% 0; } }

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 26px; letter-spacing: -.3px; }

.pager { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 36px; }
.pager a, .pager span { min-width: 40px; padding: 8px 13px; text-align: center; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.pager a:hover { border-color: var(--pink); color: #fff; }
.pager .cur { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; }
.pager .gap { background: none; border: 0; }

/* ---------- Detail ---------- */
.detail { position: relative; }
.detail-bg { position: absolute; inset: -80px calc(-1 * var(--pad)) auto calc(-1 * var(--pad)); height: 560px; background-size: cover; background-position: center 20%; opacity: .3; mask-image: linear-gradient(#000 30%, transparent); -webkit-mask-image: linear-gradient(#000 30%, transparent); pointer-events: none; }
.crumb { position: relative; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.detail-main { position: relative; display: flex; gap: 32px; margin-bottom: 26px; }
.detail-poster { flex: 0 0 270px; }
.detail-poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 16px; background: var(--bg3); box-shadow: 0 18px 44px rgba(0, 0, 0, .65); }
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.4px; margin: 12px 0 4px; }
.info { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; margin: 18px 0 0; padding: 16px 18px; background: rgba(18, 20, 29, .85); border: 1px solid var(--line); border-radius: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.info dd a { color: #ff8fb0; }
.info dd a:hover { text-decoration: underline; }
.box { position: relative; background: rgba(18, 20, 29, .85); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 22px; }
.box h2 { font-size: 18px; margin-bottom: 14px; }
.desc { margin: 0; color: #cdd1e2; white-space: pre-line; }
.server + .server { margin-top: 18px; }
.note { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: rgba(255, 201, 60, .1); border: 1px solid rgba(255, 201, 60, .35); color: #ffe39a; font-size: 14px; }
.server h3 { font-size: 14.5px; color: var(--pink); margin-bottom: 10px; }
.server h3 small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.ranges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.range { padding: 4px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.range:hover { color: #fff; border-color: var(--pink); }
.range.active { background: var(--grad); color: #fff; border-color: transparent; }
.eps { display: flex; flex-wrap: wrap; gap: 8px; }
.ep { min-width: 64px; text-align: center; padding: 7px 14px; background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; transition: .15s; }
.ep:hover { border-color: var(--pink); color: #fff; transform: translateY(-1px); }
.ep.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; }

.links summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.links p { margin: 12px 0; }
.links a { color: var(--pink); }
.link-block { margin-top: 14px; }
.link-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.links textarea { width: 100%; background: var(--bg); color: #bfc5dc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 12.5px/1.6 ui-monospace, Consolas, monospace; resize: vertical; }

/* ---------- Watch ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.server-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.watch-title { font-size: 22px; margin: 6px 0 20px; }
.watch-title small { color: var(--pink); font-size: 15px; margin-left: 8px; }
.dim { position: fixed; inset: 0; background: rgba(0, 0, 0, .93); z-index: 55; }
body.lights-off .player, body.lights-off .player-bar { z-index: 60; }

/* ---------- Misc ---------- */
.loading { display: flex; justify-content: center; padding: 140px 0; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--line); border-top-color: var(--pink); border-right-color: var(--violet); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-ico { font-size: 46px; margin-bottom: 8px; }
.empty .btn { margin-top: 12px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--bg3); border: 1px solid var(--pink); color: #fff; padding: 10px 20px; border-radius: 999px; z-index: 100; opacity: 0; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; z-index: 40; box-shadow: 0 8px 22px rgba(255, 79, 129, .45); }

.footer { border-top: 1px solid var(--line); background: rgba(9, 10, 16, .8); padding: 30px 0 18px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 10px 0 0; max-width: 420px; font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: flex-start; font-size: 14px; color: #c3c8dc; }
.copy { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.copy a { color: var(--pink); }

/* ---------- Responsive ---------- */
@media (max-width: 1420px) {
  .pill span { display: none; }
  .search input { width: 180px; }
  .search input:focus { width: 230px; }
  .nav > a, .dd-btn { padding: 8px 9px; font-size: 13.5px; }
}
@media (max-width: 1180px) {
  .search input { width: 150px; }
  .search input:focus { width: 190px; }
  .nav > a, .dd-btn { padding: 8px 7px; font-size: 13px; }
}
@media (max-width: 960px) {
  .icon-btn { display: block; }
  .header { background: rgba(9, 10, 16, .97); border-bottom: 1px solid var(--line); }
  .header-inner { gap: 10px; }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(18, 20, 29, .98); border-bottom: 1px solid var(--line); padding: 8px 18px 14px; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav > a, .dd-btn { text-align: left; width: 100%; padding: 11px 12px; border-radius: 10px; font-size: 14.5px; }
  .dropdown:hover .dd-menu { display: none; }
  .dropdown.open .dd-menu { display: grid; }
  .dd-menu { position: static; width: auto; box-shadow: none; margin: 4px 0 8px; }
  .thumbs { display: none; }
  .slide-info { bottom: 36px; }
  .detail-main { flex-direction: column; }
  .detail-poster { flex-basis: auto; width: 200px; }
}
@media (max-width: 560px) {
  .container { --pad: 12px; }
  .logo { font-size: 19px; }
  .search input, .search input:focus { width: 130px; }
  .hero { border-radius: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 18px 10px; }
  .row .card { flex-basis: 138px; }
  .dd-menu { grid-template-columns: repeat(2, 1fr); }
  .info { grid-template-columns: 90px 1fr; }
  .page-title { font-size: 21px; }
  .btn.lg { padding: 10px 20px; }
}
