*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:auto;
  overflow-anchor:none;
}

body{
  background:
    radial-gradient(circle at top,#1c1c1c 0%,#0f0f0f 45%),
    #0f0f0f;
  color:#fff;
  font-family:Arial,sans-serif;
  overflow-x:hidden;
  overflow-anchor:none;
}

body.sidebar-open{
  overflow:hidden;
}

.topbar{
  position:sticky;
  top:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  background:rgba(10,10,10,.76);
  backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 30px rgba(0,0,0,.22);
  flex-wrap:nowrap;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  text-decoration:none;
  color:#fff;
  flex:0 0 auto;
}

.brand-logo{
  width:46px;
  height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#ff004c,#ff8a00);
  box-shadow:0 10px 25px rgba(255,0,76,.25);
  flex:0 0 auto;
  font-size:22px;
  font-weight:900;
}

.brand-text{
  min-width:0;
}

.brand-text h1{
  font-size:18px;
  line-height:1.2;
  margin:0;
  font-weight:900;
  letter-spacing:.4px;
  background:linear-gradient(90deg,#fff,#d0d0d0);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  text-align:left;
}

.brand-text p{
  font-size:12px;
  color:#a8a8a8;
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.topbar-center{
  flex:1;
  display:flex;
  justify-content:center;
  min-width:0;
}

.search-wrap{
  width:min(560px,100%);
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:10px 12px;
  box-shadow:0 8px 24px rgba(0,0,0,.14);
  min-width:0;
}

.search-icon{
  width:18px;
  height:18px;
  flex:0 0 auto;
  opacity:.9;
}

.search-input{
  width:100%;
  min-width:0;
  border:none;
  outline:none;
  background:transparent;
  color:#fff;
  font-size:14px;
}

.search-input::placeholder{
  color:#b8b8b8;
}

.search-clear{
  border:none;
  outline:none;
  background:rgba(255,255,255,.08);
  color:#fff;
  width:30px;
  height:30px;
  border-radius:10px;
  cursor:pointer;
  flex:0 0 auto;
  font-size:18px;
  line-height:1;
  display:none;
}

.search-clear.show{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.menu-btn{
  width:46px;
  height:46px;
  border:none;
  outline:none;
  border-radius:14px;
  background:rgba(255,255,255,.08);
  color:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:.25s ease;
  flex:0 0 auto;
}

.menu-btn:hover{
  background:rgba(255,255,255,.14);
  transform:translateY(-1px);
}

.menu-btn.active{
  background:rgba(255,255,255,.18);
  box-shadow:0 0 0 2px rgba(255,255,255,.12) inset;
}

.menu-lines{
  width:20px;
  height:14px;
  position:relative;
}

.menu-lines span{
  position:absolute;
  left:0;
  width:100%;
  height:2px;
  background:#fff;
  border-radius:2px;
  transition:.25s ease;
}

.menu-lines span:nth-child(1){ top:0; }
.menu-lines span:nth-child(2){ top:6px; }
.menu-lines span:nth-child(3){ bottom:0; }

.search-btn svg{
  display:block;
}

@media (max-width: 860px){
  .topbar{
    flex-wrap:wrap;
  }

  .brand{
    order:1;
    flex:1 1 auto;
    min-width:0;
  }

  .topbar-actions{
    order:2;
    margin-left:auto;
  }

  .topbar-center{
    order:3;
    width:100%;
    flex:0 0 100%;
    margin-top:10px;
  }

  .search-wrap{
    width:100%;
  }
}

@media (max-width: 768px){
  .topbar{
    padding:12px 12px;
    gap:10px;
  }

  .brand-text h1{
    font-size:16px;
  }

  .brand-text p{
    font-size:11px;
  }
}

@media (max-width: 480px){
  .brand-logo{
    width:40px;
    height:40px;
    border-radius:12px;
    font-size:18px;
  }

  .menu-btn{
    width:42px;
    height:42px;
    border-radius:12px;
  }

  .search-wrap{
    padding:9px 10px;
    border-radius:14px;
  }

  .search-input{
    font-size:13px;
  }
}

.sidebar-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.62);
  opacity:0;
  visibility:hidden;
  transition:.25s ease;
  z-index:12000;
}

.sidebar-overlay.active{
  opacity:1;
  visibility:visible;
}

.sidebar{
  position:fixed;
  top:0;
  left:0;
  width:min(320px,88vw);
  height:100vh;
  background:linear-gradient(180deg,rgba(24,24,24,.98),rgba(13,13,13,.98));
  border-right:1px solid rgba(255,255,255,.08);
  box-shadow:20px 0 50px rgba(0,0,0,.45);
  transform:translateX(-100%);
  transition:.28s ease;
  z-index:13000;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

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

.sidebar-header{
  padding:18px 18px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg,rgba(255,255,255,.04),transparent);
}

.sidebar-profile{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.sidebar-avatar{
  width:46px;
  height:46px;
  border-radius:14px;
  background:linear-gradient(135deg,#ff004c,#ff8a00);
  display:grid;
  place-items:center;
  font-size:20px;
  font-weight:900;
  box-shadow:0 10px 25px rgba(255,0,76,.25);
  flex:0 0 auto;
}

.sidebar-profile h2{
  font-size:17px;
  line-height:1.2;
  margin:0;
}

.sidebar-profile p{
  font-size:12px;
  color:#a8a8a8;
  margin-top:3px;
}

.sidebar-close{
  width:40px;
  height:40px;
  border:none;
  outline:none;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:24px;
  cursor:pointer;
}

.sidebar-content{
  padding:16px 12px 20px;
  overflow:auto;
}

.sidebar-section{
  margin-bottom:18px;
}

.sidebar-section-title{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1.4px;
  color:#8e8e8e;
  margin:0 10px 10px;
}

.sidebar-link{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:13px 14px;
  border-radius:14px;
  color:#f3f3f3;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  background:transparent;
  transition:.22s ease;
  border:1px solid transparent;
}

.sidebar-link:hover{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.07);
  transform:translateX(4px);
}

.sidebar-link .icon{
  width:28px;
  height:28px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.08);
  flex:0 0 auto;
}

.sidebar-note{
  margin:6px 10px 0;
  font-size:13px;
  color:#b8b8b8;
  line-height:1.55;
}

.app{
  padding:16px;
}

.hero{
  max-width:1400px;
  margin:0 auto 18px;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 10px 30px rgba(0,0,0,.18);
}

.hero h2{
  font-size:30px;
  line-height:1.25;
  margin-bottom:8px;
}

.hero p{
  color:#b8b8b8;
  font-size:14px;
  line-height:1.7;
  max-width:760px;
}

#pageBadge{
  position:sticky;
  top:78px;
  z-index:999;
  width:fit-content;
  margin-left:auto;
  margin-right:auto;
  margin-bottom:14px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
  font-size:13px;
  font-weight:700;
  color:#fff;
  display:none;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
}

.page-title{
  text-align:center;
  font-size:34px;
  font-weight:800;
  margin-bottom:28px;
  letter-spacing:.5px;
  background:linear-gradient(90deg,#fff,#bbb);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:18px;
  align-items:start;
  max-width:1400px;
  margin:0 auto;
}

@media(max-width:1300px){
  .grid{
    grid-template-columns:repeat(5,1fr);
  }
}

@media(max-width:1050px){
  .grid{
    grid-template-columns:repeat(4,1fr);
  }
}

@media(max-width:768px){
  .grid{
    grid-template-columns:repeat(3,1fr);
    gap:10px;
  }

  .hero h2{
    font-size:24px;
  }

  .page-title{
    font-size:28px;
  }
}

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

  .hero{
    padding:14px;
    border-radius:18px;
  }

  .hero p{
    font-size:13px;
  }
}

.card{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(28,28,28,.96),rgba(16,16,16,.98));
  border:1px solid rgba(255,255,255,.05);
  transition:.35s ease;
  cursor:pointer;
  isolation:isolate;
  box-shadow:0 8px 25px rgba(0,0,0,.35);
  will-change:transform;
  text-decoration:none;
  color:inherit;
  display:block;
}

.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:26px;
  background:linear-gradient(135deg,rgba(255,0,102,.3),rgba(0,195,255,.25),rgba(0,255,170,.15),rgba(255,174,0,.25));
  background-size:300% 300%;
  animation:borderMove 7s linear infinite;
  opacity:0;
  z-index:-2;
  transition:.35s ease;
}

.card:hover::before{
  opacity:1;
}

@keyframes borderMove{
  0%{ background-position:0% 50%; }
  100%{ background-position:300% 50%; }
}

.card:hover{
  transform:scale(1.02);
  box-shadow:0 20px 45px rgba(0,0,0,.55),0 0 20px rgba(255,0,102,.15);
}

.poster-wrap{
  position:relative;
  width:100%;
  aspect-ratio:2/3;
  overflow:hidden;
  background:#1b1b1b;
}

.poster{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .8s ease, filter .4s ease;
}

.card:hover .poster{
  transform:scale(1.1);
  filter:brightness(1.08);
}

.poster-wrap::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:35%;
  background:linear-gradient(to top,rgba(0,0,0,.9),transparent);
  pointer-events:none;
}

.content{
  position:relative;
  padding:12px;
  z-index:2;
}

.title{
  font-size:14px;
  font-weight:800;
  line-height:1.45;
  overflow:visible;
  white-space:normal;
  word-break:break-word;
  transition:.3s ease;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
  margin-bottom:10px;
}

.card:nth-child(6n+1) .title{ color:#ffbe76; }
.card:nth-child(6n+2) .title{ color:#d6a2ff; }
.card:nth-child(6n+3) .title{ color:#79dfff; }
.card:nth-child(6n+4) .title{ color:#72f1b8; }
.card:nth-child(6n+5) .title{ color:#ffe06b; }
.card:nth-child(6n+6) .title{ color:#ff9e9e; }

.card:hover .title{
  transform:translateX(5px);
}

.labels{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:6px;
  width:100%;
}

.label{
  display:inline-block;
  flex:0 0 auto;
  width:auto;
  max-width:100%;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(8px);
  color:#f1f1f1;
  font-size:10px;
  font-weight:600;
  padding:5px 9px;
  border-radius:40px;
  transition:.3s ease;
  white-space:nowrap;
}

.label:hover{
  background:rgba(255,255,255,.16);
}

.pagination{
  margin:40px auto 0;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  max-width:1400px;
  padding-bottom:12px;
}

.nav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border:none;
  outline:none;
  background:linear-gradient(135deg,#ff004c,#ff5e00);
  color:#fff;
  padding:12px 20px;
  border-radius:14px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:.3s ease;
  box-shadow:0 10px 20px rgba(255,0,76,.2);
  min-width:88px;
}

.nav-btn:hover{
  transform:translateY(-3px) scale(1.03);
  box-shadow:0 14px 30px rgba(255,0,76,.35);
}

.nav-btn.disabled{
  opacity:.45;
  pointer-events:none;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

#pageNum{
  font-size:16px;
  font-weight:700;
  color:#ddd;
}

#detailView{
  display:none;
  max-width:1000px;
  margin:0 auto;
  background:linear-gradient(180deg,#1c1c1c,#131313);
  border:1px solid rgba(255,255,255,.06);
  border-radius:24px;
  padding:22px;
  box-shadow:0 15px 40px rgba(0,0,0,.45);
  overflow-anchor:none;
}

.detail-title{
  margin-bottom:20px;
  font-size:32px;
  line-height:1.5;
}

.detail-body{
  line-height:1.8;
  color:#eaeaea;
}

.detail-body img{
  max-width:100%;
  height:auto;
  border-radius:14px;
}

.detail-body iframe,
.detail-body video{
  max-width:100%;
}

#relatedPostsSection{
  margin-top:40px;
  min-height:520px;
  overflow-anchor:none;
}

#relatedPostsSection h2{
  margin-bottom:20px;
  font-size:28px;
  font-weight:800;
  color:#fff;
}

#relatedPosts{
  align-items:start;
}

#relatedPosts .card:hover{
  transform:none;
  box-shadow:0 8px 25px rgba(0,0,0,.35);
}

#relatedPosts .card:hover .poster{
  transform:none;
  filter:brightness(1.02);
}

#relatedPosts .card:hover .title{
  transform:none;
}

.loading{
  grid-column:1/-1;
  text-align:center;
  padding:80px 20px;
  font-size:18px;
  color:#ddd;
}

.search-status{
  max-width:1400px;
  margin:0 auto 14px;
  color:#cfcfcf;
  font-size:14px;
  display:none;
}

::-webkit-scrollbar{
  width:8px;
}

::-webkit-scrollbar-track{
  background:#111;
}

::-webkit-scrollbar-thumb{
  background:#333;
  border-radius:30px;
}

.video-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 35vh;
  gap: 20px;
}

.video-wrapper {
  width: 100%;
  max-width: 600px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
}

.video-poster {
  position: absolute;
  inset: 0;
  background-color: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.video-player {
  width: 100%;
  height: 100%;
  border: 0;
  position: relative;
  z-index: 2;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  cursor: pointer;
}

.play-button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #111;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.video-overlay:hover .play-button {
  transform: scale(1.08);
}

.tmdb-extra-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
  margin-bottom: 10px;
}

.tmdb-extra-images img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  background: #e9e9e9;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.tmdb-extra-images img:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.tmdb-extra-images img:active {
  transform: scale(0.98);
}

@media (max-width: 900px) {
  .tmdb-extra-images {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .tmdb-extra-images {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tmdb-extra-images img {
    border-radius: 10px;
  }
}

.tmdb-image-popup{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 999999;
  overflow: hidden;
}

.tmdb-image-popup.active{
  opacity: 1;
  visibility: visible;
}

.tmdb-image-popup img{
  max-width: 95%;
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.2s ease;
}

.tmdb-close{
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 42px;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  font-weight: bold;
}

.tmdb-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  z-index: 10;
}

.tmdb-prev{
  left: 18px;
}

.tmdb-next{
  right: 18px;
}

.tmdb-nav:hover{
  background: rgba(255,255,255,0.25);
}

@media (max-width:600px){
  .tmdb-nav{
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .tmdb-prev{
    left: 10px;
  }

  .tmdb-next{
    right: 10px;
  }
}

.button-container{
  text-align:center;
  margin-top:50px;
}

.button-link{
  background:#ff2e44;
  color:#fff;
  padding:12px 25px;
  border-radius:6px;
  font-size:16px;
  display:block;
  cursor:pointer;
  transition:background .3s;
  user-select:none;
  margin:10px auto;
  width:200px;
  text-align:center;
}

.button-link:hover{
  background:#e62438;
}

.blue-button {
  background-color: #e50914;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.blue-button:hover {
  background-color: #e50914;
  transform: scale(1.05);
}

.blue-button:active {
  background-color: #e50914;
  transform: scale(1);
}
 
.clickable-label{
  cursor:pointer;
  transition:.2s;
}
.clickable-label:hover{
  opacity:.8;
  transform:scale(1.05);
}
.label-link{
  text-decoration:none;
  color:inherit;
}

.language-cloud{
  width:100%;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:center;
  align-items:center;
  padding:18px 14px;
  margin:10px auto 0;
  max-width:1200px;
  box-sizing:border-box;
}

.lang-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:inherit;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  padding:10px 18px;
  border-radius:999px;
  font-size:14px;
  font-weight:600;
  transition:transform .2s ease, opacity .2s ease, background .2s ease;
  box-shadow:0 6px 20px rgba(0,0,0,.08);
  backdrop-filter:blur(8px);
}

.lang-chip:hover{
  opacity:.9;
  transform:translateY(-2px);
  background:rgba(255,255,255,.14);
}
