/* Standard CSS Reset & Variables */
:root {
  --bg-dark: #0a0d14;
  --bg-card: #121824;
  --bg-card-hover: #1a2333;
  --bg-glass: rgba(18, 24, 36, 0.85);
  --accent-red: #e50914;
  --accent-red-hover: #f40612;
  --accent-gold: #ffb400;
  --accent-blue: #00d2ff;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent-red);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.nav-search {
  flex: 1;
  max-width: 450px;
  position: relative;
}

.nav-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 10px 16px 10px 42px;
  border-radius: 30px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.nav-search input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-menu a {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-menu a:hover, .nav-menu a.active {
  color: #fff;
}

.nav-pills {
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.pill-btn:hover, .pill-btn.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

/* Responsive Ad Container Controls */
.ad-slot {
  margin: 15px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ad-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  opacity: 0.6;
}

/* Device-based Ad Targeting Rules */
.desktop-only-ad {
  display: none !important;
}

.mobile-only-ad {
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .desktop-only-ad {
    display: flex !important;
    flex-direction: column;
    align-items: center;
  }
  .mobile-only-ad {
    display: none !important;
  }
}

/* Page Layout with Desktop Ad Sidebars */
.main-wrapper {
  max-width: 1300px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1200px) {
  .main-wrapper.has-sidebars {
    grid-template-columns: 160px 1fr 160px;
  }
}

.skyscraper-ad {
  display: none;
}

@media (min-width: 1200px) {
  .skyscraper-ad {
    display: block;
    position: sticky;
    top: 100px;
    height: 600px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    padding: 5px;
  }
}

/* Featured Hero Carousel */
.carousel-section {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  margin-bottom: 25px;
}

.carousel-container {
  position: relative;
  height: 380px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .carousel-container {
    height: 480px;
  }
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-img-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0a0d14 0%, rgba(10, 13, 20, 0.7) 40%, rgba(0, 0, 0, 0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.carousel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 12px;
}

.carousel-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

@media (min-width: 768px) {
  .carousel-title {
    font-size: 38px;
  }
}

.carousel-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.rating-star {
  color: var(--accent-gold);
  font-weight: bold;
}

.carousel-actions {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.btn-primary:hover {
  background: var(--accent-red-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Carousel Controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid var(--border-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

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

.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }

.carousel-dots {
  position: absolute;
  bottom: 15px;
  right: 25px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: var(--accent-red);
  width: 24px;
  border-radius: 10px;
}

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 15px 0;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--accent-red);
  border-radius: 2px;
}

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

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
}

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 9, 20, 0.5);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
}

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

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

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

.badge-quality {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .card-play-overlay {
  opacity: 1;
}

.play-circle {
  width: 52px;
  height: 52px;
  background: var(--accent-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.8);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.movie-card:hover .play-circle {
  transform: scale(1);
}

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

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-details {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.btn-card-dl {
  margin-top: auto;
  width: 100%;
  background: rgba(229, 9, 20, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(229, 9, 20, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.movie-card:hover .btn-card-dl {
  background: var(--accent-red);
  color: #fff;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s;
}

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

/* Download State Modal Special Styling */
.dl-modal-body {
  text-align: center;
}

.dl-status-icon {
  width: 70px;
  height: 70px;
  background: rgba(229, 9, 20, 0.1);
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  font-size: 32px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(229, 9, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

.dl-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.dl-modal-movie-name {
  color: var(--accent-gold);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.dl-progress-box {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  border: 1px solid var(--border-color);
}

.dl-progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
}

.dl-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold));
  transition: width 1s linear;
}

.dl-timer-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.dl-timer-seconds {
  color: var(--accent-red);
  font-size: 20px;
}

.dl-prompt-notice {
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: #e2f8ff;
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  margin: 18px 0;
}

.dl-prompt-notice strong {
  color: var(--accent-blue);
}

.dl-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

@media (min-width: 480px) {
  .dl-actions {
    flex-direction: row;
  }
  .dl-actions .btn-primary, .dl-actions .btn-secondary {
    flex: 1;
    justify-content: center;
  }
}

/* Legal Pages Modal Styling */
.legal-modal-body {
  max-height: 65vh;
  overflow-y: auto;
  text-align: left;
  font-size: 14px;
  color: var(--text-muted);
  padding-right: 8px;
}

.legal-modal-body h3 {
  color: #fff;
  font-size: 18px;
  margin: 15px 0 8px 0;
}

.legal-modal-body p {
  margin-bottom: 12px;
}

/* Footer Section */
.site-footer {
  background: #06080e;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  padding: 30px 20px;
  text-align: center;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  list-style: none;
}

.footer-links button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.footer-links button:hover {
  color: var(--accent-red);
}

.footer-disclaimer {
  font-size: 12px;
  color: #64748b;
  max-width: 800px;
  margin: 0 auto 15px auto;
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}
