@font-face {
  font-family: "Outfit";
  src: url("/site/templates/fonts/Outfit-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/site/templates/fonts/Outfit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/site/templates/fonts/Outfit-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/site/templates/fonts/Outfit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: #120201;
  color: #fff;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4px;
}

/* ── HERO ── */
.hero { position: relative; width: 100%; min-height: 70vh; display: flex; align-items: center; justify-content: flex-start; overflow: hidden; background: #120201; }
.hero-bg { position: absolute; inset: 0; background-color: #e11e16; }
.hero-bg-img { position: absolute; inset: 0; background-size: cover; background-position: center 20%; mix-blend-mode: darken; opacity: 0.85; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, #120201 0%, rgba(18,2,1,0.95) 10%, rgba(18,2,1,0.5) 40%, rgba(18,2,1,0) 100%); }
.hero-content { position: relative; z-index: 10; width: 100%; padding: 4rem 5% 0.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }

.hero-motto {
  color: #fff;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 50px;
  font-weight: 600;
  text-align: center;
  width: 100%;
  margin-top: -5rem;
}

.motto-dot {
  color: #ffb7b5;
}

/* ── HOME SECTIONS ── */
.home-sections { padding: 1rem 5% 2rem; margin-top: -12.5rem; position: relative; z-index: 3; }

.home-section { margin-bottom: 0.8rem; }
.home-section:last-child { margin-bottom: 0; }

.section-title {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: rgb(255, 255, 255);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 15px;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
  margin-bottom: 0.7rem;
}

.section-title:hover {
  background: #e11e16;
}

/* ── SHARED SCROLLBAR & DRAG STYLING ── */
.up-next-scroll,
.poster-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1.5rem;
  padding-top: 0.2rem;
  padding-left: 0.2rem;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

/* Hide scrollbars for WebKit browsers */
.up-next-scroll::-webkit-scrollbar,
.poster-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Active drag state */
.up-next-scroll.is-dragging,
.poster-scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.up-next-scroll.is-dragging img,
.poster-scroll.is-dragging img {
  pointer-events: none;
}

/* ── UP NEXT SCROLL ── */
.up-next-card { 
  flex: 0 0 320px;
  max-width: 320px; 
  background: rgba(255,255,255,0.025); 
  border: 2px solid rgba(255,255,255,0.08); 
  border-radius: 10px; 
  overflow: hidden; 
}
.up-next-card:hover { border-color: #e11e16; }

a.up-next-card {
  text-decoration: none;
  color: inherit;
}

.up-next-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: rgba(255,255,255,0.05); }
.up-next-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-next-labels { position: absolute; bottom: 8px; left: 8px; display: flex; flex-direction: column; gap: 0.2rem; }
.up-next-show-title { background: #e11e16; color: #fff; text-decoration: none; font-size: 0.6rem; font-weight: 600; line-height: 15px; padding: 0.2rem 0.4rem; border-radius: 4px; width: fit-content; }
.up-next-ep-label { background: #ffb7b5; color: #000; text-decoration: none; font-size: 0.65rem; font-weight: 600; line-height: 15px; padding: 0.2rem 0.4rem; border-radius: 4px; width: fit-content; }
.episode-info { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.episode-info-top { display: flex !important; justify-content: space-between; align-items: center !important; gap: 0.5rem; }
.episode-info-left { display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; flex: 1; min-width: 0; }
.episode-info-right { display: flex !important; align-items: center !important; justify-content: center !important; align-self: center !important; flex-shrink: 0; }
.episode-watched-btn { margin-top: -0.2rem !important; align-self: center !important; flex-shrink: 0; background: rgba(255,255,255,0.06); border: 2px solid #e11e16; border-radius: 5px; padding: 0.35rem 0.4rem; cursor: pointer; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
.episode-watched-btn .pill-status-icon { height: 13px; width: auto; display: block; margin: 0 !important; filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(3858%) hue-rotate(351deg) brightness(92%) contrast(94%); }
.episode-watched-btn:hover { background: rgba(255,255,255,0.12); }
.episode-watched-btn.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; border: 2px solid #e11e16; }
.episode-title { font-size: 0.82rem; font-weight: 600; color: #fff; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode-date { font-size: 0.68rem; color: rgba(255,255,255,0.45); font-weight: 600; line-height: 15px; }

/* ── POSTER SCROLL (Movies/TV cards) ── */
.home-card-wrapper { 
  position: relative; 
  flex: 0 0 170px; 
  min-width: 170px; 
  border-radius: 10px; 
  overflow: visible; 
  border: 2px solid rgba(255,255,255,0.08); 
  background: rgba(255,255,255,0.025); 
}
.home-card-wrapper:hover { border-color: #e11e16; }
.home-card { text-decoration: none; color: #fff; border: none; border-radius: 0; overflow: visible; background: transparent; display: block; }
.home-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; background: rgba(255,255,255,0.05); border-radius: 8px 8px 0 0; }
.home-poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-info { display: flex; flex-direction: column; padding: 0.5rem 0.75rem; }

.home-item-title { 
  font-size: 0.75rem; 
  color: #fff; 
  line-height: 12px; 
  font-weight: 500; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  line-clamp: 2; 
  -webkit-box-orient: vertical; 
  white-space: normal; 
}

.home-item-date { font-size: 0.65rem; font-weight: 500; line-height: 15px; color: rgba(255,255,255,0.5); }

.home-options-btn { position: absolute; top: 7px; right: 8px; z-index: 5; cursor: pointer; display: flex; align-items: center; justify-content: center; background: none; border: none; padding: 0; margin: 0; }
.home-options-icon { height: 25px; width: auto; display: block; filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0,0,0,0.8)); }
.home-options-icon:hover { filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(3858%) hue-rotate(351deg) brightness(92%) contrast(94%) drop-shadow(0 1px 3px rgba(0,0,0,0.8)); }
.home-options-dropdown { 
  position: absolute; 
  top: 38px; 
  right: 8px; 
  z-index: 6; 
  display: flex; 
  flex-direction: column; 
  gap: 0.3rem; 
}
.home-watched-btn { background: #2A1A17; border: 2px solid #e11e16; border-radius: 5px; padding: 0.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.home-watched-btn:hover { background: #1d1210; }
.home-watched-btn.active { background: #2A1A17; border-color: #2ecc71; }
.home-watched-btn.active:hover { background: #1d1210; }
.home-watched-btn.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.home-watched-btn .pill-status-icon { height: 13px; width: auto; display: block; margin: 0; filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(3858%) hue-rotate(351deg) brightness(92%) contrast(94%); }
.home-watched-btn.active .pill-status-icon { filter: brightness(0) saturate(100%) invert(67%) sepia(60%) saturate(495%) hue-rotate(84deg) brightness(92%) contrast(88%); }

.home-watchlist-btn { background: #2A1A17; border: 2px solid #e11e16; border-radius: 5px; padding: 0.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-top: 0.3rem; }
.home-watchlist-btn:hover { background: #1d1210; }
.home-watchlist-btn.active { background: #2A1A17; border-color: #2ecc71; }
.home-watchlist-btn.active:hover { background: #1d1210; }
.home-watchlist-btn .pill-status-icon { height: 13px; width: auto; display: block; margin: 0; filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(3858%) hue-rotate(351deg) brightness(92%) contrast(94%); }
.home-watchlist-btn.active .pill-status-icon { filter: brightness(0) saturate(100%) invert(67%) sepia(60%) saturate(495%) hue-rotate(84deg) brightness(92%) contrast(88%); }

/* ==========================================================================
   MOBILE HOME (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {

  body {
    line-height: 1.4 !important;
    -webkit-tap-highlight-color: transparent;
  }

  /* ── HERO ── */
  .hero {
    min-height: 55vh;
  }

  .hero-content {
    padding: 0rem 1rem 0.5rem;
  }

  .hero-motto {
    font-size: 1.6rem;
    margin-top: 0;
    line-height: 1.2;
  }

  /* ── SECTIONS ── */
  .home-sections {
    padding: 0 1rem 2rem;
    margin-top: -8rem;
  }

  .section-title {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.6rem;
  }

  .home-section {
    margin-bottom: 1rem;
  }

  /* ── SCROLL CONTAINERS ── */
  .up-next-scroll,
  .poster-scroll {
    gap: 0.6rem;
    padding-bottom: 1rem;
    padding-left: 0;
  }

  /* ── UP NEXT CARDS (horizontal scroll) ── */
  .up-next-card {
    flex: 0 0 280px;
    max-width: 280px;
  }

  .up-next-thumb {
    aspect-ratio: 16/9;
  }

  .up-next-labels {
    bottom: 6px;
    left: 6px;
    gap: 0.15rem;
  }

  .up-next-show-title,
  .up-next-ep-label {
    font-size: 0.5rem;
    padding: 0.12rem 0.25rem;
    line-height: 1.1;
    border-radius: 3px;
  }

  .episode-info {
    padding: 0.6rem;
    gap: 0.3rem;
  }

  .episode-title {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .episode-date {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  .episode-watched-btn {
    padding: 0.3rem 0.35rem;
    border-radius: 4px;
  }

  .episode-watched-btn .pill-status-icon {
    height: 12px;
  }

  /* ── POSTER CARDS (movies/tv) ── */
  .home-card-wrapper {
    flex: 0 0 105px;
    min-width: 105px;
}

  .home-poster {
    border-radius: 6px 6px 0 0;
  }

  .home-info {
    padding: 0.4rem 0.6rem;
  }

  .home-item-title {
    font-size: 0.68rem;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .home-item-date {
    font-size: 0.6rem;
    line-height: 1.2;
  }

  .home-options-btn {
    top: 5px;
    right: 6px;
  }

  .home-options-icon {
    height: 22px;
  }

  .home-options-dropdown {
    top: 32px;
    right: 6px;
    gap: 0.25rem;
  }

  .home-watched-btn,
  .home-watchlist-btn {
    padding: 0.25rem;
    border-radius: 4px;
  }

  .home-watched-btn .pill-status-icon,
  .home-watchlist-btn .pill-status-icon {
    height: 11px;
  }

  /* ── EMPTY STATE ── */
  .up-next-empty {
    padding: 2rem 1rem;
    font-size: 0.9rem;
  }
}