/* =========================================
   Movie Zone • Homepage Styles (Full Redesign)
   - Mobile-first, fluid type, modern cards
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;900&family=Orbitron:wght@500;700&display=swap");

/* -------- Theme Tokens -------- */
:root {
  --bg: #0a0a0f;
  --panel: #0f1629;
  --panel-2: #121826;
  --text: #c9d1e9;
  --muted: #8a94b3;
  --brand: #64b2ff;
  --brand-2: #223242;
  --stroke: #263356;
  --stroke2: #2c3a63;
  --hover: #1c2742;
  --focus: #9dd6ff;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* -------- Base & Typography -------- */
* {
  box-sizing: border-box;
  -webkit-user-select: none; /* Safari / Chrome */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Old IE/Edge */
  user-select: none;
}
input,
textarea,
button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Tahoma, Geneva, Verdana,
    sans-serif;
  background: radial-gradient(
      1200px 800px at 10% -10%,
      rgba(77, 166, 255, 0.08),
      transparent 55%
    ),
    radial-gradient(
      800px 600px at 100% 0%,
      rgba(122, 197, 255, 0.06),
      transparent 50%
    ),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.6;
}

/* Accessible focus */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

/* -------- Header -------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: linear-gradient(180deg, rgba(9, 9, 14, 0.8), rgba(9, 9, 14, 0.6)),
    var(--panel);
  backdrop-filter: saturate(1.4) blur(6px);
  color: var(--brand);
  text-align: center;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: clamp(22px, 3.2vw, 42px);
  padding: clamp(10px, 2.5vw, 18px) 12px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.02), 0 10px 30px rgba(0, 0, 0, 0.45);
}

.donate-link {
  color: #ffcc00;
  text-decoration: none;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 1px;
}

.donate-link:hover {
  color: #fff;
}

/* -------- Filter Bar -------- */
.filter-bar {
  position: sticky;
  top: clamp(54px, 8vw, 78px);
  z-index: 900;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px clamp(12px, 3vw, 24px);
  background: linear-gradient(
    180deg,
    rgba(18, 24, 38, 0.85),
    rgba(18, 24, 38, 0.65)
  );
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(8px);
  transition: transform 0.35s ease;
}

.filter-bar button,
.filter-bar select {
  appearance: none;
  border: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    rgba(18, 24, 38, 0.85),
    rgba(18, 24, 38, 0.65)
  );
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: clamp(12px, 1.3vw, 14px);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow);
}

.filter-bar button:hover,
.filter-bar select:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.filter-bar button.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.18), var(--shadow);
}

/* New button styles */
.filter-btn {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  border-radius: 9999px;
  transition: all 0.2s ease-in-out;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Tahoma, Geneva, Verdana,
    sans-serif;
  font-weight: 600;
}

.filter-btn-text {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 9999px;
  transition: all 0.2s ease-in-out;
  color: var(--text);
  background: var(--panel);
}

.filter-btn:hover .filter-btn-text {
  background: #252e46;
  color: var(--brand);
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Divider line */
.divider-line {
  width: 1px;
  height: 24px;
  background-color: var(--stroke);
  margin: 0 4px;
}

/* Filter selects */
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--panel);
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.filter-select:hover {
  background-color: #252e46;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#categoryFilter,
#languageFilter {
  background-color: var(--panel);
  outline: none;
}

/* Search */
.search-box {
  display: flex;
  align-items: stretch;
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  background: var(--panel);
}
.search-box input {
  background: transparent;
  color: var(--text);
  border: 0;
  padding: 10px 14px;
  min-width: 180px;
  font-size: clamp(13px, 1.4vw, 15px);
}
.search-box input::placeholder {
  .search-icon {
    font-size: 24px;
    color: #3498db;
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  color: #9aa6c3;
}
.search-box button {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  border-radius: 9999px;
  transition: all 0.2s ease-in-out;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Tahoma, Geneva, Verdana,
    sans-serif;
  font-weight: 600;
}
.search-box button:hover {
  filter: brightness(1.05);
}

/* -------- Sections -------- */
section {
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 clamp(12px, 3vw, 20px);
}
section h2 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(16px, 2.2vw, 24px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 8px 0 6px 6px;
}
/* Divider */
.divider {
  border-top: 1px solid var(--stroke);
  opacity: 0.6;
  width: 100%;
  display: block;
  margin: 12px 0 18px;
}
/* -------- Grid -------- */
.grid {
  display: grid;
  gap: clamp(12px, 2vw, 18px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

/* 3 columns at small tablets */
@media (min-width: 520px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* 4–5 columns mid desktops */
@media (min-width: 820px) {
  .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
/* 6 columns large */
@media (min-width: 1100px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
/* Mobile horizontal scroll for cards (<=520px) */
@media (max-width: 520px) {
  .grid.home {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory; /* snap horizontally */
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
  }

  .grid::-webkit-scrollbar {
    height: 6px;
  }

  .grid::-webkit-scrollbar-thumb {
    background: var(--stroke2);
    border-radius: 3px;
  }

  .card {
    flex: 0 0 calc(33.333% - 6.66px); /* 3 cards visible per screen width */
    min-width: calc(33.333% - 6.66px);
    scroll-snap-align: start; /* each card snaps individually */
  }
}

/* Force Grid Layout toggle (for All Movies/Series) */
.full-grid {
  display: grid;
}

/* -------- Cards -------- */
.card {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(18, 24, 38, 0.9),
    rgba(12, 18, 30, 0.9)
  );
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease, filter 0.22s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(77, 166, 255, 0.6);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  filter: saturate(1.05);
}

.card a.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

/* Title strip */
.card h3 {
  margin: 0;
  padding: 10px 10px 12px;
  font-size: clamp(12px, 1.35vw, 15px);
  font-weight: 800;
  text-align: center;
  color: #d5e2ff;
  background: radial-gradient(
      120% 120% at 50% -20%,
      rgba(77, 166, 255, 0.18),
      transparent 50%
    ),
    linear-gradient(180deg, rgba(15, 22, 41, 0.95), rgba(15, 22, 41, 0.85));
  border-top: 1px solid var(--stroke);
}

/* Play glyph hover */
.card::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(28px, 4vw, 44px);
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  background: radial-gradient(
    320px 220px at 50% 40%,
    rgba(0, 0, 0, 0.25),
    transparent 60%
  );
}
.card:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* -------- Buttons: Show More -------- */
.show-more-container {
  display: flex;
  justify-content: flex-end;
  padding: 10px 6px 0;
}
.show-more {
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, var(--hover), #2a3a63);
  color: var(--text);
  font-weight: 600;
  padding: 4px 6px;
  font-size: clamp(12px, 1.25vw, 14px);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow);
}
.show-more:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

/* -------- Links (generic) -------- */
a {
  color: var(--text);
  text-decoration: none;
}

/* -------- Footer -------- */
footer {
  margin-top: 24px;
  background: linear-gradient(
    180deg,
    rgba(12, 18, 30, 0.9),
    rgba(12, 18, 30, 1)
  );
  border-top: 1px solid var(--stroke);
  padding: clamp(16px, 3vw, 26px);
  text-align: center;
  color: var(--muted);
  font-size: clamp(12px, 1.2vw, 14px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.03);
}

/* New Footer Styles */
footer .container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

footer .footer-column {
  text-align: center;
}

footer .footer-column h3 {
  color: var(--brand);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(14px, 1.5vw, 18px);
  margin: 0 0 12px 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

footer .footer-links li {
  display: inline-block;
}

footer .footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 6px 10px;
  border-radius: 6px;
}

footer .footer-links a:hover {
  color: var(--brand);
  background: rgba(77, 166, 255, 0.1);
}

footer .copyright {
  margin-top: 16px;
  padding-top: 16px;
  /* border-top: 1px solid var(--stroke); */
  color: var(--muted);
  font-size: clamp(11px, 1.1vw, 13px);
}
/* Social icons in footer */
footer .social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

footer .social-link:hover {
  color: var(--brand);
  transform: translateY(-2px);
}

footer .social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: inline-block;
}

@media (max-width: 768px) {
  .card-link h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
  }
}

/* Tablet and desktop styles */
@media (min-width: 768px) {
  footer .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  footer .footer-column {
    text-align: left;
  }

  footer .footer-links {
    justify-content: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* -------- Empty/No Results -------- */
.no-results {
  text-align: center;
  color: var(--brand);
  font-weight: 800;
  margin: 18px 0 4px;
  font-size: clamp(14px, 2vw, 18px);
}

/* Donate Page */
.donate-section {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
}

.donate-section h2 {
  color: var(--brand);
  font-family: "Orbitron", sans-serif;
  margin-bottom: 12px;
}

.donate-section p {
  color: var(--muted);
  margin-bottom: 24px;
}

.donate-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.donate-btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

.donate-btn.paypal {
  background: #ffc439;
  color: #111;
}

.donate-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.crypto-box {
  background: var(--panel-2);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  text-align: left;
  max-width: 400px;
}

.crypto-box h3 {
  color: var(--brand);
  margin-bottom: 10px;
}

.crypto-box p {
  margin: 8px 0;
  color: var(--text);
  word-break: break-all;
}

.back-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 16px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--brand);
  text-decoration: none;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: rgba(77, 166, 255, 0.1);
}

.crypto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  gap: 10px;
}

.crypto-item p {
  margin: 0;
  flex: 1;
}

.crypto-item button {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.crypto-item button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.crypto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--stroke);
  gap: 10px;
}

.crypto-item:last-child {
  border-bottom: none; /* remove line on last item */
}

.crypto-item p {
  margin: 0;
  flex: 1;
}

.crypto-item button {
  background: #474a4d; /* solid black */
  border: 1px solid var(--stroke);
  color: #fff;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.crypto-item button:hover {
  background: #111; /* slightly lighter black */
  transform: translateY(-2px);
  opacity: 0.95;
}

/* Pagination Styles - Dark Blue Theme */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px; /* space between buttons and page info */
  margin-top: 20px;
}

.pagination button {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff; /* white text */
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.2s;
}

.pagination button:hover {
  background-color: #3b5bdb; /* lighter blue on hover */
  transform: translateY(-2px); /* subtle lift effect */
}

#pageInfo {
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff; /* visible on dark blue background */
  min-width: 40px; /* keeps width consistent */
  text-align: center;
}

/* ===================
   Preloader Styling
   =================== */
#preloader {
  position: fixed;
  top: 25;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0a0f2c, #000000);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

/* Spinner container */
.spinner {
  display: flex;
  gap: 12px;
}

/* Animated dots */
.spinner div {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  animation: bounce 0.8s infinite alternate;
}

.spinner div:nth-child(2) {
  animation-delay: 0.2s;
}
.spinner div:nth-child(3) {
  animation-delay: 0.4s;
}

/* Bounce animation */
@keyframes bounce {
  from {
    transform: translateY(0);
    opacity: 0.6;
  }
  to {
    transform: translateY(-18px);
    opacity: 1;
  }
}
  /* Ad box */
   .ad-box {
        background: #121826;
        border: 1px solid #263356;
        border-radius: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 1.2em auto;
        padding: 4px;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
        overflow: hidden;
      }
    .top-banner,
      .bottom-banner {
        width: 380px;
        height: 70px;
      }
     
      /* Responsive */
      @media (max-width: 768px) {
        .top-banner,
        .bottom-banner {
          width: 380px;
          height: 70px;
        }
       
      }
      .info-message {
  text-align: center;
  color: #c9d1e9;
  font-weight: 400;
  margin: 0px 0;
  line-height: 1.2;
}

.info-message h5 {
  margin: 8px 0;
  font-size: 0.8rem;
}

.info-message h5:first-child::before {
  content: "🎬 ";
}

.info-message h5:last-child::before {
  content: "📢 ";
}
/* ---- Logo Link (Clickable MovieZone) ---- */
     .logo-link {
      color: var(--brand);
      text-decoration: none;
      cursor: pointer;
      display: inline-block;
      transition: color 0.2s ease, transform 0.2s ease;
     }

     .logo-link:hover {
      color: var(--brand-2);
      transform: scale(1.05);
     }
      
/* ==============================
  Dark Animated Ad Buttons - PC & Mobile
============================== */



.buttons {
  display: flex;
  flex-wrap: nowrap; /* always one line */
  justify-content: center;
  gap: 15px;
  overflow-x: auto; /* scroll if overflow on mobile */
  padding: 10px;
  -webkit-overflow-scrolling: touch;
}

.ad-btn {
  position: relative;
  flex: 0 0 auto; /* do not shrink */
  padding: 16px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  min-width: 140px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

/* Button 1: Gradient Blue Glow */
.btn1 {
  background: linear-gradient(135deg, #0f1c3c, #000);
}
.btn1:hover {
  background: linear-gradient(135deg, #000, #0f1c3c);
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0,0,0,0.9);
}

/* Button 2: Neon Blue Border */
.btn2 {
  background: #000;
  border: 2px solid #1e90ff;
}
.btn2:hover {
  box-shadow: 0 0 20px #1e90ff, 0 0 35px #00ffff;
  transform: scale(1.08);
}

/* Button 3: Ripple Effect */
.btn3 {
  background: #111;
}
.btn3::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0; height: 0;
  background: rgba(30,144,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}
.btn3:active::after {
  width: 300px;
  height: 300px;
  opacity: 0.5;
  transition: 0s;
}

/* Button 4: Rainbow Glow Animation */
.btn4 {
  background: #000;
  border-radius: 15px;
  border: 2px solid transparent;
}
.btn4::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, #1e90ff, #ff00ff, #00ffff, #1e90ff);
  border-radius: 18px;
  z-index: -1;
  filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: glowAnim 3s linear infinite;
}
.btn4:hover::before {
  opacity: 1;
}

@keyframes glowAnim {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Mobile scroll & responsiveness */
.buttons::-webkit-scrollbar {
  display: none; /* hide scroll bar */
}
@media screen and (max-width: 768px) {
  .ad-btn {
    min-width: 120px;
    padding: 14px 25px;
    font-size: 1rem;
  }
}
@media screen and (max-width: 480px) {
  .ad-btn {
    min-width: 100px;
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}