/* =====================================================================
   dizipal — Tasarım iyileştirme katmanı (2026-10-23)
   style.min.css'ten SONRA yüklenir; sadece üzerine yazar, temel dosyaya dokunmaz.
   Kapsam: izleme sayfası (oynatıcı ilk ekranda), mobil ana sayfa/listeler (3 sütun),
   dizi/film detay (kompakt hero), alt menü (5 öğe, pill tasarımı korundu), toast, tipografi.
   Kırılma noktaları: ≤640 mobil, 641–1024 tablet, >1024 masaüstü.
   Geri alma: includes/header.php'deki <link ... redesign.css> satırını kaldır.
   ===================================================================== */

/* ---------- Ortak tipografi ölçeği / kart tutarlılığı ---------- */
:root {
  --fs-xs: .72rem;  /* 11.5px: meta, rozet */
  --fs-sm: .8rem;   /* 13px: kart başlığı mobil */
  --fs-md: .9rem;   /* 14.5px: gövde */
  --fs-lg: 1.05rem;
  --fs-xl: 1.35rem;
  --card-gap: 14px;
}
.homepage-card-title, .grid-card-title, .trend-card-title, .carousel-card-title {
  font-size: var(--fs-sm); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.homepage-card-meta-row, .grid-card-meta, .trend-card-meta { font-size: var(--fs-xs); color: #c4c4d0; }
.homepage-card-meta-row .meta-rating, .grid-card-meta .meta-rating { color: #fbbf24; font-weight: 700; }
.badge { font-size: .62rem; padding: 2px 7px; opacity: .92; }
.homepage-grid { gap: var(--card-gap); }
.content-grid { gap: var(--card-gap); }

/* ---------- İzleme sayfası (dizi bölümü + film) ---------- */
/* Uyarı kutusu artık oynatıcının ALTINDA ve sessiz bir ipucu */
.player-notice {
  background: transparent; border: 0; color: #8f8fa3; font-size: var(--fs-xs);
  padding: 6px 4px 0; margin: 0; justify-content: flex-start;
}
.player-notice svg { color: #8f8fa3; width: 12px; height: 12px; }
/* Masaüstü: bölüm listesi oynatıcıyla birlikte kalsın */
@media (min-width: 1025px) {
  .watch-sidebar { position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; }
  .watch-sidebar .watch-episodes-list { overflow-y: auto; flex: 1 1 auto; }
}
/* "Sonraki Bölüm" birincil aksiyon */
.watch-nav-btn.watch-nav-next { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.watch-nav-btn.watch-nav-next:hover { background: var(--accent-hover); }

@media (max-width: 1024px) {
  .watch-mini-hero { min-height: 0; }
  .watch-mini-hero-content { padding: 10px 14px; }
  .watch-mini-breadcrumb { display: none; }            /* üstteki kırıntı zaten var — tekrar yok */
  .watch-mini-hero-info { gap: 10px; align-items: center; }
  .watch-mini-hero-poster { width: 38px; height: 54px; border-radius: 6px; }
  .watch-mini-hero-title { font-size: var(--fs-lg); line-height: 1.2; margin: 0 0 2px; }
  .watch-mini-hero-ep { margin: 0; font-size: var(--fs-xs); }
  .watch-mini-hero-meta { display: none; }
  .detail-breadcrumb { font-size: var(--fs-xs); padding: 6px 12px 0; }
  .watch-section { padding-top: 0; }
  .watch-content { gap: 12px; }
  /* Oynatıcı üstü reklam/bilgi kutuları mobilde oynatıcının altına iner */
  .watch-player-area { display: flex; flex-direction: column; }
  .watch-player-area > .site-ad-zone, .watch-player-area > .vip-banner-player { order: 5; }
  .watch-player-area > .watch-player-container { order: 1; }
  .watch-player-area > .player-notice { order: 2; }
  .watch-player-area > .watch-actions-bar { order: 3; }
  .watch-player-area > .iptv-promo { order: 4; }
  .watch-nav-btn.watch-nav-next span { display: inline; }  /* etiket görünür kalsın */
  .watch-nav-btn.watch-nav-next { padding: 0 14px; }
  /* Film sayfası: aynı mantık */
  .video-player-section { display: flex; flex-direction: column; }
  .video-player-section > .player-container, .video-player-section > .montana-player-wrap, .video-player-section > #montana-player { order: 1; }
  .video-player-section > .player-notice { order: 2; }
  .video-player-section > .watch-actions-bar { order: 3; }
  .watch-sidebar { margin-top: 4px; }
}
@media (max-width: 640px) {
  .watch-section { padding: 0 8px; }
  .watch-actions-bar { padding: 8px 6px; gap: 6px; }
  .iptv-promo { margin: 12px 0 8px; }
}

/* ---------- Mobil: ana sayfa + listeler ---------- */
@media (max-width: 640px) {
  /* Slogan ve arama kutusu orijinal haliyle kalıyor (kullanıcı isteği, 2026-10-23) */
  .homepage-boxed { margin: 10px 8px 90px; border-radius: var(--radius-md); }
  .homepage-main { padding: 0 10px 8px; }
  .homepage-section { margin-bottom: 18px; }
  .homepage-section-head { margin-bottom: 8px; }
  .homepage-section-title { font-size: 1rem; }
  .homepage-section-link { font-size: var(--fs-xs); }
  .homepage-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  .homepage-card-overlay-bottom { padding: 6px; }
  .homepage-card-title { font-size: .72rem; -webkit-line-clamp: 1; }
  .homepage-card-meta-row { font-size: .64rem; gap: 6px; }
  .homepage-card-badges { gap: 3px; }
  .badge { font-size: .56rem; padding: 2px 5px; }
  /* Trend şeridi: dev rakamlar kapalı, posterler düz kayar */
  .trend-number { display: none !important; }
  .trend-card-poster { margin-left: 0 !important; }
  .trend-card { flex: 0 0 118px !important; }
  .trend-carousel-nav { display: none !important; }
  .trend-carousel-inner { gap: 8px; }
  /* Son eklenen bölümler: orijinal düzen (kullanıcı isteği, 2026-10-23) */
  /* Liste sayfaları */
  .content-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; padding-left: 10px; padding-right: 10px; }
  .grid-card-title { font-size: .72rem; -webkit-line-clamp: 1; }
  /* Filtreler tek satırda yan yana (önceden alt alta, kaydırma kutusu çıkıyordu) */
  .filters-bar { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 6px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 0 0 6px; max-height: none !important; }
  .filters-bar::-webkit-scrollbar { display: none; }
  .filter-select-group { flex: 0 0 auto; min-width: 0; }
  .filter-select { font-size: var(--fs-xs); padding: 7px 26px 7px 10px; }
  .page-title { font-size: var(--fs-xl); }
  /* Liste sayfası SEO paragrafı: metin DOM'da kalır (arama motoru okur), ekranda 2 satır */
  .seo-description { margin: 6px 0 10px; }
  .seo-description p { font-size: var(--fs-xs); line-height: 1.5; color: #8f8fa3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .homepage-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .content-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .trend-number { font-size: 110px; }
}

/* ---------- Dizi / film detay (mobil) ---------- */
@media (max-width: 640px) {
  .series-hero { padding: 16px 0 12px; }
  .series-hero-inner { grid-template-columns: 92px minmax(0, 1fr); gap: 0 12px; }
  .series-badges { gap: 4px; margin-bottom: 6px; }
  .series-badge { font-size: .62rem; padding: 3px 8px; }
  .series-title { font-size: 1.25rem; line-height: 1.2; margin-bottom: 4px; }
  .series-meta-mobile { font-size: var(--fs-xs); gap: 8px; margin-bottom: 8px; }
  .series-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
  .series-actions .btn { padding: 10px 8px; font-size: .78rem; justify-content: center; }
  .series-actions .btn-accent:nth-of-type(1) { grid-column: 1 / -1; font-size: .9rem; padding: 12px; }
  .series-actions .btn-trailer { background: rgba(255,255,255,.06); color: #fff; }
  .series-actions .btn-share { grid-column: auto; }
  .series-summary { font-size: var(--fs-sm); -webkit-line-clamp: 3; }
  /* "Tüm Veriler" paneli kompakt çipler */
  .series-data-panel { padding: 10px 12px; margin-top: 10px; }
  .series-data-panel h3 { font-size: .85rem; margin-bottom: 6px; }
  .series-data-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .series-data-item { padding: 6px 8px; flex-direction: column; align-items: flex-start; gap: 1px; }
  .series-data-item .label { font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; color: #8f8fa3; }
  .series-data-item .value { font-size: .78rem; }
  .detail-stats { gap: 8px; }
  .detail-stat { padding: 6px 10px; }
  .detail-summary { font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .episodes-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .episode-title { font-size: .76rem; }
  .episode-season-info { font-size: .64rem; }
  .cast-section .cast-grid, .cast-grid { gap: 10px; }
}
/* Bölüm kartı: gerçek sahne görseli yoksa aynı dizi görselini 10 kez tekrarlamak yerine
   numaralı sade kart */
.episode-card.ep-no-still .episode-thumb img { filter: brightness(.35) saturate(.6); }
.episode-card.ep-no-still .episode-thumb::after {
  content: attr(data-ep); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.episode-card.ep-no-still .episode-thumb { position: relative; }

/* ---------- Alt menü (pill tasarımı korundu; 5 öğe) ---------- */
@media (max-width: 768px) {
  .mobile-bottom-dock { padding: 7px 6px 8px; gap: 2px; }
  .mobile-bottom-dock.dock-has-5 .mobile-dock-item, .mobile-bottom-dock .mobile-dock-item { padding: 4px 0 1px; gap: 3px; }
  .dock-icon-wrap { width: 34px; height: 34px; border-radius: 12px; }
  .dock-label { font-size: 9.5px; }
  body { padding-bottom: 76px; }  /* içerik dock'un altında kalmasın */
}

/* ---------- Toast (Telegram) ---------- */
#tg-pill { bottom: auto !important; top: 70px !important; transform: translateX(-50%) translateY(-10px) !important; }
#tg-pill.is-open { transform: translateX(-50%) translateY(0) !important; }
