* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
}

.header {
  background-color: white;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}

h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 2em;
}

#searchInput {
  padding: 12px 20px;
  width: 100%;
  max-width: 500px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  transition: border-color 0.3s;
}

#searchInput:focus {
  outline: none;
  border-color: #4CAF50;
}

button {
  margin-left: 10px;
  padding: 12px 24px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #45a049;
}

.posters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 10px;
}

.poster-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.poster-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.poster-link {
  display: block;
  overflow: hidden;
  background-color: #f8f8f8;
}

.poster-thumbnail {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s;
}

.poster-card:hover .poster-thumbnail {
  transform: scale(1.05);
}

.poster-info {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.poster-nid {
  display: inline-block;
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: bold;
  margin-bottom: 8px;
  align-self: flex-start;
}

.poster-area {
  color: #666;
  font-size: 0.85em;
  margin-bottom: 8px;
  font-style: italic;
}

.poster-title {
  color: #333;
  font-size: 1em;
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: 600;
  flex-grow: 1;
}

.poster-authors {
  color: #777;
  font-size: 0.9em;
  line-height: 1.4;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

#loading {
  color: #666;
  font-style: italic;
  font-size: 1.1em;
  padding: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .posters-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  
  h1 {
    font-size: 1.5em;
  }
  
  #searchInput {
    width: 100%;
    margin-bottom: 10px;
  }
  
  button {
    margin-left: 0;
    width: 100%;
  }
}