:root{
  --bg:#0b0d0f;
  --card:#0f1113;
  --muted:#9aa0a6;
  --accent:#b3c2ff;
  --gap:14px;
  --max-width:1100px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:linear-gradient(180deg,var(--bg),#08090a 140%);
  color:var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:30px 18px;
}

.container{
  width:100%;
  max-width:var(--max-width);
}

/* lista */
.movie-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:var(--gap);
}

/* cada item */
.movie-item{
  display:flex;
  gap:14px;
  align-items:center;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:10px;
  padding:12px;
  box-shadow: 0 6px 18px rgba(2,4,6,0.5);
  transition:transform .12s ease, box-shadow .12s ease;
}

.movie-item:hover{
  transform:translateY(-4px);
  box-shadow: 0 12px 30px rgba(2,4,6,0.6);
}

/* imagen del póster (clickable) */
.poster-link{
  display:block;
  width:100px;
  min-width:100px;
  height:150px;
  overflow:hidden;
  border-radius:6px;
  flex-shrink:0;
}

.poster{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:6px;
  transition:transform .18s ease;
}

.poster-link:focus .poster,
.poster-link:hover .poster{
  transform:scale(1.03);
}

/* texto */
.meta{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.title{
  font-weight:600;
  color:#fff;
  font-size:1rem;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.year{
  font-size:0.9rem;
  color:var(--muted);
}

/* adaptabilidad para pantallas pequeñas */
@media (max-width:720px){
  .movie-item{
    gap:12px;
    padding:10px;
  }
  .poster-link{
    width:78px;
    min-width:78px;
    height:118px;
  }
  .title{font-size:0.95rem}
}

/* formato lista más compacta en pantallas muy pequeñas */
@media (max-width:420px){
  body{padding:18px}
  .poster-link{width:68px;height:102px}
  .movie-item{padding:10px}
  .title{font-size:0.92rem}
}

/* mensaje vacío */
.empty{
  text-align:center;
  color:var(--muted);
  padding:18px;
}
