/* NejaTech game trailer player (shared by the homepage and every game page).
   Self-contained and prefixed "nt-" so it never collides with a page's own styles. */

/* Section padding is intentionally NOT set here: each page's own `section` rule applies,
   so the trailer lines up with its neighbouring sections. */
.nt-trailer-wrap {
  max-width: 960px;
  margin: 0 auto;
}

/* For pages whose headings are left-aligned */
.nt-trailer-wrap.nt-trailer-wrap--left {
  margin-left: 0;
}

.nt-trailer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nt-trailer video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Play button is added by trailer.js (without JS the native controls still work). */
.nt-trailer-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nt-trailer-play:hover,
.nt-trailer-play:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 0 14px rgba(255, 255, 255, 0.24);
}

.nt-trailer-play:focus-visible {
  outline: 3px solid #06b6d4;
  outline-offset: 4px;
}

.nt-trailer-play svg {
  width: 36px;
  height: 36px;
  margin-left: 5px;
}

.nt-trailer.is-playing .nt-trailer-play {
  display: none;
}

.nt-trailer-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font: 600 0.74rem/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.nt-trailer.is-playing .nt-trailer-badge {
  display: none;
}

/* ---------- Homepage "trailer reel": one player + a playlist of all five ---------- */
.nt-reel {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.nt-reel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nt-reel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.nt-reel-item:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(3px);
}

.nt-reel-item:focus-visible {
  outline: 3px solid #06b6d4;
  outline-offset: 2px;
}

.nt-reel-item[aria-pressed="true"] {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(96, 165, 250, 0.7);
}

.nt-reel-item img {
  flex: 0 0 auto;
  width: 96px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #0b1120;
}

.nt-reel-item > span {
  min-width: 0;
}

.nt-reel-item-title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #fff;
}

.nt-reel-item-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  color: #94a3b8;
}

@media (max-width: 860px) {
  .nt-reel {
    grid-template-columns: minmax(0, 1fr);
  }

  /* playlist becomes a swipeable row under the player */
  .nt-reel-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  }

  .nt-reel-item {
    flex: 0 0 240px;
    scroll-snap-align: start;
  }

  .nt-reel-item:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .nt-trailer-play {
    width: 68px;
    height: 68px;
  }

  .nt-trailer-play svg {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nt-trailer-play,
  .nt-reel-item {
    transition: none;
  }
}
