/* ====== Reset & Base ====== */
*,*::before,*::after{box-sizing:border-box}

/* Hide all scrollbars across all browsers */
::-webkit-scrollbar{display:none; width:0; height:0}
*::-webkit-scrollbar{display:none; width:0; height:0}
html{scrollbar-width:none; -ms-overflow-style:none}
body::-webkit-scrollbar{display:none}

/* Remove any margins, borders or outlines that could create strips */
*{outline:none; border-collapse:collapse}
html,body,main,header,footer,section,div{margin:0; padding:0; border:0}

:root{
  --bg:#131313;
  --card:#1c1b1b;
  --muted:#e9bcb6;
  --text:#e5e2e1;
  --brand:#E50914;
  --brand-2:#ffb4aa;
  --chip:#201f1f;
  --chip-border:rgba(255,255,255,0.1);
  --shadow:0 10px 25px rgba(0,0,0,.45);
  --radius-2:12px;
  --radius-3:18px;
  --gap:16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --w4u-black:#131313;
}
html,body{height:100%; margin:0; padding:0; overflow-x:hidden; width:100%}
body{background:var(--bg); color:var(--text); font:400 16px/1.5 "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial; padding-bottom:0; width:100%; min-height:100vh; position:relative; overflow-x:hidden}

/* Ensure all major containers are constrained */
main,header,footer,.site-footer,.appbar{width:100%; max-width:100%; box-sizing:border-box}
.site-main{max-width:100%; margin:0 auto}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block; height:auto; box-sizing:border-box}

/* ====== Top App Bar ====== */
.appbar{
  position:sticky;
  top:0;
  z-index:100;
  background:transparent;
  background-color:transparent;
  border-bottom:0;
}
body.obsidian .appbar.oc-header{
  position:fixed;
  top:0 !important;
  margin:0 !important;
  overflow:visible !important;
}
.appbar-inner{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:16px;
  padding:14px 20px;
  max-width:1100px;
  margin:0 auto;
  width:100%;
  box-sizing:border-box;
}

/* Site Branding — plain text, no pill/box */
.site-branding{
  display:flex;
  align-items:center;
  justify-self:start;
  min-width:0;
}
.appbar .brand,
.appbar a.brand{
  display:inline-block;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  font-weight:800;
  font-size:20px;
  letter-spacing:0.2px;
  color:#fff;
  text-decoration:none;
  line-height:1.2;
  white-space:nowrap;
}
.appbar .brand:hover,
.appbar a.brand:hover{color:var(--brand)}
.custom-logo img{height:36px; width:auto}

/* Main Navigation — centered */
.main-navigation{
  display:none;
  justify-self:center;
  min-width:0;
}
.primary-menu{
  display:flex;
  list-style:none;
  margin:0;
  padding:0;
  gap:6px;
  justify-content:center;
  flex-wrap:nowrap;
  align-items:center;
}
.primary-menu > li{margin:0; flex-shrink:0; position:relative}
.primary-menu a{
  color:rgba(238,242,246,0.88);
  text-decoration:none;
  padding:8px 12px;
  border-radius:6px;
  transition:color 0.2s, background 0.2s;
  font-weight:600;
  font-size:14px;
  white-space:nowrap;
  line-height:1.2;
  background:transparent;
}
.primary-menu .sub-menu{
  display:none !important;
  position:absolute !important;
  top:100%;
  left:0;
  z-index:2000;
  min-width:180px;
  margin:0;
  padding:6px 0;
  list-style:none;
  background:#1c1b1b;
  border:1px solid #2a2d33;
  border-radius:8px;
  box-shadow:0 12px 28px rgba(0,0,0,.4);
  flex-direction:column !important;
  flex-wrap:nowrap !important;
}
.primary-menu > li:hover > .sub-menu{display:block !important}
.primary-menu .sub-menu li{display:block; width:100%; margin:0}
.primary-menu .sub-menu a{
  display:block;
  padding:10px 14px;
  white-space:nowrap;
  border-radius:0;
}
.primary-menu a:hover{color:var(--brand); background:transparent}
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a{
  color:var(--brand);
  background:transparent;
}
.fallback-menu{
  display:flex;
  list-style:none;
  margin:0;
  padding:0;
  gap:6px;
  justify-content:center;
  flex-wrap:nowrap;
}

/* Header Actions — right side (mobile menu only) */
.header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  justify-self:end;
  gap:8px;
  min-height:38px;
}
.spacer{display:none}
.iconbtn{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:var(--chip);
  border:1px solid var(--chip-border);
  cursor:pointer;
  transition:all 0.2s;
  color:var(--text);
}
.iconbtn:hover{background:rgba(245,177,0,.1); color:var(--brand)}

/* Hide search + theme toggle if leftover markup exists */
#btnSearch,
#btnTheme{display:none !important}
.icon{width:20px; height:20px; opacity:.9}

/* Mobile Menu */
.mobile-menu-toggle{display:block}
.mobile-nav-overlay{position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.8); z-index:1000; opacity:0; visibility:hidden; transition:all 0.3s}
.mobile-nav-overlay.active{opacity:1; visibility:visible}
.mobile-nav-content{position:absolute; top:0; right:0; width:280px; height:100%; background:var(--card); padding:52px 20px 20px; transform:translateX(100%); transition:transform 0.3s; box-sizing:border-box}
.mobile-nav-overlay.active .mobile-nav-content{transform:translateX(0)}
.mobile-nav-close{
  position:absolute;
  top:12px;
  right:14px;
  width:36px;
  height:36px;
  border:0;
  background:transparent;
  color:var(--text);
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.mobile-menu{list-style:none; margin:0; padding:0}
.mobile-menu li{margin:0; border-bottom:1px solid var(--chip-border)}
.mobile-menu a{display:block; padding:15px 0; color:var(--text); text-decoration:none; font-weight:500}
.mobile-menu a:hover{color:var(--brand)}

@media (max-width: 599px){
  .appbar-inner{
    grid-template-columns:1fr auto;
    gap:10px;
    padding:12px 16px;
  }
  .main-navigation{display:none !important}
  .header-actions{grid-column:2}
}

/* ====== Page Header ====== */
.container{
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Mobile Container Responsive */
@media (max-width:768px){
  .container{
    padding: 12px 16px;
    width: 95%;
  }
}

@media (max-width:480px){
  .container{
    padding: 10px 12px;
    width: 98%;
  }
}
.welcome{margin-top:8px; font-size:15px; color:var(--muted)}

/* ====== Welcome / Hero Section ====== */
.w4u-welcome-section {
    background-color: #131313 !important;
    background: #131313 !important;
    color: #ffffff;
    text-align: center;
    padding: 30px 20px;
    font-family: sans-serif;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.site-main {
    background-color: #131313;
}
.w4u-welcome-section h1,
.w4u-welcome-section .w4u-hero-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 500;
    margin: 0 0 10px;
    color: #E50914; /* text-yellow-500 */
    line-height: 1.5;
}
.w4u-welcome-section .highlight,
.w4u-welcome-section .w4u-brand-pill {
    color: #E50914;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transform: rotate(2deg);
    display: inline-block;
    margin: 0 0.25rem;
    padding: 0.15em 0.75rem;
    border-radius: 9999px;
    border: 1px solid #E50914;
    z-index: 0;
    text-transform: capitalize;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    line-height: 1.3;
}
.w4u-welcome-section .sub-text,
.w4u-welcome-section .w4u-sub-text {
    color: #e5e7eb; /* dark:text-gray-200 */
    font-size: 15px;
    line-height: 1.5;
    max-width: 42rem;
    margin: 0.5rem auto; /* my-2 + centered */
}
.w4u-welcome-section .notice-box,
.w4u-welcome-section .w4u-notice-box {
    text-align: center;
    color: #60a5fa; /* text-blue-400 */
    border: 1px solid #60a5fa; /* border-blue-400 */
    border-radius: 0.25rem; /* rounded */
    padding: 0.5rem 1rem; /* py-2 px-4 */
    margin: 1rem 1rem; /* my-4 mx-4 */
    max-width: 36rem; /* max-w-xl */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); /* shadow-sm */
    background: transparent;
    display: block;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.45;
}
.w4u-welcome-section .important-tag {
    font-weight: 700;
    color: #60a5fa;
}
@media (min-width: 640px) {
    .w4u-welcome-section h1,
    .w4u-welcome-section .w4u-hero-title {
        font-size: 1.5rem; /* sm:text-2xl */
    }
    .w4u-welcome-section .notice-box,
    .w4u-welcome-section .w4u-notice-box {
        margin-left: auto; /* sm:mx-auto */
        margin-right: auto;
        margin-top: 2rem; /* sm:my-8 */
        margin-bottom: 2rem;
    }
}
@media (max-width: 600px) {
    .w4u-welcome-section {
        padding: 22px 14px;
    }
    .w4u-welcome-section h1,
    .w4u-welcome-section .w4u-hero-title {
        font-size: 1.125rem;
    }
    .w4u-welcome-section .w4u-brand-pill {
        padding: 0.1em 0.6rem;
        margin: 0 0.15rem;
    }
    .w4u-welcome-section .sub-text,
    .w4u-welcome-section .w4u-sub-text {
        font-size: 14px;
        margin: 0.5rem auto;
    }
    .w4u-welcome-section .notice-box,
    .w4u-welcome-section .w4u-notice-box {
        font-size: 13px;
        padding: 0.5rem 1rem;
        margin: 1rem;
    }
}

/* ====== W4U Heading Bar ====== */
.w4u-heading-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e5e7eb; /* dark:text-gray-200 */
    font-size: 1rem; /* text-base */
    font-weight: 400; /* font-normal */
    letter-spacing: 0.025em; /* tracking-wide */
    background-color: #374151; /* dark:bg-night-400 approx */
    padding: 0.5rem 1rem; /* py-2 px-4 */
    margin: 1rem 0.5rem 0.875rem; /* mx-2 */
    border-radius: 0.25rem; /* rounded */
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.4;
}

.w4u-title-section {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.w4u-heading-icon {
    width: 1.15em;
    height: 1.15em;
    margin: 0 0.25rem 0 0; /* mx-1 */
    color: #E50914; /* text-yellow-500 */
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.w4u-title-text {
    color: #e5e7eb;
    font-size: inherit;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.w4u-page-badge {
    color: #E50914; /* text-yellow-500 */
    border: 1px solid #E50914; /* border-yellow-500 */
    padding: 0.25rem 1rem; /* py-1 px-4 */
    border-radius: 0.25rem; /* rounded */
    font-size: 0.875rem; /* text-sm */
    font-weight: 400;
    flex-shrink: 0;
    background: transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); /* shadow-sm */
    line-height: 1.4;
}

@media (min-width: 640px) {
    .w4u-heading-bar {
        font-size: 1.125rem; /* sm:text-lg */
    }
    .w4u-page-badge {
        padding-top: 0; /* sm:py-0 */
        padding-bottom: 0;
        font-size: 1rem; /* sm:text-base */
    }
}

@media (max-width: 480px) {
    .w4u-heading-bar {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        padding: 0.5rem 0.75rem;
    }
    .w4u-page-badge {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Legacy alias — keep old markup working */
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background-color:#374151;
  color:#e5e7eb;
  padding:0.5rem 1rem;
  border-radius:0.25rem;
  margin:1rem 0.5rem 0.875rem;
  gap:12px;
  font-weight:400;
  letter-spacing:0.025em;
}
.section-head .row{
  display:flex;
  align-items:center;
  gap:0.25rem;
}
.section-head .dot{
  background:transparent;
  color:#E50914;
  width:auto;
  height:auto;
  border-radius:0;
  padding:0;
  font-size:1em;
  box-shadow:none;
}
.section-head .dot::before{content:"▶"; color:#E50914}
.section-head .dot svg{display:none}
.section-head strong{
  color:#e5e7eb;
  font-size:inherit;
  font-weight:400;
}
.section-head .btn,
.section-head .page-indicator{
  color:#E50914 !important;
  border:1px solid #E50914 !important;
  background:transparent !important;
  padding:0.25rem 1rem !important;
  border-radius:0.25rem !important;
  font-size:0.875rem !important;
  font-weight:400 !important;
  box-shadow:0 1px 2px rgba(0,0,0,0.08);
}

/* ====== Grid ====== */
.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width:480px){
  .grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width:481px) and (max-width:768px){
  .grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* ====== Card (Worldfree4u-style) ====== */
.card{
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  transition: transform 0.15s ease;
}
.card:hover{transform: translateY(-2px)}
.card-link{display:block; color:inherit; text-decoration:none}

.poster{
  position: relative;
  aspect-ratio: 2 / 3;
  background: #15181e;
  overflow: hidden;
}
.poster img,
.poster .movie-poster-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
.poster-fallback{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #2a303a 0%, #171b22 100%);
  z-index: 0;
}
.poster-fallback__icon{
  width: 42px;
  height: 42px;
  opacity: 0.35;
  color: #8b96a8;
}
.poster-fallback span{display:none}

/* Light-blue diagonal year ribbon — Obsidian override uses crimson */
.ribbon{
  position: absolute;
  top: 12px;
  right: -36px;
  z-index: 3;
  width: 108px;
  padding: 5px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff !important;
  background: #E50914 !important;
  background-image: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transform: rotate(45deg);
  line-height: 1.2;
  pointer-events: none;
}

.poster-mark{
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 8px;
  z-index: 2;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,.85);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body{
  background: #2a2d33;
  padding: 8px 8px 10px;
  text-align: center;
  min-height: 58px;
}
.card .title{
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  font-size: 12px;
  color: #fff;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card .meta{
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: #e8ecf1;
  text-align: center;
  word-break: break-word;
}

.chip{display:inline-flex; align-items:center; gap:8px; padding:6px 10px; font-weight:700; border-radius:999px; border:1px solid var(--chip-border); background:var(--chip); color:var(--text)}

/* ====== Filter Chips ====== */
.filter-chips{margin:20px 0; display:flex; flex-direction:column; gap:12px}
.filter-group{display:flex; flex-wrap:wrap; align-items:center; gap:8px}
.filter-label{font-size:14px; font-weight:600; color:var(--text); margin-right:8px}
.filter-chip{font-size:12px; padding:4px 8px; text-decoration:none; transition:all 0.2s ease}
.filter-chip:hover{background:var(--brand); color:#222; border-color:var(--brand)}
.filter-chip.active{background:var(--brand); color:#222; border-color:var(--brand)}
.filter-chip .count{opacity:0.7; font-size:11px}
.clear-filters{background:#dc2626; border-color:#dc2626; color:#fff}
.clear-filters:hover{background:#b91c1c; border-color:#b91c1c}

/* Archive Header */
.archive-header{margin-bottom:20px}
.archive-description{margin-top:10px; color:var(--muted); font-size:15px; line-height:1.5}

/* ====== Bottom Nav (legacy — Obsidian overrides on mobile) ====== */
.bottom-nav{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:9999;
  background:transparent;
  border-top:0;
  padding:0 14px calc(10px + env(safe-area-inset-bottom, 0px)) 14px;
  display:block;
}

.tabs{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:2px;
}

.tab{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:8px 4px;
  border-radius:16px;
  color:rgba(229,226,225,0.55);
  text-decoration:none;
  transition:all 0.2s ease;
  min-height:48px;
}

.tab:hover{
  background:rgba(229,9,20,.1);
  color:#fff;
}

.tab.active{
  background:rgba(229,9,20,.16);
  color:#fff;
  border:0;
}

.tab .icon{
  width:20px;
  height:20px;
  margin-bottom:2px;
}

.tab .label{
  font-size:10px;
  font-weight:600;
  text-align:center;
  line-height:1.2;
}

/* ====== Single Movie Page ====== */
.w4u-movie-title-bar {
    position: relative;
    color: #e5e7eb; /* dark:text-gray-200 */
    font-size: 1rem; /* text-base */
    font-weight: 400; /* font-normal */
    letter-spacing: 0.025em; /* tracking-wide */
    background-color: #374151; /* dark:bg-night-400 */
    padding: 0.75rem 1rem; /* py-3 px-4 */
    margin: 2rem 0.5rem 1rem; /* mt-8 mx-2 */
    border-radius: 0.25rem; /* rounded */
    box-sizing: border-box;
    line-height: 1.45;
}
.w4u-movie-title-text {
    display: block;
    width: 100%;
    padding-left: 1rem; /* pl-4 */
    box-sizing: border-box;
    word-break: break-word;
}
.w4u-film-icon {
    width: 1.15em;
    height: 1.15em;
    margin: 0 0.25rem 0 0; /* mx-1 */
    color: #E50914; /* text-yellow-500 */
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
}
.w4u-year-badge {
    position: absolute;
    left: -0.5rem; /* -left-2 */
    top: -0.75rem; /* -top-3 */
    padding: 0 0.5rem; /* px-2 py-0 */
    border-radius: 0.25rem;
    color: #fff;
    background-color: #E50914; /* bg-yellow-500 */
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease;
    z-index: 2;
}
.w4u-year-badge:hover {
    transform: scale(0.95);
    color: #fff;
}
@media (min-width: 640px) {
    .w4u-movie-title-bar {
        font-size: 1.125rem; /* sm:text-lg */
        margin-top: 0; /* sm:mt-0 */
    }
}
@media (min-width: 1280px) {
    .w4u-year-badge {
        left: -2rem; /* xl:-left-8 */
        top: 0.75rem; /* xl:top-3 */
    }
}
.light-theme .w4u-movie-title-bar {
    background-color: #e5e7eb;
    color: #6b7280;
}

/* Legacy single movie header */
.movie-header{display:flex; align-items:center; gap:10px; background:var(--card); padding:10px 14px; border-radius:10px; margin-bottom:16px; border:1px solid #222832}
.year-tag{background:var(--brand); color:#111; padding:4px 10px; font-weight:700; border-radius:6px; font-size:14px}
.movie-title{font-weight:700; font-size:16px}

.meta-tags{margin:8px 0; display:flex; flex-wrap:wrap; gap:10px}
.meta-tag{color:var(--brand); font-size:14px; text-decoration:none; padding:4px 8px; border:1px solid var(--brand); border-radius:6px; transition:background-color 0.2s}
.meta-tag:hover{background:rgba(245,177,0,.1)}

.movie-poster{text-align:center; margin:20px 0}
.movie-poster img{margin:0 auto; border-radius:8px; max-width:120px}

/* Mobile poster sizing and sidebar hiding */
@media (max-width: 600px) {
  .movie-poster img{max-width:100px}
  .content-sidebar-wrap{flex-direction:column; gap:20px}
  .movie-sidebar{display:none}
}

/* Tablet - also hide sidebar */
@media (max-width: 920px) {
  .content-sidebar-wrap{flex-direction:column; gap:20px}
  .movie-sidebar{display:none}
}

/* Telegram join button */
.telegram-join-section{text-align:center; margin:20px 0}
.telegram-join-btn{display:inline-flex; align-items:center; gap:8px; background:linear-gradient(135deg,#229ED9,#0088cc); color:white; padding:12px 24px; border-radius:25px; text-decoration:none; font-weight:600; transition:all 0.3s ease; box-shadow:0 4px 15px rgba(34,158,217,0.3)}
.telegram-join-btn:hover{transform:translateY(-2px); box-shadow:0 6px 20px rgba(34,158,217,0.4); color:white}
.telegram-icon{width:20px; height:20px}
@media (max-width: 600px) {
  .telegram-join-btn{padding:10px 20px; font-size:14px}
  .telegram-icon{width:18px; height:18px}
}


/* Movie Share Section */
.movie-share-section {
  margin: 16px 0;
  text-align: center;
}

.single-share-btn {
  background: var(--chip);
  border: 1px solid var(--brand);
  color: var(--brand);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.single-share-btn:hover {
  background: var(--brand);
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245, 177, 0, 0.3);
}

.single-share-btn .icon {
  width: 16px;
  height: 16px;
}

/* ====== Live Search Styles ====== */
.live-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--chip-border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.live-search-results.visible {
  opacity: 1;
  transform: translateY(0);
}

.search-results-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--chip-border);
  background: var(--chip);
}

.results-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.search-results-list {
  max-height: 320px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--chip-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(245,177,0,0.1);
  border-color: var(--brand);
}

.search-result-item:last-child {
  border-bottom: none;
}

.result-thumbnail {
  width: 48px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--chip);
}

.result-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.result-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.result-title mark {
  background: var(--brand);
  color: #111;
  padding: 0 2px;
  border-radius: 2px;
}

.result-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.result-excerpt {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.result-type {
  background: var(--brand);
  color: #111;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.search-results-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--chip-border);
  background: var(--chip);
  text-align: center;
}

.view-all-results {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.2s;
}

.view-all-results:hover {
  color: var(--text);
}

/* Loading State */
.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--chip-border);
  border-top: 2px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* No Results State */
.search-no-results {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
}

.no-results-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.no-results-message {
  font-size: 14px;
  margin-bottom: 16px;
}

.try-full-search {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-block;
}

.try-full-search:hover {
  background: var(--brand);
  color: #111;
}

/* Error State */
.search-error {
  padding: 16px;
  text-align: center;
  color: #dc2626;
  font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .live-search-results {
    border-radius: 0 0 8px 8px;
    max-height: 300px;
  }

  .search-result-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .result-thumbnail {
    width: 40px;
    height: 54px;
  }

  .result-title {
    font-size: 13px;
  }

  .result-meta,
  .result-excerpt {
    font-size: 11px;
  }
}

/* Search Form Container Position */
.search-form-container {
  position: relative;
}

/* Override default search styles for better live search integration */
.search-field:focus {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.search-form:focus-within + .live-search-results {
  border-top: 1px solid var(--brand);
}

/* Enhanced Footer Styles — Obsidian owns .oc-footer; keep legacy fallback only */
.site-footer:not(.oc-footer){background:var(--bg); border-top:1px solid rgba(255,255,255,0.08); margin-top:40px; padding:30px 0}
.footer-content{text-align:center; max-width:1000px; margin:0 auto; padding:0 20px}

.footer-links{display:flex; align-items:center; justify-content:center; gap:15px; margin-bottom:15px; flex-wrap:wrap}
.footer-link{color:var(--brand); text-decoration:none; font-weight:600; transition:color 0.2s; display:flex; align-items:center; gap:5px}
.footer-link:hover{color:#fff; text-decoration:underline}
.footer-icon{font-size:16px}
.footer-divider{color:var(--muted); font-weight:bold}

.footer-report{margin:10px 0; color:var(--muted); font-size:14px; display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap}
.footer-report .footer-link{font-size:14px}

.footer-thanks{margin:15px 0; color:var(--muted); font-size:16px}
.site-name{color:var(--brand); font-weight:600}

.footer-copyright{margin-top:20px; padding-top:20px; border-top:1px solid #222832}
.footer-copyright p{margin:5px 0; color:var(--muted); font-size:13px}
.disclaimer{font-style:italic; opacity:0.8}

@media (max-width: 600px) {
  .site-footer{padding:20px 0; margin-top:20px}
  .footer-links{flex-direction:column; gap:10px}
  .footer-divider{display:none}
  .footer-report{flex-direction:column; gap:5px; text-align:center}
  .footer-copyright p{font-size:12px}
}

/* Theme transition */
.theme-transition {
  transition: background-color 0.3s ease, color 0.3s ease !important;
}

.theme-transition * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Light theme adjustments */
.light-theme {
  background-color: #ffffff;
}

.light-theme .appbar {
  background: rgba(248, 249, 250, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #dee2e6;
}

.light-theme .mobile-nav-overlay {
  background: rgba(248, 249, 250, 0.95);
}

.light-theme .bottom-nav {
  background: rgba(248, 249, 250, 0.95);
  border-top: 1px solid #dee2e6;
}

.light-theme .tab.active {
  color: var(--brand);
}

/* Dark theme specific styles */
.dark-theme .appbar {
  background: transparent;
  background-color: transparent;
  border-bottom: 0;
}

.dark-theme .mobile-nav-overlay {
  background: rgba(26, 29, 35, 0.95);
}

.dark-theme .bottom-nav {
  background: rgba(26, 29, 35, 0.95);
  border-top: 1px solid #222832;
}

.movie-details{margin-top:20px; background:var(--card); padding:12px 16px; border-radius:10px; border:1px solid #222832}
.movie-details div{margin:8px 0}
.highlight{color:var(--brand); font-weight:700}

.movie-content{margin:20px 0; line-height:1.6}

.screenshots{margin:20px 0}
.screenshots img{margin:14px auto; border-radius:8px; max-width:100%}

.download-box{margin:16px 0; padding:12px; border:1px solid var(--brand); border-radius:8px; text-align:center; background:rgba(245,177,0,.05)}
.download-label{margin-bottom:10px; font-weight:600}
.download-size{color:var(--muted); font-weight:normal}
.download-button{padding:10px 20px; border:1px solid var(--brand); background:transparent; color:var(--brand); font-weight:700; border-radius:8px; cursor:pointer; text-decoration:none; display:inline-block; transition:all 0.2s}
.download-button:hover{background:var(--brand); color:#111}
.download-button:disabled{opacity:0.5; cursor:not-allowed}

/* ====== Footer ====== */
.site-footer{text-align:center; margin:30px 0; font-size:14px; color:#bbb}
.site-footer a{color:var(--brand); text-decoration:none}
.site-footer a:hover{text-decoration:underline}

/* ====== Breadcrumbs ====== */
.breadcrumbs{margin:10px 0; font-size:14px; color:var(--muted)}
.breadcrumbs a{color:var(--brand); text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}
.breadcrumbs .separator{margin:0 8px}

/* ====== Pagination ====== */
.pagination-container{display:flex; gap:10px; align-items:center; justify-content:center; margin:24px 0}
.pagination-nav{cursor:pointer; text-decoration:none; transition:all 0.2s}
.pagination-nav:hover:not(:disabled){background:rgba(245,177,0,.1)}
.pagination-nav:disabled{opacity:0.5; cursor:not-allowed}
.current-page{background:var(--brand); color:#111; font-weight:800}

/* ====== Filter Chips ====== */
.filter-chips{margin:20px 0; display:flex; flex-wrap:wrap; gap:10px; align-items:center}
.filter-group{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-right:20px}
.filter-label{font-size:14px; color:var(--muted); margin-right:8px}
.filter-chip{font-size:12px; padding:4px 8px; text-decoration:none; transition:all 0.2s}
.filter-chip:hover{background:rgba(245,177,0,.1)}
.filter-chip.active{background:var(--brand); color:#111}
.clear-filters{background:rgba(255,255,255,.1); color:var(--text)}

/* ====== Search ====== */
.search-form-container{margin:20px 0}
.search-form{display:flex; max-width:500px; margin:0 auto}
.search-field{flex:1; padding:10px 16px; border:1px solid var(--chip-border); border-radius:10px 0 0 10px; background:var(--chip); color:var(--text); font-size:16px}
.search-field::placeholder{color:var(--muted)}
.search-submit{padding:10px 16px; border:1px solid var(--brand); border-left:none; border-radius:0 10px 10px 0; background:var(--brand); color:#111; cursor:pointer; transition:all 0.2s}
.search-submit:hover{background:#e6a000}

.search-results .search-result-item{background:var(--card); border:1px solid #222832; border-radius:var(--radius-2); padding:16px; margin-bottom:16px}
.result-title a{color:var(--brand); font-weight:700; text-decoration:none}
.result-title a:hover{text-decoration:underline}
.result-meta{color:var(--muted); font-size:14px; margin:8px 0}
.result-excerpt{margin-top:10px; line-height:1.5}

.search-suggestions{margin-top:30px; text-align:center}
.search-suggestions h3{color:var(--brand); margin-bottom:16px}
.suggestion-grid{display:flex; flex-wrap:wrap; gap:10px; justify-content:center}
.suggestion-item{padding:6px 12px; border:1px solid var(--chip-border); border-radius:20px; background:var(--chip); color:var(--text); text-decoration:none; font-size:14px; transition:all 0.2s}
.suggestion-item:hover{background:rgba(245,177,0,.1)}

/* ====== Archive Header ====== */
.archive-header{margin-bottom:20px}
.archive-description{margin-top:10px; color:var(--muted); font-style:italic}

/* ====== No Results ====== */
.no-results{text-align:center; padding:40px 20px; background:var(--card); border:1px solid #222832; border-radius:var(--radius-2); margin:20px 0}
.no-results h2{color:var(--brand); margin-bottom:16px}
.no-results p{color:var(--muted); margin-bottom:20px}
.no-results .btn{padding:10px 20px; background:var(--brand); color:#111; border-radius:8px; text-decoration:none; font-weight:700; display:inline-block; transition:all 0.2s}
.no-results .btn:hover{background:#e6a000}

/* ====== Comments ====== */
.comments-section{margin-top:40px; padding-top:20px; border-top:1px solid #222832}

/* ====== Related Movies ====== */
.related-movies{margin-top:20px}

/* ====== "Add to Home" toast — bottom snackbar ====== */
.toast{
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: calc(16px + var(--safe-bottom, 0px));
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  margin: 0;
  padding: 0;
  display: none;
  z-index: 100000;
  pointer-events: none;
}
.toast.show{
  display: block;
  pointer-events: auto;
  animation: cinevoToastIn 0.25s ease-out;
}
@media (max-width: 767px){
  .toast{
    bottom: calc(88px + var(--safe-bottom, 0px)); /* above bottom nav */
  }
}
.toast .inner{
  background: #101318;
  border: 1px solid #2b3442;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  border-radius: 999px;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.toast .inner span{
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.toast .inner .ok{
  flex-shrink: 0;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ff9900;
  color: #111;
  font-weight: 800;
  border: none;
  cursor: pointer;
  font-size: 12px;
}
@keyframes cinevoToastIn{
  from{ opacity: 0; transform: translateX(-50%) translateY(12px); }
  to{ opacity: 1; transform: translateX(-50%) translateY(0); }
}

.muted{color:var(--muted)}
.row{display:flex; align-items:center; gap:10px}

/* ====== Tablet & Desktop ====== */
@media (min-width: 600px){
  .container{width:90%; max-width:1100px; padding:18px 20px}
  .grid{grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; max-width:1100px}
  .card .title{font-size:12.5px}
  .card .meta{font-size:11px}

  /* Show centered navigation on tablet+ */
  .main-navigation{display:block}
  .mobile-menu-toggle{display:none}
}

@media (min-width: 920px){
  .appbar .brand,
  .appbar a.brand{font-size:22px; padding:0; border:0; background:transparent}
  .welcome{font-size:16px}
  .w4u-welcome-section{padding:32px 20px}
  .w4u-welcome-section h1,
  .w4u-welcome-section .w4u-hero-title{font-size:1.5rem}
  .container{padding:20px 24px; max-width:1100px; width:92%; overflow-x:hidden}
  .grid{grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px; width:100%; max-width:1100px; margin:0 auto}
  .bottom-nav{display:none}
  .card .title{font-size:12.5px}
  .movie-header{font-size:18px}
  .movie-title{font-size:18px}
  .primary-menu a{font-size:14px; padding:8px 14px}
}

/* Large Desktop - 5 columns (reference layout) */
@media (min-width: 1100px){
  .grid{grid-template-columns:repeat(5, minmax(0, 1fr)); gap:16px; margin:0 auto}
  .container{max-width:1100px; width:92%; padding:20px 24px}
  .card-body{padding:8px 7px 10px; min-height:62px}
  .card .title{font-size:12px}
  .card .meta{font-size:10.5px}

  /* Desktop navigation */
  .main-navigation{display:block}
  .mobile-menu-toggle{display:none}
  .header-actions{gap:12px}
}

/* ====== Mobile Responsive Layout ====== */
@media (max-width: 768px){
  .content-sidebar-wrap{flex-direction:column; gap:20px}
  .movie-sidebar{width:100%; order:-1}

  .movie-footer-info{grid-template-columns:1fr}

  /* Mobile sidebar adjustments */
  .movie-sidebar .widget{padding:15px; margin-bottom:20px}
  .related-movie-item, .latest-movie-item{flex-direction:column; text-align:center}
  .related-movie-thumb{width:60px; height:80px; margin:0 auto}
}

/* ====== Touch micro-interactions ====== */
@media (hover: none) and (pointer: coarse) {
  .card:active{transform:translateY(-2px) scale(1.01)}
}

/* ====== Theme Toggle States ====== */
body.light-theme {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0d1116;
  --muted: #4b5563;
  --chip: #f1f3f5;
  --chip-border: #d1d5db;
}

/* Light theme specific fixes */
.light-theme .title {
  color: #0d1116 !important;
}

.light-theme .w4u-heading-bar,
.light-theme .section-head {
  background-color: #e5e7eb; /* bg-gray-200 */
  color: #6b7280; /* text-gray-500 */
}
.light-theme .w4u-title-text,
.light-theme .section-head strong {
  color: #6b7280;
}

.light-theme .card-body {
  background: #e8eaed;
  color: #0d1116;
}
.light-theme .card .title,
.light-theme .card .meta {
  color: #0d1116;
}

/* ====== Content Sidebar Layout ====== */
.content-sidebar-wrap{display:flex; gap:30px; align-items:flex-start}
.main-content{flex:1; min-width:0}
.movie-sidebar{width:300px; flex-shrink:0}

/* ====== Movie Keywords ====== */
.movie-keywords{margin:30px 0; padding:20px; background:var(--card); border-radius:var(--radius-2); border:1px solid #222832}
.movie-keywords h3{color:var(--brand); margin:0 0 15px 0; font-size:18px}
.keywords-list{display:flex; flex-wrap:wrap; gap:8px}
.keyword-tag{padding:4px 8px; background:var(--chip); border:1px solid var(--chip-border); border-radius:16px; font-size:12px; color:var(--muted)}

/* ====== Movie Footer Info ====== */
.movie-footer-info{margin:40px 0; display:grid; gap:25px}
.footer-section{padding:20px; background:var(--card); border-radius:var(--radius-2); border:1px solid #222832}
.footer-section h3{color:var(--brand); margin:0 0 10px 0; font-size:16px}
.footer-section p{margin:0 0 15px 0; color:var(--muted); line-height:1.6}
.info-link{display:inline-flex; align-items:center; gap:8px; padding:8px 12px; background:var(--chip); border:1px solid var(--brand); border-radius:8px; color:var(--brand); text-decoration:none; font-weight:600; transition:all 0.2s}
.info-link:hover{background:var(--brand); color:#111}
.thank-you{text-align:center}
.thank-you h3{color:var(--brand)}

/* ====== Sidebar Widgets ====== */
.movie-sidebar .widget{background:var(--card); border:1px solid #222832; border-radius:var(--radius-2); padding:20px; margin-bottom:25px}
.widget-title{color:var(--brand); margin:0 0 15px 0; font-size:16px; font-weight:700}

/* Movie Quick Info */
.movie-quick-info{display:flex; flex-direction:column; gap:12px}
.info-item{display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid var(--chip-border)}
.info-item:last-child{border-bottom:none}
.info-label{font-size:14px; color:var(--muted); font-weight:600}
.info-value{font-size:14px; font-weight:700}
.info-value.rating{color:var(--brand)}
.genre-tags{display:flex; flex-wrap:wrap; gap:4px}
.genre-tag{padding:2px 6px; background:var(--chip); border-radius:12px; font-size:11px; color:var(--brand); text-decoration:none}
.genre-tag:hover{background:var(--brand); color:#111}

/* Related Movies Sidebar */
.related-movies-sidebar, .latest-movies-sidebar{display:flex; flex-direction:column; gap:12px}
.related-movie-item, .latest-movie-item{display:flex; gap:10px; padding:8px; background:var(--chip); border-radius:8px; transition:all 0.2s}
.related-movie-item:hover, .latest-movie-item:hover{background:rgba(245,177,0,.1)}
.related-movie-thumb{width:50px; height:66px; flex-shrink:0; border-radius:4px; overflow:hidden}
.related-movie-thumb img{width:100%; height:100%; object-fit:cover}
.related-movie-info, .latest-movie-info{flex:1}
.related-movie-title, .latest-movie-title{font-size:13px; font-weight:600; line-height:1.3; margin-bottom:4px}
.related-movie-year, .latest-movie-year{font-size:11px; color:var(--brand); font-weight:700}
.related-movie-link, .latest-movie-link{color:inherit; text-decoration:none}

/* ====== Screen Reader ====== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ====== Share System ====== */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--chip);
  border: 1px solid var(--chip-border);
  border-radius: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.share-btn:hover {
  background: rgba(245, 177, 0, 0.1);
  color: var(--brand);
  border-color: var(--brand);
}

.share-btn .icon {
  width: 14px;
  height: 14px;
}

.single-share-btn {
  margin-left: auto;
  margin-top: 0;
}

/* Share Popover */
.share-popover {
  position: fixed;
  z-index: 9999;
  animation: sharePopoverIn 0.2s ease-out;
}

.share-popover-content {
  background: var(--card);
  border: 1px solid var(--chip-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  min-width: 280px;
}

.share-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--chip);
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.share-option:hover {
  background: rgba(245, 177, 0, 0.1);
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

.share-option .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.share-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: var(--chip);
  color: var(--muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.share-close:hover {
  background: var(--brand);
  color: #111;
}

/* Share Toast */
.share-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 25px;
  border: 1px solid var(--brand);
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes sharePopoverIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .share-popover-content {
    min-width: 260px;
    padding: 14px;
  }

  .share-options {
    grid-template-columns: 1fr;
  }

  .share-option {
    justify-content: center;
  }
}

/* ====== Desktop Responsive ====== */
@media (min-width: 920px) {
  body {
    padding-bottom: 0;
  }
  .bottom-nav {
    display: none;
  }
}

/* ====== Global Overflow Prevention ====== */
/* Ensure no element can cause horizontal scrolling */
*,*::before,*::after{
  max-width:100% !important;
  word-wrap:break-word;
  overflow-wrap:break-word;
}

/* Specific overflow fixes for common elements */
pre,code,iframe,embed,object,video{max-width:100% !important; overflow:hidden}
table{width:100%; table-layout:fixed}
td,th{word-break:break-word}