/* ----- Card appearance variables (edit these values) ----- */
:root{
    --card-banner-percent: 85%; 
   --card-footer-gap: 10px;
   
   
   --namebox-font-size: 15px;
  --namebox-offset: 14px; 
  --banner-bottom-space: 52px; 
  
  
  --bg: #070707;
  --card: #0f0f10;
  --muted: #a8a8a8;
  --neon-green: #00ff9c;
  --neon-cyan: #00f0ea;
  --neon-magenta: #b24cff;
  --text: #e9eef2;
  --glass-2: rgba(255,255,255,0.05);
  --radius-lg: 16px;
  --transition: 180ms cubic-bezier(.2,.9,.2,1);
  --footer-height: 72px;
}

/* ---- Page reset & base ---- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; -ms-user-select: none; user-select: none; }
html, body { height: 100%; }
body{
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 400px at 5% 10%, rgba(178,76,255,0.06), transparent 6%),
    radial-gradient(900px 250px at 95% 80%, rgba(0,240,234,0.04), transparent 6%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 72px; /* footer room on small screens */
}

/* ================= NAVBAR / HEADER ================= */
.header, .navbar { /* kept both in case html refers to header.navbar */
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(0,0,0,0.18));
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

/* ---- hamburger (3-bar) ---- */
.menu-icon{
  width:44px;
  height:36px;
  display:flex;
  flex-direction:column;
  justify-content:space-around;
  cursor:pointer;
  padding:6px;
  flex-shrink: 0;
}
.menu-icon span{
  display:block;
  height:3px;
  border-radius:4px;
  background: linear-gradient(90deg,#00ffd0,#a44cff);
  box-shadow: 0 0 12px rgba(0,255,200,0.15);
}

/* ---- site title ---- */
.site-title{
  margin:0;
  font-weight:700;
  letter-spacing:3px;
  font-size:20px;
  line-height:1;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
}
.site-title span{
  color:var(--neon-magenta);
  text-shadow: 0 0 8px rgba(178,76,255,0.9), 0 0 28px rgba(178,76,255,0.15);
}

/* ================= SEARCH SECTION ================= */
/* ==================================================
   HORIZONTAL NEON SEARCH + SLIDING RESULT PANEL
   (ADD-ON ONLY — SAFE TO APPEND)
===================================================== */

/* SEARCH SECTION WRAPPER */
.search-section {
  position: relative;
  width: 100%;
  padding: 22px 14px;
  z-index: 20;
}

/* FULL-WIDTH SEARCH BAR */
.search-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.search-bar {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 56px;
  background: #050505;
  display: flex;
  align-items: center;
  padding: 0 18px 0 52px;
  border-radius: 14px;
  border: 2px solid transparent;

  /* slim RGB neon border */
  background-image:
    linear-gradient(#050505, #050505),
    linear-gradient(90deg, #ff0055, #00ffd0, #7b5cff);
  background-origin: border-box;
  background-clip: padding-box, border-box;

  box-shadow:
    0 0 18px rgba(0, 255, 210, 0.25),
    inset 0 0 12px rgba(0, 255, 210, 0.15);
}

/* SEARCH ICON */
.search-bar .material-icons {
  position: absolute;
  left: 18px;
  font-size: 24px;
  color: #9affea;
  text-shadow: 0 0 8px rgba(0, 255, 210, 0.9);
}

/* INPUT */
.search-bar input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 0.4px;
}

/* PLACEHOLDER */
.search-bar input::placeholder {
  color: rgba(190, 255, 240, 0.6);
}

/* FOCUS STATE */
.search-bar:focus-within {
  box-shadow:
    0 0 28px rgba(0, 255, 210, 0.55),
    inset 0 0 18px rgba(0, 255, 210, 0.3);
}

/* =====================================================
   RESULT PANEL (HALF-SCREEN, SLIDES DOWN)
===================================================== */
.search-result-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 100%;
  height: 50vh;
  background: rgba(5, 5, 5, 0.96);
  border-radius: 18px;
  overflow: visible;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.25s ease;
  box-shadow:
    0 -8px 40px rgba(0, 255, 210, 0.35),
    0 8px 40px rgba(178, 76, 255, 0.12),
    inset 0 0 24px rgba(0, 255, 210, 0.18);
}

.search-result-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, #baff00, #00ff66, #baff00);
  border-radius: 4px;
  box-shadow: 0 0 15px #00ff88, 0 0 30px #baff00;
}

.search-result-panel::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 72%;
  height: 4px;
  background: linear-gradient(90deg, #9b4cff, #e06bff, #9b4cff);
  border-radius: 6px;
  box-shadow:
    0 0 18px rgba(178, 76, 255, 0.9),
    0 0 34px rgba(178, 76, 255, 0.28);
}

/* ACTIVE (JS will add this) */
.search-result-panel.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* INNER SCROLL AREA */
.results-inner {
  height: 100%;
  padding: 18px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* RESULT CARD (SIMILAR TO ANIME CARD STYLE) */
.result-card {
  background: rgba(0, 0, 0, 0.85);
  border-radius: 14px;
  display: flex;
  gap: 14px;
  padding: 12px;
  cursor: pointer;

  border: 1.5px solid rgba(0, 255, 200, 0.45);
  box-shadow:
    0 0 14px rgba(0, 255, 200, 0.35);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.result-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 0 24px rgba(0, 255, 200, 0.65);
}

/* THUMBNAIL */
.result-thumb {
  width: 82px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

/* INFO */
.result-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-title {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.result-meta {
  font-size: 0.85rem;
  color: #9aff9a;
  margin-bottom: 6px;
}

.result-banner {
  font-size: 0.75rem;
  color: rgba(200, 255, 235, 0.75);
}

/* NO RESULT */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 60px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
}

/* SCROLLBAR (SUBTLE NEON) */
.results-inner::-webkit-scrollbar {
  width: 6px;
}
.results-inner::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 210, 0.6);
  border-radius: 10px;
}
/* === Slim Lime Neon Belt for Result Container === */
.search-result-panel {
  position: relative;
  border-top: 2px solid rgba(0, 255, 100, 0.8);
  box-shadow: 0 0 10px rgba(0, 255, 100, 0.6), 0 0 25px rgba(0, 255, 120, 0.3);
}

/* Neon glow accent strip (slim belt effect) */
.search-result-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, #baff00, #00ff66, #baff00);
  border-radius: 4px;
  box-shadow: 0 0 15px #00ff88, 0 0 30px #baff00;
  z-index: 2;
}

/* Optional: stronger glow when active */
.search-result-panel.active::before {
  box-shadow: 0 0 20px #00ff88, 0 0 40px #baff00;
}
/* ================= SIDE MENU (slide-out) ================= */
/* ================= SIDE MENU (PRO FIX) ================= */
.side-menu{
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0; /* static now */
  width: 320px;
  max-width: 86vw;
  background: linear-gradient(180deg, rgba(0,0,0,0.94), rgba(0,0,0,0.9));
  z-index: 80;
  padding: 18px;

  transform: translateX(-100%);
  transition:
    transform 420ms cubic-bezier(.18,.89,.32,1.28); /* bounce */

  box-shadow: 8px 0 40px rgba(0,0,0,0.6);
  will-change: transform;
  touch-action: pan-y;
}

/* OPEN STATE */
.side-menu.open{
  transform: translateX(0);
}

/* While dragging — no animation */
.side-menu.dragging{
  transition: none !important;
}

/* Responsive width sync */
@media (max-width:880px){
  .side-menu{
    width:260px;
  }
}
body.side-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 70;
}
.side-menu .menu-header h2{ margin:0 0 12px; color:var(--text); }
.menu-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.menu-list a{ color:var(--muted); text-decoration:none; padding:10px; border-radius:8px; display:block; }
.menu-list a:hover{ background: rgba(255,255,255,0.02); color:var(--text); }

/* ================= MAIN CONTENT (movies / series horizontal lists) ================= */
main { max-width:1120px; margin: 10px auto; padding: 0 18px; }
.content-section{ padding:0px; max-width:1120px; margin:10px auto; }
.section-header h2{ margin:0 0 12px; font-size:18px; color:var(--text); }

/* horizontal scroll cards */
.horizontal-scroll{
  display:flex;
  gap:14px;
  overflow:auto;
  padding-bottom:12px;
}

.card-info{ padding:10px; color:var(--muted); flex:1; display:flex; flex-direction:column; justify-content:center; gap:6px; }
.card-info h3{ margin:0; font-size:15px; color:var(--text); }
.card-info p{ margin:0; font-size:12px; color:var(--neon-green); font-weight:600; }

/* load more buttons */
.load-more{
  margin-top:14px;
  display:inline-block;
  background:var(--glass-2);
  border:1px solid rgba(255,255,255,0.03);
  color:var(--text);
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
}

/* ================= FOOTER ================= */
.footer {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #aaa;
  font-size: 13px;
}

/* ================= Accessibility focus ================= */
:focus { outline: none !important; outline-offset:3px; border-radius:6px; }

/* ================= Responsive tweaks (kept minimal & relevant) ================= */
@media (max-width:880px){
  .featured-thumb{ width:124px; height:78px; flex:0 0 124px; }
  .site-title{ font-size:18px; }
}

@media (max-width:520px){
  .featured-result{ flex-direction:column; align-items:flex-start; gap:12px; padding:14px; }
  .featured-thumb{ width:100%; height:148px; flex:0 0 auto; }
  .featured-content .featured-title{ font-size:18px; }
  .search-section{ padding:12px; }
  .search-box{ padding:12px; border-radius:16px; }
  .search-box input{ font-size:15px; }
  .horizontal-scroll{ gap:10px; padding-bottom:8px; }
   .live-search-results{ top: calc(100% + 10px); width:96%; }
}

/* ================= End of cleaned stylesheet ================= */
/* Horizontal related anime row */
#relatedRow.horizontal-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

#relatedRow .anime-card {
  flex: 0 0 auto;
}
/* Load More Movies button (JS-created) */
.load-more-btn {
  display: block;
  margin: 18px auto 28px;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;

  background: linear-gradient(90deg, #00ffd0, #a44cff);
  color: #041218;

  border: none;
  box-shadow:
    0 10px 26px rgba(0,0,0,0.6),
    0 0 14px rgba(0,255,200,0.25);

  transition: transform 160ms ease, box-shadow 160ms ease;
}

.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 36px rgba(0,0,0,0.7),
    0 0 20px rgba(0,255,200,0.45);
}
/* --- Movies: minimum 2 columns on mobile, responsive up from there --- */
#moviesContainer,
.movies-grid,
.grid-container {
  display: grid;
  gap: 12px; /* spacing between items */
  grid-template-columns: repeat(2, 1fr); /* minimum 2 columns on smallest screens */
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

/* Slightly larger phones/tablets -> 3 columns */
@media (min-width: 480px) {
  #moviesContainer,
  .movies-grid,
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets / small desktops -> 4 columns */
@media (min-width: 768px) {
  #moviesContainer,
  .movies-grid,
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large desktops -> 5 or 6 columns depending on width */
@media (min-width: 1200px) {
  #moviesContainer,
  .movies-grid,
  .grid-container {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Make sure cards and images fill their cells */
.movie-card,
.movie-item,
.movie-tile {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.movie-card img,
.movie-item img,
.movie-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  /* loading attribute must be set in HTML/JS when creating nodes; this keeps layout stable */
}
/* -------------------------
   Strip headers (movies = gold, series = lime)
   ------------------------- */
.section-header.strip {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.password-box {
  max-width: 640px;
  margin: 12px auto;
  padding: 14px 18px;
  border-radius: 12px;

  /* smooth light yellow background (no gradients fighting) */
  background: #fff4b8;

  /* purple neon border */
  border: 2px solid #b24cff;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  /* readable size */
  font-size: 18px;
  font-weight: 800;

  /* neon glow (purple only) */
  box-shadow:
    0 0 10px rgba(178, 76, 255, 0.8),
    0 0 22px rgba(178, 76, 255, 0.45);
}
.password-box .material-icons {
  font-size: 22px;
  color: #6f00ff;
  text-shadow:
    0 0 6px rgba(178, 76, 255, 0.9);
}
.password-box span:last-child {
  color: #3a2a00; /* dark yellow text for contrast */
  text-shadow:
    0 0 6px rgba(178, 76, 255, 0.85),
    0 0 14px rgba(178, 76, 255, 0.55);
}
/* Gold premium belt for Movies */
.section-header.strip.gold {
  background: linear-gradient(90deg, #4839C5, #3FDFD2);
  border: 0;
  box-shadow: 0 6px 20px rgba(170,124,0,0.18), inset 0 -4px 12px rgba(255,230,170,0.05);
}
.section-header.strip.gold h2 {
  color: #1b1200;
  letter-spacing: 1px;
  font-weight: 700;
  margin: 0;
  width: 100%;
}

/* Lime neon belt for Series */
.section-header.strip.lime {
  background: linear-gradient(90deg, #E50914, #B246FF);
  border: 0px;
  box-shadow: 0 8px 28px rgba(0,255,100,0.12), inset 0 -4px 10px rgba(0,255,120,0.04);
}
.section-header.strip.lime h2 {
  color: #02240a;
  letter-spacing: 1px;
  font-weight: 700;
  margin: 0;
  width: 100%;
}

/* -------------------------
   Ad strip styles (horizontal, JSON-driven)
   ------------------------- */
#adStrip.ad-strip {
  display: block;
  width: 100%;
  padding: 8px 6px;
  box-sizing: border-box;
  margin: 4px 0 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 10; /* lower than search panel */
}

/* each ad tile */
.ad-card {
  min-width: 280px;
  height: 120px;
  margin-right: 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.03);
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(255,255,255,0.02));
}

/* ad image area */
.ad-card img {
  width: 180px;
  height: 100%;
  object-fit: cover;
  flex: 0 0 180px;
}

/* ad meta */
.ad-card .ad-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
}

/* subtle hover */
.ad-card:hover {
  transform: translateY(-6px);
  transition: transform 160ms ease;
}

/* -------------------------
   Two stacked cards per column while preserving horizontal scroll
   (keeps other .horizontal-scroll behavior intact for other regions)
   ------------------------- */
#moviesContainer.horizontal-scroll,
#seriesContainer.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;          /* flow columns left→right to enable horizontal scrolling */
  grid-auto-columns: minmax(160px, 180px); /* column width (card width) */
  grid-template-rows: repeat(2, auto); /* two stacked rows per column */
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
    padding-left: 10px;
    padding-right: 10px;
  -webkit-overflow-scrolling: touch;
}

/* Responsive: slightly narrower on very small screens */
@media (max-width: 420px) {
  #moviesContainer.horizontal-scroll,
  #seriesContainer.horizontal-scroll {
    grid-auto-columns: minmax(140px, 160px);
  }
}

/* Ensure search panel overlays everything (ads are beneath) */
.search-section { z-index: 40; }
.search-result-panel {
  z-index: 90; /* high enough to overlay ads & content */
  position: absolute; /* already absolute, ensure stacking context */
}

/* Keep existing .horizontal-scroll default intact for other uses */

/* ---------- Neon-style select (scoped) ----------
   Paste at bottom of css/style.css
   Targets only the element with id="sortSelect" to avoid global side-effects.
--------------------------------------------------*/

#sortSelect {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* layered background: dark core + subtle neon gradient + SVG arrow */
  background-image:
    linear-gradient(90deg, rgba(18,7,28,0.96), rgba(36,8,46,0.96)),
    linear-gradient(90deg, rgba(255,198,0,0.06), rgba(50,255,150,0.02)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' fill-opacity='0.92' d='M7 10l5 5 5-5z'/></svg>");

  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;

  border: 1px solid rgba(255,198,0,0.14);
  border-radius: 12px;
  padding: 10px 42px 10px 14px; /* space for the custom arrow on the right */
  min-width: 160px;
  color: #ffffff;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;

  box-shadow:
    0 6px 18px rgba(0,0,0,0.64),
    0 0 10px rgba(50,255,150,0.04),
    inset 0 1px 0 rgba(255,255,255,0.02);
  text-shadow: 0 1px 0 rgba(0,0,0,0.45);

  transition: box-shadow 180ms ease, transform 80ms ease, border-color 180ms ease;
  outline: none;
}

/* Hover / focus states (neon glow) */
#sortSelect:hover {
  box-shadow:
    0 8px 22px rgba(0,0,0,0.66),
    0 0 12px rgba(50,255,150,0.08),
    inset 0 1px 0 rgba(255,255,255,0.02);
}

#sortSelect:focus {
  border-color: rgba(50,255,150,0.58);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.72),
    0 0 18px rgba(50,255,150,0.14),
    0 0 22px rgba(255,198,0,0.10);
  transform: translateY(-1px);
}

/* Small-screen adjustment when inside the .filter-bar container */
.filter-bar #sortSelect {
  min-width: 140px;
}

/* Native dropdown options — scoped; keeps dropdown readable */
#sortSelect option {
  background: #12041a; /* dark, consistent with the select core */
  color: #ffffff;
}
/* ===== Scoped fixes for movies.html =====
   Paste at the END of css/style.css
   Targets ONLY .search-box and #sortSelect (no global effects)
===============================================================*/

/* 1) Search box: icon positioned, input padded so text never overlaps */
.search-box {
  position: relative;
  display: block;              /* ensure block layout */
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* icon — placed on left edge inside the search box */
.search-box > .material-icons,
.search-box > i {
  position: absolute;
  left: 14px;                  /* distance from left edge; tweak if needed */
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;             /* icon size */
  line-height: 1;
  color: rgba(255,255,255,0.86);
  pointer-events: none;        /* click-through so input receives taps */
  z-index: 3;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

/* input: large left padding to clear the icon; transparent core so neon glow shows through */
.search-box input {
  width: 100%;
  padding-left: 56px;          /* <-- prevents overlap; adjust +8/-8 if your icon size changes */
  padding-right: 16px;
  box-sizing: border-box;
  background: transparent;
  border: none;                /* assume main CSS draws outer neon border */
  color: inherit;
  font-size: 16px;
  outline: none;
}

/* ensure placeholder alignment & color */
.search-box input::placeholder {
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}

/* small-screen tweak: increase left padding on very narrow screens */
@media (max-width: 420px) {
  .search-box > .material-icons,
  .search-box > i {
    left: 12px;
    font-size: 20px;
  }
  .search-box input {
    padding-left: 60px; /* make a bit larger on tiny screens (touch comfort) */
    font-size: 15px;
  }
}

/* 2) Select (Sort) — fully scoped neon-style that prevents native white fill/glitch */
.filter-bar #sortSelect,
.sort-box #sortSelect {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image:
    linear-gradient(90deg, rgba(18,7,28,0.98), rgba(36,8,46,0.98)), /* dark core */
    linear-gradient(90deg, rgba(255,198,0,0.06), rgba(50,255,150,0.02)), /* subtle neon tint */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' fill-opacity='0.92' d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;

  border: 1px solid rgba(255,198,0,0.12);
  border-radius: 12px;
  padding: 10px 44px 10px 14px; /* right padding reserves space for the arrow */
  min-width: 150px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 6px 18px rgba(0,0,0,0.64),
    0 0 8px rgba(50,255,150,0.04),
    inset 0 1px 0 rgba(255,255,255,0.02);
  outline: none;
  background-color: transparent; /* ensure no white default shows through */
  -webkit-text-fill-color: #fff;  /* mobile safeguard */
}

/* Hover / focus: stronger neon glow, no white flash */
.filter-bar #sortSelect:hover,
.filter-bar #sortSelect:focus,
.sort-box #sortSelect:hover,
.sort-box #sortSelect:focus {
  border-color: rgba(50,255,150,0.48);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.72),
    0 0 18px rgba(50,255,150,0.12),
    0 0 22px rgba(255,198,0,0.06);
  transform: translateY(-0.5px);
}

/* make option list readable if the UA exposes it inline (scoped) */
.filter-bar #sortSelect option,
.sort-box #sortSelect option {
  background: #12041a; /* dark dropdown core */
  color: #ffffff;
}

/* Android/Chrome extra: hide inner dropdown arrow if any default remains (scoped) */
.filter-bar #sortSelect::-ms-expand {
  display: none;
}
/* Side-menu current-item sky-neon highlight (visible only when menu is open) */
.side-menu .menu-list a.current {
  position: relative;
  z-index: 2;
  color: var(--text);
  transition: background 200ms var(--transition), box-shadow 200ms var(--transition), color 120ms var(--transition);
}

/* Only show the neon belt when the menu is open */
.side-menu.open .menu-list a.current {
  background: linear-gradient(90deg, rgba(0,240,234,0.12), rgba(0,160,255,0.06));
  color: #041218; /* dark text for contrast against the light neon belt */
  box-shadow: 0 8px 28px rgba(0,240,234,0.10), inset 0 0 14px rgba(0,240,234,0.04);
  border-left: 4px solid var(--neon-cyan);
  padding-left: 12px; /* push content inward so border doesn't overlap text */
  border-radius: 8px;
}

/* small tweak so emoji/icons and text align nicely when highlighted */
.side-menu.open .menu-list a.current::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  width: 2px;
  background: linear-gradient(180deg, rgba(0,240,234,0.85), rgba(0,160,255,0.55));
  border-radius: 2px;
  opacity: 0.6;
  pointer-events: none;
}
#sideMenu::after {
  content: "";
  position: absolute;
  top: 12px;            /* adjust to match menu vertical padding */
  bottom: 12px;         /* adjust to match menu vertical padding */
  right: 0;             /* flush to the right edge of the menu */
  width: 1px;           /* slim; change to 2px–5px if you prefer */
  border-radius: 2px;
  background: linear-gradient(180deg, #fff17a, #ffd300); /* warm yellow */
  box-shadow: 0 0 12px rgba(255,215,0,0.12);
  pointer-events: none;
  z-index: 999;         /* ensure it sits above the menu background */
}

/* If you only want it visible when menu is open: */
#sideMenu:not(.open)::after { opacity: 0; transition: opacity 160ms ease; }
#sideMenu.open::after { opacity: 1; transition: opacity 160ms ease; }

/* Consolidated anime-card styles (75% banner / 25% footer, gold border, watermarks) */
.anime-card {
  position: relative;
    outline: none;
  display: block;
  flex-direction: column;
  justify-content: flex-start;
  width: 180px;
  min-width: 180px;
  height: 260px;
   border: none !important; 
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  background: transparent !important;
  border: 2px solid rgba(212,175,55,0.95);
  box-shadow: none !important; 
  -webkit-print-color-adjust: exact;
}
.anime-card .card-frame {
  width: 100%;
  height: var(--card-banner-percent) !important; /* banner ratio */
  flex: 0 0 var(--card-banner-percent) !important;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  margin-bottom: var(--card-footer-gap) !important; 
  /* gold border & shadow moved here */
  border: 2px solid rgba(212,175,55,0.95);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.6),
    0 0 12px rgba(212,175,55,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0.01));
}
.anime-card .card-frame .card-banner-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
}

.anime-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(0,0,0,0.72), 0 0 18px rgba(212,175,55,0.06);
}
.anime-card .card-frame .card-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.anime-card .card-frame .card-audio,
.anime-card .card-frame .card-year,
.anime-card .card-frame .card-badge,
.anime-card .card-frame .card-type-watermark {
  position: absolute;
}
.anime-card .card-frame .card-audio { right: 8px; bottom: 8px; z-index: 30; }
.anime-card .card-frame .card-year { left: 8px; bottom: 8px; z-index: 31; }
.anime-card .card-frame .card-badge { top: 8px; left: 10px; z-index: 32; }

/* watermark inside frame */
.anime-card .card-frame .card-type-watermark {
  top: 6px; left: 8px; z-index: 6;
}

/* footer (title) sits below the frame */
.anime-card .card-footer {
  padding-top: 12px;
  background: transparent;
  height: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Banner (75%) */
.anime-card .card-banner {
  width: 100%;
  height: 100%;
   max-width: 100%;
  object-fit: cover;
  display: block;
  flex: none !important;
  border: 0;
}
.anime-card .card-banner-wrap .card-audio {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 30;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(0,0,0,0.68);
  color: var(--neon-green);
  box-shadow: 0 8px 20px rgba(0,255,150,0.06);
  pointer-events: none;
  white-space: nowrap;
}
.anime-card .card-banner-warp {
   position: relative;
  width: 100%;
  height: 80%;           /* banner ratio (change to 75/25 or 80/20 as needed) */
  flex: 0 0 80%;
  overflow: hidden;
  display: block;
}
.anime-card .card-banner-wrap .card-year {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 31;                           /* just above the banner */
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 800;
  border-radius: 8px;
  background: rgba(0,0,0,0.66);
  color: var(--neon-green);
  box-shadow: 0 8px 20px rgba(0,255,150,0.06);
  pointer-events: none;
  white-space: nowrap;
}

/* Footer (25%) */
.anime-card .card-footer {
   position: relative;
   z-index: 3;
   height: auto;
  flex: 0 0 auto;
   min-height: 0;
  padding: 8px 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  background: transparent;
   overflow: hidden;
}
.anime-card .card-footer[style*="display:none"],
.anime-card .card-footer[hidden] {
  display: flex !important;
  visibility: visible !important;
}
.anime-card .card-name-box { /* alias for older code that may still use .card-name-box */
  height: 20%;
  flex: 0 0 20%;
   min-height: 42px;
  padding: 6px 10px;
  box-sizing: border-box;
  display: none !important;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.01));
   overflow: hidden;
}

.anime-card .card-title {
  margin: 0;
  font-size: var(--namebox-font-size) !important;
  line-height: 1.05;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.anime-card .card-year {
  margin: 0;
   padding: 0;
   display: inline-block; 
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.78);
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.anime-card .card-meta {
  margin: 0;
  font-size: 12px;
  color: var(--neon-green);
  font-weight: 700;
  opacity: 0.95;
   display: none !important;
}

/* compact top-left badge */
.anime-card .card-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 32;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0,0,0,0.36);
  border: 1px solid rgba(255,255,255,0.03);
  pointer-events: none;
}

/* Large subtle type watermark */
.anime-card .card-type-watermark {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 6;
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  transform: rotate(-12deg);
  color: rgba(255,215,0,0.06);
  pointer-events: none;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* audio watermark bottom-right (lime neon) */
.anime-card .card-audio {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 22;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(0,0,0,0.68);
  color: var(--neon-green);
  box-shadow: 0 8px 20px rgba(0,255,150,0.06);
  pointer-events: none;
  white-space: nowrap;
}

/* ensure any old small overlay title is hidden */
.anime-card .card-title-small,
.anime-card .card-info { display: none; }

/* responsive sizes */
@media (max-width:880px) {
   . side-menu{width:260px;} 
  .anime-card { width:150px; min-width:150px; height:260px; }
  .anime-card .card-type-watermark { font-size: 35px; }
   .anime-card .card-banner-wrap { height: 78%; flex: 0 0 78%; }
   .anime-card .card-frame { height: 78%; flex: 0 0 78%; }
   :root{--card-banner-percent:80%;
      --namebox-font-size: 19px; 
   }
}
@media (max-width:520px) {
  .anime-card { width:140px; min-width:140px; height:220px; }
  .anime-card .card-type-watermark { font-size: 36px; top: 4px; left: 6px; }
  .anime-card .card-audio { font-size: 10px; padding:5px 7px; }
   .anime-card .card-footer { min-height: 36px; padding: 6px 8px; }
  .anime-card .card-title  { font-size: 13px; }
  .anime-card .card-year   { font-size: 11px; }
  .anime-card .card-banner-wrap .card-audio { font-size: 10px; padding:5px 7px; }
   :root{--card-banner-percent: 85%;
      --namebox-font-size: 16px; 
   }
}
@media (max-width: 360px) {
  .anime-card .card-banner-wrap .card-year {
    left: 6px;
    bottom: 6px;
    padding: 5px 6px;
    font-size: 14px;
  }
  .anime-card .card-banner-wrap .card-audio {
    right: 6px;
    bottom: 6px;
    font-size: 10px;
    padding: 5px 6px;
  }
}
/* ===== GENRE PAGE ===== */

.genre-page {
  padding: 16px;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

/* ===== GENRE TILE ===== */
.genre-tile {
  position: relative;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transition: transform .25s ease, box-shadow .25s ease;
}

.genre-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.7);
}

/* Background image */
.genre-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
}

/* Dark gradient overlay */
.genre-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.6),
    rgba(0,0,0,0.15)
  );
}
/* Center content */
.genre-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.genre-icon {
  font-size: 28px;
  margin-bottom: 6px;
  opacity: 0.95;
}

.genre-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}
