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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6f8;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

#root {
  max-width: 1200px;
  margin: 0 auto;
}

form#controls, .search-wrapper {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

input[type="search"], select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

input[type="search"]:focus, select:focus {
  border-color: #007bff;
}

button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #0056b3;
}

#clear-show-search {
  padding: 10px 15px;
  background-color: #dc3545;
}

#clear-show-search:hover {
  background-color: #c82333;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.episode-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.episode-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.episode-card h2 {
  font-size: 1.3rem;
  padding: 20px;
  margin: 0;
  text-align: center;
  background-color: #fff;
  color: #2c3e50;
  border-bottom: 1px solid #f0f0f0;
}

.episode-card img {
  width: 100%;
  height: 250px;
  object-fit: cover; 
  display: block;
}

.episode-card .summary {
  padding: 20px;
  font-size: 0.95rem;
  color: #555;
  flex-grow: 1; 
}

.episode-card > div:not(.summary) {
  padding: 15px 20px 0;
}

.episode-card > div p {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.code {
  text-align: center;
  font-weight: bold;
  color: #007bff;
  padding: 15px 0 0;
  font-size: 1.1rem;
}

footer {
  margin-top: 50px;
  padding: 20px;
  text-align: center;
  color: #333;
  border-top: 1px solid #ddd;
}

footer p,
.tvmaze-attribution {
  color: #333;
}

footer a,
.tvmaze-attribution a {
  color: #004b9b;
  text-decoration: underline;
}

footer a:hover,
.tvmaze-attribution a:hover {
  color: #003366;
}

button {
  background-color: #004b9b; 
}
button:hover {
  background-color: #003366;
}

.code {
  color: #004b9b; 
}

select {
  color: #000 !important;
  background-color: #fff !important; 
  border: 1px solid #767676 !important; 
}