@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Nunito:wght@400;600&family=Open+Sans:wght@400;600&family=Bebas+Neue&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
*,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --bg: #0a0a0a;
      --surface: #141414;
      --surface2: #1e1e1e;
      --border: #2a2a2a;
      --red: #e50914;
      --red-dim: rgba(229,9,20,0.15);
      --text-muted: #b6b7be;
      --text-dim: #555;
      --poster-w: 120px;
      --poster-h: 180px;
      --surface: #111;
      --surface2: #1a1a1a;
      --border: rgba(255,255,255,0.07);
      --accent: #e8b84b;
      --text: #e8e8e8;
      --muted: #666;
      --radius: 6px;
      --nav-btn-size: 40px;
    
    }

    body {
      background: #0f1117;
      color: #e8eaf0;
      font-family: 'Open Sans', sans-serif;
      min-height: 100vh;
      overflow-x: hidden;
      overflow-y: auto;
    }
    .main {
      margin-left: 78px;
    }
    .page-title {
      text-align: center;
      font-size: 1.4rem;
      font-weight: 700;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: rgba(255,255,255,.65);
      padding: 26px 0 20px;
    }
  
    .grid-wrap {
      position: relative;
    }

    .grid {
      overflow-x: scroll;
      overflow-y: hidden;
      white-space: nowrap;
      -webkit-overflow-scrolling: touch;
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }

    .grid::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
    }

    .card {
      display: inline-block;
      vertical-align: top;
      white-space: normal;
      width: 12%;
      width: -webkit-calc(12.5% - 12px);
      width: calc(12.5% - 12px);
      margin: 6px;
      position: relative;
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      background: #1e2130;
      text-decoration: none;
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }

    .card:focus {
      outline: 3px solid #fff;
      outline-offset: 4px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
      z-index: 2;
    }

    .card:focus .play {
      opacity: 1;
    }

    .poster {
      position: relative;
      width: 100%;
      padding-bottom: 150%;
      overflow: hidden;
    }

    .poster img {
      display: block;
      position: absolute;
      top: 50%;
      left: 50%;
      width: 100%;
      height: 100%;
      min-width: 100%;
      min-height: 100%;
      -webkit-transform: translate(-50%, -50%);
      transform: translate(-50%, -50%);
      background: #2a2d3a;
    }

    .poster-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 12%, transparent 25%);
      -webkit-background: -webkit-linear-gradient(bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 12%, transparent 25%);
      z-index: 1;
      pointer-events: none;
    }

    .play {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 44px;
      height: 44px;
      margin-top: -22px;
      margin-left: -22px;
      border-radius: 50%;
      background: rgba(255, 255, 255, .18);
      border: 2px solid rgba(255, 255, 255, .5);
      display: -webkit-flex;
      display: flex;
      -webkit-align-items: center;
      align-items: center;
      -webkit-justify-content: center;
      justify-content: center;
      opacity: 0;
      -webkit-transition: opacity .2s ease;
      transition: opacity .2s ease;
      z-index: 3;
    }

    .play svg {
      width: 18px;
      height: 18px;
      fill: #fff;
      margin-left: 3px;
    }

    .meta {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 6px 8px;
      display: -webkit-flex;
      display: flex;
      -webkit-justify-content: space-between;
      justify-content: space-between;
      -webkit-align-items: center;
      align-items: center;
      z-index: 2;
      font-size: .7rem;
    }

    .views {
      display: -webkit-flex;
      display: flex;
      -webkit-align-items: center;
      align-items: center;
      color: rgba(255, 255, 255, .8);
    }

    .views svg {
      width: 12px;
      height: 12px;
      fill: rgba(255, 255, 255, .55);
      margin-right: 4px;
    }

    .year {
      color: rgba(255, 255, 255, .45);
      font-size: .67rem;
    }
/* ── Nav buttons ── */
.nav-btn {
  position: absolute;
  top: 50%; margin-top: -28px;
  width: 48px; height: 56px;
  background: rgba(15,17,23,.85);
  border: 2px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  border-radius: 6px;
  -webkit-transition: background .2s ease, border-color .2s ease;
  transition: background .2s ease, border-color .2s ease;
}

.nav-btn:hover, .nav-btn:focus {
  background: #f5a623;
  border-color: #f5a623;
  outline: none;
}

.nav-prev { left: 20px; }
.nav-next { right: 20px; }

/* ── Skeleton ── */
.rel-skeleton {
  display: inline-block;
  vertical-align: top;
  width: -webkit-calc(12.5% - 10px);
  width: calc(12.5% - 10px);
  margin: 0 5px;
  border-radius: 8px;
  overflow: hidden;
  background: #1e2130;
}

.rel-skeleton .sk-poster {
  width: 100%;
  padding-bottom: 150%;
  position: relative;
  overflow: hidden;
}

.rel-skeleton .sk-poster::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
  -webkit-animation: shimmer 1.4s infinite;
  animation: shimmer 1.4s infinite;
}

@-webkit-keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes shimmer          { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Error ── */
.error-msg {
  color: #e84545;
  font-size: .8rem;
  padding: 16px 0;
}

.no-results {
  display: inline-block;
  font-size: .8rem;
  color: var(--red)
}