/*!
 * Theme Name: 9anime
 * Stylesheet: assets/css/main.css
 * Version: 1.0.0
 * Author: Qureshi
 * Text Domain: 9anime
 *
 * Design tokens (measured from https://9anime.or.at, 2026-11-16):
 *   Page bg #0e0e0e | Panels #1c1c1c | Buttons #303030 | Server panel #2b2b2b
 *   Filter dropdowns #242424 | Server left block #424242 | Player #000000
 *   Accent purple #5a2e98 | Text #ffffff | Secondary #ababab / #9c9c9c
 *   Muted #6e6e6e-#777777 | Synopsis #9a9a9a | Card titles #d3d3d3
 *   Links lavender #a78bfa | SUB/DUB gold #c39d00 (black text) | HD white (black text)
 *   Container 1336px | Main 986px | Sidebar 330px | Gap 20px
 *   Sticky header: yes. Sticky sidebar: no.
 */

/* ============================================================
   1. Reset & base
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --na-bg: #0e0e0e;
  --na-panel: #1c1c1c;
  --na-btn-grey: #303030;
  --na-server-panel: #2b2b2b;
  --na-field: #242424;
  --na-server-info: #424242;
  --na-player: #000000;
  --na-accent: #5a2e98;
  --na-accent-hover: #6b38b5;
  --na-text: #ffffff;
  --na-secondary: #ababab;
  --na-secondary-2: #9c9c9c;
  --na-muted: #777777;
  --na-muted-2: #6e6e6e;
  --na-synopsis: #9a9a9a;
  --na-card-title: #d3d3d3;
  --na-link: #a78bfa;
  --na-gold: #c39d00;
  --na-container: 1336px;
  --na-main: 986px;
  --na-sidebar: 330px;
  --na-gap: 20px;
  --na-radius: 6px;
  --na-radius-sm: 4px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--na-bg);
  color: var(--na-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--na-link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 12px; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

:focus-visible {
  outline: 2px solid var(--na-accent);
  outline-offset: 2px;
}

/* ============================================================
   2. Layout utilities
   ============================================================ */
.na-container {
  width: 100%;
  max-width: var(--na-container);
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.na-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.na-home-layout {
  display: grid;
  grid-template-columns: var(--na-main) var(--na-sidebar);
  gap: var(--na-gap);
  align-items: start;
  padding: 20px 0 30px;
}

.na-home-main { min-width: 0; }
.na-home-sidebar { min-width: 0; /* NOT sticky, per spec */ }

.na-section { margin-bottom: 30px; }
.na-section:last-child { margin-bottom: 0; }

.na-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.na-section-head h2,
.na-section-head .na-section-title {
  margin: 0;
  color: var(--na-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.na-view-all {
  color: var(--na-secondary);
  font-size: 13px;
  white-space: nowrap;
}
.na-view-all:hover { color: var(--na-text); text-decoration: none; }

.na-empty {
  color: var(--na-secondary);
  font-size: 15px;
  padding: 30px 0;
  text-align: center;
}

/* Buttons */
.na-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--na-radius-sm);
  background: var(--na-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background .15s ease;
}
.na-btn:hover { background: var(--na-accent-hover); text-decoration: none; }

.na-btn-ghost {
  background: var(--na-btn-grey);
  color: var(--na-text);
}
.na-btn-ghost:hover { background: #3d3d3d; }

.na-btn-sm { padding: 7px 14px; font-size: 13px; }

/* Generic prose (pages, search results, 404) */
.na-prose { color: var(--na-secondary-2); font-size: 15px; line-height: 1.7; }
.na-prose h1, .na-prose h2, .na-prose h3 { color: var(--na-text); }
.na-prose a { color: var(--na-link); }
.na-prose ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.na-prose ol { list-style: decimal; padding-left: 22px; margin-bottom: 14px; }

/* Dark form base */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #3a3a3a;
  border-radius: var(--na-radius-sm);
  background: var(--na-field);
  color: var(--na-text);
}
input::placeholder,
textarea::placeholder { color: var(--na-muted); }
select { appearance: none; cursor: pointer; }
textarea { resize: vertical; min-height: 90px; }

/* ============================================================
   3. Header
   ============================================================ */
.na-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--na-bg);
  height: 90px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1f1f1f;
}

.na-header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: var(--na-container);
  margin: 0 auto;
  height: 90px;
}

.na-menu-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--na-text);
  font-size: 24px;
  line-height: 1;
}
.na-menu-toggle:hover { background: var(--na-panel); }

/* Logo: purple circle with white "9" + white "Anime" wordmark (~160x50px) */
.na-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 160px;
  height: 50px;
  color: var(--na-text);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none;
}
.na-logo:hover { text-decoration: none; }
.na-logo .na-logo-9 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: var(--na-accent);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}
.na-logo .na-logo-text { color: #fff; }

/* Search pill 400x50, bg #1c1c1c, fully rounded */
.na-search {
  position: relative;
  flex: 0 0 400px;
  width: 400px;
  height: 50px;
  margin-left: 8px;
}
.na-search-form { position: relative; height: 100%; }
.na-search-input {
  width: 100%;
  height: 50px;
  padding: 0 52px 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--na-panel);
  color: var(--na-text);
  font-size: 14px;
}
.na-search-input::placeholder { color: var(--na-muted); }
.na-search-mag {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--na-secondary);
  font-size: 18px;
}
.na-search-mag:hover { color: var(--na-text); }

/* Header social icons (~45px circles) */
.na-header-social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.na-header-social a,
.na-header-social .na-social-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--na-panel);
  color: var(--na-secondary);
  font-size: 18px;
  text-decoration: none;
}
.na-header-social a:hover { color: #fff; background: var(--na-btn-grey); }

/* Sign in: 118x50, purple, fully rounded pill */
.na-signin {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 50px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--na-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.na-signin:hover { background: var(--na-accent-hover); text-decoration: none; }

/* Header live search dropdown */
.na-live-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 120;
  max-height: 420px;
  overflow-y: auto;
  border-radius: var(--na-radius);
  background: var(--na-panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .6);
  padding: 6px;
}
.na-live-results:empty { display: none; }
.na-live-results a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--na-radius-sm);
  color: var(--na-text);
  font-size: 14px;
}
.na-live-results a:hover { background: var(--na-btn-grey); text-decoration: none; }
.na-live-results img { width: 36px; height: 48px; object-fit: cover; border-radius: 3px; }

/* Drawer (hamburger nav) */
.na-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, .65);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.na-drawer-overlay.is-open { opacity: 1; visibility: visible; }

.na-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  width: min(340px, 88vw);
  overflow-y: auto;
  background: var(--na-panel);
  padding: 0 0 24px;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.na-drawer.is-open { transform: translateX(0); }

.na-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #2a2a2a;
}
.na-drawer-head .na-logo { width: auto; height: auto; }
.na-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--na-text);
  font-size: 22px;
}
.na-drawer-close:hover { background: var(--na-btn-grey); }

.na-drawer nav,
.na-drawer .na-drawer-nav { padding: 12px 20px; }
.na-drawer nav a,
.na-drawer .na-drawer-nav a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #2a2a2a;
  color: var(--na-text);
  font-size: 15px;
  font-weight: 600;
}
.na-drawer nav a:hover,
.na-drawer .na-drawer-nav a:hover { color: var(--na-link); text-decoration: none; }

.na-drawer-genres { padding: 16px 20px 0; }
.na-drawer-genres h3 {
  margin: 0 0 10px;
  color: var(--na-secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.na-drawer-genres a {
  display: inline-block;
  margin: 0 6px 8px 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--na-btn-grey);
  color: var(--na-text);
  font-size: 13px;
}
.na-drawer-genres a:hover { background: var(--na-accent); text-decoration: none; }

/* ============================================================
   4. Breadcrumb
   ============================================================ */
.na-breadcrumb {
  padding: 16px 0 0;
  color: var(--na-muted);
  font-size: 13px;
}
.na-breadcrumb a { color: var(--na-secondary); }
.na-breadcrumb a:hover { color: var(--na-text); }
.na-breadcrumb .na-sep { margin: 0 6px; color: var(--na-muted-2); }

/* ============================================================
   5. Hero / spotlight slider
   ============================================================ */
.na-hero { margin-bottom: 20px; }

.na-hero-viewport {
  position: relative;
  width: 100%;
  max-width: var(--na-main);
  overflow: hidden;
  border-radius: var(--na-radius) var(--na-radius) 0 0;
}

.na-hero-slide { display: none; position: relative; }
.na-hero-slide.is-active { display: block; }
.na-hero-slide img {
  width: 986px;
  max-width: 100%;
  height: 310px;
  object-fit: cover;
}

/* Dots top-right over the image */
.na-hero-dots {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 5;
  display: flex;
  gap: 8px;
}
.na-hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
}
.na-hero-dot.is-active { background: var(--na-accent); }
.na-hero-dot:hover { background: #fff; }

/* Prev/Next chevrons at left/right edges */
.na-hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}
.na-hero-arrow:hover { background: rgba(0, 0, 0, .7); }
.na-hero-prev { left: 14px; }
.na-hero-next { right: 14px; }

/* Solid purple title bar below the image: 986x~110px */
.na-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--na-main);
  min-height: 110px;
  padding: 20px 28px;
  border-radius: 0 0 var(--na-radius) var(--na-radius);
  background: var(--na-accent);
}
.na-hero-bar-title {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.na-hero-watch {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 238px;
  height: 70px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.na-hero-watch:hover { background: #e8e8e8; text-decoration: none; }

/* ============================================================
   6. Announcement banner
   ============================================================ */
.na-announcement {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--na-main);
  min-height: 65px;
  padding: 14px 20px;
  margin-bottom: 30px;
  border-radius: var(--na-radius);
  background: var(--na-panel);
  color: var(--na-text);
  font-size: 14px;
  line-height: 1.5;
}
.na-announcement p { margin: 0; }
.na-announcement a { color: var(--na-link); }
/* Variants */
.na-announcement.is-info { border-left: 4px solid var(--na-accent); }
.na-announcement.is-warning { border-left: 4px solid var(--na-gold); }

/* ============================================================
   7. Cards & grids
   ============================================================ */
.na-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 14px;
  row-gap: 50px;
}

.na-card { min-width: 0; }
.na-card a { display: block; color: inherit; }
.na-card a:hover { text-decoration: none; }

.na-card-poster {
  position: relative;
  width: 186px;
  max-width: 100%;
  height: 260px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--na-radius);
  background: var(--na-panel);
}
.na-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.na-card:hover .na-card-poster img { transform: scale(1.05); }

/* Centred play overlay, visible on hover */
.na-card-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .2s ease;
}
.na-card:hover .na-card-play,
.na-card:focus-within .na-card-play { opacity: 1; }
.na-card-play::before {
  content: "\25B6";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(90, 46, 152, .9);
  color: #fff;
  font-size: 20px;
  padding-left: 4px;
}

.na-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 10px 2px 0;
  color: var(--na-card-title);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}
.na-card:hover .na-card-title { color: #fff; }

/* Badges */
.na-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  white-space: nowrap;
}
.na-badge-hd {
  top: 6px;
  left: 6px;
  min-width: 30px;
  min-height: 20px;
  background: #fff;
  color: #000;
  font-size: 11px;
}
.na-badge-ep {
  bottom: 0;
  left: 0;
  min-width: 45px;
  background: var(--na-accent);
  color: #fff;
  border-radius: 0 2px 0 0;
}
.na-badge-sub {
  bottom: 0;
  right: 0;
  min-width: 40px;
  background: var(--na-gold);
  color: #000;
  border-radius: 2px 0 0 0;
}
.na-badge-dub {
  bottom: 0;
  right: 0;
  min-width: 40px;
  background: var(--na-gold);
  color: #000;
  border-radius: 2px 0 0 0;
}
.na-badge-18 {
  top: 6px;
  left: 6px;
  min-width: 30px;
  min-height: 20px;
  background: #ff7a00;
  color: #fff;
}

/* Suggestions grid: 5 per row, 12 items, poster 180x252 */
.na-suggest-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 14px;
  row-gap: 50px;
}
.na-suggest-grid .na-card-poster { width: 180px; height: 252px; }

/* ============================================================
   8. Estimated Schedule
   ============================================================ */
.na-schedule-panel {
  width: 100%;
  max-width: var(--na-main);
  padding: 18px 20px 20px;
  border-radius: var(--na-radius);
  background: var(--na-panel);
}

.na-schedule-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.na-schedule-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.na-schedule-clock {
  color: var(--na-secondary);
  font-size: 13px;
  white-space: nowrap;
}
.na-schedule-clock .na-schedule-clock-now { color: var(--na-text); font-weight: 600; }

.na-schedule-dates {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.na-schedule-arrow {
  flex: 0 0 auto;
  width: 32px;
  min-height: 62px;
  padding: 0;
  border: 0;
  border-radius: var(--na-radius-sm);
  background: var(--na-btn-grey);
  color: var(--na-text);
  font-size: 18px;
  line-height: 1;
}
.na-schedule-arrow:hover { background: #3d3d3d; }

.na-schedule-track {
  flex: 1;
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.na-schedule-date {
  flex: 1 1 0;
  min-width: 0;
  height: 62px;
  padding: 6px 4px;
  border: 0;
  border-radius: var(--na-radius-sm);
  background: var(--na-field);
  color: var(--na-secondary);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}
.na-schedule-date:hover { background: var(--na-btn-grey); color: var(--na-text); }
.na-schedule-date.is-active {
  background: var(--na-accent);
  color: #fff;
  font-weight: 700;
}
.na-schedule-date .na-schedule-date-day { display: block; font-size: 12px; }
.na-schedule-date .na-schedule-date-num { display: block; font-size: 15px; font-weight: 700; }

.na-schedule-day-list { margin-top: 16px; }
.na-schedule-day-list ul { display: grid; gap: 8px; }
.na-schedule-day-list a { color: var(--na-text); font-size: 14px; }
.na-schedule-day-list a:hover { color: var(--na-link); }

.na-schedule-empty {
  margin: 0;
  padding: 10px 0 4px;
  color: var(--na-text);
  font-size: 18px;
  font-weight: 700;
}

/* ============================================================
   9. Sidebar
   ============================================================ */
.na-home-sidebar .na-sidebar-box { margin-bottom: 20px; }
.na-home-sidebar .na-sidebar-box:last-child { margin-bottom: 0; }

.na-sidebar-box {
  padding: 15px 20px 20px;
  border-radius: var(--na-radius);
  background: var(--na-panel);
}
.na-sidebar-box h3 {
  margin: 0 0 14px;
  color: var(--na-text);
  font-size: 20px;
  font-weight: 700;
}
.na-sidebar-box .na-section-head { margin-bottom: 14px; }
.na-sidebar-box .na-section-head h2,
.na-sidebar-box .na-section-head h3 { font-size: 22px; }

/* Quick filter */
.na-quickfilter .na-qf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.na-qf-field select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #3a3a3a;
  border-radius: var(--na-radius-sm);
  background: var(--na-field);
  color: var(--na-text);
  font-size: 13px;
}
.na-qf-search {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  margin-bottom: 12px;
  border: 1px solid #3a3a3a;
  border-radius: var(--na-radius-sm);
  background: var(--na-field);
  color: var(--na-text);
  font-size: 13px;
}
.na-qf-search::placeholder { color: var(--na-muted); }
.na-qf-submit {
  width: 100%;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: var(--na-radius-sm);
  background: var(--na-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.na-qf-submit:hover { background: var(--na-accent-hover); }

/* Top Anime */
.na-topanime .na-section-head { align-items: center; }
.na-topanime-tabs,
.na-tab-btns { display: flex; gap: 4px; }
.na-tab-btn {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--na-secondary);
  font-size: 13px;
  font-weight: 600;
}
.na-tab-btn:hover { color: var(--na-text); }
.na-tab-btn.is-active { background: var(--na-accent); color: #fff; }

.na-top1 {
  position: relative;
  display: block;
  width: 100%;
  height: 185px;
  overflow: hidden;
  border-radius: var(--na-radius);
  background: var(--na-btn-grey);
  color: #fff;
}
.na-top1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.na-top1::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .25) 55%, transparent 100%);
}
.na-top1-rank {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: var(--na-radius-sm);
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 800;
}
.na-top1 .na-top1-title,
.na-top1-title {
  position: absolute;
  left: 58px;
  right: 12px;
  bottom: 34px;
  z-index: 2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.na-top1 .na-top1-views,
.na-top1-views {
  position: absolute;
  left: 58px;
  bottom: 12px;
  z-index: 2;
  color: var(--na-secondary);
  font-size: 13px;
}
.na-top1:hover { text-decoration: none; }

.na-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 75px;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a2a;
}
.na-top-row:last-child { border-bottom: 0; }
.na-top-rank {
  flex: 0 0 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 1px solid #4a4a4a;
  border-radius: var(--na-radius-sm);
  color: var(--na-text);
  font-size: 15px;
  font-weight: 700;
}
.na-top-thumb {
  flex: 0 0 45px;
  width: 45px;
  height: 60px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--na-btn-grey);
}
.na-top-thumb img { width: 100%; height: 100%; object-fit: cover; }
.na-top-row .na-top-info { min-width: 0; flex: 1; }
.na-top-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--na-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.na-top-title:hover { color: var(--na-link); text-decoration: none; }
.na-top-views { margin-top: 3px; color: var(--na-muted); font-size: 12px; }

/* Recently Added */
.na-recent-added .na-ra-row,
.na-ra-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 75px;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a2a;
}
.na-ra-row:last-child { border-bottom: 0; }
.na-ra-thumb {
  flex: 0 0 50px;
  width: 50px;
  height: 65px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--na-btn-grey);
}
.na-ra-thumb img { width: 100%; height: 100%; object-fit: cover; }
.na-ra-row .na-ra-info { min-width: 0; flex: 1; }
.na-ra-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--na-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.na-ra-title:hover { color: var(--na-link); text-decoration: none; }
.na-ra-meta { margin-top: 3px; color: var(--na-muted); font-size: 12px; }

/* ============================================================
   10. Detail page
   ============================================================ */
.na-info-panel {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: var(--na-main);
  min-height: 380px;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: var(--na-radius);
  background: var(--na-panel);
}

.na-detail-poster {
  flex: 0 0 210px;
  width: 210px;
  height: 282px;
  overflow: hidden;
  border-radius: var(--na-radius);
  background: var(--na-btn-grey);
}
.na-detail-poster img { width: 100%; height: 100%; object-fit: cover; }

.na-detail-info { min-width: 0; flex: 1; }

.na-detail-title {
  margin: 0 0 6px;
  color: var(--na-text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.na-alt-names {
  margin: 0 0 12px;
  color: var(--na-secondary);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
}

.na-synopsis {
  margin: 0 0 16px;
  color: var(--na-synopsis);
  font-size: 14px;
  line-height: 22px;
}

.na-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.5;
}
.na-info-row .na-info-label,
.na-info-row dt {
  flex: 0 0 90px;
  color: var(--na-secondary);
}
.na-info-row .na-info-value,
.na-info-row dd { margin: 0; color: var(--na-text); font-size: 14px; }
.na-info-row a { color: var(--na-link); }
.na-info-row a:hover { text-decoration: underline; }

/* Episode bar (detail + watch) */
.na-ep-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 11px;
  width: 100%;
  max-width: var(--na-main);
  padding: 15px;
  margin-bottom: 30px;
  border-radius: var(--na-radius);
  background: var(--na-panel);
}
.na-ep-range-label {
  flex: 0 0 auto;
  margin-right: 6px;
  color: var(--na-secondary);
  font-size: 14px;
  font-weight: 600;
}
.na-ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--na-radius-sm);
  background: var(--na-btn-grey);
  color: var(--na-text);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.na-ep-btn:hover { background: #3d3d3d; text-decoration: none; }
.na-ep-btn.is-active { background: var(--na-accent); color: #fff; }

/* ============================================================
   11. Watch page
   ============================================================ */
.na-player {
  position: relative;
  width: 100%;
  max-width: var(--na-main);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--na-radius) var(--na-radius) 0 0;
  background: var(--na-player);
}
.na-player-frame,
.na-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--na-player);
}

.na-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: var(--na-main);
  min-height: 40px;
  padding: 6px 14px;
  margin-bottom: 12px;
  border-radius: 0 0 var(--na-radius) var(--na-radius);
  background: var(--na-panel);
}
.na-control-toggles { display: flex; align-items: center; gap: 16px; }
.na-control-btn {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--na-secondary);
  font-size: 13px;
}
.na-control-btn:hover,
.na-control-btn.is-active { color: var(--na-text); }
.na-control-nav { display: flex; align-items: center; gap: 14px; }
.na-control-prev,
.na-control-next {
  color: var(--na-secondary);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.na-control-prev:hover,
.na-control-next:hover { color: var(--na-text); text-decoration: none; }
.na-control-expand {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--na-secondary);
  font-size: 13px;
}
.na-control-expand:hover { color: var(--na-text); }

/* Server box */
.na-server-box {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: var(--na-main);
  min-height: 90px;
  margin-bottom: 20px;
  border-radius: var(--na-radius);
  background: var(--na-server-panel);
  overflow: hidden;
}
.na-server-info {
  flex: 0 0 280px;
  width: 280px;
  padding: 16px 18px;
  background: var(--na-server-info);
  color: var(--na-text);
  font-size: 13px;
  line-height: 1.5;
}
.na-server-info p { margin: 0 0 6px; }
.na-server-info p:last-child { margin: 0; color: var(--na-secondary); }

.na-server-list { flex: 1; min-width: 0; padding: 14px 18px; }
.na-server-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.na-server-row:last-child { margin-bottom: 0; }
.na-server-row .na-server-label {
  flex: 0 0 auto;
  color: var(--na-secondary);
  font-size: 13px;
  font-weight: 700;
}
.na-server-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--na-radius-sm);
  background: var(--na-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.na-server-btn:hover { background: var(--na-accent-hover); text-decoration: none; }
.na-server-btn.is-active { outline: 2px solid #fff; outline-offset: -2px; }
.na-server-empty { color: var(--na-muted); font-size: 13px; font-style: italic; }

.na-episode-title {
  margin: 0 0 14px;
  color: var(--na-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

/* ============================================================
   12. Comments
   ============================================================ */
.na-comments-section { margin-bottom: 30px; }
.na-comments-section h2 {
  margin: 0 0 14px;
  color: var(--na-text);
  font-size: 24px;
  font-weight: 700;
}
.na-comment-count { color: var(--na-secondary); font-size: 15px; font-weight: 400; }

.na-comments-panel {
  padding: 20px;
  border-radius: var(--na-radius);
  background: var(--na-panel);
}

.na-comments-list { display: grid; gap: 18px; margin-bottom: 20px; }
.na-comment {
  display: flex;
  gap: 12px;
}
.na-comment .na-comment-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--na-btn-grey);
}
.na-comment .na-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.na-comment .na-comment-body { min-width: 0; flex: 1; }
.na-comment .na-comment-author { color: var(--na-text); font-size: 14px; font-weight: 700; }
.na-comment .na-comment-time { margin-left: 8px; color: var(--na-muted); font-size: 12px; }
.na-comment .na-comment-text { margin-top: 4px; color: var(--na-secondary-2); font-size: 14px; line-height: 1.6; }

.na-comment-form input[type="text"],
.na-comment-form input[type="email"],
.na-comment-form input[type="url"],
.na-comment-form textarea {
  background: var(--na-field);
  border: 1px solid #3a3a3a;
  color: var(--na-text);
}
.na-comment-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border-radius: var(--na-radius-sm);
}
.na-comment-form .na-comment-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.na-comment-form .na-comment-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  margin-top: 12px;
  border: 0;
  border-radius: var(--na-radius-sm);
  background: var(--na-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.na-comment-form .na-comment-submit:hover { background: var(--na-accent-hover); }

/* ============================================================
   13. Footer
   ============================================================ */
.na-footer {
  margin-top: 40px;
  padding: 24px 0 30px;
  background: var(--na-panel);
}

.na-footer-az h3 {
  margin: 0 0 6px;
  color: var(--na-text);
  font-size: 20px;
  font-weight: 700;
}
.na-footer-az p {
  margin: 0 0 14px;
  color: var(--na-secondary);
  font-size: 13px;
}
.na-footer-az-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}
.na-footer-az-pills a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: var(--na-radius-sm);
  background: var(--na-btn-grey);
  color: var(--na-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.na-footer-az-pills a:hover { background: #3d3d3d; }
.na-footer-az-pills a.is-active { background: var(--na-accent); color: #fff; }

.na-footer-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid #2a2a2a;
}
.na-footer-top .na-logo { width: auto; height: auto; }
.na-footer-top .na-footer-lang {
  color: var(--na-secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
}
.na-footer-top .na-header-social { margin-left: auto; }

.na-footer-bottom {
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
  color: var(--na-muted);
  font-size: 13px;
  line-height: 1.7;
}
.na-footer-bottom p { margin: 0 0 8px; }
.na-footer-bottom a { color: var(--na-secondary); }
.na-footer-bottom a:hover { color: var(--na-text); }
.na-footer-bottom .na-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.na-footer-bottom .na-footer-links a { color: var(--na-secondary); }

.na-back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--na-accent);
  color: #fff;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.na-back-to-top.is-visible { opacity: 1; visibility: visible; }
.na-back-to-top:hover { background: var(--na-accent-hover); }

/* ============================================================
   14. Archive / search / misc pages
   ============================================================ */
.na-page-head { margin: 10px 0 20px; }
.na-page-head h1 { margin: 0; font-size: 26px; font-weight: 700; }
.na-page-head p { margin: 6px 0 0; color: var(--na-secondary); font-size: 14px; }

.na-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 30px; }
.na-pagination a,
.na-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--na-radius-sm);
  background: var(--na-btn-grey);
  color: var(--na-text);
  font-size: 14px;
  text-decoration: none;
}
.na-pagination a:hover { background: #3d3d3d; }
.na-pagination .current { background: var(--na-accent); color: #fff; }

/* ============================================================
   15. Responsive
   ============================================================ */
@media (max-width: 1400px) {
  .na-container,
  .na-header-inner { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 1100px) {
  .na-home-layout { grid-template-columns: 1fr; }
  .na-home-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }
  .na-home-sidebar .na-sidebar-box { margin-bottom: 0; }
  .na-hero-bar { flex-wrap: wrap; min-height: 0; padding: 18px 20px; }
  .na-hero-watch { width: 200px; height: 56px; font-size: 19px; }
  .na-grid-5,
  .na-suggest-grid { grid-template-columns: repeat(4, 1fr); row-gap: 40px; }
  .na-search { flex-basis: 300px; width: 300px; }
}

@media (max-width: 900px) {
  .na-grid-5,
  .na-suggest-grid { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .na-info-panel { flex-direction: column; }
  .na-detail-poster { flex-basis: auto; }
  .na-server-box { flex-direction: column; }
  .na-server-info { flex-basis: auto; width: 100%; }
  .na-home-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .na-header { height: auto; min-height: 64px; }
  .na-header-inner { height: auto; gap: 10px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 0; }
  .na-logo { width: auto; font-size: 20px; }
  .na-logo .na-logo-9 { width: 36px; height: 36px; flex-basis: 36px; font-size: 20px; }
  .na-header-social { display: none; }
  .na-signin { width: auto; height: 40px; padding: 0 16px; font-size: 13px; }
  .na-search { flex: 1 1 100%; width: 100%; height: 44px; margin: 0 0 10px; order: 5; }
  .na-search-input { height: 44px; }

  .na-grid-5,
  .na-suggest-grid { grid-template-columns: repeat(2, 1fr); column-gap: 10px; row-gap: 32px; }
  .na-card-poster { width: 100%; height: auto; aspect-ratio: 186 / 260; }
  .na-suggest-grid .na-card-poster { width: 100%; height: auto; aspect-ratio: 180 / 252; }

  .na-hero-slide img { height: 200px; }
  .na-hero-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .na-hero-bar-title { font-size: 18px; }
  .na-hero-watch { width: 100%; height: 56px; font-size: 18px; }

  .na-section-head h2,
  .na-schedule-head h2,
  .na-comments-section h2 { font-size: 20px; }
  .na-schedule-dates { flex-wrap: wrap; }
  .na-schedule-track { flex-wrap: wrap; }
  .na-schedule-date { flex: 1 1 30%; }

  .na-control-bar { flex-wrap: wrap; }
  .na-comment-form .na-comment-fields { grid-template-columns: 1fr; }
  .na-ep-range-label { flex-basis: 100%; }
  .na-footer-top { flex-direction: column; align-items: flex-start; }
  .na-footer-top .na-header-social { display: flex; margin-left: 0; }
}

/* Watch player: one stacked source div per server; the active one is
 * shown, the rest are hidden (toggled by main.js via data-server). */
.na-player-sources,
.na-player-source {
	height: 100%;
}
.na-player-source[hidden] {
	display: none !important;
}
.na-player-source.na-player-frame {
	width: 100%;
	height: 100%;
}
