/* ===== Variables ===== */
:root {
  --bg: #0d0d0d;
  --bg-elevated: #161616;
  --bg-card: #1a1a1a;
  --border: #262626;
  --accent: #e50914;
  --accent-hover: #ff1a25;
  --text-primary: #f5f5f5;
  --text-secondary: #9a9a9a;
  --text-muted: #6b6b6b;
  --radius: 10px;
  --shadow: 0 10px 25px rgba(0,0,0,0.5);
  --transition: 0.25s ease;
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}
a { color: var(--text-primary); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.accent { color: var(--accent); }

/* ===== Navbar ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background-color: var(--bg-elevated);
  padding: 16px 30px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo a { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; }

/* Hamburger button (opens Categories sidebar) */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 22px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle:hover span { background: var(--accent); }

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Right side nav links: Home / Blog / About */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--accent); }

/* ===== Left Categories Sidebar ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  will-change: opacity, visibility;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.categories-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  height: 100dvh; /* Mobile browser address bar fix */
  width: 280px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  z-index: 999;
  transform: translate3d(-100%, 0, 0); /* Hardware accelerated transition */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
  will-change: transform;
}

.categories-sidebar.active {
  transform: translate3d(0, 0, 0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.sidebar-close:hover { 
  color: var(--accent); 
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.sidebar-links a {
  padding: 16px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.sidebar-links a:hover {
  background: #1f1f1f;
  color: var(--accent);
  padding-left: 26px;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: radial-gradient(ellipse at top, #1c1c1c 0%, var(--bg) 70%);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.4rem; margin-bottom: 10px; font-weight: 800; }
.hero p { color: var(--text-secondary); font-size: 1.05rem; }

/* ===== Section Header ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0 16px 0;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}
.section-header h2 { font-size: 1.35rem; font-weight: 700; }
.view-all {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  transition: var(--transition);
}
.view-all:hover { color: var(--accent-hover); }

.page-heading { font-size: 1.8rem; font-weight: 800; margin: 20px 0 24px 0; }

/* ===== Movie Grid & Cards ===== */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-bottom: 20px;
}
.movie-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: #3a3a3a;
}

.poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  overflow: hidden;
}
.poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.movie-card:hover .poster-wrapper img { transform: scale(1.06); }

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--accent);
  color: white;
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.card-details { padding: 14px; background: var(--bg-card); }
.card-details h3 {
  font-size: 0.92rem;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 6px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { font-size: 0.78rem; color: var(--text-muted); }

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  grid-column: 1 / -1;
}
.loading::before {
  content: '🎬';
  font-size: 1.6rem;
  opacity: 0.5;
}

/* ===== Section rhythm ===== */
.category-section { margin-bottom: 10px; }
.category-section + .category-section { margin-top: 8px; }
.section-header { margin: 44px 0 18px 0; }

.container > .category-section:not(:last-child) {
  border-bottom: 1px solid var(--border);
  padding-bottom: 30px;
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  margin-top: 48px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(180deg, #0b0b0b 0%, #111111 100%);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.footer-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(229, 9, 20, 0.10), transparent 35%);
  pointer-events: none;
}

.footer-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 28px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: inline-block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  transition: opacity var(--transition);
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer-accent-line {
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.35);
}

.footer-tagline {
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.footer-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  display: inline-block;
  position: relative;
  font-size: 0.9rem;
  color: #999;
  padding-bottom: 3px;
  transition: color 0.25s ease;
}

.footer-links-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.footer-links-list a:hover {
  color: #fff;
}

.footer-links-list a:hover::after {
  width: 100%;
}

.footer-legal {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 20px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.footer-divider {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.developer-credit {
  font-size: 0.82rem;
  color: #999;
  letter-spacing: 0.3px;
  transition: color 0.25s ease;
}

.developer-credit:hover {
  color: var(--accent);
}

/* ============================= */
/* ===== Admin Panel Styles ===== */
/* ============================= */
.admin-body { background-color: var(--bg); }
.admin-navbar { padding: 14px 30px; }
.admin-tag {
  font-size: 0.7rem;
  background: #262626;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-secondary);
  vertical-align: middle;
  margin-left: 6px;
}
.btn-logout {
  background: #262626;
  color: #fff;
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.btn-logout:hover { background: var(--accent); border-color: var(--accent); }

.admin-main { padding: 40px 20px; }
.admin-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.admin-card-header { margin-bottom: 24px; }
.admin-card-header h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.admin-subtext { color: var(--text-secondary); font-size: 0.88rem; }

.admin-form .form-row { margin-bottom: 18px; }
.admin-form .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}
.optional-tag {
  font-size: 0.7rem;
  background: #262626;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 500;
}
.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 12px;
  background: #202020;
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 7px;
  font-size: 0.92rem;
  transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #242424;
}
.form-group textarea { resize: vertical; }

.btn-submit {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
  margin-top: 6px;
  transition: var(--transition);
}
.btn-submit:hover { background: var(--accent-hover); }

@media (max-width: 640px) {
  .admin-form .two-col { grid-template-columns: 1fr; }
  .admin-card { padding: 22px; }
}

/* ===== Hero Upgrade ===== */
.hero {
  position: relative;
  padding: 80px 20px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(229,9,20,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at top, #1c1c1c 0%, var(--bg) 75%);
  overflow: hidden;
  transform: translateZ(0);   /* own compositing layer */
  contain: layout paint;      /* browser ko batata hai isse bahar repaint na phaile */
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 0%, transparent 100%);
  pointer-events: none;
  transform: translateZ(0);
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  position: relative;
  z-index: 3;
}
.hero p {
  position: relative;
  z-index: 3;
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(229,9,20,0.12);
  border: 1px solid rgba(229,9,20,0.35);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  position: relative;
  z-index: 3;
  text-transform: uppercase;
}

/* Hero background video layers */
.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 177.78vh;
  min-height: 56.25vw;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.70));
  pointer-events: none;
}

.hero.hero-has-video {
  background: #000;
}

.hero.hero-has-video::before {
  z-index: 1;
  opacity: 0.35;
}

.hero.hero-has-video h1,
.hero.hero-has-video p {
  z-index: 3;
}

/* Pro Search Box Styling */
.search-box {
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 50px;
  padding: 4px 4px 4px 20px;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 rgba(229, 9, 20, 0);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.4);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 15px;
  padding: 10px 0;
  width: 280px;
}

.search-box input::placeholder {
  color: #888;
}

.search-box button {
  background: linear-gradient(135deg, #e50914, #b0060f);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.search-box button:hover {
  background: linear-gradient(135deg, #ff0a16, #d0060f);
  transform: scale(1.04);
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.5);
}

.search-box button:active {
  transform: scale(0.97);
}

/* ===== Blog Grid ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 30px 0 60px;
}

.blog-card {
  background: #161616;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}

.blog-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.blog-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-img-wrap img {
  transform: scale(1.08);
}

.blog-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-body {
  padding: 16px 18px 20px;
}

.blog-date {
  font-size: 12px;
  color: #888;
}

.blog-card-body h3 {
  margin: 8px 0 10px;
  font-size: 17px;
  line-height: 1.4;
  color: #fff;
}

.blog-card-body p {
  font-size: 13.5px;
  color: #aaa;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* ===== Blog Article Page ===== */
.blog-article {
  max-width: 780px;
  margin: 0 auto;
  padding: 50px 20px 80px;
}

.blog-badge-inline {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.blog-article h1 {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 12px;
  color: #fff;
}

.blog-meta {
  color: #888;
  font-size: 13.5px;
  margin-bottom: 24px;
}

.blog-hero-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 28px;
}

.blog-content p {
  color: #ccc;
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 20px;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}