/* === RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #222;
}

/* === IKLAN HEADER === */
.ad-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.ad-container {
  text-align: center;
  margin: 0 auto;
}

/* === NAVBAR === */
.navbar {
  background-color: #222;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar .logo {
  font-size: 1.2rem;
  font-weight: 600;
}

.navbar nav a {
  color: #ddd;
  text-decoration: none;
  margin-left: 16px;
  transition: 0.3s;
}

.navbar nav a:hover,
.navbar nav a.active {
  color: #00bcd4;
}

/* === SEARCH SECTION === */
.search-section {
  background: #fff;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid #ddd;
}

.search-section input {
  padding: 10px;
  border: 1px solid #bbb;
  border-radius: 8px;
  outline: none;
  width: 100%;
}

/* === NAV BUTTONS === */
.nav-buttons {
  display: flex;
  gap: 10px;
}

.nav-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background-color: #eee;
  font-weight: 500;
  transition: 0.3s;
}

.nav-btn.active {
  background-color: #0090cc;
  color: white;
}

.nav-btn:hover {
  background-color: #00bcd4;
  color: white;
}

/* === FILM SECTION === */
.film-section {
  padding: 20px;
}

.film-section h2 {
  margin-bottom: 15px;
  font-size: 1.3rem;
}

/* === FILM CONTAINER === */
.film-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

/* === FILM CARD === */
.film-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.film-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-container {
  width: 100%;
  position: relative;
  padding-top: 177.78%; /* 9:16 Aspect Ratio (9/16 = 0.5625, 1/0.5625 = 1.7778) */
  overflow: hidden;
}

.thumbnail-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.film-card:hover .thumbnail-container img {
  transform: scale(1.05);
}

/* === EPISODE BADGE === */
.episode-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.film-card h4 {
  padding: 8px 4px;
  font-size: 0.75rem;
  color: #333;
  line-height: 1.2;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #0090cc;
  background-color: white;
  color: #0090cc;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #0090cc;
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.85rem;
  color: #666;
}

/* === FOOTER === */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 15px 0;
  margin-top: 20px;
  font-size: 0.85rem;
}

/* === RESPONSIVE DESIGN === */
/* Tambahkan di bagian responsive style.css */

/* Untuk halaman spoiler */
body.spoiler-page {
  background: #000;
}

/* Sembunyikan footer di halaman spoiler */
body:has(.spoiler-feed) footer {
  display: none;
}

@media (max-width: 768px) {
  .film-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .film-section {
    padding: 15px;
  }
  
  .film-card h4 {
    font-size: 0.7rem;
    padding: 6px 3px;
    min-height: 32px;
  }
  
  .episode-badge {
    font-size: 0.65rem;
    padding: 3px 6px;
    bottom: 6px;
    left: 6px;
  }
  
  .navbar {
    padding: 10px 15px;
  }
  
  .navbar .logo {
    font-size: 1.1rem;
  }
  
  .search-section {
    padding: 12px 15px;
  }
}

@media (max-width: 480px) {
  .film-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .film-section {
    padding: 10px;
  }
  
  .film-card {
    border-radius: 6px;
  }
  
  .film-card h4 {
    font-size: 0.65rem;
    padding: 5px 2px;
    min-height: 30px;
  }
  
  .episode-badge {
    font-size: 0.6rem;
    padding: 2px 5px;
    bottom: 4px;
    left: 4px;
  }
  
  .navbar {
    flex-direction: column;
    gap: 8px;
    padding: 8px 10px;
  }
  
  .pagination {
    flex-direction: row;
    gap: 10px;
  }
  
  .pagination-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .page-info {
    font-size: 0.8rem;
  }
  
  /* Mobile ad adjustments */
  .ad-banner {
    padding: 6px 0;
  }
}

@media (max-width: 360px) {
  .film-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  
  .film-card h4 {
    font-size: 0.6rem;
    padding: 4px 2px;
    min-height: 28px;
  }
  
  .episode-badge {
    font-size: 0.55rem;
    padding: 2px 4px;
    bottom: 3px;
    left: 3px;
  }
  
  .ad-banner {
    padding: 4px 0;
  }
}