/* General Styles */
:root {
  --primary-color: #e50914;
  --secondary-color: #141414;
  --text-color: #ffffff;
  --background-color: #000000;
}

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

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

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

/* Navbar Styles */
.navbar {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 20px 0;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.search-form {
  display: flex;
}

.search-input {
  padding: 10px;
  border: none;
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  border-radius: 4px 0 0 4px;
}

.search-button {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: var(--text-color);
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-button:hover {
  background-color: #f40612;
}

/* Hero Section */
.hero {
  background-image: url("https://assets.nflxext.com/ffe/siteui/vlv3/f841d4c7-10e1-40af-bcae-07a3f8dc141a/f6d7434e-d6de-4185-a6d4-c77a2d08737b/US-en-20220502-popsignuptwoweeks-perspective_alpha_website_medium.jpg");
  background-size: cover;
  background-position: center;
  height: 80vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero .container {
  max-width: 800px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

/* Movie Grid */
.movie-section {
  padding: 60px 0;
}

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

.movie-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  position: relative;
}

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

.movie-poster {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.movie-info {
  padding: 15px;
}

.movie-title {
  font-size: 1rem;
  margin-bottom: 5px;
}

.movie-year {
  font-size: 0.9rem;
  color: #aaa;
}

.movie-details {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  color: var(--text-color);
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.btn-watch {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: var(--text-color);
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-watch:hover {
  background-color: #f40612;
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: #aaa;
  text-align: center;
  padding: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    margin-top: 20px;
    justify-content: center;
  }

  .search-form {
    margin-top: 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* Additional Styles */
.main-content {
  padding-top: 80px; /* To account for the fixed navbar */
}

.error-message,
.no-results {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-top: 20px;
}

