/* ============================================================
   Reels Canavarı — Dikey video akışı
   Mobil öncelikli; 768px üstünde ortalanmış 9:16 sahne.
   ============================================================ */
html, body.rl-body { height: 100%; overflow: hidden; background: #000; }
.rl-body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.rl-body svg { width: 1em; height: 1em; fill: currentColor; }

/* ---------- Üst çubuk ---------- */
.rl-top {
  position: fixed; inset: 0 0 auto 0; z-index: 20; pointer-events: none;
  display: flex; align-items: center; gap: .6rem;
  padding: max(env(safe-area-inset-top), .75rem) .9rem .75rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent);
}
.rl-top > * { pointer-events: auto; }
.rl-brand { display: inline-flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; }
.rl-brand img { height: 30px; width: auto; max-width: 150px; object-fit: contain; }
.rl-brand span { font-family: var(--rc-font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.rl-chip { font-size: .8rem; font-weight: 600; padding: .2rem .6rem; border-radius: var(--rc-radius-pill); background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.rl-top__menu { margin-left: auto; }

.rl-iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 1.5rem; cursor: pointer;
}
.rl-iconbtn:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Akış ---------- */
.rl-feed {
  height: 100vh; height: 100dvh; overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; outline: none;
}
.rl-feed::-webkit-scrollbar { display: none; }
.rl-slide {
  position: relative; height: 100vh; height: 100dvh; width: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.rl-stage { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
.rl-video, .rl-poster, .rl-embed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; background: #000; }
.rl-slide.is-landscape .rl-video, .rl-slide.is-landscape .rl-poster { object-fit: contain; }
.rl-poster { transition: opacity .25s ease; }
.rl-slide.is-playing .rl-poster { opacity: 0; }
.rl-tap { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; cursor: pointer; }
.rl-tap:focus-visible { box-shadow: inset 0 0 0 3px var(--rc-primary); border-radius: 0; }

/* Durum katmanı: oynat, yükleniyor, hata */
.rl-state { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; }
.rl-state__play { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 2.2rem; opacity: 0; transform: scale(.9); transition: opacity .15s, transform .15s; }
.rl-slide.is-paused .rl-state__play { opacity: 1; transform: scale(1); }
.rl-spinner { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--rc-primary); animation: rl-spin .8s linear infinite; opacity: 0; transition: opacity .2s .25s; }
.rl-slide.is-loading .rl-spinner { opacity: 1; }
@keyframes rl-spin { to { transform: rotate(360deg); } }
.rl-error { position: absolute; inset: 0; z-index: 6; display: none; place-items: center; text-align: center; padding: 2rem; background: rgba(0, 0, 0, .78); }
.rl-slide.has-error .rl-error { display: grid; }
.rl-error p { margin: 0 0 1rem; color: #ddd; max-width: 28ch; }

/* Çift dokunma kalbi */
.rl-burst { position: absolute; z-index: 4; width: 96px; height: 96px; color: var(--rc-primary); pointer-events: none; animation: rl-burst .7s ease-out forwards; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
@keyframes rl-burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1); } }

/* Başlık ve açıklama */
.rl-info {
  position: absolute; left: 0; right: 72px; bottom: 0; z-index: 4; pointer-events: none;
  padding: 3.5rem 1rem calc(1.35rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .25) 60%, transparent);
}
.rl-info > * { pointer-events: auto; }
.rl-cat { display: inline-block; margin-bottom: .4rem; font-size: .78rem; font-weight: 600; color: #fff; text-decoration: none; padding: .15rem .55rem; border-radius: var(--rc-radius-pill); background: rgba(255, 255, 255, .16); }
.rl-title { font-family: var(--rc-font-display); font-size: 1.08rem; font-weight: 700; line-height: 1.25; margin: 0 0 .3rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.rl-desc { margin: 0; font-size: .9rem; color: #EDEDED; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; cursor: pointer; white-space: pre-line; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.rl-desc.is-open { -webkit-line-clamp: unset; max-height: 40vh; overflow-y: auto; }

/* İlerleme çubuğu (markanın imzası) */
.rl-progress { position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom); z-index: 5; height: 18px; display: flex; align-items: flex-end; cursor: pointer; touch-action: none; }
.rl-progress__track { position: relative; width: 100%; height: 3px; background: rgba(255, 255, 255, .25); transition: height .12s; }
.rl-progress__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--rc-primary); }
.rl-progress:hover .rl-progress__track, .rl-progress.is-drag .rl-progress__track { height: 6px; }
.rl-time { position: absolute; right: .75rem; bottom: 22px; font-size: .75rem; font-variant-numeric: tabular-nums; color: #fff; background: rgba(0, 0, 0, .5); padding: .1rem .45rem; border-radius: 6px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.rl-slide.is-paused .rl-time, .rl-progress.is-drag + .rl-time { opacity: 1; }

/* Eylem butonları (mobil: video üzerinde sağda) */
.rl-actions {
  position: absolute; right: .35rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
}
.rl-act { display: grid; justify-items: center; gap: .1rem; border: 0; background: none; color: #fff; cursor: pointer; padding: 0; font: 600 .75rem/1.1 var(--rc-font-ui); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.rl-act__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; font-size: 1.85rem; background: rgba(0, 0, 0, .28); transition: transform .12s, color .12s; }
.rl-act__icon svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.rl-act:active .rl-act__icon { transform: scale(.88); }
.rl-act[aria-pressed="true"] .rl-act__icon { color: var(--rc-primary); }
.rl-act--small .rl-act__icon { width: 40px; height: 40px; font-size: 1.3rem; }
.rl-act:focus-visible .rl-act__icon { box-shadow: var(--rc-focus); }
@media (prefers-reduced-motion: no-preference) {
  .rl-act.is-pop .rl-act__icon { animation: rl-pop .3s ease-out; }
  @keyframes rl-pop { 50% { transform: scale(1.25); } }
}

/* Masaüstü gezinme */
.rl-nav { display: none; }

/* Boş ve SSR */
.rl-empty { text-align: center; padding: 2rem; }
.rl-empty img { margin: 0 auto 1.2rem; }
.rl-empty p { color: var(--rc-muted); max-width: 34ch; margin: 0 auto 1.25rem; }
.rl-loadmore { height: 30vh; display: grid; place-items: center; color: var(--rc-muted); scroll-snap-align: end; }

/* ---------- Alt sayfalar (dialog) ---------- */
.rl-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 78dvh;
  padding: 0; border: 0; border-radius: 18px 18px 0 0; background: #121212; color: #fff;
  display: none; flex-direction: column;
}
.rl-sheet[open] { display: flex; }
.rl-sheet::backdrop { background: rgba(0, 0, 0, .55); }
@media (prefers-reduced-motion: no-preference) { .rl-sheet[open] { animation: rl-up .22s ease-out; } @keyframes rl-up { from { transform: translateY(30%); opacity: 0; } } }
.rl-sheet--small { max-height: 60dvh; }
.rl-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: .6rem .6rem .6rem 1.1rem; border-bottom: 1px solid #262626; }
.rl-sheet__head h2 { font-size: 1rem; margin: 0; }
.rl-sheet__head [data-c-count] { color: var(--rc-muted); font-weight: 500; }
.rl-sheet__body { flex: 1; overflow-y: auto; padding: .5rem 1.1rem 1rem; overscroll-behavior: contain; }

.rl-comment { display: grid; grid-template-columns: 34px 1fr; gap: .65rem; padding: .7rem 0; }
.rl-comment + .rl-comment { border-top: 1px solid #1f1f1f; }
.rl-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #000; background: var(--rc-secondary); }
.rl-comment__name { font-size: .82rem; color: var(--rc-muted); }
.rl-comment__name b { color: #fff; font-weight: 600; margin-right: .35rem; }
.rl-comment__text { margin: .15rem 0 0; white-space: pre-line; word-break: break-word; font-size: .93rem; }
.rl-muted { color: var(--rc-muted); text-align: center; padding: 1.5rem 0; margin: 0; }
.rl-morebtn { display: block; margin: .5rem auto; background: none; border: 1px solid #333; color: #ddd; border-radius: var(--rc-radius-pill); padding: .45rem 1rem; cursor: pointer; }

.rl-cform { border-top: 1px solid #262626; padding: .7rem 1.1rem calc(.8rem + env(safe-area-inset-bottom)); display: grid; gap: .5rem; }
.rl-cform__row { display: flex; gap: .5rem; align-items: flex-end; }
.rl-cform__row .rl-input { flex: 1; resize: none; max-height: 120px; }
.rl-cform__row .rc-btn { min-height: 42px; padding: .5rem 1rem; }
.rl-cform__msg:empty { display: none; }
.rl-cform__msg { font-size: .85rem; padding: .5rem .7rem; border-radius: 8px; background: #1d1d1d; }
.rl-cform__msg.is-error { color: #ff8a8c; }
.rl-cform__msg.is-ok { color: #6ee7a6; }
.rl-cform__note { font-size: .72rem; color: var(--rc-muted); margin: 0; }
.rl-cform__off { padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); color: var(--rc-muted); margin: 0; border-top: 1px solid #262626; }
.rl-input { width: 100%; background: #1d1d1d; color: #fff; border: 1px solid #2c2c2c; border-radius: 10px; padding: .6rem .8rem; font: inherit; font-size: 16px; }
.rl-input:focus { outline: none; border-color: var(--rc-primary); }
.rl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rl-share { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem .4rem; padding: 1rem 1.1rem .5rem; }
.rl-share button { display: grid; justify-items: center; gap: .35rem; background: none; border: 0; color: #ddd; cursor: pointer; font-size: .78rem; }
.rl-share__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 800 1.05rem var(--rc-font-display); color: #fff; }
.rl-copy { display: flex; gap: .5rem; padding: .5rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); }
.rl-copy .rc-btn { min-height: 42px; padding: .5rem 1rem; }

.rl-menu { list-style: none; margin: 0 0 1rem; padding: 0; }
.rl-menu a { display: block; padding: .7rem 0; color: #fff; text-decoration: none; border-bottom: 1px solid #1f1f1f; }
.rl-menu a:hover { color: var(--rc-primary); }
.rl-menu--social { display: flex; flex-wrap: wrap; gap: .5rem; }
.rl-menu--social a { border: 1px solid #333; border-radius: var(--rc-radius-pill); padding: .35rem .8rem; font-size: .85rem; }
.rl-menu__slogan { color: var(--rc-muted); }
.rl-menu__foot { color: var(--rc-muted); font-size: .8rem; margin: 0; }

.rl-toast { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #fff; color: #000; font-weight: 600; font-size: .9rem; padding: .6rem 1rem; border-radius: var(--rc-radius-pill); transition: opacity .2s, transform .2s; max-width: calc(100% - 2rem); text-align: center; }
.rl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Masaüstü ---------- */
@media (min-width: 768px) {
  .rl-top { background: none; padding: 1rem 1.5rem; }
  .rl-slide { padding: 16px 0; }
  .rl-stage { height: 100%; width: auto; aspect-ratio: 9 / 16; max-width: calc(100vw - 200px); border-radius: 14px; }
  .rl-info { right: 0; border-radius: 0 0 14px 14px; }
  .rl-actions { position: static; align-self: flex-end; margin-bottom: 1.5rem; gap: 1.1rem; }
  .rl-act__icon { background: #1d1d1d; }
  .rl-act:hover .rl-act__icon { background: #2a2a2a; }
  .rl-nav { display: flex; flex-direction: column; gap: .75rem; position: fixed; right: 1.5rem; top: 50%; transform: translateY(-50%); z-index: 15; }
  .rl-nav .rl-iconbtn { background: #1d1d1d; }
  .rl-nav .rl-iconbtn:hover { background: #2a2a2a; }
  .rl-nav .rl-iconbtn:disabled { opacity: .35; cursor: default; }
  .rl-sheet { inset: 0 0 0 auto; width: 420px; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .rl-sheet--small { inset: 50% auto auto 50%; transform: translate(-50%, -50%); height: auto; max-height: 80dvh; border-radius: 16px; width: 440px; }
  @media (prefers-reduced-motion: no-preference) { .rl-sheet--small[open] { animation: none; } .rl-sheet:not(.rl-sheet--small)[open] { animation: rl-left .22s ease-out; } @keyframes rl-left { from { transform: translateX(30%); opacity: 0; } } }
}
:fullscreen .rl-nav { display: none; }

/* ============================================================
   Reklam katmanı (akış arası ve video üstü)
   ============================================================ */
.ad-layer { position: absolute; inset: 0; z-index: 5; background: #000; }
.ad-media, .ad-media > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ad-video, .ad-image { object-fit: contain; background: #000; }
.ad-frame { background: #000; }
.ad-adsense { display: grid; place-items: center; padding: 4rem 1rem; }
.ad-adsense ins { width: 100%; min-height: 250px; }
.ad-top { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: .5rem; padding: calc(max(env(safe-area-inset-top), .75rem) + 3.1rem) 1rem 2rem; background: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent); pointer-events: none; }
.ad-title { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.ad-count { margin-left: auto; font-size: .78rem; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .55); padding: .25rem .55rem; border-radius: var(--rc-radius-pill); white-space: nowrap; }
.ad-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; padding: 2.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); }
.ad-cta { flex: 1 1 auto; text-align: center; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: .6rem 1.1rem; border-radius: 12px; background: #fff; color: #000; font-weight: 700; text-decoration: none; max-width: 70%; }
.ad-cta:hover { background: var(--rc-secondary); color: #000; }
.ad-skip { margin-left: auto; min-height: 46px; padding: .55rem 1rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(0, 0, 0, .6); color: #fff; font: 600 .88rem var(--rc-font-ui); cursor: pointer; }
.ad-skip:not(:disabled):hover { background: #fff; color: #000; }
.ad-skip:disabled { cursor: default; color: #cfcfcf; font-weight: 500; font-size: .8rem; }
.ad-progress { position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom); height: 3px; z-index: 3; background: rgba(255, 255, 255, .2); }
.ad-progress span { display: block; height: 100%; width: 0; background: var(--rc-secondary); transition: width .2s linear; }
.ad-layer--google .ad-top { padding-top: calc(max(env(safe-area-inset-top), .75rem) + 3.1rem); }
.ad-layer--google .ad-bottom { display: none; }
.rl-adslide .ad-stage { display: grid; place-items: center; }
.ad-end { text-align: center; padding: 2rem; }
.ad-end[hidden] { display: none; }
.ad-end p { color: var(--rc-muted); }
.rl-sheet__ad:not(.ad-slot) { display: none; }
.rl-sheet__ad.ad-slot { margin: .6rem 1.1rem 0; }
.rl-sideslot { display: none; }
@media (min-width: 768px) {
  .ad-top { padding-top: 1rem; }
  .ad-layer { border-radius: 14px; overflow: hidden; }
}
@media (min-width: 1200px) {
  .rl-sideslot { display: block; position: fixed; left: 1.5rem; top: 50%; transform: translateY(-50%); width: 300px; z-index: 15; }
  .rl-sideslot[hidden] { display: none; }
}
.rl-menu__account { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
.rl-menu__account .rc-btn { flex: 1; min-height: 42px; }
.rl-cform__off a { color: var(--rc-primary); }
