/* ================= ROOT & THEME ================= */

:root {
  --bg: #f4f6fb;
  --card: rgba(255, 255, 255, 0.65);
  --text: #111;
  --muted: #555;
  --accent: #4f46e5;
  --glow: #ef4444;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

body.dark {
  --bg: #0f1115;
  --card: rgba(20, 22, 28, 0.65);
  --text: #fff;
  --muted: #aaa;
}

/* ================= GLOBAL ================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Poppins, system-ui;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease;
}

/* ================= FULL WEBSITE BACKGROUND VIDEO ================= */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
  transition: background 0.4s ease;
}

body.dark .bg-overlay {
  background: rgba(0, 0, 0, 0.75);
}

/* ================= NAVBAR ================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: 0.3s ease;
}

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

.theme-toggle {
  border: none;
  background: none;
  font-size: 1.3rem;
  cursor: pointer;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text);
  margin: 4px 0;
}

/* HARD FIX: hide mobile dark mode on desktop */
#themeToggleMobile {
  display: none !important;
}

@media (max-width: 768px) {
  #themeToggleMobile {
    display: flex !important;
  }

  .desktop-toggle {
    display: none !important;
  }
}

/* ================= HERO ================= */

.hero {
  min-height: 100vh;
  padding: 120px 20px 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  color: rgb(255, 230, 0);
}

.hero p {
  color: var(--muted);
  color: #f4f6fb;
}

/* ================= SEARCH ================= */

.search-box {
  margin-top: 35px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* INPUT */
.search-box input {
  width: 420px; /* ⬅ BIGGER */
  padding: 18px 22px; /* ⬅ TALLER */
  font-size: 1.05rem; /* ⬅ READABLE */
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #111; /* ⬅ FONT COLOR FIX */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* PLACEHOLDER */
.search-box input::placeholder {
  color: #666; /* ⬅ BETTER CONTRAST */
}

/* FOCUS EFFECT */
.search-box input:focus {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35), 0 30px 70px rgba(0, 0, 0, 0.35);
}

/* BUTTON */
.search-box button {
  padding: 18px 32px; /* ⬅ BIGGER BUTTON */
  font-size: 1.05rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff; /* ⬅ FONT COLOR FIX */
  border: none;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* BUTTON HOVER */
.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 70px rgba(79, 70, 229, 0.6);
}

/* ================= MOVIES GRID ================= */

.movies-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}

/* ================= MOVIE CARDS ================= */

.movie-card {
  position: relative;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.movie-card:hover {
  transform: translateY(-14px) scale(1.06);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 35px rgba(79, 70, 229, 0.35);
  z-index: 10;
}

.movie-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.movie-card h3 {
  padding: 12px;
  font-size: 0.95rem;
  text-align: center;
}

.movie-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.movie-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7),
    rgba(0, 0, 0, 0.1),
    transparent
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.movie-card:hover::after {
  opacity: 1;
}

.movie-card h3 {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  margin: 0;
  padding: 12px;
  text-align: center;
  font-size: 0.95rem;
  color: white;
  transform: translateY(12px);
  opacity: 0;
  transition: 0.35s ease;
  z-index: 2;
}

.movie-card:hover h3 {
  transform: translateY(0);
  opacity: 1;
}

body.dark .movie-card:hover {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(239, 68, 68, 0.45);
}

.movie-card {
  transform-style: preserve-3d;
}

.movie-card:hover {
  transform: translateY(-14px) scale(1.06) rotateX(4deg);
}

/* ================= MOVIE DETAILS ================= */

.movie-details {
  grid-column: 1 / -1;
  margin-top: 40px;
  padding: 32px;
  border-radius: 22px;

  background: var(--card);
  backdrop-filter: blur(16px);

  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;

  border: 2px solid rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.45), 0 0 80px rgba(239, 68, 68, 0.35);

  animation: glowPulse 1.8s infinite alternate;
}

.movie-details img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.movie-details h2 {
  margin-top: 0;
  font-size: 1.7rem;
}

.movie-details p {
  color: var(--muted);
  line-height: 1.7;
}

/* ================= SECTIONS ================= */

.section {
  padding: 80px 20px;
  display: flex;
  justify-content: center;
}

/* ================= ABOUT / CONTACT CARD ================= */

.card {
  width: 100%;
  max-width: 1100px;
  background: var(--card);
  backdrop-filter: blur(16px);
  padding: 50px;
  border-radius: 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;

  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-content {
  padding: 50px;
}

/* Hover lift + glow */
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 35px rgba(79, 70, 229, 0.35),
    0 0 120px rgba(79, 70, 229, 0.25);
}
/* Cursor glow layer */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(79, 70, 229, 0.25),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* Activate glow on hover */
.card:hover::before {
  opacity: 1;
}

.input-group input:hover,
.input-group textarea:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.35),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::after {
  opacity: 1;
}

/* ================= ABOUT FEATURES ================= */

.about-features {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.about-features div {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 18px;
  border-radius: 14px;
  font-weight: 500;
  transition: transform 0.3s ease;
}

/* Dark mode */
body.dark .about-features div {
  background: rgba(30, 33, 41, 0.5);
}

.about-features div:hover {
  transform: translateY(-6px);
}

/* ================= ABOUT CARD HOVER GLOW ================= */

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.35), 0 0 90px rgba(79, 70, 229, 0.25);
}

/* ================= CURSOR GLOW ================= */

.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(79, 70, 229, 0.25),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.about-card:hover::before {
  opacity: 1;
}

@media (max-width: 768px) {
  .card {
    padding: 30px;
  }
}

/* ================= CONTACT FORM (CLEAN & ALIGNED) ================= */

.card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Wrapper */
.input-group {
  position: relative;
  width: 100%;
}

/* Icon */
.input-group i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #6b7280;
  pointer-events: none;
  transition: color 0.3s ease;
}

/* Textarea icon */
.textarea-group i {
  top: 18px;
  transform: none;
}

/* Inputs */
.input-group input,
.input-group textarea {
  width: 100%;
  height: 52px; /* ⬅ FIX HEIGHT */
  padding: 0 18px 0 48px; /* ⬅ PERFECT ICON SPACE */
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

/* Textarea override */
.input-group textarea {
  height: 120px;
  padding-top: 14px;
  resize: none;
}

/* Focus */
.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.input-group input:focus + i,
.input-group textarea:focus + i {
  color: #4f46e5;
}

/* Button */
.btn {
  margin-top: 6px;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 15px 40px rgba(79, 70, 229, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 60px rgba(79, 70, 229, 0.6);
}

/* ================= DARK MODE ================= */

body.dark .input-group input,
body.dark .input-group textarea {
  background: rgba(20, 22, 28, 0.85);
  border-color: #333;
  color: #fff;
}

body.dark .input-group i {
  color: #9ca3af;
}

/* ================= FOOTER (REDESIGNED) ================= */

.footer {
  position: relative;
  padding: 50px 20px 40px;
  text-align: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

body.dark .footer {
  background: rgba(20, 22, 28, 0.45);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: footerFadeUp 0.8s ease both;
}

/* Text */
.footer-text {
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* Social icons */
.footer-socials {
  display: flex;
  gap: 22px;
}

.footer-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

/* Hover glow */
.footer-socials a:hover {
  transform: translateY(-6px) scale(1.1);
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.6), 0 0 60px rgba(79, 70, 229, 0.4);
  color: #fff;
}

/* Subtle pulse on hover */
.footer-socials a:hover i {
  animation: iconPulse 0.8s ease;
}

/* Animations */
@keyframes footerFadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* ================= ANIMATIONS ================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  from {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4),
      0 0 60px rgba(239, 68, 68, 0.25);
  }
  to {
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.7),
      0 0 100px rgba(239, 68, 68, 0.45);
  }
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--card);
    width: 200px;
    flex-direction: column;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .movie-details {
    grid-template-columns: 1fr;
  }

  .bg-video {
    display: none;
  }

  .bg-overlay {
    background: linear-gradient(135deg, #111827, #000);
  }
}

@media (max-width: 768px) {
  .search-box {
    flex-direction: column;
    align-items: center;
  }

  .search-box input {
    width: 90%;
  }

  .search-box button {
    width: 90%;
  }
}

/* ================= DARK MODE TOGGLE (ANIMATED) ================= */

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Icon */
.toggle-icon {
  font-size: 1.2rem;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

/* Hover glow */
.theme-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.5), 0 0 40px rgba(79, 70, 229, 0.35);
}

/* Dark mode style */
body.dark .theme-toggle {
  background: rgba(20, 22, 28, 0.6);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.45), 0 0 60px rgba(239, 68, 68, 0.3);
}

/* ================= DARK MODE TOGGLE VISIBILITY ================= */

/* Desktop defaults */
.desktop-toggle {
  display: flex;
}

.mobile-toggle {
  display: none;
}

/* ================= MOBILE NAV MENU ================= */

@media (max-width: 768px) {
  /* Hide desktop dark mode */
  .desktop-toggle {
    display: none !important;
  }

  /* Show mobile dark mode inside hamburger */
  .mobile-toggle {
    display: flex !important;
    width: 100%;
    gap: 12px;
    align-items: center;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    padding: 14px 18px;
    cursor: pointer;
    text-align: left;
  }

  /* Mobile menu container */
  .nav-links {
    position: absolute;
    top: 64px;
    right: 0;
    width: 240px;
    background: var(--card);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 10px 0;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  }
}

/* ================= NAV ITEMS (LINKS + BUTTON) ================= */

.nav-links a,
.nav-links .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Hover effect */
.nav-links a:hover,
.nav-links .nav-item:hover {
  background: rgba(79, 70, 229, 0.15);
  color: #fff;
}

/* Dark mode menu item glow */
.nav-links .mobile-toggle:hover {
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.5),
    0 0 25px rgba(79, 70, 229, 0.35);
}

/* Icon size */
.nav-links .nav-item i {
  font-size: 1.1rem;
}

/* ================= CONTACT FORM – MOBILE RESPONSIVE ================= */

@media (max-width: 768px) {
  /* Section spacing */
  #contact.section {
    padding: 60px 16px;
  }

  /* Contact card */
  #contact .card {
    width: 100%;
    max-width: 100%;
    padding: 28px 22px;
    border-radius: 22px;
  }

  /* Card content */
  #contact .card-content {
    padding: 0;
  }

  /* Heading */
  #contact h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
  }

  /* Form */
  #contact form {
    gap: 18px;
  }

  /* Input wrapper */
  .input-group {
    width: 100%;
  }

  /* Inputs */
  .input-group input,
  .input-group textarea {
    width: 100%;
    font-size: 1rem;
    border-radius: 14px;
  }

  /* Textarea height */
  .input-group textarea {
    height: 140px;
  }

  /* Icons */
  .input-group i {
    left: 16px;
    font-size: 1.05rem;
  }

  /* Submit button */
  #contact .btn {
    width: 100%;
    height: 54px;
    font-size: 1.05rem;
    border-radius: 16px;
    margin-top: 10px;
  }
}

/* ================= LOGO ================= */

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
}

/* Logo image */
.logo-img {
  height: 36px; /* perfect navbar size */
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Logo text */
.logo-text {
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Hover animation */
.logo:hover .logo-img {
  transform: rotate(-5deg) scale(1.08);
  filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.6));
}

@media (max-width: 768px) {
  .logo-img {
    height: 30px;
  }

  .logo-text {
    font-size: 1.2rem;
  }
}
