/* Algemene layout */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #000;
  text-align: center;
}

/* Navigatie */
header {
  background: #e50914;
  padding: 10px;
}
.navbar {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.navbar button {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 15px;
}

/* Zoekbalk */
.search-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.search-bar input {
  padding: 8px;
  width: 250px;
}
.search-bar button {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#filterNL {
  background: #007bff;
  color: white;
}

/* Resultaten */
#count {
  margin-bottom: 10px;
  font-weight: bold;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

/* ===== Cards: uniforme, strakke opbouw ===== */
.result-card {
  background: #fafafa;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);

  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;

  height: 500px; /* vaste hoogte */
}

/* Poster altijd gelijk */
.result-card > img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 8px;
}

/* Titel met jaar */
.result-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  min-height: 40px; /* ruimte voor max 2 regels */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Genres als strakkere labels */
.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
  min-height: 30px;
}
.genre-label {
  background: #f0f0f0;
  color: #222;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  line-height: 1.4;
  transition: background 0.2s;
}
.genre-label:hover {
  background: #ddd;
}

/* Score */
.score {
  font-size: 14px;
  margin-bottom: 8px;
  min-height: 18px;
}

/* Streaming logos - altijd boven de button */
.streaming-logos {
  margin-top: auto;
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  justify-content: center;
  min-height: 24px;
}
.logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: transform 0.2s;
}
.logo-icon:hover {
  transform: scale(1.1);
}

/* Subtiele Details-knop */
.result-card button {
  background: #f2f2f2;
  color: #333;
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  cursor: pointer;
  margin-top: auto;
}
.result-card button:hover {
  background: #ddd;
}

/* Streaming beschikbaarheid -> groene border i.p.v. statusbalk */
.result-card[data-has-streaming="true"] {
  border: 2px solid #28a745;
}

/* === Modal === */
.modal {
  display: none; /* standaard verborgen */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  text-align: left;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content img {
  max-width: 300px;
  max-height: 450px;
  width: auto;
  height: auto;
  display: block;
  margin: 10px auto; /* centreert de poster */
  border-radius: 5px;
}

.close {
  color: #666;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #e50914;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
