/* Newgen on-demand: cinematic artwork, restrained chrome, readable controls. */
:root { --red:#e50914; --bg:#141414; --gutter:4vw; }
body { font-family:Arial,Helvetica,sans-serif; }
.anime-nav { position:sticky; top:0; height:72px; background:linear-gradient(#080808ee,#080808b0); gap:38px; backdrop-filter:blur(8px); z-index:20; }
.anime-brand { font-size:27px; letter-spacing:-1.4px; }
.anime-brand span { font-size:10px; letter-spacing:2px; margin-left:8px; }
.anime-nav nav { font-size:13px; gap:23px; }
.anime-nav nav a[aria-current] { font-weight:700; }
.nav-search { width:40px; height:40px; display:grid; place-items:center; }
.nav-search svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2; }
.anime-hero { margin-top:-72px; height:83vh; min-height:620px; max-height:950px; background:#181818; }
.hero-image { object-position:center 30%; }
.hero-shade { background:linear-gradient(90deg,#141414eb 0%,#14141470 46%,transparent 78%),linear-gradient(0deg,#141414 0%,#14141400 38%,#0003 100%); }
.hero-copy { top:auto; bottom:23%; width:47%; max-width:640px; left:var(--gutter); }
.hero-copy h1 { font-size:clamp(36px,5vw,78px); line-height:1.05; letter-spacing:-2px; text-wrap:balance; margin-bottom:22px; }
.hero-copy p:not(.overline) { font-size:clamp(15px,1.35vw,20px); line-height:1.5; color:#f2f2f2; max-width:570px; }
.overline { letter-spacing:3px; font-size:11px; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:25px; }
.action { border-radius:4px; min-height:46px; padding:12px 27px; font-size:17px; font-weight:700; border:0; }
.action.primary { background:#fff; color:#141414; }
.action.primary:hover { background:#ffffffbf; }
.action.secondary { background:#6d6d6eaa; color:white; }
.action.secondary:hover { background:#6d6d6e66; }
.catalogue-section { padding:0 var(--gutter); margin:0 0 36px; position:relative; }
body[data-view=browse] .anime-hero + .catalogue-section { margin-top:-85px; z-index:2; }
.catalogue-section h2,.section-heading h2 { font-size:clamp(18px,1.6vw,25px); font-weight:700; letter-spacing:-.3px; margin:0 0 14px; }
.section-heading { align-items:center; }
.title-row { display:flex; gap:9px; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scrollbar-width:none; padding:12px 0 20px; margin-top:-12px; }
.title-row::-webkit-scrollbar { display:none; }
.title-row .title-card,.title-row .card-skeleton { flex:0 0 calc((100% - 36px)/5); min-width:0; scroll-snap-align:start; }
.title-card { position:relative; border-radius:5px; overflow:hidden; background:#202020; display:block; transition:transform .2s,box-shadow .2s; }
.card-art { aspect-ratio:16/9; height:auto; border-radius:4px 4px 0 0; overflow:hidden; background:#252525; position:relative; }
.card-art img { transition:transform .3s; }
.card-play { position:absolute; inset:0; display:grid; place-items:center; font-size:27px; color:white; background:#0004; opacity:0; transition:opacity .2s; }
.card-title { display:block; font-size:13px; line-height:1.3; padding:11px 12px 3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.card-meta { display:block; color:#a3a3a3; font-size:11px; padding:0 12px 12px; }
.card-progress { height:3px; background:#555; margin:0 12px 10px; }
.card-progress span { display:block; height:100%; background:var(--red); }
.row-arrows { margin:0 0 12px; gap:6px; }
.row-arrows button { background:transparent; border:0; font-size:29px; color:#eee; }
.row-arrows button:disabled { opacity:.2; }
@media(hover:hover) { .title-card:hover { transform:translateY(-5px); box-shadow:0 8px 20px #0008; } .title-card:hover img { transform:scale(1.045); } .title-card:hover .card-play { opacity:1; } }
.title-card:focus-visible .card-play { opacity:1; }
.detail-hero { min-height:680px; height:84vh; }
.detail-hero .hero-copy { bottom:13%; width:55%; max-width:720px; }
.detail-hero .hero-copy h1 { font-size:clamp(36px,4.5vw,66px); }
.detail-hero #hero-description { font-size:16px; max-height:144px; overflow:auto; scrollbar-width:thin; }
.title-meta { font-size:14px; color:#bcbcbc; margin:12px 0; line-height:1.6; }
.back-link { display:inline-block; color:#bcbcbc; font-size:13px; margin-bottom:20px; }
.episodes-section { max-width:1180px; padding:20px var(--gutter) 50px; margin:0 auto; }
.episode-list { display:block; }
.episode-card { display:grid; grid-template-columns:30px 180px minmax(0,1fr) 45px; align-items:center; gap:20px; padding:22px 12px; border-radius:4px; border-bottom:1px solid #353535; background:transparent; }
.episode-card:hover { background:#303030; }
.episode-number { color:#aaa; font-size:25px; text-align:center; }
.episode-art { width:100%; height:auto; aspect-ratio:16/9; border-radius:4px; overflow:hidden; }
.episode-card h3 { font-size:16px; margin:0 0 9px; }
.episode-card p { font-size:13px; color:#aaa; line-height:1.6; margin:0; }
.episode-duration { font-size:13px; color:#ddd; }
body[data-view=title] #recommendations-section { max-width:1180px; margin:0 auto 50px; }
body[data-view=title] #recommendations-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:visible; gap:16px; }
.search-page { max-width:1800px; padding:55px var(--gutter) 70px; margin:auto; min-height:70vh; }
.search-page h1 { font-size:32px; letter-spacing:-.8px; margin:0 0 24px; }
.search-page .overline { display:none; }
.search-page form { display:flex; gap:12px; margin-bottom:42px; }
#anime-query { width:min(620px,100%); min-width:0; border:1px solid #777; border-radius:2px; background:#080808; color:white; padding:14px 18px; font-size:16px; }
#search-heading { font-size:20px; color:#ddd; font-weight:400; margin-bottom:24px; }
.title-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:28px 12px; }
.schedule-teaser { background:transparent; border-top:1px solid #333; border-bottom:1px solid #333; margin:40px var(--gutter); padding:28px 0; }
.schedule-teaser h2 { font-size:24px; }
.schedule-days { gap:0; border-bottom:1px solid #444; padding:0; }
.schedule-days button { background:transparent; border:0; border-bottom:3px solid transparent; border-radius:0; min-height:60px; flex:1; }
.schedule-days button[aria-pressed=true] { background:transparent; color:#fff; border-color:var(--red); font-weight:700; }
.anime-footer { max-width:1180px; margin:60px auto 0; padding:35px var(--gutter); border-top:1px solid #333; font-size:12px; color:#888; line-height:2; }
.anime-status { padding:0 var(--gutter); }
.anime-status:empty { display:none; }
body[data-view=watch] { background:black; overflow:hidden; }
body[data-view=watch] .anime-nav,body[data-view=watch] .watch-heading,body[data-view=watch] .watch-shortcuts { display:none; }
body[data-view=watch] .watch-page { max-width:none; width:100%; padding:0; margin:0; }
body[data-view=watch] .watch-screen { width:100%; height:100dvh; aspect-ratio:auto; border-radius:0; }
body[data-view=watch] .watch-screen video { width:100%; height:100%; object-fit:contain; }
body[data-view=watch] #anime-status:not(:empty) { position:fixed; top:85px; left:0; right:0; z-index:6; pointer-events:none; text-align:center; color:white; background:#000a; padding:12px; }
.vod-top { padding:30px max(30px,env(safe-area-inset-left)); font-size:18px; gap:25px; }
.vod-hud { padding:90px max(30px,env(safe-area-inset-right)) max(25px,env(safe-area-inset-bottom)); }
.vod-timeline { gap:20px; margin-bottom:15px; }
.vod-timeline input { appearance:none; background:linear-gradient(to right,var(--red) var(--played,0%),#ffffff65 var(--played,0%)); height:4px; border-radius:0; }
.vod-timeline input::-webkit-slider-thumb { appearance:none; width:13px; height:13px; border-radius:50%; background:var(--red); }
.vod-timeline span { font-size:13px; }
.vod-buttons { gap:20px; }
.vod-buttons button { min-width:44px; min-height:48px; font-size:29px; }
.vod-buttons .vod-next { font-size:15px; }
.vod-buttons svg { width:28px; height:28px; }
#vod-menu { background:#181818; border:0; border-radius:4px; width:290px; padding:22px; }
.vod-start { border-radius:50px; padding:17px 30px; }
.watch-screen video::cue { color:#fff; background:#000b; font-size:clamp(16px,2.2vw,30px); font-family:Arial,Helvetica,sans-serif; }
.vod-ended { position:absolute; inset:0; background:linear-gradient(90deg,#141414f5,#141414cc); z-index:2; display:flex; flex-direction:column; justify-content:center; padding:8vw; }
.vod-ended > p { color:#aaa; font-size:12px; letter-spacing:3px; }
.vod-ended h2 { font-size:clamp(26px,4vw,50px); margin:8px 0 25px; }
.vod-ended > div { display:flex; flex-wrap:wrap; gap:12px; }
.vod-buttons .vod-next { background:#fff; color:#141414; border-radius:4px; font-weight:700; padding:10px 16px; }
.vod-buttons .vod-next:hover { background:#ddd; }
@media(min-width:1700px) { .title-row .title-card,.title-row .card-skeleton { flex-basis:calc((100% - 45px)/6); } .title-grid { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media(max-width:1000px) { .title-row .title-card,.title-row .card-skeleton { flex-basis:calc((100% - 18px)/3); } .title-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .hero-copy { width:65%; } .anime-nav { gap:22px; } .anime-brand { font-size:22px; } .anime-brand span { display:none; } .detail-hero .hero-copy { width:70%; } }
@media(max-width:600px) {
  :root { --gutter:5vw; }
  .anime-nav { height:60px; gap:16px; padding:0 var(--gutter); }
  .anime-brand { font-size:20px; }
  .anime-nav nav { gap:14px; font-size:11px; }
  .nav-search { width:28px; flex-shrink:0; }
  .anime-hero { margin-top:-60px; height:76vh; min-height:540px; max-height:720px; }
  .hero-shade { background:linear-gradient(0deg,#141414 0%,#141414c9 35%,transparent 80%),linear-gradient(90deg,#0004,transparent); }
  .hero-image { object-position:60% center; }
  .hero-copy,.detail-hero .hero-copy { width:90%; bottom:15%; top:auto; }
  .hero-copy h1,.detail-hero .hero-copy h1 { font-size:36px; letter-spacing:-1px; }
  .hero-copy p:not(.overline) { font-size:14px; line-height:1.5; }
  .action { min-height:44px; padding:11px 19px; font-size:14px; }
  .catalogue-section { margin-bottom:24px; }
  body[data-view=browse] .anime-hero + .catalogue-section { margin-top:-45px; }
  .title-row .title-card,.title-row .card-skeleton { flex-basis:72%; }
  .card-title { font-size:12px; }
  .detail-hero { min-height:660px; height:auto; }
  .detail-hero .hero-copy { bottom:7%; }
  .detail-hero #hero-description { font-size:14px; max-height:110px; }
  .episodes-section { padding-top:22px; }
  .episode-card { grid-template-columns:20px 100px minmax(0,1fr); gap:12px; padding:18px 0; }
  .episode-card h3 { font-size:13px; }
  .episode-card p { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:11px; }
  .episode-number { font-size:19px; }
  .episode-duration { display:none; }
  body[data-view=title] #recommendations-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .search-page { padding-top:32px; }
  .search-page h1 { font-size:27px; }
  .search-page form { margin-bottom:30px; gap:8px; }
  #anime-query { font-size:14px; padding:12px; }
  .search-page form .action { padding:12px; }
  .title-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 9px; }
  .schedule-page form { flex-wrap:wrap; }
  .schedule-days button { padding:12px; font-size:12px; }
  .vod-top { padding:18px 14px; font-size:13px; gap:15px; }
  .vod-hud { padding:60px 12px max(15px,env(safe-area-inset-bottom)); }
  .vod-timeline { margin-bottom:8px; gap:10px; }
  .vod-timeline span { font-size:10px; }
  .vod-buttons { gap:3px; }
  .vod-buttons button { min-width:32px; min-height:44px; font-size:24px; }
  .vod-buttons svg { width:22px; height:22px; }
  .vod-buttons .vod-next { font-size:10px; padding:4px; }
  #vod-menu { width:210px; padding:16px; }
}
@media(prefers-reduced-motion:reduce) { .title-card,.card-art img,.card-play { transition:none; } }
/* Phones may refuse orientation.lock(). Rotate the entire transport with video
   so portrait-held phones still get a landscape player, including touch UI. */
@media (pointer:coarse) and (orientation:portrait) {
  body[data-view=watch] .watch-screen {
    position:fixed!important;
    inset:auto!important;
    left:50%!important;
    top:50%!important;
    width:100dvh!important;
    height:100dvw!important;
    max-width:none!important;
    max-height:none!important;
    transform:translate(-50%,-50%) rotate(90deg);
    transform-origin:center;
  }
  body[data-view=watch] .vod-top { padding:12px 20px; }
  body[data-view=watch] .vod-hud { padding:40px 20px 12px; }
  body[data-view=watch] .vod-ended { padding:5vw 8vw; }
  body[data-view=watch] #vod-menu { max-height:calc(100vw - 100px); overflow-y:auto; }
}

/* Buffering spinner shown while the stream is catching up */
.watch-loading[data-buffering] { flex-direction:column; gap:12px; font-size:13px; letter-spacing:1px; }
.watch-loading[data-buffering]::before {
  content:"";
  width:34px; height:34px;
  border:3px solid rgba(255,255,255,.19);
  border-top-color:#e6323f;
  border-radius:50%;
  animation:buffer-spin .8s linear infinite;
}
@keyframes buffer-spin { to { transform:rotate(360deg); } }
