/* ============================================================
   FileExplorer — Main Stylesheet
   Theme: dark (default) / light via [data-theme]
   ============================================================ */

* {
    -webkit-tap-highlight-color: transparent;
}

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Sora:wght@300;400;500;600;700&display=swap');

/* ── Variables: DARK (default) ───────────────────────────── */
:root {
  --accent:        #E07850;
  --accent-hover:  #D06640;
  --accent-muted:  rgba(224,120,80,0.15);
  --accent-border: rgba(224,120,80,0.3);

  --bg:      #111111;
  --bg-2:    #1A1A1A;
  --bg-2-rgb:  26, 26, 26;
  --bg-3:    #222222;
  --bg-card: #191919;

  --text:   #EDEDED;
  --text-2: #888888;
  --text-3: #555555;

  --border:   #2A2A2A;
  --border-2: #333333;

  --error-bg:     rgba(224,80,60,0.12);
  --error-text:   #E07070;
  --error-border: rgba(224,80,60,0.25);

  --success: #5CB85C;
  --size-tag: #45B36B;
  --size-tag-muted: rgba(69, 179, 107, 0.12);
  --size-tag-border: rgba(69, 179, 107, 0.3);
  --info: #5C96DC;
  --radius:      12px;
  --radius-sm:    8px;
  --radius-pill: 100px;
}

/* ── Variables: LIGHT ────────────────────────────────────── */
html[data-theme="light"] {
  --bg:      #F4F3EF;
  --bg-2:    #ECEAE4;
  --bg-2-rgb:  236, 234, 228;
  --bg-3:    #E2DFD8;
  --bg-card: #FAF9F6;
  --text:   #1A1A1A;
  --text-2: #666666;
  --text-3: #AAAAAA;
  --border:   #D8D5CE;
  --border-2: #C8C5BE;
  --error-bg:     rgba(224,80,60,0.08);
  --error-text:   #C04030;
  --error-border: rgba(224,80,60,0.2);
  --size-tag: #3A995A;
  --size-tag-muted: rgba(58, 153, 90, 0.08);
  --size-tag-border: rgba(58, 153, 90, 0.2);
  --info: #3B7DC8;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.25s, color 0.25s;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* On desktop, reserve space for sidebar */
@media (min-width: 900px) {
  .app-body { }
}

/* ── SIDEBAR TOGGLE BUTTON ───────────────────────────────── */
.sidebar-toggle-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.sidebar-toggle-btn:hover { background: var(--border); color: var(--text); }

/* ── SIDEBAR OVERLAY (mobile backdrop) ───────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}
.sidebar-overlay.active { display: block; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 0;
  flex-shrink: 0;

  /* Mobile: off-screen by default */
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  transform: translateX(0);
}

/* Desktop: always visible, static */
@media (min-width: 900px) {
  .sidebar {
    position: sticky;
    top: 59px;
    height: calc(100vh - 59px);
    transform: translateX(0) !important;
    flex-shrink: 0;
    align-self: flex-start;
    z-index: 900;
  }
  .sidebar-overlay { display: none !important; }
  /* On desktop, toggle collapses/expands sidebar */
  .sidebar.collapsed {
    width: 70px;
    min-width: 70px;
    overflow: visible;
    border-right: 1px solid var(--border);
    transform: translateX(0);
  }
  .sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px 0;
    margin: 4px 10px;
  }
  .sidebar.collapsed .sidebar-link span:not(.notification-dot) {
    display: block;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--bg-3);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1002;
  }
  .sidebar.collapsed .sidebar-link:hover span:not(.notification-dot) {
    opacity: 1;
    transform: translateY(-50%) translateX(18px);
  }
  .sidebar.collapsed .sidebar-title,
  .sidebar.collapsed .dropdown-icon,
  .sidebar.collapsed .sidebar-divider,
  .sidebar.collapsed .sidebar-footer > *:not(.sidebar-expand-btn) {
    display: none;
  }
  .sidebar.collapsed .sf-socials,
  .sidebar.collapsed .sf-meta {
    display: none;
  }
  .sidebar.collapsed .sidebar-footer {
    display: block !important;
    padding: 12px 0 !important;
  }
  .sidebar.collapsed .sidebar-expand-btn {
    display: flex !important;
  }
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

/* Social icon buttons */
.sf-socials {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}
.sf-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.sf-social-btn:hover {
  background: var(--accent-muted);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Sitemap + version row */
.sf-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sf-sitemap-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.15s;
  opacity: 0.8;
}
.sf-sitemap-link:hover { color: var(--accent); opacity: 1; }
.sf-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.sidebar-expand-btn {
  display: none;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--text-2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.sidebar-expand-btn:hover { background: var(--border); color: var(--text); }


/* ── SIDEBAR HEADER ─────────────────────────────────────── */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sidebar-close-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.sidebar-close-btn:hover { background: var(--border); color: var(--text); }

/* Hide close button on desktop */
@media (min-width: 900px) {
  .sidebar-close-btn { display: none; }
  .sidebar-header { display: none; }
}

/* ── SIDEBAR NAV ─────────────────────────────────────────── */
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; overflow-x: hidden; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item { }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 4px 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border-radius: 8px;
  position: relative;
}

.sidebar-link:hover {
  background: var(--bg-3);
  color: var(--text);
}

.sidebar-item.active > .sidebar-link,
.sidebar-item.active > .dropdown-toggle {
  color: var(--accent);
  background: var(--accent-muted);
}

.notification-dot {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  border: 2px solid var(--bg-2);
  z-index: 10;
}

/* Tooltip Arrow */
.sidebar.collapsed .sidebar-link span:not(.notification-dot)::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 12px;
  background: var(--bg-3);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}


/* ── DROPDOWN L-LINE ────────────────────────────────────── */
.sidebar-dropdown-menu {
  position: relative;
  margin-left: 32px !important;
  border-left: 1px solid var(--border);
  padding-left: 0 !important;
}

.sidebar-dropdown-link {
  position: relative;
  margin-left: 0 !important;
}

.sidebar-dropdown-link::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--border);
}


.sidebar-link svg { flex-shrink: 0; }

/* ── REMOVE RIGHT SIDEBAR ────────────────────────────────── */
.sidebar-right { display: none !important; }


/* ── HEADER ──────────────────────────────────────────────── */
.app-header {
  background: rgba(var(--bg-2-rgb), 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 0 20px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 100%;
}

.header-top {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 58px; gap: 12px;
}

/* Logo */
.logo-section { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent-muted);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}

.logo-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 17px;
  color: var(--text); letter-spacing: -0.5px;
}
.logo-name span { color: var(--accent); }

/* Status */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.3s;
  flex-shrink: 0;
}
.status-badge.status-online  { background: rgba(92,184,92,0.12); border-color: rgba(92,184,92,0.3); color: var(--success); }
.status-badge.status-offline { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }
.status-badge.status-checking{ background: var(--bg-3); border-color: var(--border); color: var(--text-2); }

.status-dot { width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0; }
.status-badge.status-online .status-dot { animation: pulse-g 2s infinite; }
@keyframes pulse-g { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Theme toggle */
.header-actions { display:flex; align-items:center; gap:12px; }
.theme-toggle-wrap { position: relative; }

.theme-toggle-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle-btn:hover { background: var(--border); color: var(--text); }

/* Only show the right icon based on data-theme */
.theme-toggle-btn .icon-sun    { display: none; }
.theme-toggle-btn .icon-moon   { display: block; }
.theme-toggle-btn .icon-system { display: none; }

.theme-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); overflow: hidden;
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  display: none;
  animation: dropIn 0.15s ease;
}
@keyframes dropIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.theme-dropdown.open { display: block; }

.theme-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  text-align: left; font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: all 0.15s;
}
.theme-option:last-child { border-bottom: none; }
.theme-option:hover { background: var(--bg-3); color: var(--text); }
.theme-option.active { color: var(--accent); }
.theme-option svg { flex-shrink: 0; }

.search-wrapper {
  display: flex; align-items: center;
  flex: 1;
  max-width: 800px;
  margin: 0 20px;
}
.search-form {
  display: flex; align-items: center;
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  padding: 5px 5px 5px 14px; gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.search-icon { color: var(--text-3); flex-shrink:0; display:flex; align-items:center; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  font-family: 'Sora', sans-serif; font-size: 14px;
  color: var(--text); min-width: 0;
}
.search-input::placeholder { color: var(--text-3); }
.search-btn {
  background: var(--accent); color: white;
  font-family: 'Sora', sans-serif; font-weight: 600; font-size: 13px;
  padding: 8px 18px; border-radius: var(--radius-pill);
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap; flex-shrink: 0;
}
.search-btn:hover { background: var(--accent-hover); }
.search-btn:active { transform: scale(0.97); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 0 20px 48px;
  min-height: 400px;
  background: var(--bg);
  min-width: 0;
}

/* ── HOME ────────────────────────────────────────────────── */
.page-hero { padding: 28px 0 16px; }
.page-hero h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 700;
  color: var(--text); letter-spacing: -1px; margin-bottom: 4px;
}
.page-hero h2 span { color: var(--accent); }
.page-hero p { font-size: 13px; color: var(--text-2); }

.section-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); margin: 20px 0 12px;
}

/* Category list */
.category-list { display: flex; flex-direction: column; gap: 8px; }

/* Category Card logo */
.category-card-icon { overflow: hidden; border-radius: 8px; background: var(--bg-3); }
.category-logo-img  { width: 36px; height: 36px; object-fit: cover; display: block; border-radius: 8px; }
.category-logo-fallback { font-size: 22px; line-height: 36px; }

.category-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all 0.2s;
}
.category-card:hover {
  border-color: var(--accent-border); background: var(--bg-3);
  transform: translateX(2px);
}
.category-card-icon { font-size: 22px; flex-shrink:0; width:36px; text-align:center; }
.category-card-info { flex:1; min-width:0; }
.category-card-title { font-size:14px; font-weight:600; color:var(--text); margin-bottom:2px; }
.category-card-type  { font-family:'JetBrains Mono',monospace; font-size:10px; color:var(--text-3); letter-spacing:.05em; }
.category-card-arrow { color:var(--text-3); font-size:16px; flex-shrink:0; transition:color .2s; }
.category-card:hover .category-card-arrow { color:var(--accent); }

/* Error */
.error-box {
  background: var(--error-bg); border: 1px solid var(--error-border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  color: var(--error-text); font-family:'JetBrains Mono',monospace;
  font-size:12px; line-height:1.6; display:flex; gap:10px; align-items:center;
  justify-content: center; text-align: center; max-width: 480px;
  margin: 0 auto;
}

/* ── CATEGORY PAGE ───────────────────────────────────────── */
.back-nav {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: 13px;
  padding: 16px 0 8px; transition: color .2s;
}
.back-nav:hover { color: var(--accent); }

/* Item cards (clickable) */
.items-list { display:flex; flex-direction:column; gap:8px; }

.item-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px;
  transition: border-color 0.2s, background 0.2s;
}
.item-card-link { display:block; color:inherit; cursor:pointer; }
.item-card-link:hover { border-color: var(--accent-border); background: var(--bg-3); }
.item-card:hover { border-color: var(--border-2); }

/* ── Item card inner layout (overflow-proof) ── */
.item-card-with-poster {
  display: flex !important;
  gap: 14px !important;
  padding: 12px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* Category page card — column layout so badges wrap freely */
.item-card-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.item-card-category:hover { border-color: var(--border-2); }
.item-card-category > .item-card-link-wrapper {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
}

.item-poster-sm {
  width: 70px;
  height: 105px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}

.item-poster-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-content {
  flex: 1;
  min-width: 0;
}

.item-header {
  display: block;
  margin-bottom: 4px;
}

.item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.item-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 6px;
}
.item-year {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  font-weight: 600; color: #3cb371;
  background: rgba(60, 179, 113, 0.1);
  border: 1px solid rgba(60, 179, 113, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.item-season-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  font-weight: 700; color: #5C96DC;
  background: rgba(92,150,220,.12); border: 1px solid rgba(92,150,220,.3);
  padding: 2px 7px; border-radius: var(--radius-pill); white-space: nowrap;
}
.item-type {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--accent); background: var(--accent-muted);
  border: 1px solid var(--accent-border);
  padding: 2px 7px; border-radius: var(--radius-pill);
  text-transform: uppercase; white-space: nowrap;
}
.item-rating {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: #FFD700; background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 2px 7px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.item-category {
  font-size: 10px; color: var(--text-3);
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: var(--radius-pill); white-space: nowrap;
}
.item-meta-row {
  display: flex; align-items: center; gap: 7px;
  flex-wrap: wrap; margin-top: 5px;
}
.item-meta-chip {
  font-size: 11px; color: var(--text-2);
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.item-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.item-watch-cta {
  margin-top: 9px; font-size: 11px; font-weight: 600;
  color: var(--accent); font-family: 'JetBrains Mono', monospace;
  opacity: 0; transition: opacity .2s;
}
.item-card-link:hover .item-watch-cta { opacity: 1; }
.item-card-category:hover .item-watch-cta { opacity: 1; }

/* Search info */
.search-info-bar { display:flex; align-items:center; justify-content:space-between; padding:10px 0; margin-bottom:12px; font-size:13px; color:var(--text-2); }
.clear-search { font-family:'JetBrains Mono',monospace; font-size:11px; color:var(--accent); padding:4px 12px; border:1px solid var(--accent-border); border-radius:var(--radius-pill); transition:all .2s; }
.clear-search:hover { background:var(--accent); color:white; }.btn-download, .btn-watch, .btn-dl {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  transition: all 0.2s; white-space: nowrap; text-decoration: none;
}.btn-watch { background: var(--accent); color: white; }.btn-watch:hover { background: var(--accent-hover); }
.btn-download,.btn-dl { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border-2); }
.btn-download:hover,.btn-dl:hover { color: var(--text); background: var(--border); }

/* Pagination */
.pagination { display:flex; align-items:center; justify-content:center; gap:12px; padding:24px 0; }
.page-link { padding:8px 20px; background:var(--bg-3); border:1px solid var(--border); border-radius:var(--radius-pill); font-size:13px; color:var(--text-2); transition:all .2s; }
.page-link:hover { background:var(--accent); border-color:var(--accent); color:white; }
.page-info { font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--text-3); }

/* No items */
.no-items { text-align:center; padding:40px 20px; color:var(--text-2); font-size:14px; grid-column: 1 / -1; width:100%; }

/* Search results */
.search-results-header { padding:20px 0 12px; border-bottom:1px solid var(--border); margin-bottom:16px; }
.search-results-title { font-family:'JetBrains Mono',monospace; font-size:16px; font-weight:600; color:var(--text); margin-bottom:4px; }
.search-results-query { font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--text-3); }
.search-results-query span { color:var(--accent); }

/* ── WATCH PAGE ──────────────────────────────────────────── */
.player-wrap {
  width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius);
  overflow: hidden; margin: 16px 0;
  border: 1px solid var(--border); position: relative;
}
.player-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--text-3); background: var(--bg-card);
}
.player-placeholder svg { opacity: .4; }
.player-placeholder p { font-size: 13px; text-align: center; line-height: 1.5; }
#artplayer-wrap { width:100%; height:100%; }

.watch-header { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.watch-poster { flex-shrink:0; width:100px; }
.watch-poster img { width:100px; border-radius:var(--radius); aspect-ratio:2/3; object-fit:cover; border:1px solid var(--border); }
.watch-info { flex:1; min-width:0; }

.watch-type-badge {
  display: inline-flex; align-items: center; gap:5px;
  font-family:'JetBrains Mono',monospace; font-size:10px; font-weight:600;
  text-transform:uppercase; letter-spacing:.08em;
  padding:3px 10px; border-radius:var(--radius-pill); margin-bottom:7px; border:1px solid transparent;
}
.watch-type-badge.movie { background:var(--accent-muted); border-color:var(--accent-border); color:var(--accent); }
.watch-type-badge.series { background:rgba(92,150,220,.12); border-color:rgba(92,150,220,.3); color:#5C96DC; }

.watch-title { font-family:'JetBrains Mono',monospace; font-size:16px; font-weight:700; color:var(--text); line-height:1.3; margin-bottom:9px; }
.watch-tags { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:9px; }
.watch-tag { font-size:11px; color:var(--text-2); background:var(--bg-3); border:1px solid var(--border); padding:2px 9px; border-radius:var(--radius-pill); white-space:nowrap; }
.watch-tag.accent { background:var(--accent-muted); border-color:var(--accent-border); color:var(--accent); }
.watch-plot { font-size:12px; color:var(--text-2); line-height:1.6; margin-bottom:9px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; line-clamp: 3; }
.watch-credits { display:flex; flex-direction:column; gap:3px; }
.credit-row { display:flex; gap:8px; font-size:11px; line-height:1.5; }
.credit-label { font-family:'JetBrains Mono',monospace; color:var(--text-3); font-weight:600; flex-shrink:0; min-width:52px; }
.credit-val { color:var(--text-2); }

.quality-grid { display:flex; flex-direction:column; gap:8px; margin-bottom:24px; }
.quality-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:13px 15px; transition:border-color .2s, background .2s; cursor: pointer; }
.quality-card:hover { border-color:var(--border-2); background:var(--bg-3); }
.quality-card.active { border-color:var(--accent-border); background:var(--accent-muted); }
.quality-top { display:flex; align-items:center; gap:10px; margin-bottom:5px; }
.quality-badge { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-muted); border: 1px solid var(--accent-border); padding: 2px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .05em; }
.dl-size, .quality-size { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--size-tag); background: var(--size-tag-muted); border: 1px solid var(--size-tag-border); padding: 2px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .05em; }
.quality-caption { font-size: 13px; color: var(--text-2); margin-bottom: 12px; line-height: 1.5; background: var(--bg-3); padding: 8px 12px; border-radius: 6px; border-left: 3px solid var(--accent); word-break: break-all; overflow-wrap: anywhere; }
.quality-actions { display:flex; flex-direction: column; gap:12px; }

.season-tabs { display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; margin-bottom:14px; scrollbar-width:none; }
.season-tabs::-webkit-scrollbar { display:none; }
.season-tab { display:flex; align-items:center; gap:6px; padding:7px 15px; border-radius:var(--radius-pill); background:var(--bg-3); border:1px solid var(--border); font-size:13px; font-weight:500; color:var(--text-2); white-space:nowrap; transition:all .2s; flex-shrink:0; }
.season-tab:hover { border-color:var(--border-2); color:var(--text); }
.season-tab.active { background:var(--accent); border-color:var(--accent); color:white; }
.season-ep-count { font-family:'JetBrains Mono',monospace; font-size:10px; background:rgba(0,0,0,.15); padding:1px 6px; border-radius:20px; }
.season-tab:not(.active) .season-ep-count { background:var(--bg-2); color:var(--text-3); }

.quality-tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; padding: 4px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); }
.quality-tab { padding: 6px 14px; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .2s; }
.quality-tab:hover { border-color: var(--border-2); color: var(--text); }
.quality-tab.active { background: var(--accent-muted); border-color: var(--accent-border); color: var(--accent); }
.season-panel { display:none; }
.season-panel.active { display:block; }

.episode-list { display:flex; flex-direction:column; gap:6px; }
.episode-card { display:flex; flex-direction:column; align-items:stretch; gap:10px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 13px; transition:border-color .2s, background .2s; }
.episode-card:hover { border-color:var(--border-2); }
.episode-card.playing { border-color:var(--accent-border); background:var(--accent-muted); }
.episode-info { width:100%; min-width:0; }
.episode-num { font-family:'JetBrains Mono',monospace; font-size:12px; font-weight:700; margin-bottom:0; background: var(--accent-muted); border: 1px solid var(--accent-border); padding: 2px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.s-part { color: var(--accent); }
.e-part { color: var(--info); }
.episode-num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.episode-meta-inline { display: flex; align-items: center; gap: 8px; }
.episode-meta { display:flex; align-items:center; gap:8px; margin-bottom:2px; }
.episode-caption { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.5; background: var(--bg-3); padding: 8px 12px; border-radius: 6px; border-left: 3px solid var(--accent); word-break: break-all; overflow-wrap: anywhere; }
.episode-actions { display:flex; flex-direction: row; gap:8px; flex-shrink:0; }

.not-found-page { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:60px 20px; min-height:60vh; }
.not-found-code { font-family:'JetBrains Mono',monospace; font-size:80px; font-weight:700; color:var(--border-2); line-height:1; margin-bottom:12px; }
.not-found-title { font-size:18px; font-weight:600; color:var(--text); margin-bottom:8px; }
.not-found-msg { font-size:13px; color:var(--text-2); margin-bottom:24px; }
.btn-home { display:inline-flex; align-items:center; gap:6px; padding:10px 24px; background:var(--accent); color:white; border-radius:var(--radius-pill); font-weight:600; font-size:14px; transition:background .2s; }
.btn-home:hover { background:var(--accent-hover); }

/* ── FOOTER ──────────────────────────────────────────────── */
.app-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.footer-brand > svg:first-child { color: var(--text-2); flex-shrink: 0; }
.footer-brand > span:first-of-type { color: var(--text-2); font-weight: 600; }
.footer-brand-name { color: var(--accent); }
.footer-brand-icon { color: var(--accent); flex-shrink: 0; }
.footer-separator { color: var(--text-2); font-size: 14px; }
.footer-right {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

@media (min-width: 900px) {
  .items-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .dl-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 899px) {
  .header-top { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 4px; }
  .header-left { order: 0; }
  .header-actions { order: 1; margin-left: auto; }
  .search-wrapper { 
    order: 2; 
    flex: 1 1 100%; 
    margin: 2px -12px 0; 
    padding: 4px 12px 6px;
    border-top: 1px solid var(--border); 
    max-width: none; 
  }
  .app-header { padding: 0 12px; }
  .page-hero { padding: 14px 0 16px; }
}

@media (max-width: 480px) {
  .page-hero h2 { font-size: 22px; }
  .logo-name { font-size: 15px; }
  .watch-poster { width: 75px; }
  .watch-poster img { width: 75px; }
  .watch-title { font-size: 14px; }
  .episode-caption { max-width: 100%; }
  .player-wrap { border-radius: 8px; }
}

.watch-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn-download-page { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; background: var(--bg-3); border: 1px solid var(--border-2); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: var(--text-2); transition: all 0.2s; white-space: nowrap; margin-top: 14px; }
.btn-download-page:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-muted); }

.dl-page-header { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dl-count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 6px; background: var(--accent-muted); border: 1px solid var(--accent-border); color: var(--accent); border-radius: 20px; font-size: 10px; font-weight: 700; font-family: 'JetBrains Mono', monospace; margin-left: 6px; vertical-align: middle; }
.dl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.dl-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s; flex-wrap: wrap; }
.dl-card:hover { border-color: var(--border-2); }
.dl-card-left { flex: 1; min-width: 0; }
.dl-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.dl-recommended { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--success); background: rgba(92, 184, 92, 0.1); border: 1px solid rgba(92, 184, 92, 0.25); padding: 2px 8px; border-radius: var(--radius-pill); letter-spacing: 0.05em; }
.dl-caption { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-top: 6px; white-space: normal; overflow: visible; word-wrap: break-word; word-break: break-all; overflow-wrap: anywhere; max-width: none; background: var(--bg-3); padding: 8px 12px; border-radius: 6px; border-left: 3px solid var(--accent); }
.dl-card-actions { display: flex; gap: 7px; flex-shrink: 0; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.btn-dl-main { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; background: var(--accent); color: white; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; transition: background 0.2s; white-space: nowrap; text-decoration: none; }
.btn-dl-main:hover { background: var(--accent-hover); }
.btn-dl-main.telegram { background: #2AABEE; }
.btn-dl-main.telegram:hover { background: #2298D6; }
.btn-watch-sm { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; background: var(--bg-3); border: 1px solid var(--border-2); color: var(--text-2); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; transition: all 0.2s; white-space: nowrap; text-decoration: none; }
.btn-watch-sm:hover { color: var(--text); background: var(--border); }
.episode-num-sm { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; background: var(--accent-muted); border: 1px solid var(--accent-border); padding: 2px 8px; border-radius: 6px; flex-shrink: 0; }
.bulk-banner { display: flex; align-items: center; justify-content: space-between; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 10px; gap: 12px; flex-wrap: wrap; }
.bulk-banner-info { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); font-family: 'JetBrains Mono', monospace; }
.bulk-copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--border-2); border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; color: var(--text-2); font-family: 'JetBrains Mono', monospace; transition: all 0.2s; cursor: pointer; white-space: nowrap; }
.bulk-copy-btn:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-muted); }

@media (max-width: 480px) {
  .dl-caption { max-width: none; white-space: normal; }
  .dl-card { gap: 10px; }
  .btn-dl-main { padding: 7px 14px; font-size: 12px; }
}

.type-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.type-filter-btn { padding: 6px 16px; border-radius: 99px; border: 1px solid var(--border, rgba(255,255,255,0.12)); background: var(--bg-card); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.type-filter-btn:hover { background: var(--bg-3); color: var(--text); }
.type-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.layout-2-container { padding: 10px 0; }
.category-section { margin-bottom: 32px; }
.category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.category-title { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
.category-accent { color: var(--accent); font-weight: 900; }
.category-header-actions { display: flex; align-items: center; gap: 8px; }
.category-header-actions .header-slider-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  padding: 0;
}
.category-header-actions .header-slider-arrow:hover {
  background: var(--accent-muted);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.category-header-actions .header-slider-arrow:active {
  transform: scale(0.95);
}

/* Desktop enhancements */
@media (min-width: 768px) {
  .header-slider-arrow {
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transform: scale(1.05);
  }
  .header-slider-arrow:hover {
    box-shadow: 0 5px 10px rgba(0,0,0,0.4);
    transform: scale(1.15);
  }
  .header-slider-arrow:active {
    transform: scale(1);
  }
}
.view-all-link { font-size: 11px; color: white; font-weight: 600; text-decoration: none; background: var(--accent); padding: 4px 10px; border-radius: 99px; transition: background .2s; }
.view-all-link:hover { background: var(--accent); filter: brightness(0.9); }
.horizontal-slider-wrap { position: relative; margin: 0 -20px; padding: 0 20px; }
.horizontal-slider { display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; will-change: scroll-position; -webkit-overflow-scrolling: touch; }
.horizontal-slider::-webkit-scrollbar { display: none; }
.movie-card { flex: 0 0 150px; display: flex; flex-direction: column; background: var(--bg-card); border-radius: 5px; overflow: hidden; transition: opacity 0.2s; border: none; cursor: pointer; }
.movie-card:hover { opacity: 0.75; transform: none; border-color: transparent; }
.movie-poster { width: 150px; height: 225px; position: relative; background: var(--bg-3); flex-shrink: 0; }
.movie-poster img { width: 150px; height: 225px; object-fit: cover; display: block; border-radius: 5px; }
.movie-rating-badge { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #FFD700; padding: 2px 7px; border-radius: 20px; font-size: 9px; font-weight: 700; font-family: 'JetBrains Mono', monospace; border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; gap: 3px; z-index: 2; }
.movie-season-badge { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; padding: 2px 7px; border-radius: 20px; font-size: 9px; font-weight: 700; font-family: 'JetBrains Mono', monospace; z-index: 2; border: 1px solid rgba(255,255,255,0.15); }
.poster-placeholder { width: 150px; height: 225px; display: flex; align-items: center; justify-content: center; color: var(--text-3); background: var(--bg-3); border-radius: 5px; }
.play-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; z-index: 3; pointer-events: none; }
.play-overlay svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
.movie-card:hover .play-overlay { opacity: 1; }
.movie-info { padding: 8px 2px 4px; }
.movie-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-meta { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.movie-filesource { color: var(--accent); font-weight: 600; font-size: 10px; white-space: nowrap; }
.item-filesource { font-size: 11px; color: var(--info); background: rgba(92, 150, 220, 0.1); border: 1px solid rgba(92, 150, 220, 0.2); padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: white; display: flex; align-items: center; justify-content: center; z-index: 10; opacity: 0; transition: opacity 0.2s; border: 1px solid rgba(255, 255, 255, 0.1); font-size: 18px; }
.horizontal-slider-wrap:hover .slider-arrow { opacity: 1; }
.slider-arrow.left { left: 5px; }
.slider-arrow.right { right: 5px; }

@media (max-width: 480px) {
  .main-content { padding-left: 12px; padding-right: 12px; }
  .horizontal-slider-wrap { margin: 0 -12px; padding: 0 12px; }
  .horizontal-slider { gap: 12px; }
  /* 2 side paddings (12+12=24) + 2 gaps (12+12=24) = 48px total offset */
  .movie-card { flex: 0 0 calc((100vw - 48px) / 3); width: calc((100vw - 48px) / 3); }
  .movie-poster { width: 100%; height: calc(((100vw - 48px) / 3) * 1.5); }
  .movie-poster img { width: 100%; height: calc(((100vw - 48px) / 3) * 1.5); }
  .poster-placeholder { width: 100%; height: calc(((100vw - 48px) / 3) * 1.5); }
  .movie-title { font-size: 12px; }
  .movie-meta { font-size: 10px; }
  .movie-rating-badge { font-size: 8px; padding: 1px 5px; }
  .category-title { font-size: 16px; }
  .slider-arrow { display: none; }
  .header-slider-arrow { display: none; }
  .dl-card-actions { flex-direction: column; align-items: flex-start; }
  .dl-card-actions .btn-dl-main,
  .dl-card-actions .btn-watch-sm { width: 100%; justify-content: center; }
}

.status-warn-icon { flex-shrink: 0; }

/* ══ CATEGORY HERO BANNER ══════════════════════════════════ */

.category-hero-banner {
  margin-left: -20px;
  margin-right: -20px;
  width: calc(100% + 40px);
  min-height: 175px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  /* Dark mode fallback */
  background: linear-gradient(160deg, #0d1117 0%, #151c27 55%, #1a1f2e 100%);
}

/* Light mode fallback — deep teal/slate so white text stays legible */
html[data-theme="light"] .category-hero-banner {
  background: linear-gradient(160deg, #1b2a3b 0%, #1e3448 55%, #213d57 100%);
}

/* Blurred poster div — inline background-image set from EJS */
.category-hero-bg {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  /* reduced blur + less darkening so image is visible */
  filter: blur(6px) brightness(0.42) saturate(1.15);
  z-index: 0;
}

/* Light mode: slightly more brightness so it doesn't look pitch black */
html[data-theme="light"] .category-hero-bg {
  filter: blur(6px) brightness(0.50) saturate(1.1);
}

/* Vignette overlay */
.category-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.38) 50%,
    rgba(0,0,0,0.72) 100%
  );
  z-index: 1;
}

/* Inner content */
.category-hero-content {
  position: relative;
  z-index: 2;
  padding: 12px 20px 16px;
  min-height: 175px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 3-column grid: Back | Indicator (centred) | spacer */
.category-hero-top-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}

.hero-back-nav {
  color: rgba(255,255,255,0.80) !important;
  padding: 0 !important;
  font-size: 13px;
  justify-self: start;
}
.hero-back-nav:hover { color: #fff !important; }

.category-hero-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0.80;
}

.category-hero-filmicon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.category-hero-indicator-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.60);
  letter-spacing: 0.06em;
  text-align: center;
}

/* Bottom body — all centred */
.category-hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

/* Title — smaller than before (was 27px) */
.category-hero-title {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.60);
}

/* Badge — smaller & more compact (was 10px / 4px 16px) */
.category-hero-premium-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  background: rgba(212,168,32,0.14);
  border: 1px solid rgba(212,168,32,0.42);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #c9a020;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .category-hero-banner  { min-height: 150px; }
  .category-hero-content { min-height: 150px; padding: 10px 16px 14px; }
  .category-hero-title   { font-size: 17px; }
}

/* ── Batch/Zip tab ──────────────────────────────────────── */
.quality-tab.batch-zip-tab {
  background: rgba(var(--accent-rgb, 224,120,80), 0.08);
  border-color: rgba(var(--accent-rgb, 224,120,80), 0.30);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.quality-tab.batch-zip-tab:hover {
  background: rgba(var(--accent-rgb, 224,120,80), 0.15);
  border-color: var(--accent-border);
}
.quality-tab.batch-zip-tab.active {
  background: var(--accent-muted);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* ── Batch section info note ────────────────────────────── */
.batch-section-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  margin-bottom: 10px;
}
.batch-section-note svg { flex-shrink: 0; opacity: .7; }

/* ── Batch "Complete" episode label ─────────────────────── */
.batch-complete-label {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── Batch episode card accent left border ──────────────── */
.batch-ep-card {
  border-left: 3px solid var(--accent-border) !important;
}
