/* Kanal istatistikleri: telefon oncelikli calisma panosu. Renkler rol adiyla; acik/koyu tek yerde degisir. */
:root {
  color-scheme: light;
  --zemin: #f4f2ec;
  --yuzey: #fdfcf9;
  --yuzey-2: #efece4;
  --murekkep: #14130f;
  --murekkep-2: #55524a;
  --soluk: #716e65;
  --cizgi: #e2dfd5;
  --eksen: #c6c2b6;
  --ust-zemin: #14130f;
  --ust-yazi: #f4f2ec;
  --ust-soluk: #b3afa3;
  --ninni: #2a78d6;
  --kaydet: #eb6834;
  --iyi: #006300;
  --kotu: #b3261e;
  --uyari-zemin: #fff3d6;
  --uyari-yazi: #5c4300;
  --odak: #14130f;
  --secim: #d8e6fa;
  --yazi: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --zemin: #0f0e0c; --yuzey: #1a1917; --yuzey-2: #262521; --murekkep: #f0efec; --murekkep-2: #c3c2b7; --soluk: #9c998f;
    --cizgi: #2c2b27; --eksen: #403f39; --ust-zemin: #1a1917; --ust-yazi: #f0efec; --ust-soluk: #9c998f;
    --ninni: #3987e5; --kaydet: #d95926; --iyi: #3fc13f; --kotu: #f07a72; --uyari-zemin: #3a2f10; --uyari-yazi: #f5d98a;
    --odak: #f0efec; --secim: #1d3a63;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --zemin: #0f0e0c; --yuzey: #1a1917; --yuzey-2: #262521; --murekkep: #f0efec; --murekkep-2: #c3c2b7; --soluk: #9c998f;
  --cizgi: #2c2b27; --eksen: #403f39; --ust-zemin: #1a1917; --ust-yazi: #f0efec; --ust-soluk: #9c998f;
  --ninni: #3987e5; --kaydet: #d95926; --iyi: #3fc13f; --kotu: #f07a72; --uyari-zemin: #3a2f10; --uyari-yazi: #f5d98a;
  --odak: #f0efec; --secim: #1d3a63;
}
[data-kanal="ninni"] { --renk: var(--ninni); }
[data-kanal="kaydet"] { --renk: var(--kaydet); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--zemin); color: var(--murekkep);
  font: 400 1rem/1.45 var(--yazi); font-feature-settings: "ss01";
}
::selection { background: var(--secim); }
h1, h2, h3, p, ol, ul, table { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button, select, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--odak); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Ust bant */
.ust { background: var(--ust-zemin); color: var(--ust-yazi); border-bottom: 1px solid var(--cizgi); }
.ust :focus-visible { outline-color: var(--ust-yazi); }
.ust-ic {
  max-width: 70rem; margin: 0 auto; padding: 0.75rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right));
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 0.75rem;
}
.ust h1 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.ust-zaman { grid-column: 1; font-size: 0.8125rem; color: var(--ust-soluk); min-height: 1.2em; }
.ust-zaman.gecikti { color: #f5c063; }
.ust-dugmeler { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 0.25rem; }
.simge-dugme {
  width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center; background: none; border: 0; border-radius: 10px; cursor: pointer;
  transition: background-color 160ms ease-out;
}
.simge-dugme svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ust .simge-dugme:hover { background: rgb(255 255 255 / 0.1); }
.simge-dugme.donuyor svg { animation: don 700ms linear infinite; }
@keyframes don { to { transform: rotate(360deg); } }
.ay { display: none; }
:root[data-theme="dark"] .ay { display: block; } :root[data-theme="dark"] .gunes { display: none; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .ay { display: block; }
  :root:where(:not([data-theme="light"])) .gunes { display: none; }
}
.metin-dugme {
  min-height: 2.75rem; padding: 0 0.75rem; background: none; border: 0; border-radius: 10px; cursor: pointer;
  font-size: 0.875rem; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.metin-dugme.genis { width: 100%; margin-top: 0.5rem; border: 1px solid var(--cizgi); text-decoration: none; background: var(--yuzey); }
.metin-dugme.genis:hover { background: var(--yuzey-2); }

main {
  max-width: 70rem; margin: 0 auto; padding: 0 1rem 3rem;
  padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right));
}

/* Durumlar: yukleniyor, giris */
.durum-kutu { max-width: 26rem; margin: 3.5rem auto; text-align: center; color: var(--murekkep-2); }
.durum-kutu h2 { color: var(--murekkep); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 0.5rem; }
.durum-kutu p { text-wrap: balance; }
.ana-dugme {
  margin-top: 1.25rem; min-height: 3rem; padding: 0 1.5rem; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--murekkep); color: var(--zemin); font-weight: 600; transition: opacity 160ms ease-out;
}
.ana-dugme:hover { opacity: 0.86; }
.ana-dugme:disabled { opacity: 0.5; cursor: progress; }
.hata-metin { margin-top: 0.75rem; color: var(--kotu); font-size: 0.875rem; min-height: 1.3em; }
.iskelet { display: grid; gap: 0.625rem; margin-bottom: 1rem; }
.iskelet i { height: 0.875rem; border-radius: 6px; background: var(--yuzey-2); animation: nefes 1.4s ease-in-out infinite; }
.iskelet i:nth-child(2) { width: 72%; margin: 0 auto; animation-delay: 120ms; }
.iskelet i:nth-child(3) { width: 48%; margin: 0 auto; animation-delay: 240ms; }
@keyframes nefes { 50% { opacity: 0.45; } }

/* Kanal suzgeci: sayfanin geri kalanini kapsar, kaydirirken ustte kalir */
.suzgec {
  position: sticky; top: 0; z-index: 5; display: flex; gap: 0.25rem; margin: 0 -1rem; padding: 0.625rem 1rem;
  background: color-mix(in srgb, var(--zemin) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent;
}
.suzgec label, .secim label { position: relative; flex: 1 1 0; cursor: pointer; }
.suzgec input, .secim input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.suzgec span, .secim span {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.75rem; padding: 0 0.75rem;
  border: 1px solid var(--cizgi); border-radius: 999px; background: var(--yuzey); color: var(--murekkep-2);
  font-size: 0.9375rem; font-weight: 500; white-space: nowrap; transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}
.suzgec label:hover span, .secim label:hover span { background: var(--yuzey-2); }
.suzgec input:checked + span, .secim input:checked + span { background: var(--murekkep); border-color: var(--murekkep); color: var(--zemin); }
.suzgec input:focus-visible + span, .secim input:focus-visible + span { outline: 2px solid var(--odak); outline-offset: 2px; }
.nokta { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--renk); flex: none; }
.secim { display: flex; gap: 0.25rem; }
.secim label { flex: 0 1 auto; }
.secim span { min-height: 2.5rem; font-size: 0.875rem; padding: 0 0.875rem; }

#pano.tazeleniyor > :not(.suzgec) { opacity: 0.55; transition: opacity 160ms ease-out; }

/* Kanal kartlari */
.kartlar { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
.kart { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 14px; padding: 1rem; min-width: 0; }
.kart-bas { display: flex; align-items: baseline; gap: 0.5rem; }
.kart-bas .nokta { align-self: center; }
.kart-bas h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.kart-bas a { margin-left: auto; font-size: 0.8125rem; color: var(--murekkep-2); white-space: nowrap; padding: 0.5rem 0; }
.olculer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 0.75rem; margin-top: 0.75rem; }
.olcu dt { font-size: 0.8125rem; color: var(--murekkep-2); }
.olcu dd { margin: 0; }
.olcu .deger { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.olcu .fark { font-size: 0.8125rem; color: var(--murekkep-2); line-height: 1.35; }
.olcu .fark b { font-weight: 600; }
.olcu .fark b.arti { color: var(--iyi); } .olcu .fark b.eksi { color: var(--kotu); }
.uyari {
  display: flex; gap: 0.5rem; margin-top: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 10px;
  background: var(--uyari-zemin); color: var(--uyari-yazi); font-size: 0.875rem;
}
.uyari svg { flex: none; width: 1.125rem; height: 1.125rem; margin-top: 0.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Grafikler */
.grafik-bas { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }
.grafik-bas h3 { font-size: 0.875rem; font-weight: 500; color: var(--murekkep-2); }
.grafik-bas h3 b { color: var(--murekkep); font-weight: 600; }
.grafik-bas span { font-size: 0.8125rem; color: var(--soluk); white-space: nowrap; }
.grafik { margin-top: 0.375rem; }
.grafik svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; border-radius: 6px; }
.grafik .izgara { stroke: var(--cizgi); stroke-width: 1; }
.grafik .taban { stroke: var(--eksen); stroke-width: 1; }
.grafik text { fill: var(--soluk); font-size: 11px; font-variant-numeric: tabular-nums; }
.grafik .sutun { fill: var(--renk); transition: opacity 120ms ease-out; }
.grafik svg.secili .sutun { opacity: 0.4; }
.grafik svg.secili .sutun.etkin { opacity: 1; }
.grafik .bos, .bos-metin { font-size: 0.875rem; color: var(--murekkep-2); padding: 0.75rem 0 0.25rem; max-width: 34rem; }
details.tablo-gor { margin-top: 0.25rem; }
details.tablo-gor summary { font-size: 0.8125rem; color: var(--murekkep-2); cursor: pointer; padding: 0.5rem 0; width: fit-content; }
details.tablo-gor table { border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
details.tablo-gor th, details.tablo-gor td { text-align: left; padding: 0.25rem 1rem 0.25rem 0; font-weight: 400; border-bottom: 1px solid var(--cizgi); }
details.tablo-gor td:last-child { text-align: right; padding-right: 0; }
details.tablo-gor .kaydir { max-height: 14rem; overflow: auto; }

.ipucu {
  position: fixed; z-index: 20; pointer-events: none; max-width: 15rem; padding: 0.4rem 0.6rem; border-radius: 8px;
  background: var(--murekkep); color: var(--zemin); font-size: 0.8125rem; line-height: 1.3;
  box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.35);
}
.ipucu strong { display: block; font-size: 0.9375rem; font-weight: 600; }
.ipucu span { opacity: 0.8; }

/* Bolumler */
.bolum { margin-top: 2.25rem; }
.bolum-bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.bolum-bas h2 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.bolum-not { font-size: 0.8125rem; color: var(--murekkep-2); }
.ikili { display: grid; gap: 0.75rem; }
.ikili > .kart > .grafik-bas:first-child { margin-top: 0; }
#gunluk-not { margin-top: 0.5rem; }

/* En cok artanlar */
.artan { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 14px; padding: 0.25rem 1rem; }
.artan li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--cizgi); }
.artan li:last-child { border-bottom: 0; }
.kucuk-resim { width: 4.5rem; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: var(--yuzey-2); display: block; }
.artan .ad { font-size: 0.9375rem; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.artan .ad a { text-decoration: none; }
.artan .ad a:hover { text-decoration: underline; }
.ust-bilgi { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-top: 0.2rem; font-size: 0.8125rem; color: var(--murekkep-2); }
.ust-bilgi .nokta { width: 0.5rem; height: 0.5rem; }
.rozet { font-size: 0.75rem; font-weight: 500; padding: 0.05rem 0.4rem; border: 1px solid var(--eksen); border-radius: 999px; color: var(--murekkep-2); white-space: nowrap; }
.artan .sayi { text-align: right; font-variant-numeric: tabular-nums; }
.artan .sayi b { display: block; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.artan .sayi span { font-size: 0.75rem; color: var(--murekkep-2); white-space: nowrap; }
.artan .cubuk { grid-column: 2 / -1; height: 6px; border-radius: 0 4px 4px 0; background: var(--renk); min-width: 2px; }
.artan-bos { padding: 1rem 0; }

/* Trafik kaynaklari */
.kaynaklar { display: grid; gap: 0.625rem; margin-top: 0.75rem; }
.kaynak { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.75rem; font-size: 0.875rem; }
.kaynak .deger { font-variant-numeric: tabular-nums; color: var(--murekkep-2); }
.kaynak .deger b { color: var(--murekkep); font-weight: 600; }
.kaynak .cubuk { grid-column: 1 / -1; height: 8px; border-radius: 0 4px 4px 0; background: var(--renk); min-width: 2px; }

/* Video tablosu: telefonda satir kart olur, genis ekranda gercek tablo */
.tablo-arac { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.sira-sec { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; font-size: 0.875rem; color: var(--murekkep-2); }
.sira-sec select {
  min-height: 2.5rem; padding: 0 2rem 0 0.75rem; border: 1px solid var(--cizgi); border-radius: 10px; background: var(--yuzey); color: var(--murekkep);
  font-size: 0.875rem; font-weight: 500; max-width: 11rem;
}
.tablo-arac .simge-dugme { border: 1px solid var(--cizgi); background: var(--yuzey); width: 2.5rem; height: 2.5rem; }
.tablo-arac .simge-dugme:hover { background: var(--yuzey-2); }
.tablo-sar { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 14px; }
.videolar { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.videolar thead { display: none; }
.videolar tbody tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem 0.5rem; padding: 0.875rem 1rem; border-bottom: 1px solid var(--cizgi); }
.videolar tbody tr:last-child { border-bottom: 0; }
.videolar td { display: block; padding: 0; font-variant-numeric: tabular-nums; }
.videolar td::before { content: attr(data-etiket); display: block; font-size: 0.75rem; color: var(--murekkep-2); }
.videolar td.video { grid-column: 1 / -1; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; align-items: center; }
.videolar td.video::before { content: none; }
.videolar .ad { font-size: 0.9375rem; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.videolar .ad a { text-decoration: none; } .videolar .ad a:hover { text-decoration: underline; }
.videolar td.yayin, .videolar td.sure { display: none; }
.videolar td b { font-weight: 600; }
.videolar .yok { color: var(--soluk); }

.alt { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--cizgi); font-size: 0.8125rem; color: var(--murekkep-2); max-width: 44rem; }

@media (min-width: 48rem) {
  .ust-ic { padding-top: 1rem; padding-bottom: 1rem; }
  .ust h1 { font-size: 1.25rem; }
  .suzgec { justify-content: flex-start; }
  .suzgec label { flex: 0 0 auto; }
  .suzgec span { padding: 0 1.125rem; }
  .kartlar, .ikili { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kartlar.tek, .ikili.tek { grid-template-columns: minmax(0, 1fr); }
  .kart { padding: 1.25rem; }
  .olcu .deger { font-size: 1.75rem; }
  .artan li { grid-template-columns: 6rem minmax(0, 1fr) auto; }
  .artan .kucuk-resim { width: 6rem; }
}
@media (min-width: 64rem) {
  .sira-sec, #sira-yon { display: none; }
  .tablo-sar { overflow-x: auto; }
  .videolar thead { display: table-header-group; }
  .videolar tbody tr { display: table-row; padding: 0; }
  .videolar td, .videolar td.yayin, .videolar td.sure { display: table-cell; padding: 0.625rem 0.75rem; text-align: right; white-space: nowrap; vertical-align: middle; border-bottom: 1px solid var(--cizgi); }
  .videolar tbody tr:last-child td { border-bottom: 0; }
  .videolar td::before { content: none; }
  .videolar td.video { display: table-cell; text-align: left; white-space: normal; min-width: 18rem; }
  .videolar .tarih-sure { display: none; }
  .videolar td.video > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; align-items: center; }
  .videolar th { padding: 0; text-align: right; font-weight: 500; border-bottom: 1px solid var(--eksen); white-space: nowrap; }
  .videolar th:first-child { text-align: left; }
  .videolar th button {
    display: inline-flex; align-items: center; gap: 0.25rem; width: 100%; justify-content: flex-end; min-height: 2.75rem; padding: 0 0.75rem;
    background: none; border: 0; cursor: pointer; font-size: 0.8125rem; font-weight: 500; color: var(--murekkep-2);
  }
  .videolar th:first-child button { justify-content: flex-start; }
  .videolar th button:hover { color: var(--murekkep); background: var(--yuzey-2); }
  .videolar th[aria-sort] button { color: var(--murekkep); font-weight: 600; }
  .videolar th svg { width: 0.75rem; height: 0.75rem; fill: currentColor; opacity: 0; }
  .videolar th[aria-sort] svg { opacity: 1; }
  .videolar th[aria-sort="ascending"] svg { transform: rotate(180deg); }
  .videolar tbody tr:hover td { background: var(--yuzey-2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
