/* ============================================
   PHIMHAY - MODERN CINEMA THEME
   Font: Montserrat + Be Vietnam Pro
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Be+Vietnam+Pro:wght@300;400;500;600&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-hover: #1e1e2a;
  --accent: #e50914;
  --accent-hover: #f40612;
  --accent-glow: rgba(229, 9, 20, 0.3);
  --gold: #f5c518;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #5a5a70;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --gradient-hero: linear-gradient(135deg, #0a0a0f 0%, #1a0a1a 50%, #0a0a1a 100%);
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(10, 10, 15, 0.98) 0%, rgba(10, 10, 15, 0.85) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.99);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-logo span:first-child {
  color: var(--text-primary);
}

.nav-logo span:last-child {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown-menu {
  /* Ẩn bằng opacity+pointer-events thay vì display:none để có thể transition */
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;

  position: absolute;
  /* top = 100% (sát mép dưới nav item), padding-top tạo vùng cầu nối trong suốt */
  top: 100%;
  padding-top: 10px;
  /* ← cầu nối — chuột đi qua đây vẫn tính là hover */
  left: 50%;
  min-width: 220px;
  z-index: 100;
}

/* Box thật nằm bên trong, để padding-top không có background */
.nav-links .dropdown-menu::before {
  content: '';
  display: block;
}

.dropdown-menu-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-card);
}

/* Mở bằng JS — thêm class .open */
.nav-links .dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px;
}

.dropdown-menu a:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

.nav-search {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0 16px;
  gap: 8px;
  transition: var(--transition);
  width: 220px;
}

.nav-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  width: 280px;
}

.nav-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  width: 100%;
  padding: 9px 0;
}

.nav-search input::placeholder {
  color: var(--text-muted);
}

.nav-search svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 10px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ============================================
   HERO BANNER (SLIDER)
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  max-height: 700px;
  min-height: 500px;
  margin-top: 64px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(10, 10, 15, 0.95) 0%,
      rgba(10, 10, 15, 0.7) 40%,
      transparent 70%),
    linear-gradient(to top,
      rgba(10, 10, 15, 1) 0%,
      transparent 40%);
}

.hero-content {
  position: absolute;
  bottom: 100px;
  left: 60px;
  max-width: 550px;
  z-index: 2;
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-quality {
  background: var(--gold);
  color: #000;
}

.badge-type {
  background: var(--accent);
  color: white;
}

.badge-lang {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-origin {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 400;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.hero-meta .dot {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}

.hero-meta .rating {
  color: var(--gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-indicators {
  position: absolute;
  bottom: 32px;
  left: 60px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  width: 28px;
  background: var(--accent);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  padding-bottom: 60px;
}

.section {
  margin: 48px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
}

.section-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.section-link:hover {
  gap: 8px;
}

/* ============================================
   MOVIE CARDS
   ============================================ */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.movies-grid.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.movies-grid.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.movies-grid.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.movie-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  group: true;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.movie-thumb {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .movie-thumb img {
  transform: scale(1.05);
}

.movie-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.movie-card:hover .movie-overlay {
  opacity: 1;
}

.play-btn {
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: scale(0.8);
  transition: transform 0.3s;
}

.movie-card:hover .play-btn {
  transform: scale(1);
}

.movie-quality {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.movie-ep {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(229, 9, 20, 0.9);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.movie-info {
  padding: 12px;
}

.movie-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.movie-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.movie-meta .year {
  color: var(--text-secondary);
}

.movie-meta .views {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ============================================
   HORIZONTAL SCROLL (Top phim)
   ============================================ */
.movies-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.movies-scroll::-webkit-scrollbar {
  display: none;
}

.movies-scroll .movie-card {
  flex-shrink: 0;
  width: 160px;
}

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--border);
}

.tab {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  font-family: var(--font-body);
}

.tab.active,
.tab:hover {
  background: var(--accent);
  color: white;
}

/* ============================================
   DETAIL PAGE
   ============================================ */
.detail-hero {
  position: relative;
  background: var(--bg-secondary);
  overflow: hidden;
  padding-top: 64px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.3);
  transform: scale(1.1);
}

.detail-content {
  position: relative;
  z-index: 1;
  padding: 60px 0 40px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.detail-poster {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  aspect-ratio: 2/3;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {}

.detail-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.2;
}

.detail-origin {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.meta-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
  margin-bottom: 28px;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.genre-tag {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.genre-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   VIDEO PLAYER
   ============================================ */
.player-section {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 32px 0;
  box-shadow: var(--shadow-card);
}

.player-wrapper {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
}

.player-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.ep-section {
  margin: 32px 0;
}

.server-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.server-tab {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  font-weight: 500;
}

.server-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.ep-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ep-btn {
  min-width: 52px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 500;
}

.ep-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.ep-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-header {
  padding: 100px 0 40px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.search-input-large {
  display: flex;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 700px;
  transition: var(--transition);
}

.search-input-large:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-input-large input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 18px 24px;
  font-size: 18px;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.search-input-large button {
  background: var(--accent);
  border: none;
  padding: 0 28px;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: var(--transition);
}

.search-input-large button:hover {
  background: var(--accent-hover);
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 64px;
  z-index: 100;
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.page-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-section {
  margin: 48px 0;
}

.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.comment-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.comment-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.comment-meta strong {
  color: var(--text-secondary);
}

.comment-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.star-rating {
  display: flex;
  gap: 4px;
  cursor: pointer;
  margin-bottom: 12px;
}

.star-rating span {
  font-size: 20px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.star-rating span.active,
.star-rating span:hover {
  color: var(--gold);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  font-size: 28px;
  font-family: var(--font-heading);
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-col ul a:hover {
  color: var(--text-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  max-width: 300px;
}

.toast.success {
  border-left: 3px solid #22c55e;
}

.toast.error {
  border-left: 3px solid var(--accent);
}

.toast.info {
  border-left: 3px solid #3b82f6;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   LOADING SKELETON
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px;
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  flex-shrink: 0;
}

.admin-main {
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(229, 9, 20, 0.15);
  color: var(--accent);
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-card.accent {
  border-left: 3px solid var(--accent);
}

.stat-card.gold {
  border-left: 3px solid var(--gold);
}

.stat-card.green {
  border-left: 3px solid #22c55e;
}

.stat-card.blue {
  border-left: 3px solid #3b82f6;
}

/* Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--bg-hover);
}

.admin-table img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .movies-grid.grid-6 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {

  .movies-grid.grid-6,
  .movies-grid.grid-5 {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-content {
    grid-template-columns: 200px 1fr;
    gap: 32px;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    gap: 12px;
  }

  .nav-search {
    width: 160px;
  }

  .nav-search:focus-within {
    width: 180px;
  }

  .hero {
    max-height: 600px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
    bottom: 80px;
    max-width: none;
  }

  .hero-indicators {
    left: 24px;
  }

  .movies-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 200px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding: 0 14px;
  }

  .hero-title {
    font-size: 22px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-accent {
  color: var(--accent);
}

.text-gold {
  color: var(--gold);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Search autocomplete */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  z-index: 200;
  max-height: 360px;
  overflow-y: auto;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.search-suggestion-item:hover {
  background: var(--bg-hover);
}

.suggestion-thumb {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.suggestion-name {
  font-size: 14px;
  font-weight: 600;
}

.suggestion-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-search-wrap {
  position: relative;
}

/* Progress bar top */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-glow);
}