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

body {
  background-color: #0f1014;
  color: #e5e5e5;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
}

a {
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
}

ul, li {
  list-style: none;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  padding: 0 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background 0.4s ease, backdrop-filter 0.4s;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.header.scrolled {
  background-color: rgba(15, 16, 20, 0.98);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #E50914 0%, #ff5f6d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 2px 5px 2px 15px;
  transition: 0.3s;
}

.search-box:focus-within {
  background: rgba(0, 0, 0, 0.8);
  border-color: #E50914;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  width: 150px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-box button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 5px 10px;
}

#install-btn{
  background:#E50914;
  color:#fff;
  border:none;
  padding:5px 15px;
  border-radius:50px;
  cursor:pointer;
  font-size:12px;
  font-weight:bold;
}

.hero {
  position: relative;
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 4% 80px 4%;
  background-size: cover;
  background-position: center top;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(15,16,20,0.2) 0%, rgba(15,16,20,0) 40%, rgba(15,16,20,1) 100%);
  z-index: 1;
}

.hero-info {
  position: relative;
  z-index: 10;
  max-width: 650px;
  width: 100%;
}

.hero-info h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-btn {
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  background: #E50914;
  color: #fff;
  cursor: pointer;
}

.main-content {
  position: relative;
  z-index: 20;
  padding: 0 4%;
  width: 100%;
  margin-top: -50px;
}

.label-group {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 40px;
}

.label {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  border-left: 4px solid #E50914;
  padding-left: 12px;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  width: 100%;
}

.grid-card {
  aspect-ratio: 2/3;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: #1f2024;
  transition: transform 0.3s ease;
}

.grid-card:hover {
  transform: translateY(-5px);
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 10px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,1) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: #eee;
  line-height: 1.3;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

.modal-content {
  margin: 30px auto;
  width: 95%;
  max-width: 1000px;
  position: relative;
  padding-bottom: 50px;
}

.close-modal {
  position: fixed;
  right: 25px;
  top: 15px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  transition: 0.3s;
}

.close-modal:hover {
  color: #E50914;
  transform: scale(1.2);
}

.video-container {
  position: relative;
  padding-bottom: 56.8%;
  height: 0;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  width: 100%;
  margin-bottom: 20px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  z-index: 5;
}

.ep-btn {
  display: block;
  background: #25262c;
  color: #ccc;
  padding: 10px 0;
  text-align: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #333;
  transition: 0.3s;
}

.ep-btn:hover {
  background: #E50914;
  color: #fff;
  border-color: #E50914;
}

body.modal-open {
  overflow: hidden;
}

.movie-info-box {
  display: grid;
  grid-template-columns: 180px 1fr 300px;
  gap: 20px;
  padding: 20px 0;
}

.info-right {
    background: #16171b;
    padding: 15px;
    border-radius: 8px;
}

.episode-label {
    color: #E50914;
    margin-bottom: 10px;
    font-weight: bold;
}

#api-eps-dynamic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.synopsis-area {
    background: #16171b;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.synopsis-title {
    color: #fff;
    margin-bottom: 10px;
    border-left: 3px solid #E50914;
    padding-left: 10px;
}

.synopsis-text {
    color: #ccc;
}

.meta-eps-count {
    color: #888;
}

.ep-btn.active {
    background: #E50914;
    color: #fff;
    border-color: #E50914;
}

@media (max-width: 768px) {
.hero { height: 60vh; }
.hero-info h1 { font-size: 2rem; }
  .grid-layout { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .logo { font-size: 18px; }
  .search-box input { width: 100px; font-size: 12px; }
  .main-content { margin-top: 20px; }

  .movie-info-box {
    display: flex;
    flex-direction: column;
  }

  .video-container{padding-bottom: 100%;}
  
  .info-right {
    order: 1;
    width: 100%;
    margin-bottom: 20px;
  }

  .info-left {
    order: 2;
    width: 140px;
    margin: 0 auto 15px auto;
  }

  .info-center {
    order: 3;
    width: 100%;
    text-align: center;
  }
 
  .info-center h2 { font-size: 1.2rem; }

  .synopsis-area {
    margin-top: 20px;
  }
 
  #api-eps-dynamic {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

.tabs-container {
    display: flex;
    gap: 12px;
    margin: 30px 0 20px 0;
    padding: 0 4%;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-btn {
    background: #1f2024;
    color: #ccc;
    border: 1px solid #333;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #E50914;
    border-color: #E50914;
    color: #fff;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.horizontal-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0 30px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    margin: 0 4%;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #E50914;
}

.slider-layout {
    display: flex;
    gap: 18px;
    padding: 0 4%;
}

.slider-layout .grid-card {
    width: 170px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 12px;
    background: #1f2024;
}

@media (max-width: 768px) {
    .slider-layout .grid-card {
        width: 130px;
    }
    .tabs-container { margin-top: 15px; }
}

.search-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f1014;
    z-index: 900;
    padding: 20px 4%;
    overflow-y: auto;
}

.search-header-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.close-search {
    font-size: 30px;
    cursor: pointer;
    color: #888;
}

.close-search:hover { color: #E50914; }

.ep-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(229, 9, 20, 0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.fav-btn {
    margin-top: 15px;
    background: transparent;
    border: 1px solid #E50914;
    color: #E50914;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: 0.3s;
    display: inline-block;
}

.fav-btn:hover {
    background: rgba(229, 9, 20, 0.1);
}

.fav-btn.active {
    background: #E50914;
    color: #fff;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}

@media (max-width: 768px) {
    .fav-btn {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}
