/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  background: #222;
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
}
header h1 {
  margin: 0 0 0.3rem;
  font-size: 1.8rem;
}
header p {
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
}

/* Container */
.container {
  max-width: 960px;
  margin: 1rem auto;
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 4px;
}

/* Headings */
h1, h2 {
  color: #222;
}
h2 {
  margin-top: 30px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

/* Links */
a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover, a:focus {
  color: #0056b3;
  text-decoration: underline;
}

/* Genres & A-Z Link Buttons */
.genres, .az {
  display: flex;
  flex-wrap: wrap;
  margin: 15px 0;
}
.genres a,
.az a {
  display: inline-block;
  margin: 5px 10px 5px 0;
  padding: 8px 15px;
  background: #007bff;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}
.genres a:hover,
.az a:hover {
  background: #0056b3;
}

/* Year Dropdown */
.year-dropdown {
  margin: 15px 0;
}
.year-dropdown select {
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-right: 10px;
  min-width: 150px;
}
.year-dropdown button {
  padding: 8px 16px;
  font-size: 1rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.year-dropdown button:hover,
.year-dropdown button:focus {
  background: #0056b3;
}

/* Pagination */
.pagination {
  margin-top: 20px;
  text-align: center;
}
.pagination a {
  margin: 0 5px;
  padding: 8px 14px;
  background: #007bff;
  color: white;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}
.pagination a:hover,
.pagination a:focus {
  background: #0056b3;
}
.pagination span {
  margin: 0 10px;
  font-weight: 600;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9em;
  padding: 20px;
  color: #777;
}

/* Responsive layout */
@media (max-width: 600px) {
  .genres a,
  .az a {
    flex: 1 1 100%;
    text-align: center;
    margin: 5px 0;
  }
  .year-dropdown {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .year-dropdown select,
  .year-dropdown button {
    width: 100%;
    margin: 5px 0;
  }
}


.search-form {
  position: relative;
}

.search-form {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
}


.search-wrapper input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
}

#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #000;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%; /* now matches input width */
  border-radius: 0 0 4px 4px;
}

#suggestions li {
  padding: 8px 12px;
  cursor: pointer;
}

#suggestions li:hover {
  background-color: #f0f0f0;
}


.search-form button {
  padding: 8px 15px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.3s ease;
}

.search-form button:hover,
.search-form button:focus {
  background-color: #0056b3;
}

