@import url("/assets/controls.css?v=1.26.2");
/* ==========================
   RESET & GLOBAL VARIABLES
   ========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Search / card theme */
  --oos-ink: #e8e8e8;
  --oos-muted: #a9a9b2;
  --oos-border: #2b2b2f;
  --oos-card: #18181b;
  --oos-card2: #141417;
  --oos-accent: #ff5a66;
  --oos-accent-2: #ff8a90;

  /* Home “latest” cards */
  --card-bg: #111;
  --card-radius: 14px;
  --card-shadow: 0 2px 10px rgba(0,0,0,.35);
  --text-muted: #aaa;
  --accent: #e63946;

  /* Hero poster layout (movie / episode / series) */
  --pad: 18px;
  --poster-w: 170px;
  --gap: 18px;
  --poster-h: 260px; /* updated by JS */
  --offset: calc(var(--poster-w) + var(--pad) + var(--gap));
}

body {
  font-family: Arial, sans-serif;
  background: #1a1a1a;
  color: #eaeaea;
  line-height: 1.6;
}

/* ==========================
   HEADER & NAV
   ========================== */

header {
  background: #2b2b2b;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #444;
}

.logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #fc9997;
}

.search-bar input {
  padding: 8px;
  border: none;
  border-radius: 4px;
  width: 200px;
}

nav {
  background: #222;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  position: relative;
}

nav .nav-links {
  list-style: none;
  display: flex;
}

nav .nav-links li {
  margin: 0 15px;
}

nav .nav-links a {
  color: #eaeaea;
  text-decoration: none;
  padding: 10px;
  transition: color 0.3s;
}

nav .nav-links a:hover {
  color: #fc9997;
}

/* BURGER (mobile) */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

.burger div {
  width: 25px;
  height: 3px;
  background: #eaeaea;
  margin: 4px;
  transition: all 0.3s ease;
}

/* ==========================
   LAYOUT
   ========================== */

.container {
  display: flex;
  flex-direction: row;
  padding: 20px 30px;
}

.main-content {
  flex: 3;
  margin-right: 20px;
}

.sidebar {
  flex: 1;
}

/* Mobile layout for main + sidebar */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    padding: 16px 16px 24px;
  }

  .main-content {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .sidebar {
    margin-top: 0;
  }
}

/* ==========================
   MAIN CONTENT / NEWS
   ========================== */

.main-content h2 {
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid #444;
  color: #fc9997;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #444;
}

.news-img img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.news-content h3 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.news-date {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.news-content p {
  line-height: 1.6;
  margin-top: 0.3rem;
}

.news-content a {
  color: #fc9997;
  text-decoration: none;
}

.news-content a:hover {
  text-decoration: underline;
}

/* BADGES */
.news-badge, .review-badge {
  background: #fc9997;
  color: #000;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

/* ==========================
   SIDEBAR
   ========================== */

.sidebar section {
  background: #2b2b2b;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.sidebar h3 {
  color: #fc9997;
  margin-bottom: 10px;
}

.movie-list {
  list-style: decimal inside;
  padding-left: 20px;
}

.movie-list li {
  margin-bottom: 0.5em;
}

.movie-list li a {
  color: #fc9997;
  text-decoration: none;
  transition: color 0.3s;
}

.movie-list li a:hover {
  color: #eaeaea;
}

.sidebar .movie-list {
  list-style: decimal inside;
  padding-left: 20px;
}

.sidebar .movie-list li {
  margin-bottom: 0.5em;
}

.sidebar .movie-list li a {
  color: #fc9997;
  text-decoration: none;
  transition: color 0.3s;
}

.sidebar .movie-list li a:hover {
  color: #eaeaea;
}

.on-this-day__img-wrap img {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* ==========================
   NEWS SLIDER
   ========================== */

.news-slider {
  margin-bottom: 2rem;
}

.news-slider.swiper {
  height: 300px;
}

.news-slider .swiper-wrapper {
  width: 100% !important;
}

.news-slider .swiper-slide {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.news-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-caption {
  position: absolute;
  bottom: 12px;
  left: 16px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
}

.news-slider .swiper-button-prev,
.news-slider .swiper-button-next {
  top: 50%;
  transform: translateY(-50%);
}

.news-slider .swiper-pagination-bullet {
  background: #fc9997;
  opacity: 0.8;
}

/* Desktop blurred BG + foreground poster */
@media (min-width: 1024px) {
  .news-slider .swiper-slide {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
  }
  .news-slider .swiper-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(12px);
    transform: scale(1.1);
    z-index: 1;
  }
  .news-slider .swiper-slide .slide-foreground {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 40%;
    height: auto;
    z-index: 2;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  }
  .news-slider .swiper-slide .slide-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
  }
}

/* mobile news list float */
@media (max-width: 768px) {
  .news-list .news-item {
    display: block;
    margin-bottom: 1.5rem;
  }
  .news-list .news-item .news-img {
    float: left;
    margin: 0 1rem 1rem 0;
    width: 120px;
    height: auto;
  }
  .news-list .news-item::after {
    content: "";
    display: table;
    clear: both;
  }
}

/* ==========================
   LOST SOULS: A–Z NAV
   ========================== */

.soul-count-container.navbar {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px auto;
}

.soul-count-container.navbar .soul-count-item {
  background-color: #111;
  border: 2px solid #3CB3ED;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.soul-count-container.navbar .soul-count-item:hover {
  background-color: #3CB3ED;
  transform: scale(1.05);
}

.soul-count-container.navbar .soul-count-number {
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================
   CAST SECTION (TEXT VERSION)
   ========================== */

h2 + article {
  margin: 1.5rem 0 2rem;
}

h2 + article p {
  line-height: 1.5;
  font-size: 1rem;
}

h2 + article p img {
  vertical-align: middle;
  margin-right: 6px;
  height: 16px;
}

h2 + article p a {
  color: #fc9997;
  text-decoration: none;
  transition: color 0.2s;
}

h2 + article p a:hover {
  color: #eaeaea;
}

h2 + article p br {
  content: "";
  display: block;
  margin: 0.5rem 0;
}

/* ==========================
   ALL ARTICLES LISTING
   ========================== */

h2 + .news-list {
  margin: 1.5rem 0;
}

/* ==========================
   ARTICLE PAGE
   ========================== */

.article-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.article-hero .article-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.article-hero .article-date {
  font-style: italic;
  color: #bbb;
  margin-bottom: 1rem;
  display: inline-block;
}

.article-header-img {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

.article-body {
  max-width: 70ch;
  margin: 0 auto 2rem;
  line-height: 1.8;
  font-size: 1.05rem;
  text-align: justify;
}

.article-body p {
  margin-bottom: 1.2rem;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  max-width: 70ch;
  margin: 2rem auto;
  font-size: 0.95rem;
}

.article-nav a {
  color: #3CB3ED;
  text-decoration: none;
}

.article-nav a:hover {
  color: #fc9997;
}

/* ==========================
   ACTOR PROFILE & MOVIES
   ========================== */

.actor-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.actor-profile img {
  max-width: 280px;
  border-radius: 12px;
  border: 1px solid #2a1d22;
  display: block;
  margin: 10px auto;
  object-fit: cover;
}

.actor-bio {
  background: #1a1518;
  border: 1px solid #2a1d22;
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
}

.actor-bio h2 {
  margin: 0 0 0.75rem;
  color: #fc9997;
  font-size: 1.5rem;
}

.actor-bio p {
  line-height: 1.7;
  font-size: 1rem;
  color: #eaeaea;
  margin-bottom: 1.5rem;
}

.movie-list-wrapper {
  background:#2b2b2b;
  padding:20px;
  border-radius:8px;
  box-shadow:0 0 8px rgba(0,0,0,0.5);
  margin-bottom:3rem;
}

.movie-list-wrapper .movie-list {
  list-style:decimal inside;
  padding-left:1rem;
  margin:0;
}

.movie-list-wrapper .movie-list li {
  margin-bottom:0.5rem;
  font-size:1rem;
}

.movie-list-wrapper .movie-list li a {
  color:#3CB3ED;
  text-decoration:none;
  transition:color 0.2s;
}

.movie-list-wrapper .movie-list li a:hover {
  color:#fc9997;
}

.actor-movies {
  list-style: none;
  padding: 0;
  margin: 0;
}

.actor-movies li a {
  color: #fc9997;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.actor-movies li a:hover {
  color: #eaeaea;
}

.actor-name {
  color: #fc9997;
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.actor-bio-text {
  text-align: justify;
  font-size: 0.95rem;
  color: #eaeaea;
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}

/* Admin chip & delete link */

.delete-link {
  color:#ff7a7a;
  text-decoration:none;
  font-weight:bold;
  margin-left:1rem;
}

.delete-link:hover {
  text-decoration:underline;
}

.admin-chip{
  display:inline-flex;
  gap:8px;
  align-items:center;
  background:#241a25;
  border:1px solid #3b293f;
  border-radius:999px;
  padding:4px 10px;
  font-size:.9rem;
}

.admin-chip a{
  color:#ffc38f;
  text-decoration:underline;
}

/* ==========================
   MOVIE DESCRIPTION / SERIES META
   ========================== */

.movie-description img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .movie-description {
    display: block !important;
  }
  .movie-description img {
    float: left;
    width: 150px;
    height: auto;
    margin: 0 15px 15px 0;
  }
  .movie-description::after {
    content: "";
    display: table;
    clear: both;
  }
}

.poster-img {
  float: left;
  width: 150px;
  height: auto;
  margin: 0 15px 10px 0;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.series-description::after {
  content: "";
  display: block;
  clear: both;
}

.series-meta {
  margin: 12px 0 24px;
  padding: 12px 14px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  display: grid;
  gap: 8px;
}

@media (min-width: 720px) {
  .series-meta {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }
}

.series-meta strong {
  font-weight: 600;
  margin-right: 6px;
}

/* ==========================
   EPISODE LIST (NEW FANCY)
   ========================== */

h2 + h3 { margin-top: 18px; }

.episode-list {
  list-style: none;
  margin: 10px 0 28px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.episode-item {
  background: #1a1b1d;
  border: 1px solid #2c2d30;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  overflow: hidden;
}

.episode-item:hover {
  transform: translateY(-1px);
  border-color: #3a3b3f;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
  background: #1d1e20;
}

.episode-item .inner {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
}

.episode-number {
  font-weight: 700;
  opacity: .9;
  background: #121315;
  border: 1px solid #2a2b2f;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
}

.episode-title a {
  display: block;
  text-decoration: none;
  padding: 6px 4px;
  border-radius: 6px;
  outline: none;
  color: #3CB3ED;
}

.episode-title a:hover,
.episode-title a:focus {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .episode-item .inner {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .episode-number { justify-self: start; }
}

/* ==========================
   NETWORK BUTTONS (INCLUDE-SAFE)
   ========================== */

.network-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  justify-content:center;
  align-items:center;
  margin: 10px 0 16px;
}

/* Keep your existing btn look but make it responsive and consistent */
.network-buttons .network-btn{
  display:flex;
  align-items:center;
  justify-content:center;

  /* responsive sizing */
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;

  /* visual style */
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  text-decoration:none;

  /* prevents giant buttons */
  height: auto;
  overflow:hidden;
}

.network-buttons .network-btn:hover{
  border-color: rgba(60,179,237,0.55);
}

/* ✅ Critical fix: stop logos from exploding */
.network-buttons .network-logo{
  height: 44px;     /* adjust if you want bigger/smaller */
  width: auto;
  max-width: 100%;
  display:block;
  object-fit: contain;
}

/* Mobile tweaks */
@media (max-width: 600px){
  .network-buttons{
    gap: 10px;
  }
  .network-buttons .network-btn{
    flex: 1 1 100%;
    max-width: 100%;
    padding: 10px 12px;
  }
  .network-buttons .network-logo{
    height: 40px;
  }
}


/* Pill-style alternative (if needed) */
.network-buttons-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.network-btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  background: #111;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.network-logo-pill {
  max-height: 30px;
  width: auto;
  display: block;
}

/* ==========================
   MOVIE / EPISODE / SERIES HEROES
   ========================== */

/* ====== EPISODE HERO ====== */

.episode-hero{
  position:relative;
  width:100%;
  min-height: calc(var(--poster-h) + (var(--pad) * 2));
  background:#111 center/cover no-repeat;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  overflow:hidden;
  margin:12px 0 22px;
  will-change: background-image;
}

.episode-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.78), rgba(0,0,0,.70));
  pointer-events:none;
}

.episode-hero-inner{ position:relative; padding:var(--pad); }

.hero-poster{
  position:absolute;
  top:var(--pad);
  left:var(--pad);
  width:var(--poster-w);
  height:auto;
  border-radius:6px;
  box-shadow:0 8px 20px rgba(0,0,0,.5);
  border:1px solid rgba(255,255,255,.15);
  background:#000;
}

.hero-title{
  position:relative;
  z-index:2;
  font-size:1.35rem;
  font-weight:800;
  margin:0 0 10px var(--offset);
  text-shadow:0 2px 8px rgba(0,0,0,.7);
}

.hero-desc{
  position:relative;
  z-index:2;
  margin:0 0 0 var(--offset);
  padding:16px;
  color:#eee;
  line-height:1.55;
  border-radius:10px;
  border:none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  overflow:hidden;
  background:transparent;
  isolation:isolate;
}

.hero-desc::before{
  content:"";
  position:absolute;
  inset:0;
  background:transparent;
  clip-path: polygon(
    var(--offset) 0, 100% 0, 100% 100%, 0 100%,
    0 var(--poster-h), var(--offset) var(--poster-h)
  );
  backdrop-filter: brightness(55%) saturate(90%);
  -webkit-backdrop-filter: brightness(55%) saturate(90%);
  z-index:-1;
  pointer-events:none;
}

/* ====== MOVIE HERO ====== */

.movie-hero{
  position:relative;
  width:100%;
  min-height: calc(var(--poster-h) + (var(--pad) * 2));
  background:#111 center/cover no-repeat;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  overflow:hidden;
  margin:12px 0 22px;
}

.movie-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.78), rgba(0,0,0,.70));
  pointer-events:none;
}

.movie-hero-inner{ position:relative; padding:var(--pad); }

.movie-hero .hero-poster{
  position:absolute;
  top:var(--pad);
  left:var(--pad);
  width:var(--poster-w);
  height:auto;
  border-radius:6px;
  box-shadow:0 8px 20px rgba(0,0,0,.5);
  border:1px solid rgba(255,255,255,.15);
  background:#000;
}

.movie-hero .hero-title{
  position:relative;
  z-index:2;
  font-size:1.35rem;
  font-weight:800;
  margin:0 0 10px var(--offset);
  text-shadow:0 2px 8px rgba(0,0,0,.7);
}

.movie-hero .hero-desc{
  position: relative;
  margin: 0 0 0 var(--offset);
  padding: 16px;
  color: #eee;
  line-height: 1.55;
  border-radius: 10px;
  border: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  overflow: hidden;
  background: transparent;
  isolation: isolate;
  z-index: 0;
}

.movie-hero .hero-desc::before{
  content:"";
  position:absolute;
  inset:0;
  background: transparent;
  clip-path: polygon(var(--offset) 0, 100% 0, 100% 100%, 0 100%, 0 var(--poster-h), var(--offset) var(--poster-h));
  backdrop-filter: brightness(55%) saturate(90%);
  -webkit-backdrop-filter: brightness(55%) saturate(90%);
  z-index:-1;
  pointer-events:none;
}

/* Buttons row on movie page */
.dm-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 18px;
}
.dm-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:8px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  color:#3CB3ED;
  text-decoration:none;
  font-weight:600;
  line-height:1;
}
.dm-link:hover{
  background:rgba(255,255,255,0.10);
  border-color:rgba(255,255,255,0.22);
  text-decoration:none;
}
.dm-link svg{
  width:16px;
  height:16px;
  flex:0 0 auto;
}

/* Cast columns (used on movie/episode heroes) */
.cast-columns{
  display:grid;
  gap:1rem;
}

@media (min-width:992px){
  .cast-columns{ grid-template-columns:repeat(3,1fr);}
}

@media (max-width:991px){
  .cast-columns{ grid-template-columns:1fr;}
}

.cast-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:.5rem .75rem;
  background:rgba(255,255,255,0.05);
  border-radius:4px;
  transition:background .2s;
}

.cast-item:hover{ background:rgba(255,255,255,0.1); }

.cast-item > img:not(.cast-thumb):not(.cast-thumb-admin){
  width:16px;
  height:16px;
  margin-right:.5rem;
  flex-shrink:0;
}

.cast-item a{
  color:#3CB3ED;
  font-weight:500;
  text-decoration:none;
  margin-right:.25rem;
}

.cast-item a:hover{ text-decoration:underline; }

.missing-box a.admin-missing-link{
  color:#A5F59E;
  font-weight:600;
  text-decoration:none;
  border-bottom:1px dashed rgba(165,245,158,.6);
}
.missing-box a.admin-missing-link:hover{
  text-decoration:underline;
  border-bottom-color: transparent;
}
.missing-box small{ opacity:.8; }

/* right-side cast thumbnail (movie page admin) */
.cast-spacer{ flex:1; }
.cast-thumb,
.cast-thumb-admin{
  margin-left:auto;
  width:22px;
  height:22px;
  object-fit:cover;
  border-radius:3px;
  border:1px solid rgba(255,255,255,0.20);
  box-shadow:0 1px 2px rgba(0,0,0,.25);
}

/* ====== SERIES HERO (NAMESPACED) ====== */

.series-hero{
  position:relative;
  width:100%;
  min-height: calc(var(--poster-h) + (var(--pad) * 2));
  background:#111 center/cover no-repeat;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  overflow:hidden;
  margin:12px 0 22px;
  will-change: background-image;
}

.series-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.78), rgba(0,0,0,.70));
  pointer-events:none;
}

.series-hero-inner{ position:relative; padding:var(--pad); }

/* scoped poster/title/desc so they don’t clash with movie/episode */
.series-hero .hero-poster{
  position:absolute;
  top:var(--pad); left:var(--pad);
  width:var(--poster-w); height:auto;
  border-radius:6px;
  box-shadow:0 8px 20px rgba(0,0,0,.5);
  border:1px solid rgba(255,255,255,.15);
  background:#000;
}

.series-hero .hero-title{
  position:relative; z-index:2;
  font-size:1.35rem; font-weight:800;
  margin:0 0 10px var(--offset);
  text-shadow:0 2px 8px rgba(0,0,0,.7);
}

.series-hero .hero-desc{
  position:relative; z-index:2;
  margin:0 0 0 var(--offset);
  padding:16px;
  color:#eee; line-height:1.55;
  border-radius:10px;
  border:none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  overflow:hidden;
  background:transparent;
  isolation:isolate;
}

.series-hero .hero-desc::before{
  content:"";
  position:absolute; inset:0;
  background:transparent;
  clip-path: polygon(
    var(--offset) 0, 100% 0, 100% 100%, 0 100%,
    0 var(--poster-h), var(--offset) var(--poster-h)
  );
  backdrop-filter: brightness(55%) saturate(90%);
  -webkit-backdrop-filter: brightness(55%) saturate(90%);
  z-index:-1; pointer-events:none;
}

/* Series meta/cards (card style already defined above for .series-meta; this just enhances) */
.card { background:#0e0e0f; border:1px solid #242426; border-radius:10px; box-shadow:0 6px 16px rgba(0,0,0,.25); }
.series-meta.card { padding:14px 16px; display:grid; gap:14px; }
@media (min-width:900px){
  .series-meta.card{ grid-template-columns:2fr 1fr 1fr; align-items:start; }
}
.meta-block{ display:grid; gap:8px; min-width:0; }
.meta-label{ font-size:.9rem; opacity:.85; letter-spacing:.02em; }
.meta-value{ font-size:1rem; }
.badge{
  display:inline-block; padding:6px 10px;
  border:1px solid #303033; border-radius:999px;
  background:#151516; font-weight:600; line-height:1;
}
.badge-accent{
  border-color:#4b1d1f;
  background:linear-gradient(180deg,#231215,#1a0f11);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}

.chips{ display:flex; flex-wrap:wrap; gap:8px; position:relative; }
.chip{
  display:inline-block; padding:6px 10px;
  border-radius:999px;
  background:#171718; border:1px solid #2b2b2e;
  font-size:.92rem; white-space:nowrap; line-height:1;
}
.chips.is-collapsed{ max-height:64px; overflow:hidden; }
.chips.is-collapsed::after{
  content:""; position:absolute; right:0; bottom:0; left:0;
  height:28px; background:linear-gradient(to bottom, rgba(14,14,15,0), #0e0e0f);
}
.link-btn{
  appearance:none; background:none; border:0;
  color:#d76b6b; padding:0; font:inherit; cursor:pointer;
}
.link-btn:hover{ text-decoration:underline; }

.series-episodes .episode-list{
  list-style:none;
  margin:0;
  padding:0;
}

.series-episodes .episode-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  padding:6px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.series-episodes .episode-main{
  display:flex;
  gap:8px;
  align-items:baseline;
  min-width:0;
}

.series-episodes .episode-number{ opacity:.8; min-width:90px; }
.series-episodes .episode-title a{ text-decoration:none; }

.series-episodes .episode-delete-form{ margin:0; }

.series-episodes .delete-btn{
  width:26px;
  height:26px;
  border-radius:6px;
  border:1px solid #303033;
  background:#151516;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.9rem;
  line-height:1;
  color:#e0e0e0;
  cursor:pointer;
  padding:0;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.08s ease;
}
.series-episodes .delete-btn:hover{
  background:#1c1c1f;
  border-color:#f26b6b;
  color:#f26b6b;
}
.series-episodes .delete-btn:active{
  transform:scale(0.94);
}

/* Series trailer block */
.series-trailer .trailer-wrap{
  margin:20px 0 28px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:8px;
  padding:12px;
}
.series-trailer .trailer-title{
  margin:0 0 8px;
  font-size:1.1rem;
  font-weight:700;
}
.series-trailer .trailer-embed{
  width:100%;
  aspect-ratio:16/9;
  border:0;
  border-radius:6px;
  display:block;
}

/* Mobile tweaks for heroes */
@media (max-width:720px){
  .hero-poster,
  .movie-hero .hero-poster,
  .series-hero .hero-poster,
  .episode-hero .hero-poster{
    position:static;
    display:block;
    width:58%;
    max-width:240px;
    margin:0 auto 12px;
  }
  .hero-title,
  .movie-hero .hero-title,
  .series-hero .hero-title,
  .episode-hero .hero-title{
    margin:0 0 8px 0;
    text-align:center;
  }
  .hero-desc,
  .movie-hero .hero-desc,
  .series-hero .hero-desc,
  .episode-hero .hero-desc{
    margin:0;
    padding:14px;
    background:rgba(0,0,0,.6);
  }
  .hero-desc::before,
  .movie-hero .hero-desc::before,
  .series-hero .hero-desc::before,
  .episode-hero .hero-desc::before{
    display:none;
  }
  .movie-hero,
  .series-hero,
  .episode-hero{
    min-height:auto;
    background-position:center top;
  }

  .series-episodes .episode-item{
    align-items:flex-start;
    flex-direction:row;
  }
}

/* ==========================
   TIMELINE (NEW SINGLE VERSION)
   ========================== */

.timeline-container{
  position: relative;
  height: 60px;
  margin: 8px 0 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0;
  line-height: 0;
}

.icon-marker{
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-icon {
  display: block;
  width: 22px;        /* adjust if needed */
  height: 22px;       /* keeps all icons same height */
  object-fit: contain;
}

/* Tooltip container under timeline */
.tooltip-container {
  position: relative;
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tooltip-container.active {
  opacity: 1;
}

.tooltip-container .tooltip-content {
  display: inline-block;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  max-width: 90%;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ==========================
   COMPACT LOST SOULS LIST
   ========================== */

.souls-list{
  display:grid;
  gap:6px;
}

.soul-row{
  display:grid;
  grid-template-columns: 28px 76px 1fr 28px; /* icon | time | main | delete */
  align-items:center;
  gap:8px;
  padding:6px 8px;
  border-radius:8px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}

.soul-type-icon{
  width:22px;
  height:22px;
  object-fit:contain;
  display:block;
  opacity:.95;
}

.soul-time-badge{
  display:inline-block;
  font-weight:700;
  font-size:.85rem;
  line-height:1;
  padding:6px 10px;
  text-align:center;
  border-radius:999px;
  background:rgba(255,255,255,0.07);
  border:1px solid rgba(255,255,255,0.12);
  white-space:nowrap;
  color:#e7f0ff;
}

.soul-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.soul-name {
  font-size: 1rem;
  font-weight: 700;
  font-style: italic;
  color: #ffffff;               /* bright highlight */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.soul-cause {
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.7;
  color: #c9d0d6;               /* softer grey-blue tone */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kill-delete-form{ margin:0; }

.kill-delete-button{
  --size:26px;
  width:var(--size);
  height:var(--size);
  display:inline-grid;
  place-items:center;
  border:1px solid rgba(255,255,255,0.14);
  background:transparent;
  color:#d9d9d9;
  border-radius:6px;
  cursor:pointer;
  font-size:.9rem;
  line-height:1;
  padding:0;
}

.kill-delete-button:hover{
  border-color:rgba(255,0,0,0.35);
  color:#ff8f8f;
  background:rgba(255,0,0,0.08);
}

/* Counters by type */
.movie-souls{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:8px 0 14px;
}

.movie-soul-item{
  flex:1 1 150px;
  min-width:120px;
  background:rgba(255,255,255,0.05);
  border-radius:8px;
  padding:10px 12px;
  text-align:center;
}

.movie-soul-number{
  font-size:1.1rem;
  font-weight:800;
}

.movie-soul-label{
  opacity:.9;
  font-size:.9rem;
}

/* Notice flash */
.notice-flash{
  margin:10px 0 0;
  padding:8px 10px;
  border-radius:4px;
  background:#1e2a22;
  border:1px solid #385343;
  color:#cfe9dc;
  font-size:.95rem;
}

@media (max-width:560px){
  .soul-row{
    grid-template-columns: 24px 66px 1fr 28px;
    padding:8px;
  }
  .soul-main{
    line-height:1.35;
    white-space:normal;
  }
  .soul-name,
  .soul-cause{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
}

/* ==========================
   LATEST SECTIONS (HOME)
   ========================== */

.latest-section {
  margin-top: 1.5rem;
}

.latest-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.latest-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.latest-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Ensure latest grids wrap properly */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

/* Card base style for hover animation */
.movie-card,
.episode-card {
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Prevent huge poster images */
.movie-card img,
.episode-card img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  border-radius: 6px;
}

.movie-card:hover,
.episode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}

.movie-thumb,
.episode-thumb {
  position: relative;
  display: block;
  overflow: hidden;
}

.movie-thumb img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

/* series cover + episode still variant */
.episode-main-thumb {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.episode-still {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 90px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.8);
  background: #000;
}

.card-body {
  padding: 0.55rem 0.6rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.card-title a {
  color: #fff;
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #b5179e, #7209b7);
}

/* Limit max items per viewport size */
@media (min-width: 1200px) {
  .latest-grid > article:nth-child(n+17) { display: none; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .latest-grid > article:nth-child(n+13) { display: none; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .latest-grid > article:nth-child(n+9) { display: none; }
}
@media (max-width: 767.98px) {
  .latest-grid > article:nth-child(n+5) { display: none; }
}

/* Mobile grid + smaller posters */
@media (max-width: 768px) {
  .latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Smaller posters on phones */
  .movie-thumb img,
  .episode-main-thumb {
    height: 140px;
  }
}

@media (max-width: 520px) {
  .latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .movie-thumb img,
  .episode-main-thumb {
    height: 120px;
  }
}

/* ==========================
   MOBILE HEADER FIX
   ========================== */

@media (max-width: 768px) {

  header, .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 12px !important;
    background: var(--oos-bg, #1e1e1e);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: saturate(120%) blur(6px);
  }

  header .header-inner,
  header .container,
  header .wrap,
  .site-header .header-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  header .brand,
  header .branding,
  header .site-brand,
  .site-header .branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  header h1,
  header .site-title,
  .site-header .site-title {
    margin: 0 !important;
    font-size: 1.1rem !important;
    line-height: 1.2 !important;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
  }

  header h1 br,
  .site-header .site-title br { display: none; }

  header .logo img { max-height: 28px; height: 28px; width: auto; }

  header form[role="search"],
  header .search,
  header .site-search,
  .site-header .site-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
  }

  header form[role="search"] input[type="search"],
  header .site-search input[type="search"],
  header .site-search input[type="text"],
  header .search input[type="search"],
  header .search input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: var(--oos-text, #fff);
    outline: none;
  }

  header form[role="search"] button,
  header .site-search button,
  header .search button {
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    background: var(--oos-peach, #ff7f7f);
    color: #111;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }

  header .site-search,
  header .search { position: static !important; }

  header .brand + .site-search,
  header .branding + .site-search,
  header .brand + .search { margin-top: 0 !important; }

  .hero-title-in-header { display: none !important; }
}

/* title on one line, search under on phones */
@media (max-width: 768px) {
  header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
  }

  .logo {
    font-size: 1.4em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  header .logo br { display: none; }

  .search-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
  }

  .search-bar input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
  }

  .search-bar button {
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
  }

  /* nav burger/menu */
  .burger {
    display: flex;
  }

  nav .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    background: #222;
    z-index: 1000;
  }

  nav .nav-links.nav-active {
    display: flex;
  }

  .search-bar input {
    width: 150px;
  }
}

/* ==========================
   SEARCH (GLOBAL + /search PAGE)
   ========================== */

/* Generic search block used in multiple places */
.search-head-hint {
  color:var(--oos-muted);
  font-size:13px;
  margin:6px 2px 0;
}

.search {
  display:flex;
  align-items:center;
  gap:8px;
}

.search input{
  flex:1;
  min-width:220px;
  background:var(--oos-card);
  border:1px solid var(--oos-border);
  color:var(--oos-ink);
  border-radius:999px;
  padding:10px 14px;
  outline:none;
  transition:border-color .15s, box-shadow .15s;
}

.search input:focus{
  border-color:var(--oos-accent);
  box-shadow:0 0 0 3px rgba(255,90,102,.15);
}

.oos-btn {
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:0;
  cursor:pointer;
  white-space:nowrap;
  padding:10px 14px;
  font-weight:700;
  color:#0e0e11;
  border-radius:999px;
  background:linear-gradient(180deg,var(--oos-accent),var(--oos-accent-2));
  box-shadow:0 6px 18px rgba(255,90,102,.22), inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .08s ease, box-shadow .15s ease, filter .15s ease;
}

.oos-btn:hover{ filter:brightness(1.05); }

.oos-btn:active{
  transform:translateY(1px);
  box-shadow:0 3px 12px rgba(255,90,102,.26), inset 0 1px 0 rgba(255,255,255,.18);
}

.oos-btn svg{ width:16px;height:16px; }

/* Scoped /search page layout */
.oos-search .search-head-hint{
  color:var(--oos-muted);
  font-size:13px;
  margin:6px 2px 0;
}

.oos-search .search-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--oos-border);
  margin:8px 0 16px;
}

.oos-search .search-tab{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  background:var(--oos-card2);
  border:1px solid var(--oos-border);
  border-bottom:none;
  color:var(--oos-ink);
  cursor:pointer;
  border-top-left-radius:10px;
  border-top-right-radius:10px;
}

.oos-search .search-tab[aria-selected="true"]{
  background:#1d1d22;
  border-color:#3a3a41;
  color:#fff;
  position:relative;
}

.oos-search .search-tab[aria-selected="true"]::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  background:#1d1d22;
}

.oos-search .search-count{
  opacity:.7;
  font-size:.95em;
}

.oos-search .search-panel{display:none;}
.oos-search .search-panel.active{display:block;}

.oos-search .search-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
}

.oos-search .search-card{
  background:var(--oos-card);
  border:1px solid var(--oos-border);
  border-radius:12px;
  padding:12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

.oos-search .search-card a{
  color:inherit;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.oos-search .search-thumb{
  display:block;
  width:100%;
  max-width:200px;
  max-height:300px;
  height:auto;
  object-fit:contain;
  border-radius:10px;
  background:#0f0f12;
  border:1px solid var(--oos-border);
  margin-bottom:8px;
}

.oos-search .search-title{font-weight:700;}

.oos-search .search-sub{
  color:var(--oos-muted);
  font-size:13px;
  margin-top:4px;
}

.oos-search .search-empty{
  color:var(--oos-muted);
  padding:16px;
  border-radius:12px;
  border:1px dashed var(--oos-border);
  background:var(--oos-card2);
}

/* Optional: underline H2 with oos border */
.main-content h2 {
  border-bottom:1px solid var(--oos-border);
  padding-bottom:8px;
}

/* ==========================
   GLOBAL LINK THEME
   ========================== */

a {
  color: #fc9997;
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: #fc9997;
  text-decoration: underline;
}

a:visited {
  color: #fc9997;
}

/* Login note under Lost Souls */
.souls-login-note{
  max-width: 720px;
  margin: 10px auto 16px;          /* centers it and adds space above/below */
  padding: 10px 16px;
  border-radius: 999px;            /* pill shape */
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.9rem;
  text-align: center;
  color: var(--oos-muted);
}

.souls-login-note a{
  font-weight: 600;
  text-decoration: underline;
  color: #ff8a90;
}

.souls-login-note a:hover{
  color: #ffc1c5;
}

/* ==========================
   AUTH PAGES (LOGIN / SIGNUP)
   ========================== */

.auth-card{
  max-width: 520px;
  margin: 24px auto 32px;
  padding: 22px 24px 24px;
  background:#111214;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}

.auth-title{
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
}

.auth-subtitle{
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
  color: var(--oos-muted);
}

.auth-form{
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-group{
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label{
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f5f5f5;
}

.form-group input{
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border:1px solid rgba(255,255,255,0.18);
  background: #18181b;
  color: #f5f5f5;
  outline: none;
  font-size: 0.95rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.form-group input:focus{
  border-color: var(--oos-accent);
  box-shadow: 0 0 0 2px rgba(255,90,102,0.25);
  background: #141417;
}

.auth-submit{
  margin-top: 0.5rem;
  align-self: flex-start;
}

/* Error / info messages on auth pages */
.auth-alert{
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.auth-alert ul{
  margin: 0;
  padding-left: 18px;
}

.auth-alert-error{
  background: #2b1717;
  border: 1px solid #ff6b6b;
  color: #ffdede;
}

.auth-footer-text{
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--oos-muted);
}

.auth-footer-text a{
  color: #ff8a90;
  font-weight: 600;
}

.auth-footer-text a:hover{
  color: #ffc1c5;
}

/* Small screens: make card breathe a bit more */
@media (max-width: 600px){
  .auth-card{
    margin-top: 16px;
    padding: 18px 16px 20px;
  }
}

.auth-alert-success{
  background:#18251a;
  border:1px solid #4caf50;
  color:#d5f7dc;
}

/* Make each soul row a flex line */
.souls-list .soul-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Let main text take the space, actions pushed to the right */
.souls-list .soul-main {
  flex: 1 1 auto;
}

/* Actions area on the far right */
.souls-list .soul-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Buttons styling */
.kill-edit-button,
.kill-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  height: 24px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.kill-edit-button {
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
}

.kill-delete-button {
  background: #ef4444;
  color: #fff;
}

/* Remove default form spacing */
.kill-delete-form {
  margin: 0;
}

/* Edit kill form */
.edit-kill-box {
  margin: 16px 0;
  padding: 16px 18px 18px;
  border-radius: 12px;
  background: #050814;
  border: 1px solid #2a3242;
  box-shadow: 0 12px 24px rgba(0,0,0,0.45);
}

.edit-kill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.edit-kill-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.edit-kill-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #424b5f;
  background: #0b1120;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
}

.edit-kill-close:hover {
  background: #111827;
}

.edit-kill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 18px;
}

.edit-kill-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.edit-kill-grid input,
.edit-kill-grid select,
.edit-kill-box textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.edit-kill-box textarea {
  margin-top: 4px;
  min-height: 70px;
  resize: vertical;
}

.edit-kill-cause-label {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
}

.edit-kill-save {
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 0;
  background: #22c55e;
  color: #02120a;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.edit-kill-save:hover {
  filter: brightness(1.07);
}

/* ==========================
   LATEST MOVIE / EPISODE CARDS — STACKED + BADGE BOTTOM (HOME)
   ========================== */

/* Make grid rows equal height so badges line up */
.latest-grid{
  align-items: stretch;
  grid-auto-rows: 1fr;
}

/* Cards fill the grid cell */
.latest-grid > article{
  height: 100%;
}

/* Movie + Episode cards behave as columns (poster + body) */
.latest-grid .movie-card,
.latest-grid .episode-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Body uses remaining height */
.latest-grid .movie-card .card-body,
.latest-grid .episode-card .card-body{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Title centered on top */
.latest-grid .card-title{
  width: 100%;
}
.latest-grid .card-title a{
  display: block;
}

/*
  Meta area takes remaining space so the badge can be pushed to the bottom.
  NOTE: the bullet "•" is printed by PHP as a raw text node; CSS cannot reliably remove it.
  To remove it permanently, remove '&bull;' from the template (recommended).
*/
.latest-grid .movie-card .card-meta{
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

/* Pin the badge to the bottom of the card */
.latest-grid .movie-card .card-tag{
  margin-top: auto;
  background: #c62828;
  background-image: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==========================
   LATEST SECTIONS — UNIFIED CARD LAYOUT
   Episodes + Upcoming match Movies
   ========================== */

/* Make grid items stretch so cards share row height */
.latest-grid{
  align-items: stretch;
}

/* Make BOTH card types flex columns so we can pin the badge */
.latest-grid .movie-card,
.latest-grid .episode-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Ensure thumbs don't "steal" layout height unexpectedly */
.latest-grid .movie-thumb,
.latest-grid .episode-thumb{
  flex: 0 0 auto;
}

/* Ensure body fills remaining height so badge can sit at bottom */
.latest-grid .movie-card .card-body,
.latest-grid .episode-card .card-body{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

/* Title */
.latest-grid .movie-card .card-title,
.latest-grid .episode-card .card-title{
  width: 100%;
  margin-top: 6px;
}

/* Meta stack (year, S/E, release date, etc) */
.latest-grid .movie-card .card-meta,
.latest-grid .episode-card .card-meta{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.9;
}

/* If your Upcoming section has nested <span class="card-meta">Releases ...</span>,
   make it behave like a normal line (not inherit flex quirks) */
.latest-grid .movie-card .card-meta .card-meta{
  display: block;
  width: 100%;
  opacity: 0.95;
}

/* Pin badge to bottom for ALL latest cards */
.latest-grid .movie-card .card-tag,
.latest-grid .episode-card .card-tag{
  margin-top: auto;
  display: inline-block;
  background: #c62828;       /* red */
  background-image: none;    /* overrides old gradient */
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 1;
}

/* OPTIONAL: make Episode badge purple to match your screenshot style */
.latest-grid .episode-card .card-tag{
  background: #7b1fa2;
}

.latest-grid .card-se,
.latest-grid .card-release{
  display: block;
  width: 100%;
}

/* ==========================
   LATEST EPISODES — PIN EPISODE BADGE TO BOTTOM
   ========================== */

/* Ensure episode cards behave like movie cards */
.latest-grid .episode-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Card body must fill available space */
.latest-grid .episode-card .card-body{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

/* Meta stack (S/E info etc) */
.latest-grid .episode-card .card-meta{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* 🔥 THIS is the key line */
.latest-grid .episode-card .card-tag{
  margin-top: auto;        /* pushes EPISODE badge to bottom */
  background: #7b1fa2;     /* keep purple */
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.latest-grid .episode-card .card-body{
  padding-bottom: 0.5rem;
}

/* ==========================
   LATEST EPISODES — FORCE BADGE TO CARD BOTTOM
   ========================== */

/* Ensure each episode card is a full-height flex column */
.latest-grid .episode-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thumb stays fixed height, body stretches */
.latest-grid .episode-card .episode-thumb{
  flex: 0 0 auto;
}

/* Body fills remaining space */
.latest-grid .episode-card .card-body{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 0; /* important for flex children */
}

/* Meta block becomes the "stretch zone" */
.latest-grid .episode-card .card-meta{
  width: 100%;
  flex: 1 1 auto;              /* 🔥 this is the missing piece */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
}

/* EPISODE badge pinned to bottom of the meta stretch zone */
.latest-grid .episode-card .card-tag{
  margin-top: auto;            /* pushes to bottom */
  background: #7b1fa2;
  background-image: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 1;
}

/* ==========================
   UPCOMING / RELEASING CARDS — STACKED META
   ========================== */

/* Ensure meta stacks vertically */
.latest-grid .movie-card .card-meta{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

/* Year directly under title */
.latest-grid .movie-card .card-year{
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Release date under year */
.latest-grid .movie-card .card-release{
  font-size: 0.8rem;
  opacity: 0.75;
}

/* Badge always pinned to bottom */
.latest-grid .movie-card .card-tag{
  margin-top: auto;
}

/* Make Title Card line feel like the other meta lines */
.movie-meta-line{
  margin: 0 0 10px;
}

/* Thumbnail: subtle + not intrusive */
.titlecard-thumb-wrap{
  margin: 6px 0 12px;
}

.titlecard-thumb-btn{
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
}

.titlecard-thumb-btn:hover{
  border-color: rgba(60,179,237,0.55);
}

.titlecard-thumb-btn img{
  display:block;
  width: 180px;           /* small, non-intrusive */
  max-width: 42vw;
  height: auto;
  border-radius: 10px;
}

.titlecard-thumb-hint{
  display:block;
  margin-top: 6px;
  font-size: .85rem;
  opacity: .75;
}

/* ---------- Modal Lightbox ---------- */
.tc-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.tc-modal.is-open{
  display: block;
}

.tc-modal .tc-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.tc-modal .tc-panel{
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 28px));
  margin: 70px auto 30px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15,18,25,0.92);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  overflow: hidden;
}

.tc-modal .tc-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.tc-modal .tc-title{
  font-weight: 800;
  font-size: 1rem;
  opacity: .95;
}

.tc-modal .tc-close{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.tc-modal .tc-close:hover{
  border-color: rgba(60,179,237,0.55);
}

.tc-modal .tc-body{
  padding: 14px;
}

.tc-modal .tc-body img{
  display:block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Mobile-only ad block (hidden for logged-in users by PHP) */
.ad-mobile-only { 
  display: none;
  margin: 10px 0 14px;
}

/* Show only on mobile */
@media (max-width: 768px) {
  .ad-mobile-only { display: block; }
}

/* ==========================
   ENHANCED FOOTER
   ========================== */

.site-footer{
  background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
  border-top: 1px solid rgba(255,90,102,0.25);
  margin-top: 3rem;
  padding-top: 40px;
  position: relative;
}

/* subtle glow line */
.site-footer::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:2px;
  background: linear-gradient(
    90deg,
    transparent,
    #ff5a66,
    #ff8a90,
    #ff5a66,
    transparent
  );
  opacity:0.7;
}

.footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 40px;
}

.footer-col h4{
  color: #ff8a90;
  margin-bottom: 14px;
  font-size: 1rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.footer-logo{
  font-size: 1.6rem;
  color: #ff5a66;
  margin-bottom: 8px;
  font-weight: 800;
}

.footer-tagline{
  color: #aaa;
  font-size: .95rem;
  line-height: 1.6;
  max-width: 320px;
}

/* links */
.footer-links{
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li{
  margin-bottom: 8px;
}

.footer-links a{
  color: #ccc;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-links a:hover{
  color: #ff8a90;
}

/* social buttons */
.footer-social{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-social a{
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: .85rem;
  text-decoration: none;
  color: #fff;
  transition: all .2s ease;
}

.footer-social a:hover{
  background: #ff5a66;
  border-color: #ff5a66;
  color: #111;
}

.footer-email{
  font-size: .9rem;
  color: #aaa;
}

.footer-email a{
  color: #ff8a90;
  font-weight: 600;
}

/* bottom bar */
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 30px;
  text-align: center;
  font-size: .85rem;
  color: #777;
}

.site-footer{
  background:
    radial-gradient(circle at 50% 0%, rgba(255,90,102,0.08), transparent 60%),
    linear-gradient(180deg, #141417 0%, #0d0d0f 100%);
}