body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  margin-bottom: 8px;
}

.subtitle {
  margin-top: 0;
  color: #666;
}

#status {
  margin: 16px 0 24px;
  color: #555;
}

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

.card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.thumb-wrap {
  background: #eee;
  aspect-ratio: 0.707 / 1; /* A-series portrait ratio roughly */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  color: #777;
  font-size: 14px;
  text-align: center;
  padding: 12px;
}

.card-body {
  padding: 14px;
}

.title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}

.authors {
  font-size: 14px;
  color: #555;
  margin: 0 0 12px;
  line-height: 1.4;
}

.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.links a {
  font-size: 14px;
  text-decoration: none;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #222;
  background: #fafafa;
}

.links a:hover {
  background: #f0f0f0;
}

.back-link {
  margin: 50px 0 20px;
  text-align: center;
}

.back-link a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #f3f3f3;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
}

.back-link a:hover {
  background: #e8e8e8;
  transform: translateY(-1px);
}

.controls {
  margin: 20px 0;
}

#searchInput {
  width: 100%;
  max-width: 500px;
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
