/* Base Styles */
:root {
  --primary: #000000;
  --secondary: #453831;
  --light: #cfd8d7;
  --white: #ffffff;
  --accent: #c0091e;
}

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

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--primary);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  margin-bottom: 20px;
  font-weight: 600;
}

p {
  margin-bottom: 15px;
}

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

.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  background-color: white;
  color: #c0091e;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(242, 97, 1, 0.3);
}

/* Navigation */
.navbar {
  background-color: var(--primary);
  color: var(--white);
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
}

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

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

.nav-links a {
  color: var(--white);
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  height: 20px;
  width: 30px;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--white);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background-color: var(--primary);
  padding: 20px;
  z-index: 999;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-150%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-menu a {
  display: block;
  color: var(--white);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  background: url("https://images.unsplash.com/photo-1535016120720-40c646be5580?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D")
    no-repeat center center/cover;
  position: relative;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--white);
  margin-top: 70px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.2s forwards;
  opacity: 0;
}

.hero .btn {
  animation: fadeInUp 1s ease 0.4s forwards;
  opacity: 0;
}

/* Modern Search Section */
.search-section {
  padding: 60px 0 80px;
  background-color: var(--white);
}

.search-header {
  text-align: center;
  margin-bottom: 40px;
}

.search-header h2 {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 10px;
}

.search-header .subtitle {
  color: #666;
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.modern-search-container {
  max-width: 800px;
  margin: 0 auto 30px;
}

.search-bar-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-radius: 50px;
  padding: 5px 5px 5px 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.search-bar-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 5px 20px rgba(242, 97, 1, 0.2);
}

.search-icon {
  color: #999;
  margin-right: 10px;
  font-size: 18px;
}

.search-bar-wrapper input {
  flex: 1;
  border: none;
  padding: 15px 10px;
  font-size: 16px;
  outline: none;
  background: transparent;
}

.modern-search-btn {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modern-search-btn:hover {
  background-color: #e05a00;
  transform: translateX(5px);
}

.modern-search-btn i {
  transition: transform 0.3s ease;
}

.modern-search-btn:hover i {
  transform: translateX(3px);
}

.search-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 16px;
  background-color: var(--light);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-chip:hover {
  background-color: var(--secondary);
  color: var(--primary);
}

.filter-chip.active {
  background-color: var(--accent);
  color: white;
}

.search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.results-info {
  font-weight: 500;
  color: var(--primary);
}

.sort-options select {
  padding: 8px 15px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background-color: var(--white);
  color: var(--primary);
  font-family: "Poppins", sans-serif;
  cursor: pointer;
}

.sort-options select:focus {
  outline: none;
  border-color: var(--accent);
}

.load-more-container {
  text-align: center;
  margin-top: 40px;
}

.load-more-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 12px 30px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.load-more-btn:hover {
  background-color: #253556;
}

.loading-spinner {
  display: none;
}

/* Modern Movie Cards */
.movie-card {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.movie-poster {
  height: 450px;
  position: relative;
  overflow: hidden;
}

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

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

.movie-poster .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary), var(--light));
  color: var(--primary);
  font-weight: 500;
}

.movie-info {
  padding: 20px;
  position: relative;
}

.movie-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-year {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.movie-type {
  position: absolute;
  top: -15px;
  right: 15px;
  background-color: var(--accent);
  color: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

/* Movies Grid */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

/* Modern Trending Section */
.trending-section {
  padding: 80px 0;
  background-color: var(--white);
  position: relative;
  overflow: hidden;
}

.trending-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.03) 0%,
    rgba(69, 56, 49, 0.03) 100%
  );
  z-index: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--accent);
}

.section-subtitle {
  color: var(--secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.trending-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.trending-movies {
  display: flex;
  gap: 30px;
  padding: 20px 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.trending-movies::-webkit-scrollbar {
  display: none;
}

.trending-movies .movie-card {
  scroll-snap-align: start;
  flex: 0 0 calc(33.333% - 30px);
  min-width: 250px;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.carousel-prev,
.carousel-next {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: var(--primary);
}

.carousel-prev:disabled,
.carousel-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel-dots {
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background-color: var(--accent);
  transform: scale(1.2);
}

/* Modern About Section */
.about-section {
  padding: 100px 0;
  background-color: var(--light);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
}

.about-text h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background-color: var(--accent);
}

.about-text .lead {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 25px;
  font-weight: 500;
}

.about-text p {
  color: var(--secondary);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.about-image {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease;
  margin-top: 80px;
}

.about-image:hover {
  transform: translateY(-10px);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  
}

.about-image:hover img {
  transform: scale(1.05);
}

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

.feature-card {
  background-color: var(--white);
  padding: 30px;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(192, 9, 30, 0.1);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background-color: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: rotateY(180deg);
  background-color: var(--primary);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary);
}

.feature-card p {
  color: var(--secondary);
  font-size: 1rem;
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
}

.footer p {
  margin-bottom: 10px;
}

.social-links {
  margin-top: 20px;
}

.social-links a {
  display: inline-block;
  margin: 0 10px;
  color: var(--white);
  font-size: 20px;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: var(--white);
  margin: 50px auto;
  padding: 30px;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  position: relative;
  animation: slideIn 0.3s ease;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: var(--primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.movie-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.movie-details .top-section {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.movie-details .poster {
  flex: 0 0 300px;
  height: 450px;
  background-color: var(--light);
  border-radius: 8px;
  overflow: hidden;
}

.movie-details .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-details .poster .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  color: var(--primary);
  font-weight: 500;
}

.movie-details .info {
  flex: 1;
  min-width: 300px;
}

.movie-details .info h2 {
  font-size: 28px;
  color: var(--primary);
}

.movie-details .info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  color: #666;
}

.movie-details .info .meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.movie-details .info .plot {
  margin-bottom: 20px;
}

.movie-details .info .details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.movie-details .info .detail-item {
  background-color: var(--light);
  padding: 10px;
  border-radius: 5px;
}

.movie-details .info .detail-item h4 {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.movie-details .info .detail-item p {
  font-size: 14px;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .trending-movies .movie-card {
    flex: 0 0 calc(33.333% - 30px);
  }
}

@media (max-width: 992px) {
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .hero h1 {
    font-size: 40px;
  }

  .about-content {
    flex-direction: column;
  }

  .about-image {
    order: -1;
    max-width: 600px;
    margin: 0 auto 40px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .movie-details .top-section {
    flex-direction: column;
  }

  .movie-details .poster {
    flex: 0 0 auto;
    height: 400px;
  }

  .search-header h2 {
    font-size: 28px;
  }

  .search-bar-wrapper {
    flex-direction: column;
    border-radius: 10px;
    padding: 15px;
  }

  .search-bar-wrapper input {
    width: 100%;
    margin-bottom: 15px;
  }

  .modern-search-btn {
    width: 100%;
    justify-content: center;
  }

  .search-meta {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .trending-movies .movie-card {
    flex: 0 0 calc(50% - 30px);
  }

  .carousel-controls {
    gap: 10px;
  }
}

@media (max-width: 576px) {
  .movie-poster {
    height: 350px;
  }

  .movies-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .movie-details .poster {
    height: 350px;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .trending-movies .movie-card {
    flex: 0 0 calc(100% - 30px);
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
  }
}
