/*
Theme Name: MovieFlix Core
Description: Base WordPress Movie Portal Theme with 6-Theme Architecture, Hero Auto-Slider & Universal Single Page.
Version: 1.3.0
Author: Custom Dev
*/

:root {
  --bg-body: #090514;
  --bg-surface: #120b24;
  --bg-card: #160e2c;
  --bg-info-grad: linear-gradient(135deg, #251042 0%, #140a24 100%);
  --accent: #9333ea;
  --accent-light: #a855f7;
  --accent-glow: rgba(147, 51, 234, 0.45);
  --border-color: rgba(168, 85, 247, 0.25);
  --btn-text: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: #f8fafc;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 100; width: 100%;
  background: rgba(8, 8, 16, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 800; flex-shrink: 0; }
.brand-icon {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
}
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.92rem; color: #cbd5e1; }
.nav-links a:hover { color: var(--accent-light); }
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 170px;
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 8px 0; z-index: 120;
  box-shadow: 0 12px 28px rgba(0,0,0,0.6);
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 7px 14px; font-size: 0.85rem; }
.dropdown-menu a:hover { background: rgba(255,255,255,0.06); }

.nav-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.search-box {
  display: flex; align-items: center; min-width: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-color);
  border-radius: 999px; padding: 5px 12px;
}
.search-box input { background: transparent; border: none; outline: none; color: #fff; width: 155px; min-width: 0; font-size: 0.85rem; }
.search-box button { background: transparent; border: none; color: #fff; cursor: pointer; flex-shrink: 0; }

.btn-primary {
  background: var(--accent); color: var(--btn-text);
  border: none; border-radius: 8px; padding: 8px 14px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 0 16px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.1); }

/* Hero Auto-Slider */
.hero-wrapper {
  margin: 20px auto 30px; border-radius: 18px;
  border: 1px solid var(--border-color);
  background: radial-gradient(circle at 75% 45%, var(--accent-glow), transparent 60%), var(--bg-surface);
  position: relative; overflow: hidden; min-height: 360px;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; padding: 40px 48px;
}
.hero-content { position: relative; z-index: 3; }
.hero-content h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 10px; }
.hero-content h1 span { color: var(--accent-light); }
.hero-sub { color: #cbd5e1; font-size: 1rem; margin-bottom: 8px; }
.hero-movie-title { font-size: 0.92rem; color: var(--accent-light); font-weight: 600; margin-bottom: 18px; }
.hero-image-stage { position: absolute; top: 0; right: 0; bottom: 0; width: 58%; z-index: 1; overflow: hidden; }
.hero-slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity 0.8s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 45%, transparent 100%);
}
.hero-dots { position: absolute; bottom: 16px; left: 48px; z-index: 4; display: flex; gap: 6px; }
.hero-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.3); cursor: pointer; }
.hero-dot.active { width: 24px; background: var(--accent-light); }

/* 6-Column Grids */
.section-block { margin-bottom: 38px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-size: 1.25rem; font-weight: 700; border-left: 4px solid var(--accent-light); padding-left: 10px; }
.see-all { font-size: 0.85rem; color: var(--accent-light); white-space: nowrap; }
.movie-grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

.movie-card {
  background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden; display: block;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.movie-card:hover {
  transform: translateY(-5px); border-color: var(--accent-light);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.movie-thumb { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: #0f172a; }
.movie-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-rating {
  position: absolute; top: 8px; left: 8px; z-index: 4; background: rgba(0,0,0,0.78);
  color: #facc15; font-size: 0.72rem; font-weight: 700; padding: 2px 6px; border-radius: 5px;
}
.badge-quality {
  position: absolute; top: 8px; right: 8px; z-index: 4; background: var(--accent);
  color: #fff; font-size: 0.68rem; font-weight: 700; padding: 2px 6px; border-radius: 5px;
}
.badge-lang {
  position: absolute; bottom: 8px; left: 8px; right: 8px; z-index: 4; text-align: center;
  background: rgba(0,0,0,0.75); color: #e2e8f0; font-size: 0.68rem; padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.movie-card-body { padding: 10px; }
.movie-card-title { font-size: 0.84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-card-meta { font-size: 0.74rem; color: #94a3b8; margin-top: 3px; }

/* Play Button Animation (Hover/Tap করলে শুধু দেখাবে) */
.movie-thumb::before {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0.72) 85%);
  opacity: 0; transition: opacity 0.25s ease; z-index: 2; pointer-events: none;
}
.movie-thumb::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 54px; height: 54px; margin-top: -27px; margin-left: -27px;
  border-radius: 50%; background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpolygon points='8,5 8,19 19,12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 22px 22px;
  box-shadow: 0 0 22px var(--accent-glow);
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3; pointer-events: none;
}
.movie-card:hover .movie-thumb::before,
.movie-card:focus-visible .movie-thumb::before,
.movie-card:active .movie-thumb::before { opacity: 1; }
.movie-card:hover .movie-thumb::after,
.movie-card:focus-visible .movie-thumb::after,
.movie-card:active .movie-thumb::after { opacity: 1; transform: scale(1); animation: mfPlayPulse 1.4s infinite; }

@keyframes mfPlayPulse {
  0%   { box-shadow: 0 0 18px var(--accent-glow), 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 26px var(--accent-glow), 0 0 0 16px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 18px var(--accent-glow), 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* Single Movie Page (100% Theme Colored + Thick Animated Player Border) */
.single-page { width: 100%; max-width: 980px; margin: 24px auto 60px; padding: 0 16px; }
.player-wrapper {
  background: #000;
  border: 3px solid var(--accent-light);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 24px var(--accent-glow), 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: mfPlayerShadowGlow 2.8s ease-in-out infinite alternate;
}
@keyframes mfPlayerShadowGlow {
  0% {
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow), 0 8px 28px rgba(0, 0, 0, 0.75);
  }
  100% {
    border-color: var(--accent-light);
    box-shadow: 0 0 38px var(--accent-glow), 0 0 14px var(--accent-light), 0 12px 36px rgba(0, 0, 0, 0.85);
  }
}
.video-container { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-container video, .video-container iframe { width: 100%; height: 100%; border: none; display: block; }
.player-notice { background: #09090b; text-align: center; font-size: 0.78rem; color: #e2e8f0; padding: 8px 12px; }
.player-notice span { color: #22c55e; font-weight: 600; }

/* Social Share Bar */
.mf-share-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 14px; padding: 10px 12px;
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px;
}
.mf-share-label { font-size: 0.82rem; font-weight: 700; color: #cbd5e1; margin-right: 4px; }
.mf-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 7px; font-size: 0.78rem; font-weight: 600;
  color: #fff; border: none; cursor: pointer; transition: transform 0.2s, filter 0.2s;
}
.mf-share-btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.mf-sh-fb { background: #1877f2; }
.mf-sh-tw { background: #1da1f2; }
.mf-sh-wa { background: #25d366; }
.mf-sh-tg { background: #0088cc; }
.mf-sh-cp { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }

.single-info-card {
  margin-top: 22px; background: var(--bg-info-grad);
  border: 1px solid var(--border-color); border-radius: 14px; padding: 24px;
}
.single-info-card h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 18px; word-break: break-word; }
.info-grid { display: grid; grid-template-columns: 185px 1fr; gap: 24px; align-items: start; }
.info-poster { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 2 / 3; }
.info-poster img { width: 100%; height: 100%; object-fit: cover; }
.info-meta-table { display: grid; gap: 8px; font-size: 0.9rem; }
.meta-rating { font-size: 1.15rem; font-weight: 700; color: #facc15; margin-bottom: 6px; }
.meta-row { display: grid; grid-template-columns: 95px 1fr; gap: 8px; }
.meta-label { color: #94a3b8; }

.download-section { text-align: center; margin: 28px 0; }
.download-section h3 { font-size: 1.15rem; margin-bottom: 14px; }
.download-stack { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dl-btn {
  width: 100%; max-width: 260px; padding: 10px 16px; background: #0a0a0f; color: #fff;
  border: 1.5px solid var(--accent-light); border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
}
.dl-btn:hover { background: var(--accent); box-shadow: 0 0 20px var(--accent-glow); transform: translateY(-2px); }

.single-subblock { margin-top: 28px; }
.single-subblock-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.screenshots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shot-box { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #111; }
.shot-box img { width: 100%; height: 100%; object-fit: cover; }
.shot-more { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.65); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; }

.carousel-arrows { display: flex; gap: 6px; }
.arrow-btn {
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: var(--accent); color: #fff; cursor: pointer; font-weight: bold;
  box-shadow: 0 0 10px var(--accent-glow);
}
.cast-row, .similar-row { display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; padding-bottom: 8px; }
.cast-row::-webkit-scrollbar, .similar-row::-webkit-scrollbar { display: none; }
.cast-item { min-width: 82px; text-align: center; }
.cast-avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; border: 2px solid var(--border-color); display: block; }
.cast-name { font-size: 0.76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-role { font-size: 0.68rem; color: #94a3b8; }
.similar-row .movie-card { min-width: 150px; max-width: 150px; }

.site-footer { text-align: center; padding: 24px 16px; border-top: 1px solid var(--border-color); font-size: 0.78rem; color: #94a3b8; margin-top: 40px; }

/* সব ডিভাইসের জন্য Auto-Responsive Breakpoints */
@media (max-width: 1100px) {
  .movie-grid-6 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 12px; }
  .nav-links { display: none; }
  .brand { font-size: 1.02rem; gap: 6px; }
  .brand-icon { width: 30px; height: 30px; }
  .nav-actions { flex: 1; justify-content: flex-end; gap: 8px; }
  .search-box { flex: 1; max-width: 155px; padding: 4px 10px; }
  .search-box input { width: 100%; font-size: 0.78rem; }
  .btn-primary { padding: 7px 10px; font-size: 0.78rem; }

  .hero-wrapper { grid-template-columns: 1fr; padding: 24px 18px 36px; min-height: 270px; margin: 14px auto 24px; }
  .hero-content h1 { font-size: 1.85rem; }
  .hero-image-stage { width: 100%; opacity: 0.4; }
  .hero-dots { left: 18px; bottom: 12px; }

  .movie-grid-6 { grid-template-columns: repeat(3, 1fr); gap: 12px; }

  /* মোবাইলেও বাম পাশে থাম্বনেইল এবং ডান পাশে মুভির ডিটেইলস */
  .single-info-card { padding: 16px; }
  .single-info-card h1 { font-size: 1.08rem; margin-bottom: 14px; }
  .info-grid { grid-template-columns: 118px 1fr; gap: 14px; align-items: start; }
  .info-poster { width: 100%; margin: 0; }
  .info-meta-table { gap: 5px; font-size: 0.78rem; }
  .meta-rating { font-size: 0.98rem; margin-bottom: 2px; }
  .meta-row { grid-template-columns: 64px 1fr; gap: 6px; }

  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .movie-grid-6 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .section-header h2 { font-size: 1.08rem; }
  .movie-card-body { padding: 8px; }
  .movie-card-title { font-size: 0.8rem; }
}