
.archive-page {
  margin: 0;
  padding: 0;
}

body[data-theme="light"] .archive-page {
  background: transparent !important;
}

body[data-theme="dark"] .archive-page {
  background: transparent !important;
}

/* Dark tema için arşiv sayfası archive-section arkaplanı */
[data-theme="dark"] .archive-page .archive-section {
  background: transparent !important;
}

@media (min-width: 769px) {
  [data-theme="dark"] .archive-page .archive-section {
    background: #252540 !important;
  }
}

/* Dark tema için arşiv sayfası yapım kartları archive-info arkaplanı */
[data-theme="dark"] .archive-page .archive-info {
  background: #21213A !important;
}

/* Mobilde arşiv animasyonunu kapat */
@media (max-width: 768px) {
  [data-theme="dark"] .archive-page .archive-info {
    animation: none !important;
    background: #21213A !important;
  }
}

/* Arşiv kartları başlık fade-out efekti - sadece uzun başlıklara uygula */
.archive-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

/* JavaScript ile kontrol edilen sınıf için fade-out */
.archive-title.text-overflow {
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.archive-header {
  text-align: center;
  margin-bottom: 3rem;
}

.archive-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.archive-header p {
  color: var(--muted-color);
  font-size: 1.1rem;
  margin: 0;
}

.archive-container {
  display: block;
  margin: 0;
  padding-bottom: 6rem;
}

/* Takvim ve arşiv tamamlanma banner stilleri */
.takvim-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: 150px;
}

.takvim-liste {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.takvim-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-background-color);
  border-radius: 25px;
  padding: 0.6rem 1rem 0.6rem calc(0.6rem + 2px);
  border: 1px solid var(--muted-border-color);
  position: relative;
}

.takvim-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.takvim-poster {
  flex-shrink: 0;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  height: 165px;
  min-height: 165px;
  max-height: 165px;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.takvim-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.takvim-bilgi {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 50px;
}

.takvim-baslik {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: var(--pico-color);
  line-height: 1.2;
  font-weight: 600;
}

.takvim-bolum {
  font-size: 1rem;
  color: var(--muted-color);
  font-weight: 500;
  line-height: 1.4;
}

.takvim-tarih-gun {
  font-size: 0.95rem;
  color: var(--pico-primary);
  font-weight: 600;
  margin-top: auto;
}

.platform-info {
  font-size: 1rem;
  color: var(--muted-color);
  font-weight: 500;
  margin: 0.2rem 0;
  margin-top: auto;
}

.film-spacer {
  height: 1.4rem;
  flex-shrink: 0;
}

.takvim-sag {
  position: absolute;
  right: calc(1.2rem - 1.5px);
  top: calc(50% - 1px);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.episode-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.dizi-link,
.bolum-link,
.film-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.dizi-link:hover {
  color: var(--pico-primary);
}

.bolum-link:hover .takvim-bolum {
  color: var(--pico-primary);
}

.film-link:hover {
  color: var(--pico-primary);
}

.completion-banner {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  color: white;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  min-height: 50px;
  max-height: 60px;
}

.congratulations {
  font-size: 1rem;
  font-weight: 700;
  animation: celebrate 2s ease-in-out infinite alternate;
}

@keyframes celebrate {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

.completion-banner .archive-action {
  display: flex;
  align-items: center;
  margin: 0;
  margin-top: 21px;
}

.completion-banner {
  align-items: center !important;
}

.archive-complete-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 9999px !important;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.archive-complete-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Masaüstü için takvim kartı düzenlemeleri */
@media (min-width: 769px) {
  .takvim-item {
    border-radius: 25px;
  }
  .archive-page {
    padding-top: 30px;
  }
}

/* Mobil için takvim poster boyutu */
@media (max-width: 768px) {
  .takvim-item {
    border-radius: 30px !important;
  }
  .takvim-poster {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    height: 135px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    border-radius: 20px !important;
  }
}

/* 768px ve altı: bölüm bilgisi fade-out için container sınırla */
@media (max-width: 768px) {
  .takvim-bilgi {
    overflow: hidden;
    min-width: 0;
  }
}

/* 320px ve altı: başlık da tek satır fade-out */
@media (max-width: 320px) {
  .takvim-baslik {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
  }

}

/* section-title-pill - arşiv sayfası */
.archive-page .section-title-pill {
  display: none;
}
.archive-page .section-title-desktop {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.archive-page .section-count-desktop {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
@media (max-width: 768px) {
  .archive-page .section-title-desktop,
  .archive-page .section-count-desktop {
    display: none !important;
  }
  .archive-page .section-title-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #433c77;
    border-radius: 999px;
    padding: 0 1.2rem;
    color: #fff;
    box-sizing: border-box;
    height: 50px;
    width: calc(100% + 16px);
    margin-left: -8px;
    margin-right: -8px;
    position: relative;
    top: 8px;
    margin-top: 29px;
  }
  .archive-page .section-header {
    background: transparent !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
  }
  .archive-page .pill-title {
    font-size: clamp(0.5rem, 3.5vw, 0.75rem);
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1;
    vertical-align: middle;
  }
  .archive-page .pill-title i,
  .archive-page .section-title-pill i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  .archive-page .section-title-pill .item-count {
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
    border: none;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    align-self: center;
    position: relative;
    top: 0px;
    left: 6px;
  }
  .archive-page .archive-section {
    margin-top: 10px !important;
  }
}

@media (max-width: 768px) {
  .archive-page .empty-state {
    background: transparent !important;
  }
}

/* Açık temada archive-section mobilde şeffaf, masaüstünde beyaz */
@media (max-width: 768px) {
  body[data-theme="light"] .archive-page .archive-section {
    background: transparent !important;
  }
}

@media (min-width: 769px) {
  body[data-theme="light"] .archive-page .archive-section {
    background: #ffffff !important;
  }
}

/* Açık temada arşiv kartı info alanı */
body[data-theme="light"] .archive-page .archive-info {
  background: #252540 !important;
  color: #BBC6CE !important;
}

body[data-theme="light"] .archive-page .archive-info * {
  color: #BBC6CE !important;
}

/* --- LAZY LOAD & INFINITE SCROLL PREMIUM STYLES --- */

/* Görsel lazy load fade-in efekti */
.lazy-image {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lazy-image.loaded {
  opacity: 1;
}

/* Sonsuz Kaydırma Tetikleyici ve Yükleniyor Spinnerı */
.infinite-scroll-trigger {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 2.5rem 0;
  margin-top: 1rem;
  min-height: 80px;
}

.infinite-scroll-spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid rgba(255, 255, 255, 0.1);
  border-top-color: #764ba2;
  border-radius: 50%;
  animation: infinite-spin 0.8s linear infinite;
  box-shadow: 0 0 15px rgba(118, 75, 162, 0.2);
}

@keyframes infinite-spin {
  to {
    transform: rotate(360deg);
  }
}
