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

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #020617;
  color: #e5e7eb;
  overflow: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* HALAMAN SEARCH: izinkan salin / tempel */
body[data-page="search"],
body[data-page="search"] * {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* IZINKAN COPY/PASTE DI INPUT (cadangan) */
input,
textarea,
.search-input {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

img {
  pointer-events: none;
}

/* layout root */
.app-root {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */

.app-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: radial-gradient(circle at top, #0f172a, #020617 70%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* logo header */
.logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e5f0ff;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.icon-button:active {
  transform: scale(0.95);
  background: rgba(30, 64, 175, 0.9);
}

.back-button {
  margin-right: 8px;
}

.icon-svg {
  width: 18px;
  height: 18px;
}

/* MAIN / VIEW */

#mainContent {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 64px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* SECTION HEADER */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header-spaced {
  margin-top: 28px;
}

/* section Rilis Hari Ini */
#todaySection {
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.section-title.small-title {
  font-size: 18px;
  margin-top: 16px;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 2px;
}

.section-action {
  border: none;
  background: none;
  color: #22d3ee;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
}

/* RILIS HARI INI HERO */

.today-hero-section {
  margin-bottom: 20px;
}

.today-hero-card {
  position: relative;
  margin-top: 8px;
  padding: 12px 12px 16px;
  border-radius: 20px;
  background: radial-gradient(circle at top, #0b1220, #020617 80%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #e5e7eb;
}

.today-hero-poster-wrap {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.9);
}

#todayPoster {
  width: 220px;
  max-width: 70vw;
  height: auto;
  display: block;
}

.today-hero-info {
  text-align: center;
  margin-top: 6px;
}

.today-hero-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.today-hero-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.today-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.today-hero-nav.prev {
  left: 8px;
}

.today-hero-nav.next {
  right: 8px;
}

.today-hero-dots {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.today-hero-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.today-hero-dots span.active {
  width: 18px;
  background: #facc15;
}

/* GRID & ROW */

.anime-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
}

.full-grid {
  margin-top: 12px;
}

.anime-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.anime-row::-webkit-scrollbar {
  height: 4px;
}

.anime-row::-webkit-scrollbar-thumb {
  background: rgba(30, 64, 175, 0.7);
  border-radius: 999px;
}

.anime-card {
  background: #020817;
  border-radius: 18px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease,
    background 0.14s ease;
}

.anime-row .anime-card {
  min-width: 32%;
  max-width: 32%;
  flex-shrink: 0;
}

.anime-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.95);
  background: #020617;
}

.anime-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
}

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

.badge-top-left {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  font-size: 10px;
  color: #bfdbfe;
}

.badge-bottom-left {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  font-size: 11px;
  color: #e5e7eb;
}

.badge-rating {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  font-size: 11px;
  color: #e5e7eb;
}

.badge-rating span.star {
  color: #facc15;
  font-size: 12px;
}

.anime-title {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.anime-meta {
  font-size: 11px;
  color: #9ca3af;
}

/* PAGINATION */

.pagination-bar {
  margin-top: 4px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-outline {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
}

.btn-outline:disabled {
  opacity: 0.4;
  cursor: default;
}

.page-info {
  font-size: 13px;
  color: #9ca3af;
}

/* DETAIL ANIME – wrapper */
.anime-detail {
  margin-bottom: 14px;
}

/* kartu utama dengan poster blur */
.anime-detail-card {
  position: relative;
  padding: 12px 12px 14px;
  border-radius: 22px;
  background: #020617; /* fallback */
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.96);
  display: grid;
  grid-template-columns: 110px 1fr;
  column-gap: 14px;
  row-gap: 6px;
  align-items: center;
  overflow: hidden;
}

/* poster blur (tidak terlalu blur) */
.anime-detail-card::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(5px);
  transform: scale(1.05);
  z-index: 0;
}

/* overlay supaya teks kebaca di dark theme */
.anime-detail-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.98)
  );
  opacity: 0.9;
  z-index: 0;
}

.anime-detail-card > * {
  position: relative;
  z-index: 1;
}

.detail-poster {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.9);
  aspect-ratio: 2 / 3;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-main-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.detail-sub {
  font-size: 13px;
  color: #cbd5f5;
  margin-top: 3px;
}

.detail-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.detail-meta span.label {
  color: #9ca3af;
  font-weight: 500;
}

.detail-genres {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* wrapper tombol di luar box */
.detail-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
}

/* tombol Putar */
.btn-play {
  flex: 1 1 0;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #1f2937;
}

.btn-play svg {
  width: 18px;
  height: 18px;
}

/* tombol favorit */
.btn-fav {
  flex: 1 1 0;
  margin-top: 0;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #1e40af, #22d3ee);
  color: #e5e7eb;
}

.btn-fav svg {
  width: 18px;
  height: 18px;
}

/* genre pill di halaman detail */
.genre-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(30, 64, 175, 0.7);
  font-size: 12px;
  color: #bfdbfe;
  cursor: pointer;
  white-space: nowrap;
}

.genre-pill:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.6);
}

/* synopsis – di luar box */
.synopsis {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #e5e7eb;
  white-space: normal;
}

/* EPISODE LIST */

.episode-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.episode-item {
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.95);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.episode-item span {
  max-width: 70%;
}

/* PLAYER */

.player-wrapper {
  margin-top: 8px;
  border-radius: 16px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
}

.player-wrapper iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
}

/* TOOLBAR */

.player-toolbar {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.toolbar-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.9);
}

.toolbar-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.9);
}

.toolbar-icon-wrap {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-icon {
  width: 14px;
  height: 14px;
}

.toolbar-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.toolbar-text-main {
  font-size: 11px;
  font-weight: 600;
}

.toolbar-text-sub {
  font-size: 10px;
  color: #9ca3af;
}

/* DROPDOWN PANELS */

.dropdown-container {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dropdown-panel {
  display: none;
  padding: 8px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.95);
  font-size: 13px;
}

.dropdown-panel.show {
  display: block;
}

.dropdown-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.dropdown-item {
  width: 100%;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  text-align: left;
  font-size: 12px;
  margin-bottom: 4px;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.dropdown-item:last-child {
  margin-bottom: 0;
}

.dropdown-item.active {
  background: linear-gradient(135deg, #1d4ed8, #22d3ee);
  color: #e5f0ff;
}

.dropdown-empty {
  font-size: 12px;
  color: #9ca3af;
}

/* EPISODE NAV */

.episode-nav {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* EPISODE SELECTOR */

.episode-selector {
  margin-top: 12px;
}

.episode-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.episode-chip-list {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.episode-chip-list::-webkit-scrollbar {
  height: 4px;
}

.episode-chip-list::-webkit-scrollbar-thumb {
  background: rgba(30, 64, 175, 0.7);
  border-radius: 999px;
}

.episode-chip {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.episode-chip.active {
  background: #e5e7eb;
  color: #020617;
  border-color: transparent;
}

/* SERVER LIST */

.server-list {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}

.server-button {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  cursor: pointer;
}

/* SEARCH & EXPLORE */

.search-form {
  margin: 6px 0 10px;
  display: flex;
  gap: 6px;
}

.search-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: #22d3ee;
}

.btn-primary {
  border-radius: 999px;
  border: none;
  padding: 6px 14px;
  background: linear-gradient(135deg, #1d4ed8, #22d3ee);
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.genre-chip-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.genre-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(30, 64, 175, 0.7);
  font-size: 12px;
  color: #bfdbfe;
  cursor: pointer;
}

/* EXPLORE TABS */

.explore-tabs {
  margin-top: 6px;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.explore-tab {
  flex: 1;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.95);
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.explore-tab:active {
  transform: scale(0.97);
}

.explore-tab.active {
  background: linear-gradient(135deg, #1d4ed8, #22d3ee);
  color: #e5f0ff;
}

.explore-panel {
  display: none;
  margin-top: 4px;
}

.explore-panel.active {
  display: block;
}

/* JADWAL ANIME */

.schedule-day {
  margin-top: 12px;
}

.schedule-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.schedule-day-title {
  font-size: 16px;
  font-weight: 600;
}

.schedule-day-count {
  font-size: 12px;
  color: #9ca3af;
}

/* LOADING */

.loading-indicator {
  margin-top: 8px;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.loading-indicator.show {
  display: flex;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-top-color: #22d3ee;
  animation: spin 0.6s linear infinite;
}

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

/* PROFILE */

.profile-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}

.profile-text {
  margin-top: 6px;
  font-size: 13px;
  color: #e5e7eb;
}

.version-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.version-value {
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
}

.profile-footer {
  margin-top: 10px;
  font-size: 11px;
  text-align: center;
  color: #9ca3af;
  opacity: 0.8;
}

/* BOTTOM NAV */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(30, 64, 175, 0.6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  transition: transform 0.18s ease;
  z-index: 20;
}

.bottom-nav.hide {
  transform: translateY(100%);
}

.nav-item {
  border: none;
  background: none;
  color: #9ca3af;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.nav-item.active {
  color: #e5f0ff;
}

.nav-icon {
  width: 20px;
  height: 20px;
}

/* TOAST */

.toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
}

/* RESPONSIVE */

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

  .anime-detail-card {
    grid-template-columns: 140px 1fr;
  }

  .anime-row .anime-card {
    min-width: 24%;
    max-width: 24%;
  }
}

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

  .anime-row .anime-card {
    min-width: 19%;
    max-width: 19%;
  }
}

/* THEME SYSTEM */
body.theme-dark {
  background: #020617;
  color: #e5e7eb;
}

body.theme-light {
  background: #f9fafb;
  color: #111827;
}

/* Light theme overrides */
body.theme-light .app-header {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

body.theme-light .bottom-nav {
  background: #ffffff;
  border-top-color: rgba(148, 163, 184, 0.6);
}

body.theme-light .nav-item {
  color: #4b5563;
}

body.theme-light .nav-item.active {
  color: #1d4ed8;
}

body.theme-light .toast {
  background: #111827;
  color: #f9fafb;
}

body.theme-light .profile-card {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

body.theme-light .version-value {
  color: #1f2937;
}

body.theme-light .profile-footer {
  color: #6b7280;
}

/* Theme options (profile) */
.theme-options {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.theme-option input {
  margin-top: 4px;
}

.theme-option-main {
  font-size: 14px;
  font-weight: 600;
}

.theme-option-sub {
  font-size: 12px;
  color: #9ca3af;
}

body.theme-light .theme-option {
  background: #f3f4f6;
}

body.theme-light .theme-option-sub {
  color: #6b7280;
}

/* THEME CARD DROPDOWN */

.theme-card {
  position: relative;
}

.theme-toggle-btn {
  margin-top: 8px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 13px;
  color: #e5e7eb;
  cursor: pointer;
}

.theme-toggle-main {
  font-weight: 600;
}

.theme-toggle-current {
  font-size: 12px;
  color: #9ca3af;
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.theme-card.open .theme-toggle-icon {
  transform: rotate(180deg);
}

.theme-list {
  margin-top: 8px;
  display: none;
}

.theme-card.open .theme-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-light .theme-toggle-btn {
  background: #ffffff;
  border-color: rgba(156, 163, 175, 0.9);
  color: #111827;
}

body.theme-light .theme-toggle-current {
  color: #6b7280;
}

/* Light theme: player & dropdown dsb */
body.theme-light .player-wrapper {
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

body.theme-light .toolbar-btn {
  background: #f3f4f6;
  color: #111827;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

body.theme-light .toolbar-icon-wrap {
  background: #e5e7eb;
}

body.theme-light .toolbar-text-sub {
  color: #6b7280;
}

body.theme-light .dropdown-panel {
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  color: #111827;
}

body.theme-light .dropdown-title {
  color: #111827;
}

body.theme-light .dropdown-item {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid rgba(156, 163, 175, 0.6);
}

body.theme-light .dropdown-item.active {
  background: linear-gradient(135deg, #1d4ed8, #22c55e);
  color: #f9fafb;
}

body.theme-light .dropdown-empty {
  color: #6b7280;
}

body.theme-light .episode-chip {
  background: #e5e7eb;
  color: #111827;
  border-color: rgba(156, 163, 175, 0.7);
}

body.theme-light .episode-chip.active {
  background: #111827;
  color: #f9fafb;
  border-color: transparent;
}

body.theme-light .section-subtitle {
  color: #6b7280;
}

body.theme-light .anime-card {
  color: #e5e7eb;
}

body.theme-light .anime-card .anime-title {
  color: #e5e7eb;
}

body.theme-light .anime-card .anime-meta {
  color: #cbd5f5;
}

body.theme-light .badge-top-left,
body.theme-light .badge-bottom-left,
body.theme-light .badge-rating {
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
}

body.theme-light .badge-top-left {
  color: #bfdbfe;
}

body.theme-light .badge-rating span.star {
  color: #facc15;
}

body.theme-light .episode-item {
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
}

body.theme-light .episode-item span {
  color: inherit;
}

/* Light theme: detail card */
body.theme-light .anime-detail-card {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  color: #111827;
  border: 1px solid rgba(209, 213, 219, 0.9);
}

/* overlay di light theme: lebih transparan supaya poster blur kelihatan */
body.theme-light .anime-detail-card::after {
  background: radial-gradient(
    circle at top left,
    rgba(255, 255, 255, 0.82),
    rgba(249, 250, 251, 0.9)
  );
  opacity: 0.9;
}

body.theme-light .detail-main-title {
  color: #111827;
}

body.theme-light .detail-sub {
  color: #6b7280;
}

body.theme-light .detail-meta {
  color: #4b5563;
}

body.theme-light .detail-meta span.label {
  color: #6b7280;
}

body.theme-light .synopsis {
  color: #111827;
}

body.theme-light .genre-pill {
  background: #f3f4f6;
  border-color: rgba(156, 163, 175, 0.8);
  color: #1f2937;
}
