/* MVP: estilos compartidos listado y detalle */
:root {
  --bg: #ffffff;
  --card-bg: #f4f4f4;
  --text: #1a1a1a;
  --muted: #888;
  --accent: #c9a227;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Cabecera: franja negra que cruza toda la página */
.site-header {
  margin-bottom: 1.5rem;
}
.site-header__stripe {
  background: #000;
  width: 100%;
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.site-header__stripe .container {
  display: flex;
  align-items: center;
}
.site-header a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.site-header a:hover {
  text-decoration: none;
  opacity: 0.9;
}
.site-logo {
  display: block;
  height: auto;
  max-width: 280px;
  width: 100%;
}
.site-logo--svg {
  height: 3.75rem;
  width: auto;
  max-width: 100%;
}
.site-logo__text {
  fill: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 0.02em;
}
.site-header a:hover .site-logo__text {
  fill: var(--accent);
}

.site-search {
  margin-left: auto;
}
.site-search form {
  position: relative;
  display: flex;
  align-items: center;
}
.site-search input {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  width: 200px;
  transition: all 0.2s ease;
}
.site-search input:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent);
  outline: none;
  width: 240px;
}
.site-search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.site-search button {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.site-search button:hover {
  color: var(--accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Grid: 4 rows of 6 movies on desktop */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .movies-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 500px) {
  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.movie-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
}
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
  border-color: #e0e0e0;
}
.movie-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.movie-card a:hover {
  text-decoration: none;
}

.movie-card__poster {É
  aspect-ratio: 2/3;
  object-fit: cover;
  width: 100%;
  display: block;
  background: #2a2a2a;
}
.movie-card__title {
  padding: 0.6rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Paginador */
.pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  border: 1px solid #ddd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pagination a:hover {
  background: #e2e2e2;
  text-decoration: none;
}
.pagination .current {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border-color: var(--accent);
}
.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}
.pagination svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.5;
}

/* Detalle */
.detail {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .detail {
    grid-template-columns: 280px 1fr;
  }
}

.detail__poster {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius);
  background: #2a2a2a;
}

.detail__meta {
  color: var(--muted);
  font-size: 0.95rem;
}
.detail__meta dt {
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--text);
}
.detail__meta dd {
  margin: 0.25rem 0 0;
}

.detail__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.detail__links li {
  margin: 0;
}
.detail__links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.detail__links a:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  text-decoration: none;
}
.player-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.detail__section {
  margin-top: 1.5rem;
}
.detail__section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

/* Sugerencias al pie */
.suggestions {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2a2a;
}
.suggestions h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
}
.back-link:hover {
  color: var(--accent);
}

.error-404 {
  text-align: center;
  padding: 3rem 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
