/* =========================================================
   MỌT PHIM AI - CINEMA DARK THEME & ADSTERRA INTEGRATION
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;900&display=swap');

:root {
  --bg-main: #07090e;
  --bg-card: rgba(16, 21, 34, 0.75);
  --bg-card-hover: rgba(23, 31, 51, 0.9);
  --bg-header: rgba(7, 9, 14, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  
  --primary: #00f2fe;
  --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --accent-red: #ff3366;
  --accent-purple: #8a2be2;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-cinema: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.35);
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090c13;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==================== LIGHTS OFF EFFECT ==================== */
#cinema-dimmer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
body.lights-off #cinema-dimmer {
  opacity: 1;
  pointer-events: auto;
}
body.lights-off #player-section {
  z-index: 995;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 242, 254, 0.25);
}

/* ==================== HEADER ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 1000;
  transition: var(--transition);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: #07090e;
  box-shadow: var(--shadow-glow);
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

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

.ai-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--border-glow);
  color: var(--primary);
  text-transform: uppercase;
  margin-left: 4px;
}

/* Search Bar */
.search-wrapper {
  position: relative;
  width: 380px;
}

.search-input {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 99px;
  padding: 0 18px 0 44px;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-ad-config {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-ad-config:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==================== MAIN CONTAINER ==================== */
main {
  margin-top: 72px;
  padding-bottom: 5rem;
}

/* ==================== ADSTERRA AD SLOTS ==================== */
.ad-slot-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  position: relative;
}

.ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.ad-banner-box {
  background: rgba(16, 21, 34, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  position: relative;
  transition: var(--transition);
}

.ad-banner-box:hover {
  border-color: rgba(0, 242, 254, 0.4);
}

.ad-728x90 {
  width: 728px;
  max-width: 95%;
  min-height: 90px;
}

.ad-300x250 {
  width: 300px;
  min-height: 250px;
}

.ad-native-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
}

.native-ad-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.native-ad-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.native-ad-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.native-ad-info h5 {
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.native-ad-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-sponsored {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 51, 102, 0.15);
  color: var(--accent-red);
  font-weight: 700;
  margin-bottom: 4px;
}

/* ==================== HERO SECTION ==================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.42);
  transition: transform 1.2s ease;
}

.hero-slider:hover .hero-backdrop {
  transform: scale(1.02);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.2) 0%, rgba(7, 9, 14, 0.8) 75%, var(--bg-main) 100%),
              linear-gradient(90deg, rgba(7, 9, 14, 0.95) 0%, rgba(7, 9, 14, 0.4) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 0 3.5rem;
}

.hero-badge-group {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 1rem;
}

.badge-tag {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.badge-ai-curated {
  background: var(--primary-gradient);
  color: #07090e;
  font-weight: 800;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
}

.hero-meta .rating {
  color: #ffd700;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-desc {
  font-size: 1rem;
  color: #cbd5e1;
  margin-bottom: 1.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-primary-watch {
  background: var(--primary-gradient);
  color: #07090e;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.btn-primary-watch:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 242, 254, 0.6);
}

.btn-ai-summary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 24px;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-ai-summary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==================== FILTER & CATEGORIES ==================== */
.section-wrapper {
  padding: 0 3.5rem;
  margin-top: 2rem;
}

.filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 2rem;
  scrollbar-width: none;
}

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

.filter-pill {
  padding: 8px 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--primary-gradient);
  color: #07090e;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

/* ==================== MOVIE GRID & CARDS ==================== */
.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.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-icon {
  color: var(--primary);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.movie-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.card-poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #121824;
}

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

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

.card-overlay-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
}

.card-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffd700;
  padding: 3px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-ai-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(0, 242, 254, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ==================== WATCH VIEW (PLAYER SECTION) ==================== */
#watch-view {
  display: none;
  padding: 0 3.5rem;
}

.player-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  margin-top: 1.5rem;
}

.player-layout.theater-active {
  grid-template-columns: 1fr;
}

/* Video Frame Wrapper */
.video-frame-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-cinema);
  border: 1px solid var(--border-glass);
}

.video-frame-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Player Control Bar (Theater, Lights Off, Server) */
.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-top: 14px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-tool {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

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

/* Episodes List & Sidebar */
.watch-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.episodes-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.ep-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 10px 0;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

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

.ep-btn.active {
  background: var(--primary-gradient);
  color: #07090e;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

/* AI Analysis Box (Dưới Player) */
.ai-insights-box {
  background: linear-gradient(145deg, rgba(16, 21, 34, 0.85) 0%, rgba(10, 14, 24, 0.95) 100%);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.ai-insights-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
}

.ai-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ai-box-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-score-pill {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 0.85rem;
}

.ai-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.ai-bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.ai-bullet-list li span.bullet-icon {
  color: var(--primary);
  font-size: 1.1rem;
  line-height: 1;
}

/* ==================== ADSTERRA SOCIAL BAR (SIMULATED & INTERACTIVE) ==================== */
.adsterra-social-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: rgba(16, 21, 34, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  cursor: pointer;
  animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition);
}

.adsterra-social-bar:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--primary);
}

.social-bar-avatar {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

.social-bar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-bar-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid #07090e;
}

.social-bar-body {
  flex-grow: 1;
}

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

.social-bar-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.social-bar-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
}

.social-bar-close:hover {
  color: #fff;
}

.social-bar-msg {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==================== MODAL (AD CONFIGURATION) ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #0f1422;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  box-shadow: var(--shadow-cinema);
}

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

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.88rem;
  font-family: monospace;
  outline: none;
}

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

/* ==================== NAV ACTIONS EXPANSION ==================== */
.btn-nav-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-nav-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-add-movie {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--primary);
}

.btn-add-movie:hover {
  background: var(--primary-gradient);
  color: #07090e;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

/* ==================== AI CHAT CARD (HỎI ĐÁP CÙNG MỌT AI) ==================== */
.ai-chat-card {
  background: linear-gradient(145deg, rgba(16, 21, 34, 0.9) 0%, rgba(11, 15, 26, 0.95) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

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

.ai-avatar-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07090e;
  font-size: 1.1rem;
}

.ai-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 14px;
}

.chat-msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

.ai-msg {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: #e2e8f0;
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.user-msg {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  align-self: flex-end;
  border-top-right-radius: 2px;
}

.quick-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

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

.chat-input-wrapper {
  display: flex;
  gap: 10px;
}

.chat-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

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

/* ==================== COMMUNITY COMMENTS & RATINGS ==================== */
.community-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
}

.comment-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.star-rating-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
}

.star-item.active, .star-item:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  color: #ffd700;
  font-weight: 700;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 14px;
}

.comment-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.comment-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.comment-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.comment-user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.comment-content {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  padding-left: 40px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 992px) {
  .navbar {
    padding: 0 1.5rem;
  }
  .search-wrapper {
    width: 260px;
  }
  .hero-slider {
    height: 480px;
  }
  .hero-content {
    padding: 0 1.5rem;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .section-wrapper, #watch-view {
    padding: 0 1.5rem;
  }
  .player-layout {
    grid-template-columns: 1fr;
  }
  .ad-728x90 {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    height: auto;
    gap: 8px;
  }
  .search-wrapper {
    order: 3;
    width: 100%;
    margin-top: 4px;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .nav-actions {
    gap: 6px;
  }
  .btn-nav-action {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .hero-slider {
    height: 420px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .adsterra-social-bar {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
  }
}

/* ==================== TOAST NOTIFICATION SYSTEM ==================== */
.toast-container {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: rgba(16, 21, 34, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast-message.toast-fadeout {
  opacity: 0;
  transform: translateX(30px);
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-body {
  flex-grow: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.5);
}
.toast-success .toast-icon {
  color: #10b981;
}

.toast-info {
  border-color: rgba(0, 242, 254, 0.5);
}
.toast-info .toast-icon {
  color: var(--primary);
}

.toast-warning {
  border-color: rgba(245, 158, 11, 0.5);
}
.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-error {
  border-color: rgba(255, 51, 102, 0.5);
}
.toast-error .toast-icon {
  color: var(--accent-red);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==================== RELATED MOVIES SECTION ==================== */
.related-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 1.2rem;
}

/* ==================== NAVBAR ACTIONS EXTENSION ==================== */
.btn-admin-nav {
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffd700;
  text-decoration: none;
  font-weight: 700;
}

.btn-admin-nav:hover {
  background: #ffd700;
  color: #07090e;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  border-color: transparent;
}

.btn-delete-watch {
  background: rgba(255, 51, 102, 0.12) !important;
  border-color: rgba(255, 51, 102, 0.3) !important;
  color: var(--accent-red) !important;
}

.btn-delete-watch:hover {
  background: var(--accent-red) !important;
  color: #fff !important;
}

/* Modal Enhancements */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 1.5rem;
}

.btn-modal-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-modal-save {
  background: var(--primary-gradient);
  border: none;
  color: #07090e;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.btn-modal-save:hover {
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
  transform: translateY(-1px);
}

.comment-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
}
.comment-delete-btn:hover {
  color: var(--accent-red);
  background: rgba(255, 51, 102, 0.1);
}
