/* ===================================================
   WIBUSTREAM MODERN STREAMING THEME
   Tailored for Mobile-First TikTok Audiences & Desktop
   =================================================== */

:root {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #182234;
  --bg-card-hover: #1f2c42;
  --text-main: #e2e8f0;
  --text-muted: #8b9bb4;
  --primary: #38bdf8;
  --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --accent: #818cf8;
  --rating: #fbbf24;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: all 0.25s ease;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==================== HEADER & NAVBAR ==================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.logo span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-bar form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 4px 6px 4px 16px;
  transition: var(--transition);
}

.search-bar form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
  background: rgba(20, 28, 56, 0.7);
}

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

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar button {
  background: var(--primary-gradient);
  border: none;
  color: #070913;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
}

.search-bar button:hover {
  transform: scale(1.05);
}

/* ==================== HERO SLIDER ==================== */
.hero-slider-section {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-item {
  min-width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center 25%;
  display: flex;
  align-items: center;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #070913 25%, rgba(7, 9, 19, 0.85) 60%, rgba(7, 9, 19, 0.2) 100%),
              linear-gradient(0deg, #070913 0%, rgba(7, 9, 19, 0.2) 50%, rgba(7, 9, 19, 0.6) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 0 24px;
}

.slide-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.badge-releasing {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.badge-score {
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid var(--rating);
  color: var(--rating);
}

.slide-title {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slide-synopsis {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-play-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: var(--primary-gradient);
  color: #070913;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
  transition: var(--transition);
}

.btn-play-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.5);
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  right: 30px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  width: 26px;
  border-radius: 10px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

/* ==================== GENRE BAR ==================== */
.genre-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.genre-bar::-webkit-scrollbar {
  display: none;
}

.genre-list {
  display: flex;
  gap: 8px;
}

.genre-chip {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.genre-chip:hover, .genre-chip.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==================== SECTION TITLE ==================== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 18px 0;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 4px;
  display: inline-block;
}

/* ==================== ANIME GRID ==================== */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.anime-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.anime-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 12px 28px rgba(0, 242, 254, 0.15);
}

.card-poster {
  position: relative;
  width: 100%;
  height: 245px;
  overflow: hidden;
  background: #090c17;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.anime-card:hover .card-poster img {
  transform: scale(1.08);
}

.card-rating {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(7, 9, 19, 0.85);
  backdrop-filter: blur(6px);
  color: var(--rating);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-eps-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 242, 254, 0.9);
  color: #070913;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.card-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==================== DETAIL & PLAYER SECTION ==================== */
.detail-view {
  margin-top: 24px;
  margin-bottom: 50px;
}

.player-box {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.player-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

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

.episode-picker {
  margin-top: 24px;
}

.episode-picker-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.btn-episode {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-episode:hover {
  background: var(--primary-gradient);
  color: #070913;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
}

/* ==================== DETAIL INFO BOX ==================== */
.anime-detail-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.detail-cover {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.detail-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-info h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
}

.meta-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat-item {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-item .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-item .value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

.synopsis-box {
  background: rgba(0, 0, 0, 0.25);
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.7;
}

/* ==================== MONETAG POPUP MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 6, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background: #11172e;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 242, 254, 0.25);
  position: relative;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.modal-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  margin: 0 auto 16px auto;
}

.modal-content h3 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.modal-content p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-monetag {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--primary-gradient);
  color: #070913;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
  transition: var(--transition);
  text-decoration: none;
}

.btn-monetag:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.6);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ==================== FOOTER & PROMOSI DEVELOPER ==================== */
footer {
  background: #04060d;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px 0 30px 0;
  margin-top: 60px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 12px;
  color: #475569;
}

/* PROMOSI DEVELOPER (BARTER TIKTOK CLIENT) */
.developer-credit {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  font-size: 12px;
  color: var(--text-muted);
}

.developer-credit a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.developer-credit a:hover {
  text-decoration: underline;
}

/* ==================== LOADING SKELETON ==================== */
.loading-box {
  display: none;
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 242, 254, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .hero-slider-section {
    height: 420px;
  }
  .slide-title {
    font-size: 24px;
  }
  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
  }
  .card-poster {
    height: 195px;
  }
  .anime-detail-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .detail-cover {
    max-width: 220px;
    margin: 0 auto;
  }
  .player-box {
    padding: 16px;
  }
}
