body {
  display: block;
  background: #1a2329;
}

.wrapper {
  display: block;
  cursor: default;
  max-width: 900px;
  margin: 0 auto;
  padding: 2em 1.5em;
  min-height: 100vh;
}

.tmdb-header {
  margin-bottom: 1.8em;
}

.tmdb-header h1 {
  color: #72b3bb;
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.25em;
}

.subtitle {
  color: #5a8a90;
  font-size: 0.85em;
}

.tmdb-controls {
  background: #1e2d33;
  border-radius: 10px;
  padding: 1.2em 1.4em;
  margin-bottom: 1em;
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.8em;
  flex-wrap: wrap;
  margin-bottom: 1em;
}

.controls label {
  color: #72b3bb;
  font-size: 0.88em;
  white-space: nowrap;
}

.controls input[type="number"] {
  width: 72px;
  font-size: 0.9em;
  color: #787d85;
  background-color: #252f37;
  border: 1px solid #405f63;
  padding: 5px 10px;
  height: 2.4em;
  border-radius: 8px;
}

.controls select {
  font-size: 0.9em;
  color: #787d85;
  background-color: #252f37;
  border: 1px solid #405f63;
  padding: 5px 10px;
  height: 2.4em;
  border-radius: 8px;
  cursor: pointer;
}

#search-input {
  flex: 1;
  min-width: 180px;
}

.fetch-btn {
  padding: 0 1.4em;
  height: 2.4em;
  background: #1b7c85;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88em;
  font-weight: 500;
  transition: background 0.18s;
  white-space: nowrap;
}

.fetch-btn:hover {
  background: #23a0ac;
}

.fetch-btn:disabled {
  background: #344044;
  cursor: not-allowed;
  color: #5a7a80;
}

.stats {
  color: #9eb5b5;
  font-size: 0.88em;
  margin-bottom: 0.8em;
}

.stats span {
  color: #72b3bb;
  font-weight: 600;
}

.filter-bar {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.3em 1em;
  border-radius: 20px;
  border: 1px solid #405f63;
  background: transparent;
  color: #72b3bb;
  cursor: pointer;
  font-size: 0.82em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-btn.active {
  background: #1b7c85;
  color: #fff;
  border-color: #1b7c85;
}

.filter-btn:hover:not(.active) {
  background: #233238;
}

/* Results area */
.results-area {
  width: 100%;
}

.results-area .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  background: #283636;
  color: #72b3bb;
  border-radius: 8px;
  padding: 0.9em 1.2em;
  margin-bottom: 0.5em;
}

.row-info {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  min-width: 0;
}

.row-title {
  font-size: 0.92em;
  color: #a8cdd1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alt-title {
  color: #5a8a90;
  font-style: italic;
}

.row-meta {
  font-size: 0.78em;
  color: #5a8a90;
}

.badge {
  padding: 0.2em 0.75em;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.badge-found {
  background: #163f42;
  color: #4cc9d4;
  border: 1px solid #1b7c85;
}

.badge-not-found {
  background: #252d30;
  color: #5a7a80;
  border: 1px solid #344044;
}

.noresults {
  color: #5a8a90;
  padding: 2em;
  text-align: center;
  font-size: 0.9em;
}

.error-msg {
  color: #c07070;
  padding: 2em;
  text-align: center;
  font-size: 0.9em;
}
