/* NoirPlay V30 — Final public polish */

/* ---------- Header search: real-time suggestions ---------- */
.search-enhanced{
  position:relative;
  overflow:visible!important;
}
.search-suggestions{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:420;
  overflow:hidden;
  padding:7px;
  border:1px solid var(--line);
  border-radius:14px;
  background:color-mix(in srgb,var(--surface) 96%,transparent);
  box-shadow:0 24px 64px rgba(0,0,0,.34);
  backdrop-filter:blur(18px);
}
.search-suggestion-group+.search-suggestion-group{
  margin-top:6px;
  padding-top:6px;
  border-top:1px solid var(--line-soft);
}
.search-suggestion-label{
  display:block;
  padding:5px 7px 6px;
  color:var(--muted-2);
  font-size:8px;
  font-weight:900;
  letter-spacing:.13em;
}
.search-suggestion-item{
  min-height:58px;
  display:grid;
  grid-template-columns:76px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  padding:6px;
  border-radius:9px;
}
.search-suggestion-item:hover{
  background:var(--surface-2);
}
.search-suggestion-item img,
.search-suggestion-fallback{
  width:76px;
  aspect-ratio:16/9;
  display:block;
  overflow:hidden;
  border-radius:7px;
  object-fit:cover;
  background:var(--surface-3);
}
.search-suggestion-copy{
  min-width:0;
}
.search-suggestion-copy b,
.search-suggestion-copy small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.search-suggestion-copy b{
  font-size:10px;
}
.search-suggestion-copy small{
  margin-top:3px;
  color:var(--muted);
  font-size:8px;
}
.search-suggestion-item em{
  padding:4px 6px;
  border-radius:999px;
  background:var(--surface-3);
  color:var(--muted);
  font-size:7px;
  font-style:normal;
}
.search-suggestion-categories>div{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  padding:0 4px 4px;
}
.search-suggestion-categories a{
  min-height:32px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 8px;
  border:1px solid var(--line-soft);
  border-radius:999px;
  background:var(--surface-2);
}
.search-suggestion-categories a span{font-size:9px;font-weight:800}
.search-suggestion-categories a small{color:var(--muted);font-size:7px}
.search-suggestion-all{
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:5px;
  padding:7px 9px;
  border-top:1px solid var(--line-soft);
  color:var(--text);
  font-size:9px;
  font-weight:850;
}
.search-suggestion-empty{
  padding:15px 10px;
  color:var(--muted);
  text-align:center;
  font-size:9px;
}

/* ---------- Home ---------- */
.home-main{
  gap:20px!important;
}
.home-hero{
  min-height:220px!important;
}
.home-hero-copy{
  padding:26px 34px!important;
}
.home-hero h1{
  font-size:clamp(30px,3.5vw,47px)!important;
}
.home-hero-copy>p{
  max-width:620px!important;
}
.home-overview-card{
  box-shadow:none!important;
}
.home-section,
.home-catalog-panel{
  overflow:visible!important;
}
/* ---------- Search results page ---------- */
.search-page{
  padding-top:20px;
  padding-bottom:36px;
}
.search-page-hero{
  padding:28px;
  border:1px solid var(--line-soft);
  border-radius:20px;
  background:
    radial-gradient(circle at 88% 12%,var(--red-soft),transparent 34%),
    var(--surface);
}
.search-page-hero h1{
  margin:6px 0 6px;
  font-size:clamp(29px,4vw,44px);
  letter-spacing:-.045em;
}
.search-page-hero>p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.65;
}
.search-page-form{
  max-width:760px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  margin-top:18px;
}
.search-page-form input{
  width:100%;
  min-height:46px;
  padding:10px 13px;
  border:1px solid var(--line);
  border-radius:11px;
  outline:0;
  background:var(--input);
  color:var(--text);
  font-size:13px;
}
.search-page-form input:focus{
  border-color:color-mix(in srgb,var(--red) 45%,var(--line) 55%);
  box-shadow:0 0 0 3px var(--red-soft);
}
.search-summary{
  margin-top:14px;
  padding:12px 14px;
  border:1px solid var(--line-soft);
  border-radius:13px;
  background:var(--surface);
}
.search-summary>div{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.search-summary-icon{
  width:31px;
  height:31px;
  flex:0 0 31px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--surface-2);
  color:var(--red);
  font-size:17px;
}
.search-summary b,
.search-summary small{
  display:block;
}
.search-summary b{
  font-size:10px;
}
.search-summary small{
  margin-top:3px;
  color:var(--muted);
  font-size:8px;
}
.search-category-suggestions{
  margin-top:20px;
  padding:18px;
  border:1px solid var(--line-soft);
  border-radius:16px;
  background:var(--surface);
}
.search-category-head h2{
  margin:4px 0 11px;
  font-size:18px;
}
.search-category-chips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.search-category-chip{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-2);
}
.search-category-chip:hover{
  border-color:color-mix(in srgb,var(--red) 35%,var(--line) 65%);
  background:var(--surface-3);
}
.search-category-chip span{font-size:9px;font-weight:850}
.search-category-chip small{color:var(--muted);font-size:8px}
.search-results-section{
  padding-top:26px;
}
.search-empty{
  grid-column:1/-1;
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.search-empty b{font-size:14px}
.search-empty span{color:var(--muted);font-size:10px}
.search-empty .btn{margin-top:5px}

/* ---------- Categories ---------- */
.category-hero{
  position:relative;
  overflow:hidden;
  min-height:185px;
  padding:28px!important;
  border-color:var(--line-soft)!important;
}
.category-hero>div:first-child{
  max-width:720px;
}
.category-hero h1{
  font-size:clamp(31px,4vw,45px)!important;
}
.category-hero p{
  max-width:650px;
  font-size:11px!important;
  line-height:1.6;
}
.category-hero-stats{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:13px;
}
.category-hero-stats span{
  min-height:30px;
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px 8px;
  border:1px solid var(--line-soft);
  border-radius:999px;
  background:var(--surface-2);
  color:var(--muted);
  font-size:8px;
}
.category-hero-stats b{
  color:var(--text);
  font-size:9px;
}
.category-tools{
  align-self:center;
}
.category-tools input{
  min-height:44px;
  font-size:12px;
}
.category-visual-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:11px!important;
}
.category-visual-card{
  min-height:140px!important;
  border-color:var(--line-soft)!important;
  box-shadow:none!important;
}
.category-visual-card img{
  filter:saturate(.88) brightness(.82);
  transition:transform .22s ease,filter .22s ease;
}
.category-available-dot{
  position:absolute;
  top:9px;
  right:9px;
  z-index:4;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#52c978;
  box-shadow:0 0 0 4px rgba(82,201,120,.13);
}
@media(hover:hover) and (pointer:fine){
  .category-visual-card:hover img{
    transform:scale(1.045);
    filter:saturate(1) brightness(.92);
  }
}
.category-related-section{
  border-top:1px solid var(--line-soft);
}

/* ---------- Watch page final refinement ---------- */
.watch-page{
  padding-bottom:38px!important;
}
.player-shell{
  overflow:hidden;
}
.video-info-card{
  background:
    linear-gradient(180deg,rgba(255,255,255,.018),transparent),
    var(--surface)!important;
}
.more-like-this,
.comments-card{
  border-color:var(--line-soft)!important;
}
.more-like-this .section-head-modern,
.comments-head{
  padding-bottom:4px;
}

/* ---------- Legal pages ---------- */
.legal-page{
  padding-top:20px;
  padding-bottom:46px;
}
.legal-en{display:none}
html[lang="en"] .legal-es{display:none!important}
html[lang="en"] .legal-en{display:block!important}
html[lang="es"] .legal-es{display:block!important}
html[lang="es"] .legal-en{display:none!important}
.legal-hero{
  padding:30px;
  border:1px solid var(--line-soft);
  border-radius:20px;
  background:
    radial-gradient(circle at 90% 10%,var(--red-soft),transparent 34%),
    var(--surface);
}
.legal-hero h1{
  margin:6px 0 8px;
  font-size:clamp(31px,4vw,46px);
  letter-spacing:-.045em;
}
.legal-hero p{
  max-width:800px;
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.7;
}
.legal-meta{
  margin-top:14px;
  color:var(--muted-2);
  font-size:8px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.legal-document{
  max-width:1000px;
  margin:16px auto 0;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:var(--surface);
}
.legal-document section{
  padding:20px 22px;
}
.legal-document section+section{
  border-top:1px solid var(--line-soft);
}
.legal-document h2{
  margin:0 0 8px;
  font-size:15px;
  letter-spacing:-.02em;
}
.legal-document p{
  margin:7px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.78;
}

/* ---------- Footer cleanup ---------- */
.footer-brand p{
  max-width:460px;
}
.footer-links a{
  min-height:29px;
  display:flex;
  align-items:center;
}

/* ---------- Responsive ---------- */
@media(max-width:1200px){
  .category-visual-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}
@media(max-width:900px){
  .category-visual-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:820px){
  .search-suggestions{
    top:calc(100% + 5px);
  }
}
@media(max-width:620px){
  .search-suggestions{
    position:fixed;
    left:8px;
    right:8px;
    top:calc(112px + env(safe-area-inset-top));
    max-height:min(68vh,520px);
    overflow:auto;
    border-radius:13px;
  }
  .search-suggestion-item{
    min-height:61px;
    grid-template-columns:78px minmax(0,1fr);
  }
  .search-suggestion-item em{
    display:none;
  }
  .home-category-row::-webkit-scrollbar{display:none}
  .search-page{
    padding-top:10px;
  }
  .search-page-hero{
    padding:20px 15px;
    border-radius:15px;
  }
  .search-page-hero h1{
    font-size:29px;
  }
  .search-page-form{
    grid-template-columns:1fr;
  }
  .search-page-form input{
    min-height:46px;
    font-size:16px;
  }
  .search-page-form .btn{
    min-height:44px;
  }
  .search-category-suggestions{
    padding:14px;
  }
  .category-hero{
    min-height:0;
    padding:20px 15px!important;
  }
  .category-tools{
    width:100%;
  }
  .category-tools input{
    min-height:44px;
    font-size:16px;
  }
  .category-visual-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .category-visual-card{
    min-height:120px!important;
  }
  .legal-page{
    padding-top:10px;
  }
  .legal-hero{
    padding:20px 16px;
    border-radius:15px;
  }
  .legal-document{
    border-radius:14px;
  }
  .legal-document section{
    padding:17px 15px;
  }
  .legal-document p{
    font-size:10.5px;
  }
}
@media(max-width:390px){
  .category-visual-grid{
    grid-template-columns:1fr 1fr!important;
  }
  .category-visual-card{
    min-height:108px!important;
  }
}

/* Lower-cost effects for small/touch devices */
@media(max-width:760px),(pointer:coarse){
  .search-suggestions{
    backdrop-filter:none;
  }
  .search-page-hero,
  .legal-hero{
    box-shadow:none;
  }
}
