/* General reset and font */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

/* Body styling */
body {
  background: linear-gradient(to right, #1e1e2f, #252545);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* Header styling */
header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #ff4c4c;
  text-shadow: 1px 1px 5px #000;
}

/* Search box container */
.search-box {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search-box input {
  width: 300px;
  padding: 12px 20px;
  border-radius: 50px;
  border: none;
  outline: none;
  font-size: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.search-box button {
  padding: 12px 25px;
  border-radius: 50px;
  border: none;
  background-color: #ff4c4c;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.search-box button:hover {
  background-color: #e63946;
  transform: translateY(-2px);
}

/* Movies container grid */
#moviesContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  width: 100%;
  max-width: 1000px;
}

/* Individual movie card styling */
.movie-card {
  background-color: #2c2c3c;
  border-radius: 15px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

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

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

.movie-card h3 {
  margin: 12px 0 5px;
  font-size: 1.1rem;
}

.movie-card p {
  margin: 3px 0;
  font-size: 0.9rem;
  color: #ccc;
}

/* Rating badge on top-right of card */
.movie-card .rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff4c4c;
  color: #fff;
  padding: 5px 8px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Footer styling */
footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
}

/* Responsive design for small screens */
@media (max-width: 500px) {
  .search-box {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-box input, .search-box button {
    width: 100%;
  }
}
