:root {
  --bg: #090b10;
  --panel: #11151d;
  --ink: #f2f4f8;
  --muted: #a9b1c0;
  --accent: #e8b45b;
  --line: #262c38;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(ellipse at 70% 15%, #1b2431 0%, var(--bg) 55%);
}

button, input, select { font: inherit; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 5vw 14px;
}

.brand {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-decoration: none;
}

.search-wrap {
  position: relative;
  width: min(440px, 65vw);
}

.search-wrap span {
  position: absolute;
  top: 8px;
  left: 15px;
  color: var(--muted);
  font-size: 23px;
}

.search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  color: white;
  background: #11151ddc;
  border: 1px solid #343c4a;
  border-radius: 99px;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #e8b45b20;
}

.page-main {
  max-width: 1450px;
  margin: 0 auto;
  padding: 20px 4vw 50px;
}

.filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filters label { color: var(--muted); font-size: 12px; }

.filters select {
  padding: 9px 12px;
  color: #e8eaf0;
  background: #141923;
  border: 1px solid #343c4a;
  border-radius: 9px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(190px, 26%) 1fr minmax(180px, 22%);
  align-items: center;
  gap: 26px;
  min-height: 550px;
}

/* Lista vertical curva, con máscara de desvanecimiento en ambos extremos. */
.ring-area {
  position: relative;
  height: 510px;
  overflow-x: hidden;
  overflow-y: auto;
  perspective: 850px;
  cursor: grab;
  scrollbar-width: none;
  overscroll-behavior: contain;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.ring-area::-webkit-scrollbar { display: none; }
.ring-area.dragging { cursor: grabbing; }

.ring {
  position: relative;
  min-height: 100%;
  padding: 227.5px 0;
  transform-style: preserve-3d;
}

.movie-name {
  position: relative;
  display: block;
  width: 100%;
  height: 55px;
  padding: 0 8px;
  color: #d6dbe5;
  font-size: 17px;
  font-weight: 650;
  line-height: 55px;
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  text-overflow: ellipsis;
  overflow: hidden;
  text-shadow: none;
  transition: color .2s ease, text-shadow .25s ease, filter .15s linear, opacity .15s linear;
}

.movie-name.active {
  color: var(--accent);
  text-shadow: 0 0 20px #e8b45b55;
}

.movie-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.movie-title {
  max-width: 800px;
  margin: 0;
  font-size: clamp(26px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.poster {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(260px, 80%);
  height: 350px;
  overflow: hidden;
  background: linear-gradient(145deg, #172c44, #15202c 40%, #b56d36);
  border: 2px solid #c3c8d1;
  border-radius: 4px;
  box-shadow: 0 25px 65px #0009;
}

.poster::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #080a0d 0%, transparent 70%);
  content: "";
  pointer-events: none;
}

.poster-image, .preview-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-art {
  position: relative;
  font-size: 70px;
  filter: drop-shadow(0 8px 20px #0008);
}

.poster-caption {
  position: absolute;
  z-index: 1;
  right: 15px;
  bottom: 20px;
  left: 15px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

.movie-meta { margin: 0; color: var(--muted); font-size: 13px; }

.movie-description {
  max-width: 820px;
  margin: 0;
  color: #d3d7df;
  font-size: 15px;
  line-height: 1.65;
}

.preview-card {
  overflow: hidden;
  padding: 0;
  color: inherit;
  text-align: left;
  background: #141923;
  border: 1px solid #343c4a;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.preview-card:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.preview-card:disabled { cursor: default; opacity: .65; }

.preview-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  overflow: hidden;
  background: linear-gradient(135deg, #263e50, #111827 55%, #a96d43);
  font-size: 44px;
}

.preview-play {
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #141414;
  background: var(--accent);
  border-radius: 50%;
  font-size: 18px;
}

.preview-info { padding: 15px; }
.preview-info strong { display: block; margin-bottom: 6px; }
.preview-info small { color: var(--muted); line-height: 1.5; }

.empty-state {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #000e;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(1000px, 95vw);
  height: min(650px, 85vh);
  overflow: hidden;
  background: #10141c;
  border: 1px solid #404755;
  border-radius: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-close {
  width: 36px;
  height: 36px;
  color: white;
  background: transparent;
  border: 1px solid #596273;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.video-screen {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 25px;
  text-align: center;
  background: radial-gradient(circle at center, #2b3546, #050608);
}

.video-screen iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-screen video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: #000;
}

.trailer-link { color: var(--accent); }

@media (max-width: 900px) {
  .stage { grid-template-columns: 170px 1fr; min-height: unset; }
  .preview-card { grid-column: 1 / -1; width: 100%; max-width: 500px; margin: auto; }
  .ring-area { height: 440px; }
  .poster { height: 300px; }
}

@media (max-width: 600px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .search-wrap { width: 100%; }
  .stage { grid-template-columns: 1fr; }
  .ring-area {
    height: 220px;
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  }
  .movie-details { padding: 10px; }
  .poster { height: 300px; }
  .preview-card { grid-column: auto; }
}
