/* Shorts sütunu (web/js/shorts.js): ana ekranın ortasında dikey; bir video bir ekran, yapışarak kayar.
   Video her temada siyah zeminde. Geniş ekranda yüksekliği home.js verir (boydan boya), telefonda manzaranın altında. */

.hm-shorts { --hue: #ff2a3d; background: #000; border-color: color-mix(in srgb, #ff2a3d 22%, var(--line)); }
.sh-col { position: relative; flex: 1; min-height: 0; display: flex; color: #fff; }
.sh-feed {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.sh-feed::-webkit-scrollbar { display: none; }
.sh-slide { position: relative; height: 100%; overflow: hidden; background: #000; scroll-snap-align: start; scroll-snap-stop: always; }
/* kapak her zaman oynatıcının üstünde (sıradaki videonun önceden hazırlanan oynatıcısı kayarken görünmesin) */
.sh-thumb { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7); }
/* Yüklenirken görünen videonun kapağı oynatıcının ÜSTÜNDE (tam parlak): YouTube'un siyah ekranı / yükleniyor'u görünmez.
   Oynatıcı gizlenmez (opacity 0'da Chrome sessiz videoyu "görünmüyor" sayıp hiç başlatmıyor), yalnızca örtülür;
   oynayınca kapak söner. */
.sh-slide.playing .sh-thumb { z-index: 1; filter: none; opacity: 0; transition: opacity 0.25s ease-out; }
.sh-slide.playing.loading .sh-thumb { opacity: 1; transition: none; }
/* altta koyu şerit: alt yazı okunur, YouTube'un videonun alt köşelerine koyduğu beğen / kanal etiketi görünmez */
.sh-slide::after {
  content: ""; position: absolute; inset: auto 0 0 0; z-index: 1; height: 124px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgb(0 0 0 / 0.7) 30%, rgb(0 0 0 / 0.97) 58%);
}
/* YouTube oynatıcısının üst (başlık) ve alt ("diğer videolar", logo) şeritleri çerçevenin dışında kalsın: oynatıcı
   yukarı / aşağı taşar, kırpılır; dikey video ortada tam görünür */
.sh-player { position: absolute; inset: 0; overflow: hidden; pointer-events: none; } /* fare oynatıcıya hiç değmesin: altında açılan yeni video YouTube’un başlığını / ‖’sini göstermesin (komutlar postMessage ile) */
.sh-frame { position: absolute; left: 0; top: -110px; display: block; width: 100%; height: calc(100% + 220px); border: 0; pointer-events: none; } /* video genişliğe sığar (görüntü değişmez); YouTube’un üst başlık şeridi kırpılır */
/* videoya dokun: durdur / oynat. Bütün videoyu örter (yan düğmeler ve üst şerit üstünde kalır): fare YouTube
   oynatıcısına hiç değmez, YouTube'un kendi düğmeleri çıkmaz */
.sh-tap { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; }
/* ortadaki işaret: YouTube'un ‖ / ▶ düğmesinin tam üstünde (oynatıcının ortası = slaytın ortası), onu örter */
.sh-badge {
  position: absolute; left: 50%; top: 50%; z-index: 2; display: none; place-items: center; width: 88px; height: 88px;
  margin: -44px 0 0 -44px; border-radius: 50%; pointer-events: none; background: rgb(14 14 16 / 0.66);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 34px rgb(0 0 0 / 0.35);
}
.sh-badge.play { display: grid; }
.sh-badge.play::before {
  content: ""; margin-left: 7px; border-style: solid; border-width: 17px 0 17px 28px;
  border-color: transparent transparent transparent rgb(255 255 255 / 0.95);
}

/* üst: başlık ve ses */
.sh-top {
  position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 10px 22px 12px; background: linear-gradient(rgb(0 0 0 / 0.6), transparent); pointer-events: none;
}
.sh-top > * { pointer-events: auto; }
.sh-title { display: flex; align-items: center; gap: 7px; }
.sh-title img { width: 20px; height: 20px; }
.sh-title b { font-size: 13px; letter-spacing: 0.04em; }
.sh-sound {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.25);
  background: rgb(0 0 0 / 0.45); color: #fff; font-size: 15px; cursor: pointer;
}
.sh-sound:hover { border-color: rgb(255 255 255 / 0.55); }
/* kategoriler: başlığın altında kayan haplar (seçili beyaz). Sığmayınca devamı olan kenar soluklaşır, orada ‹ › */
.sh-cats {
  position: absolute; top: 48px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.sh-cats.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.sh-cats.more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px); mask-image: linear-gradient(90deg, transparent, #000 44px); }
.sh-cats.more-left.more-right {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent);
}
.sh-cat-nav {
  position: absolute; top: 48px; z-index: 4; width: 26px; height: 26px; padding: 0 0 2px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 0.28); background: rgb(0 0 0 / 0.66); color: #fff;
  font: inherit; font-size: 17px; font-weight: 800; line-height: 1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sh-cat-nav:hover { background: rgb(0 0 0 / 0.85); border-color: rgb(255 255 255 / 0.55); }
.sh-cat-nav.prev { left: 8px; }
.sh-cat-nav.next { right: 8px; }
.sh-cat-nav[hidden] { display: none; }
.sh-cats::-webkit-scrollbar { display: none; }
.sh-cats[hidden] { display: none; }
.sh-cat {
  flex: none; height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.18); cursor: pointer;
  background: rgb(0 0 0 / 0.42); color: rgb(255 255 255 / 0.88); font: inherit; font-size: 11px; font-weight: 700; white-space: nowrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.12s, color 0.12s;
}
.sh-cat:hover { background: rgb(0 0 0 / 0.6); color: #fff; }
.sh-cat.on { background: #fff; border-color: #fff; color: #000; }
/* +18: kırmızımsı çerçeve, seçiliyken kırmızı */
.sh-cat.adult { border-color: rgb(255 77 109 / 0.55); color: #ffb3c1; }
.sh-cat.adult.on { background: #ff4d6d; border-color: #ff4d6d; color: #fff; }
/* "sesi aç" ipucu: çevresinde dört kez halka (ayrı katmanda transform / opacity; box-shadow her karede boyatıyordu) */
.sh-sound { position: relative; }
.sh-sound.off::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.35); animation: sh-hint 1.8s ease-out 4;
}
@keyframes sh-hint { 0% { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.45); } }

/* sağ: tepkiler, odaya, YouTube'da aç */
.sh-side { position: absolute; right: 7px; bottom: 92px; z-index: 2; display: grid; gap: 9px; }
.sh-act {
  display: grid; justify-items: center; gap: 1px; width: 46px; padding: 6px 0; border: 0; border-radius: 14px; cursor: pointer;
  background: rgb(0 0 0 / 0.38); color: #fff; font: inherit; text-decoration: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform 0.12s, background 0.12s;
}
.sh-act:hover:not(:disabled) { background: rgb(0 0 0 / 0.6); transform: translateY(-1px); }
.sh-act:active { transform: scale(0.92); }
.sh-act:disabled { opacity: 0.4; cursor: not-allowed; }
.sh-react.on { background: rgb(255 64 120 / 0.42); }
.sh-emoji { font-size: 21px; line-height: 1.1; }
.sh-act small { min-height: 1em; color: rgb(255 255 255 / 0.85); font-size: 10px; }

/* alt: kanal, başlık */
.sh-cap {
  position: absolute; inset: auto 58px 0 0; z-index: 2; display: grid; gap: 3px; padding: 44px 12px 12px; pointer-events: none;
  background: none; /* koyu şerit .sh-slide::after */
}
.sh-cap b { font-size: 12px; }
.sh-cap p {
  margin: 0; font-size: 12px; line-height: 1.35; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sh-cap small { color: rgb(255 255 255 / 0.62); font-size: 10px; }

.sh-empty { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; color: rgb(255 255 255 / 0.7); text-align: center; }
.sh-empty[hidden] { display: none; }
.sh-retry { height: 30px; padding: 0 14px; border: 1px solid rgb(255 255 255 / 0.25); border-radius: 8px; background: rgb(255 255 255 / 0.08); color: #fff; font: inherit; cursor: pointer; }
.sh-float { position: fixed; z-index: 1000; font-size: 24px; pointer-events: none; animation: sh-float 1.3s ease-out both; }
@keyframes sh-float {
  from { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  15% { opacity: 1; transform: translate(-50%, -20px) scale(1.15); }
  to { opacity: 0; transform: translate(-50%, -150px) scale(0.9); }
}

/* "odaya" gösterilen reel bildirimi */
.sh-notice {
  position: fixed; right: 18px; bottom: 18px; z-index: 950; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 36px);
  padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg);
  box-shadow: 0 14px 40px rgb(0 0 0 / 0.35); animation: sh-up 0.25s ease-out;
}
.sh-notice[hidden] { display: none; }
.sh-notice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes sh-up { from { opacity: 0; transform: translateY(8px); } }
.sh-notice-go { flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-fg); font: inherit; font-weight: 700; cursor: pointer; }
.sh-notice-x { flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; }

/* kısa sütun (720p ekran): yan düğmeler sıkışık, ses düğmesiyle çakışmasın */
@container card (max-height: 560px) {
  .sh-side { right: 5px; bottom: 74px; gap: 5px; }
  .sh-act { width: 40px; padding: 4px 0; border-radius: 12px; }
  .sh-emoji { font-size: 18px; }
  .sh-cap { padding: 34px 10px 10px; }
}

/* telefon: manzaranın altında, ekranın çoğu */
@container home (max-width: 520px) {
  .hm-shorts { height: min(78svh, 720px); }
}
@media (max-width: 760px) {
  .sh-notice { left: 12px; right: 12px; bottom: 72px; }
}
