* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #0b0b0b;
  color: white;
  overflow-x: hidden;
}

/* Scrollbar */

::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: #e50914;
  border-radius: 20px;
}

/* Navbar */

.navbar {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 20px 60px;

  z-index: 1000;

  backdrop-filter: blur(20px);

  background: rgba(0, 0, 0, 0.25);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  color: #e50914;
  cursor: pointer;
  letter-spacing: 1px;
}

.logo:hover {
  transform: scale(1.05);
  transition: 0.3s;
}

.search-container {
  position: relative;
}

.search-container input {
  width: 320px;

  padding: 14px 18px;

  border: none;
  outline: none;

  border-radius: 50px;

  background: rgba(255, 255, 255, 0.08);

  color: white;

  backdrop-filter: blur(10px);

  transition: 0.4s;
}

.search-container input:focus {
  width: 380px;

  background: rgba(255, 255, 255, 0.12);
}

/* Suggestions */

#suggestions {
  position: absolute;

  top: 60px;
  left: 0;

  width: 100%;

  background: #181818;

  border-radius: 15px;

  overflow: hidden;

  display: none;

  max-height: 350px;

  overflow-y: auto;

  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

.suggestion-item {
  padding: 15px;

  cursor: pointer;

  transition: 0.3s;
}

.suggestion-item:hover {
  background: #e50914;
}

/* Hero */

.hero {
  height: 100vh;

  position: relative;

  background-size: cover;
  background-position: center;

  display: flex;
  align-items: center;

  padding-left: 80px;
}

.hero-overlay {
  position: absolute;

  width: 100%;
  height: 100%;

  background: linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3));
}

.hero::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: 0;

  width: 100%;
  height: 250px;

  background: linear-gradient(transparent, #0b0b0b);
}

.hero-content {
  position: relative;

  z-index: 2;

  width: 45%;

  animation: fadeUp 1s ease;
}

.hero-content h1 {
  font-size: 4.5rem;

  font-weight: 800;

  margin-bottom: 20px;

  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  line-height: 1.8;

  color: #ddd;

  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.play-btn,
.info-btn {
  padding: 14px 28px;

  border: none;

  border-radius: 8px;

  cursor: pointer;

  font-size: 15px;

  transition: 0.4s;
}

.play-btn {
  background: #e50914;
  color: white;
}

.info-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.play-btn:hover,
.info-btn:hover {
  transform: translateY(-4px);

  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Sections */

.section {
  padding: 40px 60px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.8rem;
}

/* Scroll Buttons */

.scroll-buttons {
  display: flex;
  gap: 10px;
}

.scroll-btn {
  width: 40px;
  height: 40px;

  border: none;

  border-radius: 50%;

  cursor: pointer;

  background: #1f1f1f;

  color: white;

  transition: 0.3s;
}

.scroll-btn:hover {
  background: #e50914;

  transform: scale(1.1);
}

/* Movie Row */

.movie-row {
  display: flex;
  gap: 18px;

  overflow-x: auto;

  scroll-behavior: smooth;

  padding-bottom: 20px;
}

.movie-row::-webkit-scrollbar {
  display: none;
}

/* Movie Card */

.movie-card {
  min-width: 220px;

  position: relative;

  cursor: pointer;

  transition: 0.45s ease;

  border-radius: 15px;

  overflow: hidden;
}

.movie-card img {
  width: 100%;
  height: 330px;

  object-fit: cover;

  display: block;
}

.movie-card:hover {
  transform: scale(1.08) translateY(-10px);

  z-index: 20;

  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

.movie-overlay {
  position: absolute;

  inset: 0;

  background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));

  opacity: 0;

  transition: 0.4s;
}

.movie-card:hover .movie-overlay {
  opacity: 1;
}

.movie-info {
  position: absolute;

  bottom: 20px;
  left: 15px;

  opacity: 0;

  transition: 0.4s;
}

.movie-card:hover .movie-info {
  opacity: 1;
}

.movie-info h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.movie-info p {
  font-size: 13px;
  color: #ddd;
}

/* Modal */

.modal {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.92);

  display: none;

  justify-content: center;
  align-items: center;

  z-index: 99999;

  padding: 20px;
}

.modal-content {
  width: 90%;
  max-width: 1100px;

  background: #111;

  border-radius: 20px;

  overflow: hidden;

  animation: modalShow 0.5s ease;
}

.modal-backdrop {
  height: 300px;
  overflow: hidden;
}

.modal-backdrop img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.modal-details {
  display: flex;
  gap: 30px;

  padding: 30px;
}

.modal-poster img {
  width: 250px;

  border-radius: 15px;
}

.modal-info {
  flex: 1;
}

.modal-info h1 {
  margin-bottom: 20px;

  font-size: 2.5rem;
}

.movie-meta {
  display: flex;
  gap: 25px;

  margin-bottom: 20px;
}

.modal-info p {
  line-height: 1.8;
  color: #ddd;
}

.modal-buttons {
  margin-top: 25px;
}

.modal-buttons button {
  padding: 12px 24px;

  border: none;

  border-radius: 8px;

  background: #e50914;

  color: white;

  cursor: pointer;
}

#closeModal {
  position: absolute;

  top: 20px;
  right: 35px;

  font-size: 45px;

  cursor: pointer;

  z-index: 2;
}

/* Loader */

.loader {
  position: fixed;

  inset: 0;

  background: #000;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 999999;
}

.spinner {
  width: 70px;
  height: 70px;

  border: 5px solid rgba(255, 255, 255, 0.15);

  border-top: 5px solid #e50914;

  border-radius: 50%;

  animation: spin 1s linear infinite;
}

/* Search Results */

#searchSection {
  display: none;
}

/* Footer */

.footer {
  margin-top: 50px;
  padding: 40px 20px;

  background: #080808;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  text-align: center;
}

.footer-content h3 {
  color: #e50914;

  font-size: 2rem;

  margin-bottom: 15px;
}

.footer-content p {
  color: #bdbdbd;

  margin: 8px 0;

  font-size: 15px;
}

.footer-content p:hover {
  color: white;

  transition: 0.3s;
}

.social-links {
  margin: 20px 0;
}

.social-links a {
  text-decoration: none;
  color: #e50914;
  font-weight: 600;
  margin: 0 15px;
  transition: 0.3s;
}

.social-links a:hover {
  color: white;
  text-shadow: 0 0 15px #e50914;
}

/* Animations */

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalShow {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive */

@media (max-width: 900px) {
  .hero-content {
    width: 90%;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .modal-details {
    flex-direction: column;
  }

  .modal-poster img {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 15px 20px;
  }

  .section {
    padding: 30px 20px;
  }

  .hero {
    padding-left: 20px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .search-container input {
    width: 180px;
  }

  .search-container input:focus {
    width: 220px;
  }
}
