/* === INDEX: GÖRSEL BOYUT / HİZA SABİTLEME ===
   Kaynak resmin gerçek piksel ve en-boy oranı kart düzenini değiştiremez. */

/* Ana arşiv: bütün poster kartları aynı 2:3 alanda kalır. */
#grid .item {
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  align-self: start !important;
}
#grid .item .poster {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}
#grid .item .poster-img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

/* Son Eklenenler: görsel kutusu herkes için tam aynı ölçüde. */
#recentTrack .recent-card {
  flex: 0 0 270px !important;
  width: 270px !important;
  max-width: 270px !important;
}
#recentTrack .recent-imgbox {
  width: 270px !important;
  height: 152px !important;
  aspect-ratio: auto !important;
  flex: 0 0 152px !important;
}
#recentTrack .recent-imgbox img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}
/* Yatay IMG bulunmayıp dik poster yedek olarak kullanıldığında kırpmak yerine kutuya sığdır. */
#recentTrack .recent-imgbox.is-poster-fallback img {
  object-fit: contain !important;
  background: rgba(20, 20, 30, 0.92);
}

@media (max-width: 700px) {
  #recentTrack .recent-card {
    flex-basis: 220px !important;
    width: 220px !important;
    max-width: 220px !important;
  }
  #recentTrack .recent-imgbox {
    width: 220px !important;
    height: 124px !important;
    flex-basis: 124px !important;
  }
}

  /* Arama açıkken hero alanını tamamen kapat/aç */
  .hero {
    transform-origin: top center;
    max-height: 1700px;
    overflow: hidden;
    transition: max-height .48s cubic-bezier(.22, 1, .36, 1),
                padding .48s cubic-bezier(.22, 1, .36, 1),
                margin .48s cubic-bezier(.22, 1, .36, 1),
                transform .42s cubic-bezier(.22, 1, .36, 1),
                opacity .32s ease,
                filter .32s ease;
  }

  /* Yakında Eklenecekler hero'nun dışında olduğu için arama sırasında ayrıca kapat. */
  body.search-hero-hidden .home-upcoming-shell,
  body.search-hero-hidden .recent-strip {
    display: none !important;
  }

  body.search-hero-hidden .hero {
    max-height: 0 !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
    transform: translateY(-18px) scale(.96);
    opacity: 0;
    filter: saturate(.85) blur(1px);
    pointer-events: none;
  }

  body.search-hero-hidden .hero h1,
  body.search-hero-hidden .hero #heroDesc,
  body.search-hero-hidden .hero .hero-actions,
  body.search-hero-hidden .hero .home-upcoming {
    transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
  }

  body.search-hero-hidden .hero h1,
  body.search-hero-hidden .hero #heroDesc,
  body.search-hero-hidden .hero .hero-actions,
  body.search-hero-hidden .hero .home-upcoming {
    transform: translateY(-10px);
    opacity: 0;
  }

  @media (max-width: 768px) {
    body.search-hero-hidden .hero {
      transform: translateY(-14px) scale(.98);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero,
    body.search-hero-hidden .hero h1,
    body.search-hero-hidden .hero #heroDesc,
    body.search-hero-hidden .hero .hero-actions,
    body.search-hero-hidden .hero .home-upcoming {
      transition: none !important;
    }
  }


  /* Üst alan: Son Eklenenler kaydırmalı geniş IMG kartları */
/* === YENİ NESİL SON EKLENENLER (Kutucuksuz Floating Tasarım) === */
.recent-strip {
  padding: 14px 0 28px;
}
.recent-box {
  position: relative;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.recent-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 16px;
}
.recent-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--text, #fff);
}
.recent-title i {
  color: #818cf8; /* Tatlı bir indigo neon vurgusu */
}
.recent-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.recent-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #fff);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.recent-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}
.recent-track {
  display: flex;
  gap: 22px; /* Kutular kalktığı için afişler arası ferah bir boşluk */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 20px;
}
.recent-track::-webkit-scrollbar {
  height: 6px;
}
.recent-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

/* KARTIN KENDİSİ ARTIK ŞEFFAF BİR TAŞIYICI (KUTU VEYA ÇERÇEVE YOK!) */
.recent-card {
  flex: 0 0 270px;
  scroll-snap-align: start;
  color: inherit;
  text-decoration: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
}

/* Tüm görsellik, gölge ve oval hatlar sadece resim alanında toplandı */
.recent-imgbox {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(20, 20, 30, 0.6);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.recent-imgbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Mouse ile üzerine gelindiğinde sinematik parlama ve yaklaşma efekti */
.recent-card:hover .recent-imgbox {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
}
.recent-card:hover .recent-imgbox img {
  transform: scale(1.07);
}

/* Metinler kutudan bağımsız, aşağıda özgür ve temiz bir tipografik dizilimde */
.recent-meta {
  padding: 12px 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.recent-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text, #fff);
  transition: color 0.2s ease;
}
.recent-card:hover .recent-name {
  color: #818cf8; /* Hover durumunda başlık da neon rengini alır */
}
.recent-sub {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted, rgba(255, 255, 255, 0.6));
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Yeni Bölüm / Yeni Dizi rozeti modern bir hap (pill) tasarımına geçti */
.recent-badge-wrap {
  margin-top: 4px;
}
.recent-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}

@media (max-width: 700px) {
  .recent-card { flex-basis: 220px; }
  .recent-track { gap: 14px; }
}

	@media (max-width: 700px) {
  .recent-card { flex-basis: 220px; }
  .recent-track { gap: 14px; }
}

/* ========================================================
   ✨ YAKINDA EKLENECEKLER - NETFLIX MOBİL & MASAÜSTÜ ✨
======================================================== */

.home-upcoming {
  width: 100%;
  margin: 0 auto 50px;
}
.home-upcoming__head {
  margin: 0 4px 12px;
}
.home-upcoming__title {
  color: #e5e5e5;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  letter-spacing: 0.5px;
}
.home-upcoming__title i, .home-upcoming__hint { display: none; }

.home-upcoming__track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding: 20px 4px 40px;
}
.home-upcoming__track::-webkit-scrollbar { display: none; }

.home-upcoming__card {
  position: relative;
  flex: 0 0 calc((100% - 24px) / 4);
  max-width: calc((100% - 24px) / 4);
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #141414;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.33, 0.04, 0.3, 1), box-shadow 0.3s ease;
  transform-origin: center center;
}

.home-upcoming__card:hover {
  transform: translateY(-4px) scale(1.02);
  z-index: 10;
  box-shadow: 0 14px 28px rgba(0,0,0,0.8), 0 10px 10px rgba(0,0,0,0.7);
  border-radius: 6px;
}

.home-upcoming__visual {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.home-upcoming__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-upcoming__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 20, 20, 0.95) 0%, rgba(20, 20, 20, 0.4) 35%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.home-upcoming__card:hover .home-upcoming__visual::after { opacity: 1; }

.home-upcoming__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 5;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.33, 0.04, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.home-upcoming__card:hover .home-upcoming__overlay {
  opacity: 1;
  transform: translateY(0);
}

.home-upcoming__name {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-upcoming__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  row-gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #a3a3a3;
}
.home-upcoming__meta span:first-child { color: #46d369; font-weight: 800; }
.home-upcoming__episodes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 6px;
  border-radius: 3px;
  color: #e5e5e5 !important;
  font-size: 10px;
  line-height: 1.25;
  white-space: normal;
}
.home-upcoming__dot { display: none; }

.home-upcoming__status, .home-upcoming__film-badge {
  position: absolute;
  top: 8px;
  z-index: 6;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 6px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.home-upcoming__film-badge { right: 8px; background: #E50914; color: #fff; }
.home-upcoming__status { left: 8px; background: rgba(0,0,0,0.7); color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* MOBİL TASARIM (NETFLIX'İN MOBİL UYGULAMASI) */
@media (max-width: 768px) {
  .home-upcoming { margin-bottom: 26px; }
  .home-upcoming__head { margin-bottom: 10px; }
  .home-upcoming__title { font-size: 17px; }
  .home-upcoming__track {
    padding: 8px 8px 18px;
    gap: 10px;
  }
  .home-upcoming__card {
    flex: 0 0 calc((100% - 10px) / 2);
    max-width: calc((100% - 10px) / 2);
    min-width: 0;
    border-radius: 8px;
    aspect-ratio: 1.6 / 1;
  }
  .home-upcoming__card:hover { transform: none; box-shadow: none; z-index: 1; }
  .home-upcoming__visual::after {
    opacity: 1;
    background: linear-gradient(to top, rgba(20, 20, 20, 0.94) 0%, rgba(20,20,20,0.55) 38%, transparent 72%);
  }
  .home-upcoming__overlay {
    opacity: 1;
    transform: translateY(0);
    padding: 8px;
  }
  .home-upcoming__name {
    font-size: 13px;
    line-height: 1.15;
    margin-bottom: 5px;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .home-upcoming__meta {
    font-size: 10px;
    gap: 5px;
    row-gap: 4px;
    align-items: flex-start;
  }
  .home-upcoming__meta span:first-child {
    display: block;
    width: 100%;
    line-height: 1.15;
  }
  .home-upcoming__episodes {
    font-size: 9px;
    padding: 2px 5px;
    line-height: 1.15;
  }
  .home-upcoming__film-badge,
  .home-upcoming__status {
    top: 6px;
    font-size: 9px;
    padding: 2px 5px;
  }
}

@media (max-width: 430px) {
  .home-upcoming__track {
    padding: 8px 6px 16px;
    gap: 8px;
  }
  .home-upcoming__card {
    flex: 0 0 calc((100% - 8px) / 2);
    max-width: calc((100% - 8px) / 2);
    aspect-ratio: 1.45 / 1;
  }
  .home-upcoming__overlay { padding: 7px; }
  .home-upcoming__name { font-size: 12px; margin-bottom: 4px; }
  .home-upcoming__meta { font-size: 9px; gap: 4px; row-gap: 3px; }
  .home-upcoming__episodes { font-size: 8.5px; padding: 2px 4px; }
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
#filmSubWrap { margin-top: 8px; }

.daily-grid-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 42px !important;
  margin-bottom: 24px;
  padding: 0 8px;
}

.recent-strip {
  padding: 36px 0 28px !important;
}

.daily-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text, #fff);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 100%;
}
.daily-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.daily-chip__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.daily-chip__title {
  white-space: nowrap; /* Tek satırda şık bir hap rozet olarak kalır */
  color: rgba(255, 255, 255, 0.85);
  /* overflow ve max-width kaldırıldı, isim asla yarım kesilmez! */
}
.daily-chip:hover .daily-chip__title {
  color: #fff;
}

@media (max-width: 768px) {
  .daily-grid-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .daily-chip {
    justify-content: space-between;
    padding: 6px 12px 6px 6px;
  }
.daily-chip__title {
    white-space: normal; /* Mobilde ekrandan taşmaması için doğal akışta alt satıra sarılır */
    max-width: none !important; /* İsimler kırpılmadan tam ve okunaklı görünsün */
    line-height: 1.3;
  }
}

.recent-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.recent-tab {
  background: transparent;
  border: none;
  color: var(--muted, rgba(255, 255, 255, 0.6));
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}
.recent-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.recent-tab.is-active {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

@media (max-width: 850px) {
  .recent-top {
    flex-wrap: wrap;
    gap: 12px;
  }
  .recent-tabs {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .recent-tabs::-webkit-scrollbar {
    display: none;
  }
}
/* Son Eklenenler (.recent-card) içindeki rozetleri resmin tam üst ortasına al */
.recent-card {
  position: relative !important;
}
.recent-card .recent-badge-wrap {
  position: absolute !important;
  top: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 10 !important;
  margin-top: 0 !important;
  width: max-content !important;
}
.recent-card .recent-badge {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(129, 140, 248, 0.5) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
  padding: 4px 12px !important;
}

/* "Tümü" haricindeki filtre sekmelerine (Yeni Bölümler, Yeni Şovlar vb.) tıklandığında rozetleri gizle */
.recent-box[data-active-tab]:not([data-active-tab="all"]) .recent-badge-wrap {
  display: none !important;
}


/* === CVD: YAKINDA ÜSTTE + HERO KONUMUNU KORUYAN KOMPAKT AKIŞ === */
.home-upcoming-shell { padding-top: 18px; }
.home-upcoming-shell .home-upcoming { margin: 0 auto 8px !important; }
.home-upcoming-shell .home-upcoming__track { padding-bottom: 12px !important; }
.home-upcoming__status { display: none !important; }
.hero.home-hero-compact {
  height: auto !important;
  min-height: 0 !important;
  padding-top: 12px !important;
  padding-bottom: 18px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.hero.home-hero-compact > .container { min-height: 0 !important; }
@media (max-width: 768px) {
  .home-upcoming-shell { padding-top: 12px; }
  .hero.home-hero-compact { padding-top: 8px !important; padding-bottom: 14px !important; }
}