:root {
  --bg: #0a0a0b;
  --surface: #151416;
  --surface-2: #1e1c1f;
  --border: #2e2a2c;
  --text: #f3eeee;
  --text-dim: #a39a9c;
  --accent: #e23636;
  --accent-dark: #a4161a;
  --radius: 12px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

.site-header {
  text-align: center;
  padding: 0 16px 8px;
  background:
    linear-gradient(to bottom, rgba(10, 10, 11, 0.15) 55%, var(--bg) 96%),
    url("banner.jpg") center bottom / cover no-repeat;
}

.hero-content {
  padding: 120px 0 96px;
}

.site-header h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.site-header h1 .geeks {
  color: var(--accent);
}

.tagline {
  color: var(--text);
  opacity: 0.85;
  margin-top: 6px;
  font-size: 1.05rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.demo-banner {
  margin: 0 auto 16px;
  max-width: 640px;
  background: #2b1315;
  border: 1px solid #5c1a1e;
  color: #e8a0a4;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.demo-banner a {
  color: var(--accent);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* ---------- Suche ---------- */

.search-section {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 560px;
}

#search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

#search-input:focus {
  border-color: var(--accent);
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  max-height: 420px;
  overflow-y: auto;
}

.suggestions li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.suggestions li:hover,
.suggestions li.active {
  background: var(--surface);
}

.suggestions img,
.suggestions .poster-placeholder {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.poster-placeholder {
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.suggestion-title {
  font-weight: 600;
}

.suggestion-year {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.suggestions .status-line {
  color: var(--text-dim);
  cursor: default;
  justify-content: center;
  font-size: 0.9rem;
}

/* ---------- Toolbar ---------- */

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-right: 6px;
}

.filter-btn.active {
  background: var(--accent-dark);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

#sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ---------- Watchlist ---------- */

.watchlist {
  display: grid;
  gap: 16px;
}

.movie-card {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: opacity 0.2s;
}

.movie-card.watched {
  opacity: 0.55;
}

.movie-card img.poster,
.movie-card .poster-placeholder.big {
  width: 92px;
  height: 138px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.poster-placeholder.big {
  font-size: 2rem;
}

.movie-info {
  flex: 1;
  min-width: 0;
}

.movie-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.movie-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.movie-card.watched .movie-title {
  text-decoration: line-through;
}

.movie-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 2px;
}

.movie-plot {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.ratings {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.rating {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.rating b {
  color: var(--accent);
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.card-actions button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

.card-actions button:hover {
  border-color: var(--text-dim);
}

.card-actions .btn-watched.on {
  background: var(--accent-dark);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 48px 0;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 2px solid var(--accent-dark);
  background: var(--surface);
  text-align: center;
  padding: 28px 16px 32px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.site-footer .credit {
  margin-top: 8px;
  font-size: 0.78rem;
  opacity: 0.75;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

@media (max-width: 560px) {
  .movie-card {
    flex-direction: column;
  }
  .card-actions {
    flex-direction: row;
  }
}
