@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;
}

.accent { color: #ffb7b5; }

/* ── HERO ── */
.hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.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;
}

/* ── LOGO WRAPPER ── */
.hero-logo-link {
  display: block;
  width: max-content; /* Hugs the image tightly */
  max-width: min(480px, 65%); /* Inherits the original percentage bounds */
  text-decoration: none;
}

.hero-logo-link:hover .hero-logo {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.hero-logo {
  max-width: 100% !important; /* Squeezes down safely if the wrapper squeezes */
  max-height: 160px !important;
  width: auto !important;
  height: 100px !important;
  object-fit: contain !important;
  margin-bottom: 0;
}

/* ── TITLE WRAPPER ── */
.hero-title-link {
  display: block;
  width: 70%; /* We moved your original 70% width to the link wrapper */
  text-decoration: none;
  color: inherit;
}

.hero-title-fallback {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  min-height: 100px;
  width: 100%; /* Changed from 70% to 100% so it fills its new link wrapper */
  line-height: 50px;
  display: flex;
  align-items: center;
  margin-bottom: 0;
  margin-top: 0;
  transition: color 0.2s ease;
}

.hero-title-link:hover .hero-title-fallback {
  color: #ffb7b5;
}

/* ── PILLS ── */
.hero-meta-pills {
  display: flex;
  position: relative;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.60rem 0.7rem;
  border-radius: 5px;
  color: rgba(0, 0, 0, 0.9);
  background: #ffb7b5;
  text-decoration: none;
}
a.pill { cursor: pointer; }
a.pill:hover { background: #e11e16; color: #fff; }

.pill-outline {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  color: rgb(255, 255, 255);
  font-size: 0.75rem;
  border: none;
  border-left: 2px solid #ffb7b5;
  padding: 0.60rem 0.7rem;
}

.pill-sublabel {
  color: rgba(255,255,255,0.45);
  padding-left: 0.25rem;
  font-size: 0.65rem;
  line-height: 5px;
}

.pill-watched,
.pill-watchlist {
  position: relative;
  z-index: 20;
  background: rgba(255,255,255,0.06);
  color: rgb(255, 255, 255);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border-left: 2px solid #e11e16;
  user-select: none;
  padding: 0.30rem 0.7rem;
  border-radius: 5px;
  margin-top: 0.5rem;
}

.pill-watched:hover,
.pill-watchlist:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.pill-status-icon {
  height: 15px;
  display: block;
  margin-left: -0.2rem;
  pointer-events: none;
}

.pill-watched .pill-status-icon {
  filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(3858%) hue-rotate(351deg) brightness(92%) contrast(94%);
}
.pill-watched.active .pill-status-icon {
  filter: brightness(0) saturate(100%) invert(67%) sepia(60%) saturate(495%) hue-rotate(84deg) brightness(92%) contrast(88%);
}
.pill-watched.active {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  border-left: 2px solid #2ecc71;
}

.pill-label-text {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 15px;
  display: block;
}

.pill-watched.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.pill-rating {
  background: rgba(255,255,255,0.06);
  color: rgb(255, 255, 255);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border-left: 2px solid #fff;
  user-select: none;
  padding: 0.30rem 0.7rem;
  border-radius: 5px;
  margin-top: 0.5rem;
}

.pill-rating:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.rating-heart-icon {
  filter: brightness(0) invert(1);
}

.pill-rating.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.rating-popup {
  margin-top: 0 !important;
}

/* ── DETAILS ROW ── */
.details-row {
  display: flex;
  margin: 0;
  padding: 0.75rem 5% 2.5rem;
  align-items: flex-start;
  position: relative;
  z-index: 3;
  margin-top: -5rem;
}

.info-col-detail {
  flex: 1;
  min-width: 0;
}

/* ── EPISODES GRID ── */
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0;
}

.episode-card {
  background: rgba(255,255,255,0.025);
  border: 2px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  overflow: hidden;
}

/* ── MAIN PARENT ── */
.episode-info-top {
  display: flex !important;
  justify-content: space-between;
  align-items: center !important; /* Centers both sub-parents vertically */
  gap: 0.5rem;
}

/* ── SUB PARENT 1 (LEFT): TITLE & DATE ── */
.episode-info-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

/* ── SUB PARENT 2 (RIGHT): WATCHED BUTTON ── */
.episode-info-right {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  flex-shrink: 0;
}

/* ── WATCHED BUTTON OVERRIDES ── */
.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;
}

.episode-watched-btn:hover {
  background: rgba(255,255,255,0.12);
}

.episode-watched-btn.active {
  background: rgba(46,204,113,0.15);
  border: 2px solid #2ecc71;
}

.episode-watched-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  border: 2px solid #e11e16;
}

.episode-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}

.episode-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.episode-number {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: #ffb7b5;
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 15px;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
}

.episode-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.episode-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  line-height: 15px;
}

.episode-date {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  line-height: 15px;
}

.episode-overview {
  font-size: 0.72rem;
  color: #fff;
  line-height: 13px;
  margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  a.pill:hover { background: #ffb7b5; color: rgba(0, 0, 0, 0.9); }

  .hero { min-height: 50vh; }
  .hero-logo { max-width: 240px !important; height: 60px !important; }
  .hero-title-fallback { font-size: clamp(1.5rem, 6vw, 2rem); }
  .hero-content { padding: 2rem 5% 0.5rem; }
  .hero-meta-pills { gap: 0.35rem; }
  .pill { font-size: 0.68rem; padding: 0.35rem 0.5rem; }
  .pill-outline { padding: 0.35rem 0.5rem; }
  .pill-sublabel { font-size: 0.6rem; }
  .pill-watched,
  .pill-watchlist { padding: 0.3rem 0.5rem; margin-top: 0.35rem; }
  .pill-label-text { font-size: 0.68rem; }

  .details-row { margin-top: -4rem; padding: 0.5rem 5% 1.5rem; }
  .episodes-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .episode-info { padding: 0.6rem; }
  .episode-title { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  a.pill:hover { background: #ffb7b5; color: rgba(0, 0, 0, 0.9); }

  .hero { min-height: 45vh; }
  .hero-logo { max-width: 180px !important; height: 50px !important; }
  .hero-title-fallback { font-size: 1.3rem; }
  .hero-content { padding: 1.5rem 5% 0.5rem; }
  .hero-meta-pills { gap: 0.3rem; }
  .pill { font-size: 0.62rem; padding: 0.3rem 0.4rem; }
  .pill-outline { padding: 0.3rem 0.4rem; }
  .pill-label-text { font-size: 0.62rem; }

  .details-row { margin-top: -3rem; padding: 0.5rem 5% 1rem; }
  .episodes-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .episode-title { font-size: 0.72rem; }
  .episode-overview { font-size: 0.68rem; }
}