:root {
  --bg-dark: #090c15;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 38, 58, 0.85);
  --bg-modal: #101626;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 58, 237, 0.4);
  
  --primary: #7c3aed;
  --primary-glow: rgba(124, 58, 237, 0.5);
  --secondary: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Ambient Glows */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 { top: -100px; left: -100px; background: radial-gradient(circle, var(--primary), transparent); }
.bg-glow-2 { top: 40%; right: -150px; background: radial-gradient(circle, var(--secondary), transparent); }
.bg-glow-3 { bottom: -100px; left: 30%; background: radial-gradient(circle, #ec4899, transparent); }

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 12, 21, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 2rem;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-vip {
  font-size: 0.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  box-shadow: 0 0 15px var(--primary-glow);
}

.active-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 99px;
}

/* Search Box */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-box {
  position: relative;
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-sub);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 2.2rem 0.6rem 2.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.25);
  width: 320px;
}

.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}

/* Status Banner */
.status-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.server-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.server-pill strong {
  color: var(--text-main);
}

.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-nav-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
}

.page-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Movie Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.movie-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.2);
  background: var(--bg-card-hover);
}

.poster-box {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1e293b;
}

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

.movie-card:hover .poster-box img {
  transform: scale(1.06);
}

.card-vip-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--accent-gold);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.card-year-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.4rem;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Loading & Empty States */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
  gap: 1rem;
  color: var(--text-muted);
}

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

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

.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-sub);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(124, 58, 237, 0.25);
  display: flex;
  flex-direction: column;
}

.close-modal-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background: var(--accent-red);
}

.modal-hero {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.15), transparent);
  border-bottom: 1px solid var(--border-color);
}

.modal-poster-wrap {
  position: relative;
  width: 200px;
  min-width: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.modal-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
}

.modal-badges {
  display: flex;
  gap: 0.5rem;
}

.pill-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
}

.pill-vip {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.pill-quality {
  background: rgba(6, 182, 212, 0.2);
  color: var(--secondary);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.pill-year {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.modal-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
}

.modal-bulk-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-export {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
}

.btn-export:hover {
  background: var(--accent-gold);
  color: #000;
}

.btn-copy-all {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--secondary);
}

.btn-copy-all:hover {
  background: var(--secondary);
  color: #000;
}

.btn-download-all {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-download-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--primary-glow);
}

/* Episodes Section */
.modal-episodes-section {
  padding: 1.5rem 2rem 2rem;
}

.episodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.episodes-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
}

.episodes-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.episode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.episode-row:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.ep-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ep-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--secondary);
}

.ep-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.ep-tag {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.ep-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-ep-dl {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: #fff;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-ep-dl:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-ep-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ep-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-ep-tool {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #c084fc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ep-tool:hover {
  background: var(--primary);
  color: #fff;
}

/* Downloads Section List */
.downloads-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dl-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dl-filename {
  font-weight: 700;
  font-size: 0.95rem;
}

.dl-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}

.status-downloading {
  background: rgba(6, 182, 212, 0.2);
  color: var(--secondary);
}

.status-completed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
}

.status-error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

.status-paused {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}

.status-retrying {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.status-queued {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.dl-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.dl-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.dl-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dl-error-text {
  font-size: 0.78rem;
  color: var(--accent-red);
  word-break: break-word;
}

.btn-download-control:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  border: 1px solid var(--border-glow);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==================== XEM PHIM & HLS PLAYER STYLES ==================== */
.btn-watch-now {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.btn-watch-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.65);
  filter: brightness(1.1);
}

.btn-ep-play {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px var(--primary-glow);
}

.btn-ep-play:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px var(--primary-glow);
  filter: brightness(1.15);
}

/* Video Player Modal */
.player-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.95);
  backdrop-filter: blur(25px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeInModal 0.25s ease forwards;
}

.player-modal-content {
  background: rgba(15, 22, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 1200px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(124, 58, 237, 0.25);
}

.player-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  background: rgba(9, 14, 26, 0.85);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.player-title-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(124, 58, 237, 0.5);
  color: #c4b5fd;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.player-movie-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-ep-title {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 600;
  white-space: nowrap;
}

.player-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-player-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-player-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.close-player-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.close-player-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--accent-red);
  color: #fff;
  transform: rotate(90deg);
}

.player-frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 60vh;
  background: #000;
  position: relative;
  overflow: hidden;
}

.artplayer-container {
  width: 100%;
  height: 100%;
}

.player-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  background: rgba(12, 18, 32, 0.9);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.player-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-player-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-player-nav:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-player-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.player-shortcut-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.player-shortcut-hint strong {
  color: var(--secondary);
  background: rgba(6, 182, 212, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.toggle-auto-next {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toggle-auto-next input {
  display: none;
}

.toggle-slider {
  width: 34px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  position: relative;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background: #fff;
  transition: transform 0.2s;
}

.toggle-auto-next input:checked + .toggle-slider {
  background: var(--accent-green);
}

.toggle-auto-next input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.player-ep-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-episodes-carousel {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem 1.25rem;
  background: rgba(9, 14, 26, 0.95);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.player-episodes-carousel::-webkit-scrollbar {
  height: 6px;
}

.player-episodes-carousel::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.5);
  border-radius: 4px;
}

.player-ep-pill {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.player-ep-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.player-ep-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 15px var(--primary-glow);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .search-box input:focus { width: 100%; }
  .modal-hero { flex-direction: column; align-items: center; text-align: center; }
  .modal-poster-wrap { width: 160px; min-width: 160px; }
  .modal-bulk-actions { justify-content: center; }
  .player-modal-header { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .player-header-actions { justify-content: flex-end; }
  .player-bottom-bar { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ==================== CINEMATIC REFRESH ==================== */
:root {
  --bg-dark: #070812;
  --bg-card: rgba(20, 21, 36, 0.72);
  --bg-modal: #111220;
  --border-color: rgba(255, 255, 255, 0.09);
  --primary: #8b5cf6;
  --secondary: #22d3ee;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

body {
  background:
    radial-gradient(ellipse 70% 48% at 8% -10%, rgba(124, 58, 237, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 42% at 100% 8%, rgba(34, 211, 238, 0.12), transparent 70%),
    var(--bg-dark);
}

.navbar {
  padding: 0.9rem 2rem;
  background: rgba(7, 8, 18, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.logo-icon { border-radius: 15px; }
.nav-tabs { background: rgba(255, 255, 255, 0.055); }
.search-box input { background: rgba(255, 255, 255, 0.065); }

.main-content { padding-top: 1.25rem; }

.cinema-hero {
  position: relative;
  min-height: 370px;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin-bottom: 1.25rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(105deg, rgba(14, 14, 31, 0.98) 0%, rgba(19, 16, 42, 0.92) 52%, rgba(10, 17, 35, 0.68) 100%),
    linear-gradient(135deg, #17122d, #091827);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.cinema-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.45;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to right, #000, transparent 80%);
}

.hero-content { position: relative; z-index: 2; max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .75rem;
  border: 1px solid rgba(167, 139, 250, .35); border-radius: 999px;
  color: #c4b5fd; background: rgba(124, 58, 237, .12); font-size: .68rem;
  font-weight: 800; letter-spacing: .13em;
}
.live-dot { width: 7px; height: 7px; background: #56f0ae; border-radius: 50%; box-shadow: 0 0 12px #56f0ae; }
.cinema-hero h1 { margin: 1rem 0; font-family: Outfit, sans-serif; font-size: clamp(2.4rem, 5vw, 4.65rem); line-height: .98; letter-spacing: -.065em; }
.cinema-hero h1 em { font-style: normal; background: linear-gradient(100deg, #c4b5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cinema-hero p { max-width: 455px; color: #b7bfd2; font-size: 1rem; line-height: 1.65; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-primary, .hero-secondary { border-radius: 12px; border: 1px solid transparent; padding: .82rem 1.1rem; font-weight: 750; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.hero-primary { color: white; background: linear-gradient(135deg, #8b5cf6, #6366f1); box-shadow: 0 12px 28px rgba(124, 58, 237, .34); }
.hero-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 35px rgba(124, 58, 237, .48); }
.play-glyph { font-size: .72rem; margin-right: .35rem; }
.hero-secondary { color: #d9deed; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); }
.hero-secondary:hover { background: rgba(255,255,255,.12); }
.hero-art { position: absolute; z-index: 1; right: clamp(1.25rem, 5vw, 5rem); top: 50%; width: min(34vw, 395px); aspect-ratio: 1; transform: translateY(-50%); }
.hero-art-glow { position: absolute; inset: 12%; background: conic-gradient(from 230deg, #8b5cf6, #22d3ee, #8b5cf6); border-radius: 50%; filter: blur(34px); opacity: .7; }
.hero-reel { position: absolute; inset: 11%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.2), rgba(10,11,26,.93) 55%); box-shadow: inset 0 0 50px rgba(0,0,0,.8), 0 0 55px rgba(34,211,238,.2); transform: rotate(-12deg); }
.hero-reel::before, .hero-reel::after { content: ''; position: absolute; width: 20%; aspect-ratio: 1; border-radius: 50%; border: 12px dotted rgba(196,181,253,.42); }
.hero-reel::before { top: 11%; left: 19%; }.hero-reel::after { bottom: 11%; right: 19%; }
.hero-reel span { color: #a5b4fc; font-size: .7rem; font-weight: 800; letter-spacing: .22em; }.hero-reel strong { font-family: Outfit; font-size: clamp(3.5rem, 7vw, 6.5rem); line-height: .8; letter-spacing: -.08em; background: linear-gradient(135deg,#fff,#8be9f7); -webkit-background-clip:text; color:transparent; }
.hero-caption { position: absolute; bottom: -3%; right: -2%; padding: .8rem 1rem; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(11,12,26,.7); backdrop-filter: blur(14px); }.hero-caption span { display:block; color:#8b9ab8; font-size:.6rem; font-weight:800; letter-spacing:.14em; }.hero-caption strong { display:block; margin-top:.2rem; font-size:.78rem; }

.status-banner { margin: 0 0 2.25rem; gap: .55rem; }
.server-pill { padding: .46rem .8rem; background: rgba(255,255,255,.035); }
.section-title { font-size: clamp(1.45rem, 2.4vw, 2rem); letter-spacing: -.04em; }

.movie-grid { gap: 1.15rem; }
.movie-card { overflow: hidden; border-radius: 16px; background: linear-gradient(155deg, rgba(32,33,54,.82), rgba(15,16,28,.86)); box-shadow: 0 9px 25px rgba(0,0,0,.14); }
.movie-card:hover { transform: translateY(-8px) scale(1.012); box-shadow: 0 22px 42px rgba(0,0,0,.32), 0 0 0 1px rgba(139,92,246,.18); }
.poster-box { background: #181928; }
.card-scrim { position:absolute; inset:0; opacity:0; background:linear-gradient(to top, rgba(8,8,19,.9), transparent 65%); transition:opacity .25s ease; }
.card-open-action { position:absolute; z-index:2; left:50%; top:57%; transform:translate(-50%,-40%); display:flex; align-items:center; gap:.35rem; opacity:0; padding:.5rem .75rem; border:1px solid rgba(255,255,255,.3); border-radius:999px; background:rgba(10,11,24,.74); backdrop-filter:blur(8px); color:white; font-size:.75rem; font-weight:750; transition:all .25s ease; white-space:nowrap; }
.movie-card:hover .card-scrim, .movie-card:hover .card-open-action { opacity:1; }.movie-card:hover .card-open-action { transform:translate(-50%,-50%); }
.card-body { padding: .85rem .9rem 1rem; }.card-title { font-size: .94rem; }.card-meta { margin-top:.42rem; }

.movie-skeleton { pointer-events:none; animation: none; }.skeleton-block, .skeleton-line { position:relative; overflow:hidden; background: rgba(255,255,255,.075); }.skeleton-block::after, .skeleton-line::after { content:''; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); animation:shimmer 1.3s infinite; }.skeleton-line { display:block; height: .72rem; border-radius:99px; margin:.25rem 0; }.skeleton-title { width:82%; height:.88rem; }.skeleton-meta { width:54%; } @keyframes shimmer { to { transform:translateX(100%); } }

.modal-overlay { padding: 1.1rem; background: rgba(3,4,13,.76); backdrop-filter: blur(18px); }
.modal-card { border-radius: 26px; background: linear-gradient(145deg, rgba(23,24,42,.98), rgba(12,13,26,.99)); box-shadow: 0 30px 90px rgba(0,0,0,.58), 0 0 0 1px rgba(139,92,246,.1); }
.modal-hero { position:relative; overflow:hidden; }.modal-hero::before { content:''; position:absolute; inset:0 0 auto 0; height:100%; pointer-events:none; background:radial-gradient(ellipse at 15% 30%, rgba(124,58,237,.2), transparent 58%); }.modal-info, .modal-poster-wrap { position:relative; z-index:1; }
.episode-row { border-radius: 13px; padding: .8rem 1rem; background: rgba(255,255,255,.035); }.episode-row:hover { transform: translateX(3px); border-color: rgba(34,211,238,.32); }
.btn-action { border-radius: 11px; }.toast { border-radius: 14px; bottom: 1.25rem; }

@media (max-width: 900px) { .hero-art { width: 285px; opacity:.75; right:-1.5rem; }.cinema-hero { min-height:330px; }.hero-content { max-width:520px; } }
@media (max-width: 768px) { .navbar { padding:.75rem 1rem; }.main-content { padding: 1rem 1rem 5rem; }.cinema-hero { min-height: 460px; align-items:flex-start; padding: 2rem 1.4rem; }.cinema-hero h1 { font-size: 2.7rem; }.hero-art { top:auto; bottom:-3.7rem; right:-1.6rem; transform:none; width:260px; }.hero-caption { display:none; }.status-banner { margin-top:.15rem; }.server-pill { font-size:.72rem; }.movie-grid { gap:.8rem; }.card-open-action { display:none; }.modal-card { border-radius:22px; }.episode-row { align-items:flex-start; gap:.75rem; }.ep-actions { flex-wrap:wrap; justify-content:flex-end; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } }
