/* =========================================================
   ZerozxStream ΓÇö anime.css
   Style halaman Anime + Player Anime
   Creator: @Zerozx
   ========================================================= */

/* =========================================================
   HEADER ANIME WATCH
   ========================================================= */
.anime-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4%;
  background: linear-gradient(180deg, rgba(6,6,10,.98) 0%, rgba(6,6,10,.75) 70%, transparent 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-wrap: nowrap;
}

.anime-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: #f5f5f7;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.anime-back-btn:hover {
  background: rgba(20,210,184,.15);
  border-color: #14d2b8;
  color: #fff;
  transform: translateX(-2px);
}
.anime-back-btn:active {
  transform: translateX(-2px) scale(.97);
}
.anime-back-btn svg {
  transition: transform .25s;
}
.anime-back-btn:hover svg {
  transform: translateX(-3px);
}

.anime-logo {
  margin-left: auto;
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.6px;
  text-decoration: none;
  white-space: nowrap;
}
.anime-logo .z {
  color: #14d2b8;
  text-shadow: 0 0 20px rgba(20,210,184,.6);
}
.anime-logo .rest { color: #fff; }
.anime-logo .dot { color: #14d2b8; }

/* =========================================================
   LOGO ANIME TAG (badge "ANIME")
   ========================================================= */
.anime-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff6b6b, #14d2b8);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 12px rgba(20,210,184,.5);
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

/* =========================================================
   HERO ANIME ΓÇö compact & elegan
   ========================================================= */
body:has(.anime-tag) .hero {
  min-height: 62vh;
  padding: 110px 4% 60px;
}
@media (max-width: 600px) {
  body:has(.anime-tag) .hero {
    min-height: 58vh;
    padding: 90px 4% 40px;
  }
}

/* =========================================================
   SECTION HEAD ΓÇö pill kecil di kanan
   ========================================================= */
.anime-section-sub {
  font-size: 11px;
  font-weight: 700;
  color: #8a8a96;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
@media (max-width: 600px) {
  .anime-section-sub { display: none; }
}

/* =========================================================
   EPISODE BADGE DI CARD (EP XX)
   ========================================================= */
.card-ep-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: linear-gradient(135deg, #14d2b8, #22e8cb);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(20,210,184,.6);
  text-transform: uppercase;
  letter-spacing: .5px;
  z-index: 2;
}

/* =========================================================
   MODAL DETAIL ANIME
   ========================================================= */
.anime-detail-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 13px;
  align-items: center;
}
.anime-detail-info .pill {
  border: 1px solid rgba(255,255,255,.07);
  padding: 4px 11px;
  border-radius: 8px;
  color: #ccc;
  background: rgba(255,255,255,.04);
  font-weight: 600;
  font-size: 12px;
}
.anime-detail-info .score {
  color: #ffd23f;
  font-weight: 800;
  font-size: 16px;
}

/* Episode list di modal */
.ep-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 12px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
}
.ep-list::-webkit-scrollbar { width: 6px; }
.ep-list::-webkit-scrollbar-track { background: transparent; }
.ep-list::-webkit-scrollbar-thumb { background: #2a2a35; border-radius: 6px; }
.ep-list::-webkit-scrollbar-thumb:hover { background: #14d2b8; }

.ep-item {
  padding: 10px 12px;
  background: rgba(21,21,28,.9);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #d5d5dd;
  text-align: center;
  transition: all .2s;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-item:hover {
  background: rgba(20,210,184,.15);
  border-color: #14d2b8;
  color: #fff;
  transform: translateY(-2px);
}

/* =========================================================
   WATCH PAGE LAYOUT
   ========================================================= */
.anime-watch-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 4% 80px;
  position: relative;
  z-index: 2;
}

/* =========================================================
   PLAYER BOX
   ========================================================= */
.anime-player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px rgba(0,0,0,.8);
  margin-bottom: 20px;
}
.anime-player-box iframe,
.anime-player-box video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}
.anime-player-box .fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8a8a96;
  gap: 14px;
  text-align: center;
  padding: 30px;
}
.anime-player-box .fallback svg { opacity: .4; }
.anime-player-box .fallback h3 { color: #fff; font-size: 18px; font-weight: 700; }
.anime-player-box .fallback p { font-size: 14px; max-width: 380px; line-height: 1.6; }

/* Loading overlay ΓÇö auto-hide, fade out halus */
.player-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.75);
  z-index: 3;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .25s ease;
  pointer-events: none;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.player-loading.fade-out {
  animation: fadeOut .3s ease forwards;
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: #14d2b8;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   INFO BAR (Judul + Prev/Next)
   ========================================================= */
.anime-ep-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: rgba(14,14,19,.75);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  margin-bottom: 16px;
}
.anime-ep-title { flex: 1; min-width: 200px; }
.anime-ep-title h1 {
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 4px;
  line-height: 1.2;
  color: #f5f5f7;
}
.anime-ep-title p {
  color: #8a8a96;
  font-size: 13px;
  font-weight: 500;
}

.anime-ep-nav {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.anime-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: #f5f5f7;
  font-size: 13px;
  font-weight: 700;
  transition: all .2s;
  cursor: pointer;
  font-family: inherit;
}
.anime-nav-btn:hover:not(:disabled) {
  background: rgba(20,210,184,.15);
  border-color: #14d2b8;
  transform: translateY(-2px);
}
.anime-nav-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* =========================================================
   SECTION LABEL
   ========================================================= */
.anime-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #8a8a96;
  margin-bottom: 12px;
}
.anime-section-label svg { color: #22e8cb; }

/* =========================================================
   SERVER TABS
   ========================================================= */
.anime-server-section {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: rgba(14,14,19,.75);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
}
.anime-server-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.anime-server-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  font-weight: 600;
  color: #d5d5dd;
  transition: all .2s;
  cursor: pointer;
  font-family: inherit;
}
.anime-server-tab:hover {
  background: rgba(20,210,184,.1);
  border-color: #14d2b8;
  color: #fff;
  transform: translateY(-2px);
}
.anime-server-tab.active {
  background: linear-gradient(135deg, #14d2b8, #22e8cb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(20,210,184,.6);
}
.anime-server-tab .server-name { font-weight: 700; }
.anime-server-tab .server-type {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,.35);
  font-weight: 800;
  letter-spacing: .5px;
}
.anime-server-tab .server-quality {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(20,210,184,.15);
  color: #22e8cb;
  font-weight: 800;
}
.anime-server-tab.active .server-quality {
  background: rgba(0,0,0,.3);
  color: #fff;
}

/* Anime server notice alert banner & modal */
.anime-server-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(20,210,184,.07);
  border: 1px solid rgba(20,210,184,.25);
  border-radius: 10px;
  font-size: 12.5px;
  color: #d1d5db;
}
.anime-server-alert-text {
  display: flex;
  align-items: center;
  gap: 8px;
}
.anime-server-alert-text svg {
  color: #22e8cb;
  flex-shrink: 0;
}
.anime-server-alert-btn {
  background: transparent;
  border: 1px solid rgba(20,210,184,.4);
  color: #22e8cb;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.anime-server-alert-btn:hover {
  background: rgba(20,210,184,.15);
  color: #fff;
}

/* Server Notice Modal */
.anime-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.anime-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.anime-modal-box {
  width: 100%;
  max-width: 460px;
  background: #0f1015;
  border: 1px solid rgba(20,210,184,.3);
  box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 30px rgba(20,210,184,.15);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  transform: translateY(20px) scale(.96);
  transition: transform .25s ease;
}
.anime-modal-backdrop.open .anime-modal-box {
  transform: translateY(0) scale(1);
}
.anime-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all .2s;
}
.anime-modal-close:hover {
  background: rgba(229,9,20,.2);
  border-color: #e50914;
}
.anime-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.anime-modal-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(20,210,184,.15);
  border: 1px solid rgba(20,210,184,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22e8cb;
}
.anime-modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.anime-modal-body p {
  color: #9ca3af;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0 0 14px;
}
.anime-modal-list {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: #d1d5db;
  line-height: 1.6;
}
.anime-modal-list div {
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.anime-modal-list div:last-child {
  margin-bottom: 0;
}
.anime-modal-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #14d2b8, #0ea5e9);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .2s;
}
.anime-modal-btn:hover {
  opacity: .9;
}

/* =========================================================
   EPISODE GRID DI PLAYER
   ========================================================= */
.anime-episode-section {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: rgba(14,14,19,.75);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
}
.anime-episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}
.anime-episode-grid::-webkit-scrollbar { width: 6px; }
.anime-episode-grid::-webkit-scrollbar-thumb { background: #2a2a35; border-radius: 6px; }
.anime-episode-grid::-webkit-scrollbar-thumb:hover { background: #14d2b8; }

.anime-ep-btn {
  padding: 10px 6px;
  border-radius: 8px;
  background: rgba(21,21,28,.9);
  border: 1px solid rgba(255,255,255,.07);
  font-size: 13px;
  font-weight: 700;
  color: #d5d5dd;
  transition: all .15s;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}
.anime-ep-btn:hover {
  background: rgba(20,210,184,.15);
  border-color: #14d2b8;
  color: #fff;
  transform: scale(1.05);
}
.anime-ep-btn.active {
  background: linear-gradient(135deg, #14d2b8, #22e8cb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(20,210,184,.6);
}

/* =========================================================
   ACTION BAR
   ========================================================= */
.anime-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.anime-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: #f5f5f7;
  font-size: 14px;
  font-weight: 700;
  transition: all .2s;
  text-decoration: none;
  cursor: pointer;
  flex: 1;
  min-width: 160px;
  font-family: inherit;
}
.anime-action-btn:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-2px);
}
.anime-action-btn.primary {
  background: linear-gradient(135deg, #14d2b8, #22e8cb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(20,210,184,.6);
}

/* =========================================================
   GENRE FILTER BAR
   ========================================================= */
.anime-genres-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4% 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.anime-genres-bar::-webkit-scrollbar { display: none; }
.anime-genre-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  color: #d1d5db;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
  user-select: none;
}
.anime-genre-pill:hover {
  background: rgba(20,210,184,.12);
  border-color: rgba(20,210,184,.35);
  color: #22e8cb;
  transform: translateY(-1px);
}
.anime-genre-pill.active {
  background: linear-gradient(135deg, #14d2b8, #0ea5e9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(20,210,184,.35);
  font-weight: 700;
}

/* =========================================================
   ERROR PAGE
   ========================================================= */
.anime-error {
  max-width: 560px;
  margin: 60px auto;
  text-align: center;
  padding: 40px 20px;
  background: rgba(14,14,19,.75);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
}
.anime-error svg { opacity: .35; margin-bottom: 20px; color: #14d2b8; }
.anime-error h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: #f5f5f7; }
.anime-error p { color: #8a8a96; font-size: 15px; line-height: 1.7; margin-bottom: 24px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
  .anime-watch-container { padding: 14px 3.5% 60px; }
  .anime-player-box { border-radius: 12px; margin-bottom: 14px; }
  .anime-ep-info { padding: 12px 14px; gap: 12px; }
  .anime-ep-title h1 { font-size: 16px; }
  .anime-ep-title p { font-size: 12px; }
  .anime-nav-btn { padding: 8px 12px; font-size: 12px; }
  .anime-nav-btn span { display: none; }
  .anime-server-section,
  .anime-episode-section { padding: 12px 14px; }
  .anime-server-tab { padding: 8px 12px; font-size: 12px; }
  .anime-episode-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
  .anime-ep-btn { padding: 8px 4px; font-size: 12px; }
  .anime-action-btn { padding: 11px 16px; font-size: 13px; min-width: 140px; }
  .ep-list { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

@media (max-width: 480px) {
  .anime-header {
    padding: 12px 3.5%;
    gap: 10px;
  }
  .anime-back-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  .anime-back-btn span {
    display: none;
  }
  .anime-logo {
    font-size: 18px;
  }
}
