/* ==========================================================================
   AniStream Hub - Modern Dark Glassmorphism CSS Architecture
   ========================================================================== */

:root {
  --bg-dark: #0B0E14;
  --bg-card: rgba(21, 26, 35, 0.85);
  --bg-glass: rgba(15, 19, 26, 0.85);
  --bg-elevated: #161C27;
  
  --primary-color: #00D2FF;
  --primary-gradient: linear-gradient(135deg, #00D2FF 0%, #0072FF 100%);
  --accent-color: #00ECEB;
  --accent-gradient: linear-gradient(135deg, #00ECEB 0%, #00B894 100%);
  
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(0, 210, 255, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(0, 210, 255, 0.4);
  --glass-backdrop: blur(16px) saturate(180%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* Completely hide Pull to Refresh top bar indicator & popups */
#pull-to-refresh-bar, .ptr-bar {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#app-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  padding-bottom: 24px;
}

/* Header Navbar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-glass);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-glass);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0B121E 0%, #121B2D 100%);
  border: 1.5px solid #00ECEB;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ECEB;
  font-size: 16px;
  box-shadow: 0 0 14px rgba(0, 236, 235, 0.4);
  position: relative;
  overflow: hidden;
}

.brand-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  border: 1px solid rgba(0, 236, 235, 0.5);
  pointer-events: none;
}

.brand-name {
  font-size: 21px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.brand-name span {
  background: linear-gradient(135deg, #00ECEB 0%, #0072FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--primary-color);
}

/* Bstation-Style Realtime Offline Network Banner */
.offline-network-banner {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: linear-gradient(135deg, rgba(214, 48, 49, 0.95), rgba(225, 112, 85, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(214, 48, 49, 0.35);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.offline-network-banner.hidden {
  display: none !important;
}

.offline-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offline-icon {
  font-size: 16px;
  color: #ffeaa7;
}

.retry-online-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.retry-online-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.35);
}

/* Pull-to-Refresh Modern Mobile Bar */
.ptr-bar {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 999;
  background: rgba(18, 22, 33, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 210, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 210, 255, 0.25);
  padding: 8px 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.ptr-bar.refreshing {
  opacity: 1;
  transform: translateX(-50%) translateY(12px) !important;
}

.ptr-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.ptr-icon {
  font-size: 14px;
  color: #00ECEB;
  transition: transform 0.2s ease;
}

.ptr-bar.refreshing .ptr-icon {
  animation: fa-spin 0.8s linear infinite;
  color: #00ECEB;
}

/* Search Drawer */
.search-bar-container {
  padding: 12px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-glass);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 26px !important;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 5;
}

.search-input-wrapper input {
  width: 100%;
  padding: 12px 40px 12px 56px !important;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input-wrapper input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.2);
}

.clear-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

/* Main Content & Hero Carousel */
.main-content {
  flex: 1;
  padding: 16px 0;
}

.hero-section {
  padding: 0 16px;
  margin-bottom: 20px;
}

.hero-carousel {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.hero-slides-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s ease, visibility 0.6s ease;
  transform: scale(1.04);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  cursor: pointer;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-dots-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(9, 11, 16, 0.95) 0%, rgba(9, 11, 16, 0.3) 60%, rgba(9, 11, 16, 0) 100%);
}

.hero-info {
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Kategori Genre Chips */
.genre-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.day-chips-wrapper,
.genre-chips-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-top: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.day-chips-wrapper::-webkit-scrollbar,
.genre-chips-wrapper::-webkit-scrollbar {
  display: none;
}

.day-chip,
.genre-chip {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.day-chip.active,
.day-chip:hover,
.genre-chip.active,
.genre-chip:hover {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.bg-live {
  background: rgba(225, 112, 85, 0.2) !important;
  color: #ff7675 !important;
  border: 1px solid rgba(225, 112, 85, 0.4) !important;
}

.badge-day {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(108, 92, 231, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  z-index: 3;
}

/* Anime Section & Grid Cards */
.anime-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.badge-pill {
  padding: 3px 8px;
  background: rgba(255, 118, 117, 0.2);
  color: var(--accent-color);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}

.anime-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.anime-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.anime-card:active {
  transform: scale(0.96);
}

.anime-card-poster {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background-color: var(--bg-elevated);
}

.anime-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: #F1C40F;
  display: flex;
  align-items: center;
  gap: 4px;
}

.anime-card-ep {
  position: absolute;
  bottom: 60px;
  right: 8px;
  padding: 3px 8px;
  background: var(--primary-color);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  color: #FFF;
}

.anime-card-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.anime-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-main);
}

.anime-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Skeletons Loading */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.03) 63%);
  background-size: 400% 100%;
  animation: skeletonLoading 1.4s ease infinite;
}

@keyframes skeletonLoading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.anime-card-skeleton {
  width: 100%;
  aspect-ratio: 3/4.5;
  border-radius: var(--radius-md);
}

/* Detail Modal Drawer */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: fadeIn 0.25s ease-out;
}

.detail-content {
  width: 100%;
  max-width: 480px;
  height: 90vh;
  background: var(--bg-dark);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  overflow-y: auto;
  position: relative;
  padding-bottom: 40px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.close-modal-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00D2FF 0%, #0072FF 100%);
  border: none;
  color: #FFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
  transition: all 0.2s ease;
}

.close-modal-btn:hover, .close-modal-btn:active {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.6);
}

.detail-banner {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--bg-elevated);
}

.banner-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-dark) 0%, rgba(9, 11, 16, 0.4) 100%);
}

.detail-header-info {
  padding: 0 20px;
  margin-top: -50px;
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.detail-poster {
  width: 100px;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.detail-title-block {
  flex: 1;
}

.detail-title-block h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.detail-japanese {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.score-badge {
  padding: 3px 8px;
  background: rgba(241, 196, 15, 0.2);
  color: #F1C40F;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.meta-pill {
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
}

.detail-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px 0 20px;
}

.detail-sub-tabs {
  display: flex;
  gap: 24px;
  padding: 16px 20px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.sub-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  padding-bottom: 10px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.sub-tab-btn:hover,
.sub-tab-btn.active {
  color: #00D2FF;
}

.sub-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #00D2FF;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 210, 255, 0.6);
}

.btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFF;
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 16px 20px;
}

.detail-synopsis {
  padding: 0 20px 20px 20px;
}

.detail-synopsis h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.detail-synopsis p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.episodes-wrapper {
  padding: 0 20px;
}

.episodes-wrapper h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.ep-btn {
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.ep-btn.active, .ep-btn:hover {
  background: var(--primary-color);
  border-color: transparent;
  color: #FFF;
}

/* Video Player Modal (Enhanced Mobile & Web UI) */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 999999 !important;
  background: #090b10;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: fadeIn 0.2s ease-out;
}

/* Lights Off Overlay for Cinema Dimming */
.light-off-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 25;
  transition: opacity 0.3s ease;
}

.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(14, 17, 25, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000000 !important;
  border-bottom: 1px solid var(--border-glass);
}

.player-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-action-btn {
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.player-action-btn:hover, .player-action-btn.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.btn-label-desktop {
  display: none;
}

.unreleased-notice {
  background: rgba(231, 76, 60, 0.25);
  border: 1px solid rgba(231, 76, 60, 0.6);
  color: #FF7675;
  padding: 10px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.back-btn {
  background: linear-gradient(135deg, #00D2FF 0%, #0072FF 100%);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  color: #FFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.back-btn:hover, .back-btn:active {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.6);
}

.player-title-info h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.player-title-info .ep-subtitle {
  font-size: 11px;
  color: var(--primary-color);
  font-weight: 600;
}

/* Mobile HP Layout (Single Column, Sticky Video) */
.player-layout-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

.player-main-stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  z-index: 30;
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: sticky;
  top: 60px;
  z-index: 40;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.floating-fs-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 45;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.floating-fs-btn:active {
  transform: scale(0.9);
  background: var(--primary-color);
}

/* Mobile Cinema Mode Fullscreen (Instant Forced Landscape CSS + Native Rotation for 100% Mobile HP Compatibility) */
.player-modal.mobile-fullscreen {
  overflow: hidden !important;
  background: #000 !important;
}

@media screen and (orientation: portrait) and (max-width: 768px) {
  .player-modal.mobile-fullscreen .video-container {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: 100vh !important;
    height: 100vw !important;
    max-width: 100vh !important;
    max-height: 100vw !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    background: #000 !important;
    aspect-ratio: auto !important;
  }
}

@media screen and (orientation: landscape), (min-width: 769px) {
  .player-modal.mobile-fullscreen .video-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    transform: none !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    background: #000 !important;
    aspect-ratio: auto !important;
  }
}

.player-modal.mobile-fullscreen .player-top-bar,
.player-modal.mobile-fullscreen .server-chips-wrapper,
.player-modal.mobile-fullscreen .player-toolbar,
.player-modal.mobile-fullscreen .player-sidebar-stage,
.player-modal.mobile-fullscreen .floating-fs-btn {
  display: none !important;
}

.exit-mobile-fs-btn {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 2147483647 !important;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #e74c3c, #d63031) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
  transition: all 0.2s ease;
}

.exit-mobile-fs-btn:active {
  transform: scale(0.92);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.8);
}

.video-container:fullscreen,
.video-container:-webkit-full-screen,
.video-container:-moz-full-screen,
.video-container:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  background: #000 !important;
}

.video-container:fullscreen .floating-fs-btn,
.video-container:-webkit-full-screen .floating-fs-btn {
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.video-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.player-loader {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  z-index: 10;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Server Selector Pill Chips (Mobile & Web) */
.server-chips-wrapper {
  padding: 14px 16px;
  background: rgba(18, 22, 33, 0.8);
  border-bottom: 1px solid var(--border-glass);
}

.server-chips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.server-status-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 234, 167, 0.15);
  color: #ffeaa7;
  border: 1px solid rgba(255, 234, 167, 0.3);
}

.server-chips-container {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px 2px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
}

.server-chips-container.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.server-chips-container::-webkit-scrollbar {
  height: 6px;
  display: block !important;
}

.server-chips-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.server-chips-container::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary-color), #00d2ff);
  border-radius: 4px;
}

.server-chips-container::-webkit-scrollbar-thumb:hover {
  background: #00d2ff;
}

.server-chip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-chip:hover {
  background: rgba(108, 92, 231, 0.2);
  border-color: rgba(108, 92, 231, 0.5);
}

.server-chip.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #FFF;
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.4);
}

.chip-quality-pill {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 10px;
  font-weight: 700;
  color: #55efc4;
}

.server-chip.active .chip-quality-pill {
  background: rgba(0, 0, 0, 0.25);
  color: #FFF;
}

.player-toolbar {
  padding: 12px 16px;
  background: rgba(18, 22, 33, 0.5);
  border-bottom: 1px solid var(--border-glass);
}

.player-nav-btns {
  display: flex;
  gap: 10px;
}

.nav-ep-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Sidebar Stage (Episode List on Mobile & Desktop) */
.player-sidebar-stage {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title-group h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFF;
}

.ep-count-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(108, 92, 231, 0.2);
  color: #a29bfe;
  border: 1px solid rgba(108, 92, 231, 0.4);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-search-box {
  position: relative;
  margin-bottom: 12px;
}

.sidebar-search-box input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #FFF;
  font-size: 12px;
  outline: none;
}

.sidebar-search-box input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}

.sidebar-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
}

.player-episodes-section {
  flex: 1;
  overflow-y: auto;
}

.episodes-grid.mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.no-server-tag {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 0;
}

/* Bottom Navigation Bar (Hidden for Ultra-Clean Minimalist UI) */
.bottom-nav {
  display: none !important;
}

/* Header Menu Toggle Button */
.menu-toggle-btn {
  background: rgba(108, 92, 231, 0.15) !important;
  border-color: rgba(108, 92, 231, 0.4) !important;
  color: #a29bfe !important;
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-toggle-btn:hover, .menu-toggle-btn:active {
  background: var(--primary-gradient) !important;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* Modern Glassmorphic Features Drawer Modal */
.features-drawer-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.25s ease-out;
}

.features-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.features-drawer-content {
  position: relative;
  z-index: 2;
  width: 85%;
  max-width: 380px;
  height: 100%;
  background: rgba(14, 18, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-glass);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  animation: slideLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 20px;
}

.drawer-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title-box i {
  font-size: 20px;
}

.drawer-title-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.drawer-close-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.2);
}

.drawer-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.drawer-item:hover, .drawer-item:active {
  background: rgba(108, 92, 231, 0.15);
  border-color: rgba(108, 92, 231, 0.4);
  transform: translateX(-4px);
}

.drawer-item-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.bg-indigo { background: linear-gradient(135deg, #6C5CE7, #a29bfe); box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35); }
.bg-rose { background: linear-gradient(135deg, #FF7675, #fab1a0); box-shadow: 0 4px 14px rgba(255, 118, 117, 0.35); }
.bg-amber { background: linear-gradient(135deg, #F39C12, #f1c40f); box-shadow: 0 4px 14px rgba(243, 156, 18, 0.35); }
.bg-emerald { background: linear-gradient(135deg, #00B894, #55efc4); box-shadow: 0 4px 14px rgba(0, 184, 148, 0.35); }
.bg-cyan { background: linear-gradient(135deg, #0984E3, #74b9ff); box-shadow: 0 4px 14px rgba(9, 132, 227, 0.35); }

.drawer-item-info {
  flex: 1;
}

.drawer-item-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.drawer-item-info p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.drawer-badge {
  padding: 2px 8px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

.arrow-icon {
  color: var(--text-dim);
  font-size: 12px;
  transition: transform 0.2s ease;
}

.drawer-item:active .arrow-icon {
  transform: translateX(3px);
  color: var(--primary-color);
}

.drawer-footer-card {
  margin-top: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.drawer-footer-badge {
  font-size: 11px;
  font-weight: 700;
  color: #00B894;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-footer-card span {
  font-size: 11px;
  color: var(--text-dim);
}

/* Utilities */
.hidden {
  display: none !important;
}

.empty-state {
  grid-column: span 2;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  color: var(--primary-color);
  opacity: 0.5;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Creator / About Card Section */
.about-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 10px;
}

.creator-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border: 1px solid rgba(108, 92, 231, 0.3);
}

.creator-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #a29bfe);
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4);
}

.creator-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.creator-bio {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 0 10px;
}

.creator-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.c-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 6px;
}

.stat-num {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
}

.cache-monitor-card {
  background: rgba(18, 20, 32, 0.75);
  border: 1px solid rgba(108, 92, 231, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: left;
  backdrop-filter: blur(12px);
}

.cache-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.crawler-live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00b894;
  box-shadow: 0 0 12px #00b894;
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 184, 148, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 184, 148, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 184, 148, 0); }
}

.cache-refresh-btn {
  background: rgba(108, 92, 231, 0.2);
  border: 1px solid rgba(108, 92, 231, 0.4);
  color: #a29bfe;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.cache-refresh-btn:hover, .cache-refresh-btn:active {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
}

.cache-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

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

.cache-stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease;
}

.cache-stat-item:hover {
  transform: translateY(-2px);
  border-color: rgba(108, 92, 231, 0.3);
}

.c-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.c-stat-text {
  display: flex;
  flex-direction: column;
}

.c-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.c-stat-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.text-cyan {
  color: #00cec9 !important;
}

.cache-monitor-footer {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-features-list {
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.c-feature-item {
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Auth Header Button & Modal */
.auth-pill-btn {
  height: 38px;
  padding: 0 16px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.3), rgba(162, 155, 254, 0.2));
  color: #FFF;
  border: 1px solid rgba(108, 92, 231, 0.6);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.auth-pill-btn:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
  transform: translateY(-1px);
}

.auth-pill-btn:active {
  transform: scale(0.95);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  padding: 28px 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #0B121E 0%, #121B2D 100%);
  border: 2px solid #00ECEB;
  border-radius: 16px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #00ECEB;
  box-shadow: 0 0 20px rgba(0, 236, 235, 0.5);
}

.auth-header h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-tab-group {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--border-glass);
}

.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: var(--primary-color);
  color: #FFF;
  box-shadow: var(--shadow-sm);
}

.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-bottom: 14px;
  text-align: center;
  font-weight: 600;
}

.auth-alert.error {
  background: rgba(235, 77, 75, 0.2);
  color: #ff7979;
  border: 1px solid rgba(235, 77, 75, 0.4);
}

.auth-alert.success {
  background: rgba(46, 213, 115, 0.2);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.4);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group input {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #FFF;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary-color);
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}

/* User Profile Modal Custom Styles */
.profile-header-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  text-align: center;
}

.profile-avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #FFF;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.profile-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 2px;
}

.profile-email-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.profile-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.4);
  border-radius: 20px;
  color: #2ed573;
  font-size: 11px;
  font-weight: 700;
}

.btn-danger-glow {
  padding: 12px 18px;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  border: none;
  border-radius: var(--radius-md);
  color: #FFF;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.35);
  transition: all 0.2s ease;
}

.btn-danger-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 71, 87, 0.5);
}

/* Manga Search Container */
.manga-search-container {
  margin-bottom: 20px;
  width: 100%;
}

.manga-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.manga-search-bar:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.35);
}

.manga-search-bar .search-icon {
  color: var(--text-muted);
  font-size: 15px;
}

.manga-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

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

.manga-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
}

.manga-submit-btn {
  padding: 8px 16px;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.manga-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.4);
}

/* Manga Reader Styling */
.manga-pages-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0 80px 0;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.manga-page-img {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  background-color: #121724;
}

.manga-reader-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(14, 18, 28, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border-glass);
  z-index: 200;
}

/* ==========================================================================
   Responsive Desktop & Tablet Layout Enhancements (AniStream Web UI)
   ========================================================================== */

@media (min-width: 768px) {
  #app-container {
    max-width: 100%;
  }

  .app-header {
    padding: 16px 48px;
  }

  .app-header > *,
  .hero-carousel,
  .genre-section,
  .anime-section,
  .search-overlay-content {
    max-width: 1380px;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-carousel {
    height: 380px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
    margin-bottom: 32px;
  }

  .hero-banner-inner {
    padding: 40px;
  }

  .hero-title {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero-desc {
    font-size: 15px;
    -webkit-line-clamp: 3;
    max-width: 650px;
  }

  .anime-grid,
  .manga-grid,
  .history-grid,
  .watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
    gap: 20px !important;
  }

  .anime-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(108, 92, 231, 0.3);
    border-color: var(--border-highlight);
  }

  .anime-card-poster {
    aspect-ratio: 2/3;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .day-chip,
  .genre-chip {
    padding: 8px 18px;
    font-size: 13px;
  }

  /* Modals & Watch UI Desktop Cinema Layout */
  .btn-label-desktop {
    display: inline;
  }

  .player-modal {
    background: rgba(9, 11, 16, 0.97);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    align-items: center;
    padding: 20px 40px;
  }

  .player-top-bar {
    max-width: 1360px;
    width: 100%;
    background: transparent;
    border-bottom: 1px solid var(--border-glass);
    padding: 0 0 16px 0;
    margin-bottom: 16px;
    position: relative;
  }

  .player-layout-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    max-width: 1360px;
    width: 100%;
    height: calc(90vh - 70px);
    max-height: 840px;
    margin: 0 auto;
    overflow: hidden;
  }

  .player-main-stage {
    height: 100%;
    overflow-y: auto;
    padding-right: 6px;
  }

  .video-container {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: calc(100vh - 280px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    z-index: 30;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(108, 92, 231, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .server-chips-wrapper {
    margin-top: 16px;
    padding: 16px 20px;
    background: rgba(18, 22, 33, 0.7);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
  }

  .player-toolbar {
    margin-top: 12px;
    padding: 14px 20px;
    background: rgba(18, 22, 33, 0.7);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    max-width: 100%;
  }

  .player-sidebar-stage {
    background: rgba(18, 22, 33, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
  }

  .player-episodes-section {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
  }

  .episodes-grid.mini {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  /* Theater Mode (Full Width Player) */
  .player-modal.theater-mode .player-layout-container {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }

  .player-modal.theater-mode .video-container {
    max-height: 75vh;
    height: 640px;
  }

  .player-modal.theater-mode .player-sidebar-stage {
    max-height: 380px;
    margin-top: 20px;
  }

  /* Light Off Mode (Dimming Surrounding Controls) */
  .player-modal.light-off-mode .player-top-bar,
  .player-modal.light-off-mode .server-chips-wrapper,
  .player-modal.light-off-mode .player-toolbar,
  .player-modal.light-off-mode .player-sidebar-stage {
    opacity: 0.15;
    transition: opacity 0.3s ease;
  }

  .player-modal.light-off-mode .player-top-bar:hover,
  .player-modal.light-off-mode .server-chips-wrapper:hover,
  .player-modal.light-off-mode .player-toolbar:hover,
  .player-modal.light-off-mode .player-sidebar-stage:hover {
    opacity: 1;
  }

  /* Drawer Modal on Desktop */
  .features-drawer {
    max-width: 380px;
    right: 48px;
    top: 80px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  }

  .manga-reader-nav {
    max-width: 700px;
    border-radius: 16px 16px 0 0;
  }
}

/* Katalog Anime A-Z CSS Architecture */
.az-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 14px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.az-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.2s ease;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.az-group-card:hover {
  border-color: rgba(0, 184, 148, 0.4);
}

.az-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  color: #55efc4;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 10px;
  margin-bottom: 14px;
  width: 100%;
  overflow: hidden;
}

.az-group-badge {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
  flex-shrink: 0;
}

.az-group-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

.az-items-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

@media (min-width: 600px) {
  .az-items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .az-items-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.az-item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.az-item-link:hover {
  background: rgba(0, 184, 148, 0.15);
  border-color: rgba(0, 184, 148, 0.4);
  color: #55efc4;
  transform: translateX(4px);
}

.az-item-link i {
  color: #00cec9;
  font-size: 11px;
  flex-shrink: 0;
}

.az-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  display: block;
}

@media (min-width: 1200px) {
  .anime-grid,
  .manga-grid,
  .history-grid,
  .watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    gap: 24px !important;
  }

  .video-container {
    height: 640px;
  }
}

/* --- PLATFORM ISOLATION UTILITIES (WEB vs APK) --- */
body.is-web .apk-only {
  display: none !important;
}

body.is-apk .web-only {
  display: none !important;
}

/* ==========================================================================
   EXCLUSIVE LUXURY FULL-BLEED DESKTOP WEB STYLES (body.is-web)
   ========================================================================== */

body.is-web {
  background-color: #0b0c14 !important;
  color: #e2e8f0;
  min-width: 1280px !important;
  width: 100%;
}

body.is-web #app-container {
  max-width: 100% !important;
  width: 100% !important;
  min-width: 1280px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.is-web .player-modal {
  z-index: 9999999 !important;
}

body.is-web .player-top-bar {
  z-index: 10000000 !important;
  background: rgba(14, 18, 28, 0.98) !important;
  position: sticky !important;
  top: 0 !important;
  width: 100% !important;
  max-width: 1360px !important;
  padding: 14px 20px !important;
  margin: 0 auto 16px auto !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.btn-close-video-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00D2FF 0%, #0072FF 100%);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.45);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-close-video-pill:hover,
.btn-close-video-pill:active {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.7);
}

/* 1. Full-Width Glassmorphism Header Navigation Bar */
body.is-web .app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  max-width: 100% !important;
  width: 100% !important;
  padding: 14px 4% !important;
  background: rgba(11, 12, 20, 0.92) !important;
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

body.is-web .web-desktop-nav {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

body.is-web .web-nav-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.is-web .web-nav-link:hover,
body.is-web .web-nav-link.active {
  color: #00D2FF;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.25);
}

body.is-web .web-download-apk-pill {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00b894, #0984e3);
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.is-web .web-download-apk-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.6);
}

/* Integrated Desktop Search Input Box */
body.is-web .web-header-search {
  position: relative;
  width: 300px;
  display: flex;
  align-items: center;
}

body.is-web .web-header-search input {
  width: 100%;
  padding: 10px 18px 10px 56px !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

body.is-web .web-header-search input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: #6c5ce7;
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.35);
  width: 360px;
}

body.is-web .web-header-search .search-icon {
  position: absolute;
  left: 26px !important;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  z-index: 5;
}

/* Hide mobile bottom navigation, search icon, refresh button, and menu toggle on desktop web */
body.is-web .menu-toggle-btn,
body.is-web #search-toggle-btn,
body.is-web #header-refresh-btn,
body.is-web .bottom-nav {
  display: none !important;
}

/* 2. Web Layout Container & Hero Billboard Banner */
body.is-web .main-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 4% 60px 4% !important;
}

body.is-web .hero-carousel {
  width: 100% !important;
  height: 520px !important;
  border-radius: 20px !important;
  overflow: hidden;
  margin-top: 20px;
  margin-bottom: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.is-web .hero-slide {
  height: 100% !important;
}

body.is-web .hero-overlay {
  background: linear-gradient(90deg, #0b0c14 0%, rgba(11, 12, 20, 0.75) 45%, rgba(11, 12, 20, 0.1) 100%),
              linear-gradient(0deg, #0b0c14 0%, rgba(11, 12, 20, 0.3) 40%, transparent 100%) !important;
}

body.is-web .hero-info {
  max-width: 600px !important;
  bottom: 50px !important;
  left: 50px !important;
  padding: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

body.is-web .hero-title {
  font-size: 38px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  margin-bottom: 16px !important;
  letter-spacing: -0.5px;
}

/* 3. Grid & Card Styling Enhancements for Web (6-Column Full Width) */
body.is-web .anime-grid,
body.is-web .manga-grid,
body.is-web .history-grid,
body.is-web .watchlist-grid,
body.is-web #complete-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 24px !important;
  padding: 10px 0 30px 0 !important;
}

body.is-web .anime-card {
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

body.is-web .anime-card:hover {
  transform: translateY(-10px) scale(1.03) !important;
  box-shadow: 0 20px 45px rgba(0, 210, 255, 0.35) !important;
  border-color: rgba(0, 210, 255, 0.6) !important;
}

body.is-web .anime-card-poster {
  height: 300px !important;
  object-fit: cover !important;
  border-radius: 16px 16px 0 0 !important;
}

body.is-web .anime-card-info {
  padding: 16px !important;
}

body.is-web .anime-card-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin-bottom: 6px !important;
}

/* ==========================================================================
   Dedicated Otakudesu Weekly Schedule UI Styling
   ========================================================================== */
.schedule-weekly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 16px;
  width: 100%;
}

.schedule-day-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.schedule-day-card:hover {
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.schedule-day-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.schedule-day-header.day-senin { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.schedule-day-header.day-selasa { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.schedule-day-header.day-rabu { background: linear-gradient(135deg, #00b894, #00cec9); }
.schedule-day-header.day-kamis { background: linear-gradient(135deg, #e17055, #fab1a0); }
.schedule-day-header.day-jumat { background: linear-gradient(135deg, #e84393, #fd79a8); }
.schedule-day-header.day-sabtu { background: linear-gradient(135deg, #fdcb6e, #ffeaa7); color: #2d3436; text-shadow: none; }
.schedule-day-header.day-minggu { background: linear-gradient(135deg, #d63031, #ff7675); }
.schedule-day-header.day-random { background: linear-gradient(135deg, #636e72, #b2bec3); }

.schedule-day-badge {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.schedule-anime-list {
  display: flex;
  flex-direction: column;
}

.schedule-anime-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.schedule-anime-item:last-child {
  border-bottom: none;
}

.schedule-anime-item:hover {
  background: rgba(0, 210, 255, 0.08);
}

.schedule-anime-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.schedule-anime-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.15);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.schedule-anime-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-time-badge {
  padding: 4px 10px;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: #00eceb;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- Web vs Mobile UI Player Isolation --- */
.btn-close-video-pill,
#close-player-btn-secondary {
  display: none;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00D2FF 0%, #0072FF 100%);
  border: none;
  color: #FFF;
  font-size: 13px;
  font-weight: 700;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
  transition: all 0.2s ease;
}

.btn-close-video-pill:hover,
#close-player-btn-secondary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.6);
}

/* Display dedicated secondary close button ONLY on Web Desktop */
body.is-web .btn-close-video-pill,
body.is-web #close-player-btn-secondary {
  display: inline-flex;
}

/* Strictly HIDE secondary close button on Mobile HP / APK */
@media (max-width: 768px) {
  .btn-close-video-pill,
  #close-player-btn-secondary,
  .btn-label-desktop {
    display: none !important;
  }
}

body.is-apk .btn-close-video-pill,
body.is-apk #close-player-btn-secondary {
  display: none !important;
}

/* Season Selector Chips Styling */
.season-selector-wrapper {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.2);
}

.season-chips-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.season-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.season-chip {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.season-chip:hover {
  background: rgba(108, 92, 231, 0.25);
  border-color: var(--primary-color);
  color: #FFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.season-chip.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #FFF;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.5);
}

/* Mobile HP Anime Detail Modal UI Optimization */
@media (max-width: 768px) {
  .detail-content {
    height: 94vh !important;
    max-height: 94vh !important;
    padding-bottom: 140px !important;
  }
  
  .detail-banner {
    height: 125px !important;
  }
  
  .detail-header-info {
    margin-top: -35px !important;
    padding: 0 16px !important;
    gap: 12px !important;
  }
  
  .detail-poster {
    width: 80px !important;
  }
  
  .detail-title-block h1 {
    font-size: 16px !important;
  }
  
  .detail-actions {
    padding: 12px 16px 0 16px !important;
    gap: 8px !important;
  }
  
  .detail-sub-tabs {
    padding: 10px 16px 0 16px !important;
    gap: 16px !important;
    margin-bottom: 8px !important;
  }
  
  .detail-genres {
    padding: 0 16px 10px 16px !important;
  }
  
  .detail-synopsis {
    padding: 0 16px 12px 16px !important;
  }
  
  .detail-synopsis p {
    font-size: 12px !important;
    line-height: 1.45 !important;
    max-height: 100px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .episodes-wrapper,
  .episodes-section {
    padding: 0 16px 40px 16px !important;
    margin-bottom: 60px !important;
  }
  
  .episodes-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 60px !important;
  }
  
  .ep-btn {
    padding: 10px 4px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
  }
}


