/**
 * dizilab — responsive overrides (mobile-first cascade: load after main.min.css)
 *
 * Breakpoints:
 *   ≤ 1279 px  — tablet / narrow desktop  (single column)
 *   ≤  900 px  — large mobile / small tablet
 *   ≤  600 px  — phone landscape
 *   ≤  480 px  — phone portrait
 */

/* ═══════════════════════════════════════════════════════
   0. GLOBAL (safe — no layout impact on desktop)
   ═══════════════════════════════════════════════════════ */
html {
  -webkit-text-size-adjust: 100%;
}

.tv-series-single .tss-detail .title {
  padding-left: 0;
}

.player {
  height: auto !important;
  overflow: visible !important;
}

.right .tv-series-list ul li.date {
  width: 100% !important;
  float: none;
  clear: both;
  margin-top: 15px;
  margin-bottom: 5px;
  background: none;
}
.right .tv-series-list ul li.date:first-child {
  margin-top: 0;
}
.right .tv-series-list ul li.date span h1 {
  font-size: 13px;
  font-weight: 600;
  color: #8a969c;
  padding: 8px 0 5px;
  border-bottom: 1px solid #2a3134;
}

.tv-series-single .film-image img {
  width: 130px;
  height: 200px;
  object-fit: cover;
  border-radius: 3px;
}

.menu {
  height: 57px !important;
}

.menu ul {
  padding-top: 0;
  display: flex;
  align-items: center;
  height: 100%;
}


/* ═══════════════════════════════════════════════════════
   TAB PANELS — show/hide
   ═══════════════════════════════════════════════════════ */
.dlab-tab-panel {
  display: none;
}

.dlab-tab-panel.active {
  display: block;
}

/* ═══════════════════════════════════════════════════════
   HORIZONTAL SCROLL CAROUSELS
   beklenen/eklenen diziler + dikkat çeken diziler
   ═══════════════════════════════════════════════════════ */

/* --- fragmanlar (beklenen / eklenen) --- */
#fragmanlar {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  gap: 16px;
  padding: 8px 4px 12px;
  margin: 10px 0 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

#fragmanlar::-webkit-scrollbar {
  height: 4px;
}

#fragmanlar::-webkit-scrollbar-track {
  background: transparent;
}

#fragmanlar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 4px;
}

#fragmanlar:hover::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.3);
}

#fragmanlar li {
  flex: 0 0 auto !important;
  float: none !important;
  scroll-snap-align: start;
  min-width: 100px !important;
  max-width: 110px !important;
  width: 110px !important;
  margin-right: 0 !important;
  text-align: center;
  transition: transform .2s ease;
}

#fragmanlar li h6 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#fragmanlar li small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

#fragmanlar li:hover {
  transform: scale(1.06);
}

/* --- dikkat çeken diziler --- */
#dikkat-ceken-diziler {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  gap: 14px;
  padding: 8px 4px 12px;
  margin-left: 0 !important;
  height: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

#dikkat-ceken-diziler::-webkit-scrollbar {
  height: 4px;
}

#dikkat-ceken-diziler::-webkit-scrollbar-track {
  background: transparent;
}

#dikkat-ceken-diziler::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 4px;
}

#dikkat-ceken-diziler:hover::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.3);
}

#dlab-diziler-main {
  flex: 0 0 auto !important;
  float: none !important;
  scroll-snap-align: start;
  width: 150px !important;
  height: auto !important;
  margin: 0 !important;
  transition: transform .2s ease;
}

#dlab-diziler-main:hover {
  transform: scale(1.04);
}

#dlab-diziler-main {
  overflow: hidden;
}

.dlab-dizi-main {
  width: 100% !important;
}

.dlab-title {
  width: 100% !important;
  box-sizing: border-box;
}

.dlab-yil {
  display: none !important;
}

.dlab-title {
  text-align: left !important;
}

.dlab-alfabe-div {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════
   2. TABLET / NARROW DESKTOP  — max-width: 1279px
   ═══════════════════════════════════════════════════════ */
@media screen and (max-width: 1279px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  /* ---- layout shell ---- */
  .container {
    width: 100% !important;
    max-width: 1260px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
  }

  .content {
    width: 100% !important;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: #22282b !important;
  }

  .left {
    float: none !important;
    width: 100% !important;
    clear: both;
    order: 2;
  }

  .left .logo {
    max-width: 100%;
  }

  .left .left-menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    padding: 8px 0;
  }

  .left .left-menu ul li {
    float: none !important;
  }

  .right {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    order: 1;
  }

  .content > .clear {
    order: 3;
  }

  .content > .footer {
    order: 4;
  }

  /* ---- two-column sections → full width ---- */
  .section-left,
  .section-right,
  .right .section-left,
  .right .section-right {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .right .section-right {
    margin-top: 16px;
  }

  /* ---- TV series scroll (was 1170px fixed) ---- */
  .tv-series-scroll {
    width: 100% !important;
    height: auto !important;
    overflow: visible;
  }

  /* ---- episode list items ---- */
  .right .tv-series-list ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .right .tv-series-list ul li {
    float: none !important;
    width: calc(33.333% - 7px) !important;
    min-width: 0;
    max-width: none;
    margin-right: 7px !important;
  }

  .tv-series-list ul li a:not(.icon-fa) {
    height: 50px;
    min-height: 50px;
    overflow: hidden;
  }

  .tv-series-list ul li a:not(.icon-fa) .title {
    width: auto !important;
    max-width: calc(100% - 50px);
  }

  .tv-series-list ul li a:not(.icon-fa) .alt-title {
    width: auto !important;
    max-width: calc(100% - 50px);
  }

  .right .tv-series-list ul li.date,
  .right .tv-series-list ul li.sagad,
  .right .tv-series-list ul li.advert {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 100%;
    margin-right: 0 !important;
  }

  .tv-series-scroll .sagad {
    float: none !important;
    width: 100% !important;
    height: auto !important;
    text-align: center;
  }

  .tv-series-scroll .sagad div:first-child {
    width: 100% !important;
    max-width: 300px;
    height: auto !important;
    min-height: 200px;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* ---- alphabet strip ---- */
  .dlab-alfabe-div {
    float: none !important;
    width: 100% !important;
  }

  #dlab-alfabe {
    height: auto !important;
    float: none !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .dlab-alfabe-harfler {
    white-space: nowrap;
    display: inline-block;
    min-height: 48px;
  }

  /* ---- fragman / dikkat çeken diziler: fixed height off ---- */
  .right .section-tab[style*="height"] {
    height: auto !important;
    min-height: 0;
  }

  .dlab-img,
  .dlab-img img {
    width: 140px !important;
    height: 210px !important;
  }

  /* ---- most-tab list items (en çok takip edilenler) ---- */
  .most-tab-list ul li a .info {
    width: auto !important;
    max-width: calc(100% - 110px);
  }

  .most-tab-list ul li a .info .title {
    width: auto !important;
    max-width: 100%;
  }

  .most-tab-list.style1 ul li a .info,
  .most-tab-list.dashboard-fix ul li a .info {
    width: auto !important;
  }

  .most-tab-list.style1 ul li a .info .title,
  .most-tab-list.dashboard-fix ul li a .info .title {
    width: auto !important;
    max-width: 100%;
  }

  /* ---- archives ---- */
  .archives-menu {
    float: left !important;
    width: 180px !important;
    margin-bottom: 12px;
  }

  .archives-tv-series-list {
    float: right !important;
    width: calc(100% - 200px) !important;
  }

  .tv-series-single .film-image img {
    width: 120px;
    height: 180px;
    object-fit: cover;
  }

  .tv-series-single .tss-detail {
    padding-left: 135px;
  }

  /* ---- new-episode-list ---- */
  .new-episode-list {
    height: auto !important;
    padding: 12px;
  }

  .new-episode-list ul {
    float: none !important;
    width: 100% !important;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .new-episode-list ul.column-1,
  .new-episode-list ul.column-2,
  .new-episode-list ul.column-3 {
    width: 100% !important;
  }

  .new-episode-list ul li {
    float: none !important;
    margin-right: 0 !important;
    width: calc(50% - 5px) !important;
  }

  .new-episode-list ul li a {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  /* ---- footer ---- */
  .footer {
    height: auto !important;
    min-height: 0;
    padding: 20px 16px 60px;
  }

  .footer .footer-logo {
    width: 100% !important;
    max-width: 280px;
    height: auto !important;
    margin: 0 auto 16px;
    border-right: none !important;
    border-bottom: 1px solid #202628;
    padding-bottom: 16px;
    float: none !important;
  }

  .footer .disclaimer {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    padding: 0 8px;
  }

  .footer .bottom {
    position: relative !important;
    left: auto !important;
    width: 100% !important;
    text-align: center;
    margin-top: 16px;
    padding: 12px 0;
  }

  /* ---- popup centering ---- */
  .popup .popup-content {
    left: 50% !important;
    margin-left: 0 !important;
    transform: translateX(-50%);
    max-width: calc(100vw - 24px);
  }

  .popup .popup-inner {
    width: 100% !important;
    max-width: 556px;
  }

  .popup .popup-inner .scroll {
    width: 100% !important;
    max-width: 100%;
  }

  /* ---- modal windows ---- */
  #modal-window .modal-box.modal-size-normal,
  #modal-window .modal-box.modal-size-large {
    width: calc(100vw - 24px) !important;
    max-width: 560px;
  }

  /* ---- ad containers ---- */
  .ads728x90 {
    width: 100% !important;
    max-width: 728px;
    overflow: hidden;
  }
}

/* ═══════════════════════════════════════════════════════
   3. LARGE MOBILE / SMALL TABLET  — max-width: 900px
   ═══════════════════════════════════════════════════════ */
@media screen and (max-width: 900px) {
  /* ---- archives: stack on mobile ---- */
  .archives-menu {
    float: none !important;
    width: 100% !important;
  }

  .archives-tv-series-list {
    float: none !important;
    width: 100% !important;
  }

  .tv-series-single .film-image img {
    width: 100px;
    height: 150px;
    object-fit: cover;
  }

  .tv-series-single .tss-detail {
    padding-left: 115px;
  }

  /* ---- header restructure ---- */
  .header {
    height: auto !important;
    min-height: 56px;
    padding: 8px 12px 12px;
    overflow: visible;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .header .logo-text {
    float: none !important;
    order: 1;
    flex: 0 0 auto;
  }

  .header .logo-text a {
    display: inline-flex;
    align-items: center;
  }

  .header .register-link {
    float: none !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 !important;
    width: auto;
    order: 2;
  }

  .header .register-link li {
    float: none !important;
    margin-left: 0 !important;
  }


  .header .search {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100%;
    max-width: 100%;
    margin: 4px 0 0;
    padding: 0;
    order: 4;
    flex: 1 1 100%;
  }

  .header .search input[type="text"] {
    width: 100% !important;
    max-width: 100%;
    font-size: 16px;
  }

  .search-result {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* ---- menu: horizontally scrollable ---- */
  .menu {
    height: auto !important;
    min-height: 37px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .menu ul {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    padding-top: 9px;
    padding-bottom: 8px;
  }

  .menu ul li {
    float: none !important;
    flex: 0 0 auto;
  }


  /* ---- quote bar ---- */
  .header-top {
    height: auto !important;
    min-height: 0;
    padding: 8px 0;
    background-size: 100% !important;
  }

  .header-top .quote {
    font-size: 12px;
    line-height: 1.4;
    padding: 4px 12px;
    position: relative;
    bottom: auto;
  }

  /* ---- episode items: 2 columns ---- */
  .right .tv-series-list ul li {
    width: calc(50% - 6px) !important;
    margin-right: 6px !important;
  }

  /* ---- fragmanlar: smaller on tablet ---- */
  .fragman_img {
    width: 85px !important;
    height: 85px !important;
  }

  #fragmanlar li {
    min-width: 90px !important;
    max-width: 100px !important;
    width: 95px !important;
  }

  #fragmanlar li h6 {
    font-size: 11px;
  }

  #fragmanlar li small {
    font-size: 10px;
  }

  /* ---- section-tab tabs ---- */
  .most-tab ul[tab2-list] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    height: auto !important;
  }

  .most-tab ul[tab2-list] li {
    float: none !important;
  }

  /* ---- dikkat çeken: smaller on tablet ---- */
  #dlab-diziler-main {
    width: 130px !important;
  }

  .dlab-img,
  .dlab-img img {
    width: 120px !important;
    height: 180px !important;
  }

  .dlab-dizi-main {
    margin-top: -40px !important;
  }

  .dlab-dizi-main .dlab-title {
    font-size: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dlab-dizi-main .dlab-imdb,
  .dlab-dizi-main .dlab-yil {
    font-size: 10px !important;
  }

  /* ---- left sidebar (stacked below) ---- */
  .left .logo {
    display: none;
  }

  .left .left-menu {
    background: #22282b;
    padding: 8px 12px;
    border-radius: 0 0 8px 8px;
  }

  .left .left-menu ul {
    gap: 0;
    justify-content: space-around;
  }

  .left .left-menu ul li .title {
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════
   4. PHONE LANDSCAPE  — max-width: 600px
   ═══════════════════════════════════════════════════════ */
@media screen and (max-width: 600px) {
  /* ---- section-tab tabs: horizontal scroll ---- */
  .right .section-tab > ul {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .right .section-tab > ul li {
    float: none !important;
    flex: 0 0 auto;
  }

  .section-tab ul li a {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* ---- episode items: single column ---- */
  .right .tv-series-list ul li:not(.date):not(.sagad):not(.advert) {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
  }

  /* ---- dikkat çeken: smaller ---- */
  #dlab-diziler-main {
    width: 110px !important;
  }

  .dlab-img,
  .dlab-img img {
    width: 100px !important;
    height: 150px !important;
  }

  .dlab-dizi-main {
    margin-top: -36px !important;
  }

  /* ---- fragmanlar compact ---- */
  #fragmanlar li {
    min-width: 80px !important;
    max-width: 90px !important;
    width: 85px !important;
  }

  .fragman_img {
    width: 75px !important;
    height: 75px !important;
  }

  /* ---- most-tab list info overflow ---- */
  .most-tab-list ul li a .info {
    max-width: calc(100% - 40px) !important;
    padding-right: 4px;
  }

  .most-tab-list ul li a .points {
    right: 8px !important;
    font-size: 11px;
  }

  .most-tab-list ul li a .fa {
    right: 8px !important;
  }

  /* ---- new-episode-list: single column ---- */
  .new-episode-list ul li {
    width: 100% !important;
  }

  .new-episode-list ul li a {
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  /* ---- archives: smaller poster on phone ---- */
  .tv-series-single .film-image img {
    width: 80px;
    height: 120px;
  }

  .tv-series-single .tss-detail {
    padding-left: 95px;
  }

  .tv-series-single .tss-detail .title {
    font-size: 15px;
  }

  /* ---- archives tags ---- */
  .archives .tags a {
    padding: 0 10px;
    font-size: 12px;
    margin-bottom: 8px;
  }

  /* ---- yukari-cik (back to top) ---- */
  .yukari-cik {
    right: 8px !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
  }

  /* ---- alphabet: slightly smaller ---- */
  .dlab-alfabe-link {
    padding: 12px 8px !important;
    font-size: 13px;
  }
}

/* ═══════════════════════════════════════════════════════
   5. PHONE PORTRAIT  — max-width: 480px
   ═══════════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }

  /* ---- popup ---- */
  .popup .popup-content {
    width: calc(100vw - 24px) !important;
    max-width: 362px;
    top: 50% !important;
    transform: translate(-50%, -50%);
  }

  /* ---- header compact ---- */
  .header {
    padding: 6px 8px 10px;
  }

  .header .register-link a {
    font-size: 0;
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(255,255,255,.08);
  }

  .header .register-link a .fa {
    font-size: 16px;
  }

  .icon-logo {
    max-width: 120px;
  }

  /* ---- section-tab title ---- */
  .section-tab .title {
    font-size: 13px;
  }

  /* ---- dikkat çeken: phone ---- */
  #dlab-diziler-main {
    width: 100px !important;
  }

  .dlab-img,
  .dlab-img img {
    width: 90px !important;
    height: 135px !important;
  }

  .dlab-dizi-main {
    margin-top: -30px !important;
    font-size: 10px !important;
  }

  .dlab-dizi-main .dlab-imdb,
  .dlab-dizi-main .dlab-yil {
    font-size: 10px !important;
  }

  /* ---- fragmanlar: phone ---- */
  #fragmanlar li {
    min-width: 72px !important;
    max-width: 80px !important;
    width: 76px !important;
  }

  .fragman_img {
    width: 68px !important;
    height: 68px !important;
  }

  #fragmanlar li h6 {
    font-size: 11px;
  }

  #fragmanlar li small {
    font-size: 10px;
  }

  /* ---- footer ---- */
  .footer {
    padding: 16px 8px 50px;
  }

  .footer .disclaimer {
    font-size: 10px;
    line-height: 14px;
  }

  .footer .bottom p {
    font-size: 10px;
  }

  /* ---- left menu: icon row ---- */
  .left .left-menu ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 0;
    padding: 4px 0;
  }

  .left .left-menu ul li {
    flex: 0 0 auto;
    text-align: center;
    padding: 4px 8px;
  }

  .left .left-menu ul li .title {
    font-size: 10px;
    display: block;
  }
}

/* ═══════════════════════════════════════════════════════
   6. VERY SMALL SCREENS  — max-width: 380px
   ═══════════════════════════════════════════════════════ */
@media screen and (max-width: 380px) {
  .header .register-link {
    gap: 4px;
  }

  .header .register-link a strong {
    display: none;
  }

  .section-tab ul li a {
    padding: 6px 8px !important;
    font-size: 11px !important;
  }

  .menu ul li a {
    font-size: 12px;
    padding: 0 8px;
  }

  .most-tab h3 {
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════
   7. SAFE AREA (notched devices)
   ═══════════════════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-left)) {
  .container {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* ═══════════════════════════════════════════════════════
   8. TOUCH TARGETS — min 44px on mobile
   ═══════════════════════════════════════════════════════ */
@media (pointer: coarse) {
  .menu ul li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .dlab-alfabe-link {
    min-height: 44px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .section-tab ul li a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .most-tab ul li a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .left-menu ul li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
