/* ---------- Seyir player ---------- */
.tp {
  --tp-accent: #ff4f38;
  --tp-accent-2: #ff9a3d;
  --tp-ease: cubic-bezier(.2, .8, .2, 1);
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: #000; color: #fff; overflow: hidden; border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; outline: none; container-type: inline-size;
  font: 14px/1.4 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tp:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; box-shadow: none; }
.tp:-webkit-full-screen { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; }
.tp.tp-idle { cursor: none; }
.tp-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tp-surface { position: absolute; inset: 0; z-index: 2; }
.tp-seekshot { position: absolute; inset: 0; z-index: 1; background: #000; }
.tp-seekshot img { width: 100%; height: 100%; object-fit: contain; filter: blur(6px) brightness(.7); transform: scale(1.02); animation: tp-fade .25s; }

.tp button { background: none; border: 0; color: inherit; padding: 0; font: inherit; cursor: pointer; }
.tp button:focus-visible { outline: 2px solid var(--tp-accent-2); outline-offset: 1px; }

.tp-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 19px; transition: background .2s, transform .15s var(--tp-ease), color .2s;
}
.tp-btn:hover { background: rgba(255, 255, 255, .14); transform: scale(1.08); }
.tp-btn:active { transform: scale(.9); }
.tp-btn.active, .tp-mute.boost { color: var(--tp-accent-2); }
.tp-btn i { transition: transform .25s var(--tp-ease); }
.tp-settings.active i { transform: rotate(60deg); }
.tp-ten { position: absolute; font-size: 7px; font-weight: 900; top: 50%; left: 50%; transform: translate(-50%, -40%); pointer-events: none; }
.tp-back i, .tp-fwd i { font-size: 19px; } /* same visual size as play / mute */

/* loading for 10+ s: other qualities */
.tp-slow { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: tp-card .45s var(--tp-ease); }
.tp-slow p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .7); }
.tp-slow-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; }
.tp .tp-slow-opt {
  display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 10px; padding: 9px 14px; border-radius: 14px; text-align: left;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); transition: background .2s, transform .15s, border-color .2s;
}
.tp .tp-slow-opt:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .25); transform: translateY(-2px); }
.tp-slow-opt b { font-size: 14px; }
.tp-slow-opt small { grid-column: 1 / -1; font-size: 11px; color: rgba(255, 255, 255, .5); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* subtitles */
.tp-subs {
  position: absolute; left: 4%; right: 4%; bottom: 6%; z-index: 3; pointer-events: none;
  text-align: center; line-height: 1.32; font-weight: 600; color: var(--tp-sub-color, #fff);
  font-size: calc(max(15px, 2.8cqw) * var(--tp-sub-scale, 1));
  transition: bottom .3s var(--tp-ease);
}
.tp:not(.tp-idle) .tp-subs { bottom: calc(6% + 70px); }
.tp-subs span { padding: .06em .32em; border-radius: 5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tp[data-sub-bg="shadow"] .tp-subs span { text-shadow: 0 0 3px #000, 0 0 3px #000, 0 2px 4px #000, 0 0 12px rgba(0, 0, 0, .8); }
.tp[data-sub-bg="box"] .tp-subs span { background: rgba(0, 0, 0, .72); }
.tp[data-sub-bg="none"] .tp-subs span { text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }

/* top bar */
.tp-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 12;
  display: flex; align-items: center; gap: 8px; padding: 10px 14px 30px;
  background: linear-gradient(rgba(0, 0, 0, .7), transparent);
  transition: opacity .35s, transform .35s var(--tp-ease);
}
.tp-heading { min-width: 0; }
.tp-title { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.tp-subtitle { font-size: 12px; color: rgba(255, 255, 255, .7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-subtitle:empty { display: none; }

/* bottom controls */
.tp-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 40px 14px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, .85));
  transition: opacity .35s, transform .35s var(--tp-ease);
}
.tp.tp-idle .tp-controls { opacity: 0; transform: translateY(12px); pointer-events: none; }
.tp.tp-idle .tp-top { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.tp.tp-idle .tp-center { opacity: 0; pointer-events: none; }
.tp.tp-idle .tp-center .tp-cbtn { pointer-events: none; }

.tp-seek { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; margin: 0 6px; outline: none; }
.tp-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); transition: height .18s var(--tp-ease); overflow: hidden; }
.tp-seek:hover .tp-track, .tp-scrubbing .tp-track, .tp-seek:focus-visible .tp-track { height: 7px; }
.tp-buffered i { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, .35); border-radius: 4px; }
.tp-hoverbar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, .25); }
.tp-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--tp-accent), var(--tp-accent-2)); border-radius: 4px; }
.tp-thumb {
  position: absolute; top: 50%; left: 0; width: 16px; height: 16px; border-radius: 50%; pointer-events: none;
  background: #fff; box-shadow: 0 0 0 4px rgba(255, 79, 56, .45), 0 2px 8px rgba(0, 0, 0, .4);
  transform: translate(-50%, -50%) scale(0); transition: transform .18s var(--tp-ease);
}
.tp-seek:hover .tp-thumb, .tp-scrubbing .tp-thumb, .tp-seek:focus-visible .tp-thumb { transform: translate(-50%, -50%) scale(1); }

/* seek preview */
.tp-preview {
  position: absolute; bottom: 30px; left: 0; transform: translate(-50%, 8px) scale(.96); opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px; transition: opacity .15s, transform .2s var(--tp-ease);
}
.tp-preview.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.tp-preview-img {
  position: relative; width: 256px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: #111 center / cover no-repeat; border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}
.tp-preview-img .tp-ring { position: absolute; top: 50%; left: 50%; margin: -12px 0 0 -12px; opacity: 0; transition: opacity .2s; }
.tp-preview-img.loading .tp-ring { opacity: 1; }
.tp-preview.no-image .tp-preview-img { display: none; }
.tp-preview-time { padding: 3px 9px; border-radius: 7px; background: rgba(12, 13, 18, .92); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.tp-bar { display: flex; align-items: center; justify-content: space-between; height: 48px; gap: 8px; }
.tp-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tp-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 10px; white-space: nowrap; }
.tp-sep { margin: 0 5px; opacity: .5; }
.tp-dur { opacity: .7; }
.tp .tp-chip {
  height: 26px; padding: 0 9px; margin-right: 4px; border-radius: 6px; font-size: 12px; font-weight: 900; letter-spacing: .02em;
  background: rgba(255, 255, 255, .16); transition: background .2s, transform .15s;
}
.tp .tp-chip:hover { background: rgba(255, 255, 255, .28); transform: scale(1.05); }

.tp-volume { display: flex; align-items: center; }
.tp-vol-slider {
  position: relative; height: 32px; width: 0; opacity: 0; display: flex; align-items: center;
  cursor: pointer; touch-action: none; transition: width .25s var(--tp-ease), opacity .25s, margin .25s; outline: none;
}
.tp-volume:hover .tp-vol-slider, .tp-vol-slider:focus-visible, .tp-vol-slider.boost { width: 104px; opacity: 1; margin: 0 10px 0 4px; }
.tp-vol-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); }
.tp-vol-fill { height: 100%; border-radius: 4px; background: #fff; }
.tp-vol-slider.boost .tp-vol-fill { background: linear-gradient(90deg, #fff 0, #fff 45%, var(--tp-accent-2)); }
.tp-vol-mark { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.tp-vol-thumb { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.tp-vol-slider.boost .tp-vol-thumb { background: var(--tp-accent-2); }
.tp-vol-label { font-size: 12px; font-weight: 900; color: var(--tp-accent-2); font-variant-numeric: tabular-nums; }

/* centre controls */
.tp-center {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: min(12%, 96px);
  transition: opacity .3s;
}
.tp-cbtn {
  position: relative; pointer-events: auto; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; background: rgba(12, 13, 18, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .2s var(--tp-ease), background .2s;
}
.tp-cbtn:hover { transform: scale(1.08); background: rgba(12, 13, 18, .6); }
.tp-cbtn:active { transform: scale(.92); }
.tp-cbtn b { position: absolute; font-size: 9px; font-weight: 900; top: 50%; left: 50%; transform: translate(-50%, -40%); }
.tp .tp-c-play { width: 80px; height: 80px; font-size: 30px; background: linear-gradient(135deg, rgba(255, 79, 56, .9), rgba(255, 154, 61, .9)); box-shadow: 0 10px 36px rgba(255, 79, 56, .45); }
.tp .tp-c-play .fa-play { margin-left: 4px; }
.tp-c-play.pulse { animation: tp-pulse .5s var(--tp-ease); }
@keyframes tp-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (hover: hover) {
  .tp .tp-c-back, .tp .tp-c-fwd { display: none; }
  .tp:not(.tp-paused) .tp-center { opacity: 0; }
  .tp:not(.tp-paused) .tp-center .tp-cbtn { pointer-events: none; }
  .tp.tp-paused .tp-c-play { animation: tp-pop-in .35s var(--tp-ease); }
}
@media (hover: none) {
  .tp-bar .tp-back, .tp-bar .tp-fwd, .tp-pip { display: none; }
  .tp-vol-slider { width: 72px; opacity: 1; margin: 0 8px 0 2px; }
}
.tp-loading:not([hidden]) ~ .tp-center, .tp-error:not([hidden]) ~ .tp-center { display: none; }
.tp-buffering:not([hidden]) ~ .tp-center .tp-c-play { visibility: hidden; }
@keyframes tp-pop-in { from { transform: scale(.6); opacity: 0; } }
@keyframes tp-fade { from { opacity: 0; } }

/* double-tap ripples */
.tp-ripple {
  position: absolute; top: 0; bottom: 0; width: 25%; z-index: 4; pointer-events: none; opacity: 0;
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .09);
}
.tp-ripple.left { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; }
.tp-ripple.right { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; }
.tp-ripple.show { animation: tp-ripple .75s ease-out forwards; }
.tp-ripple-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.tp-ripple-inner i { font-size: 30px; }
.tp-ripple.show .tp-ripple-inner i { animation: tp-nudge .5s var(--tp-ease); }
.tp-ripple.left.show .tp-ripple-inner i { animation-name: tp-nudge-left; }
@keyframes tp-ripple { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tp-nudge { 0% { transform: translateX(-8px); opacity: .4; } 100% { transform: none; opacity: 1; } }
@keyframes tp-nudge-left { 0% { transform: translateX(8px); opacity: .4; } 100% { transform: none; opacity: 1; } }

/* toast */
.tp-toast {
  position: absolute; top: 14%; left: 50%; z-index: 9; transform: translate(-50%, -10px) scale(.96);
  display: flex; align-items: center; gap: 9px; max-width: 86%;
  background: rgba(12, 13, 18, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  opacity: 0; transition: opacity .22s, transform .3s var(--tp-ease); pointer-events: none;
}
.tp-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.tp-toast-icon { color: var(--tp-accent-2); }
.tp-toast:not(.with-icon) .tp-toast-icon { display: none; }
.tp-toast-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* spinner ring */
.tp-ring {
  width: 54px; height: 54px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 20%, var(--tp-accent) 60%, var(--tp-accent-2));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: tp-spin .8s linear infinite;
}
.tp-ring.small { width: 24px; height: 24px; }
@keyframes tp-spin { to { transform: rotate(360deg); } }
.tp-buffering {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; animation: tp-fade .3s;
}
.tp-buffer-text { font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px #000; opacity: .85; font-variant-numeric: tabular-nums; min-height: 1em; }

/* ---------- loading screen: logo fills up ---------- */
.tp-loading {
  position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: #06070a; overflow: hidden;
  transition: opacity .6s ease, transform .6s var(--tp-ease);
}
.tp-loading.done { opacity: 0; transform: scale(1.04); pointer-events: none; }
.tp-loading-bg {
  position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(26px) brightness(.3) saturate(1.3); transform: scale(1.08); animation: tp-drift 18s ease-in-out infinite alternate;
}
@keyframes tp-drift { to { transform: scale(1.18) translate(-1.5%, -1%); } }
.tp-loading::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, .65)); pointer-events: none; }
.tp-loading-body { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2.2cqw; padding: 0 6%; text-align: center; }
/* The logo is a transparent PNG (trimmed to its visible pixels): a 10% white silhouette of its
   own shape, and the real logo rising inside it from the bottom like liquid, with a moving wave
   on the surface. Only the logo's own shape ever lights up. */
@property --tp-wave { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.tp-logo {
  --p: 0;
  --tp-wave-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M0 50 Q25 46 50 50 T100 50 V100 H0Z'/></svg>");
  position: relative; display: grid; place-items: center; width: min(46cqw, 540px);
  transition: opacity .4s;
}
.tp-logo.pending { opacity: 0; }
.tp-logo img { grid-area: 1 / 1; width: 100%; max-height: 22cqw; object-fit: contain; }
.tp-logo-dim { opacity: .1; filter: brightness(0) invert(1); }
.tp-logo-fill, .tp-logo.text::after {
  -webkit-mask: var(--tp-wave-mask) var(--tp-wave) calc(var(--p) * 1%) / 50% 200% repeat-x;
  mask: var(--tp-wave-mask) var(--tp-wave) calc(var(--p) * 1%) / 50% 200% repeat-x;
  animation: tp-wave 2.2s linear infinite;
}
.tp-logo-fill { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .35)) drop-shadow(0 0 18px rgba(255, 255, 255, .16)); }
@keyframes tp-wave { to { --tp-wave: 100%; } }
.tp-logo.generic { width: min(30cqw, 320px); }
.tp-logo.text img { display: none; }
.tp-logo.text::before, .tp-logo.text::after {
  content: attr(data-title); grid-area: 1 / 1; text-align: center; max-width: 80cqw;
  font-size: clamp(24px, 6cqw, 72px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05;
}
.tp-logo.text::before { opacity: .1; }
.tp-loading:not(.done) .tp-logo { animation: tp-breathe 3.2s ease-in-out infinite; }
@keyframes tp-breathe { 50% { transform: scale(1.015); } }
.tp-pct { font-size: clamp(13px, 1.5cqw, 17px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .08em; color: rgba(255, 255, 255, .85); }
.tp-quote { font-size: clamp(13px, 1.5cqw, 17px); color: rgba(255, 255, 255, .6); font-weight: 500; min-height: 1.4em; }
.tp-quote.in { animation: tp-quote .6s var(--tp-ease); }
@keyframes tp-quote { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }

/* ---------- error / up-next card ---------- */
.tp-error {
  position: absolute; inset: 0; z-index: 11; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(12, 13, 18, .82), rgba(0, 0, 0, .94)); animation: tp-fade .3s;
}
.tp-error-card {
  width: min(460px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 24px; border-radius: 20px; background: rgba(24, 26, 34, .9); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5); animation: tp-card .45s var(--tp-ease);
}
@keyframes tp-card { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.tp-error-icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(255, 79, 56, .2), rgba(255, 154, 61, .12)); color: var(--tp-accent-2);
  box-shadow: 0 0 0 1px rgba(255, 120, 60, .3);
}
.tp-error-title { margin: 0; font-size: 19px; font-weight: 800; }
.tp-error-text { margin: 0 0 12px; color: rgba(255, 255, 255, .7); font-size: 14px; line-height: 1.55; }
.tp-error-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tp .tp-action {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 99px;
  background: rgba(255, 255, 255, .1); font-weight: 700; font-size: 14px; transition: background .2s, transform .15s;
}
.tp .tp-action:hover { background: rgba(255, 255, 255, .18); }
.tp .tp-action:active { transform: scale(.95); }
.tp .tp-action.primary { background: linear-gradient(135deg, var(--tp-accent), var(--tp-accent-2)); box-shadow: 0 8px 22px rgba(255, 79, 56, .35); }

/* ---------- stats (hold D) ---------- */
.tp-stats {
  position: absolute; top: 58px; left: 14px; z-index: 13; min-width: 280px; max-width: calc(100% - 28px);
  padding: 12px 14px; border-radius: 12px; background: rgba(8, 9, 12, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .1); font-size: 12px; animation: tp-card .25s var(--tp-ease);
}
.tp-stats-head { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.tp-stats-head span { color: rgba(255, 255, 255, .45); font-weight: 600; }
.tp-stats > div:not(.tp-stats-head) { display: flex; justify-content: space-between; gap: 18px; padding: 3px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.tp-stats span { color: rgba(255, 255, 255, .55); }
.tp-stats b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- settings menu ---------- */
.tp-menu {
  position: absolute; right: 14px; bottom: 70px; z-index: 14;
  width: min(340px, calc(100% - 28px)); max-height: calc(100% - 90px); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(20, 21, 28, .94); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 6px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .55); transform-origin: bottom right; animation: tp-menu .22s var(--tp-ease);
  scrollbar-width: thin;
}
@keyframes tp-menu { from { opacity: 0; transform: translateY(8px) scale(.95); } }
.tp-menu > * { animation: tp-fade .2s; }
:is(.tp, .tp-portal) .tp-mi, :is(.tp, .tp-portal) .tp-mo, :is(.tp, .tp-portal) .tp-mh {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 14px; transition: background .15s;
}
:is(.tp, .tp-portal) .tp-mi:hover, :is(.tp, .tp-portal) .tp-mo:hover, :is(.tp, .tp-portal) .tp-mh:hover { background: rgba(255, 255, 255, .08); }
:is(.tp, .tp-portal) .tp-mi[disabled] { opacity: .38; cursor: default; }
:is(.tp, .tp-portal) .tp-mi[disabled]:hover { background: none; }
.tp-mi-icon { width: 20px; text-align: center; color: rgba(255, 255, 255, .8); }
.tp-mi-label { flex: 1; font-weight: 600; }
.tp-mi-value { color: rgba(255, 255, 255, .55); font-size: 13px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-mi-chev { font-size: 11px; opacity: .45; }
:is(.tp, .tp-portal) .tp-mh { font-weight: 800; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.tp-mh i { font-size: 12px; }
.tp-mgroup { padding: 10px 12px 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .4); }
.tp-mo-check { width: 18px; flex: none; color: var(--tp-accent-2); font-size: 13px; }
.tp-mo-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tp-mo-label { font-weight: 600; }
.tp-mo-detail { font-size: 12px; color: rgba(255, 255, 255, .5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-mo.selected .tp-mo-label { font-weight: 800; }
.tp-speed { flex: none; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 99px; }
.tp-speed.fast { background: rgba(62, 207, 142, .16); color: #3ecf8e; }
.tp-speed.medium { background: rgba(245, 197, 24, .16); color: #f5c518; }
.tp-speed.slow { background: rgba(255, 154, 61, .16); color: #ff9a3d; }
.tp-speed.very-slow { background: rgba(255, 90, 90, .16); color: #ff6b6b; }
.tp-speed.stream { background: rgba(120, 160, 255, .16); color: #8fb0ff; }
.tp-switch { position: relative; width: 38px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .2); transition: background .2s; flex: none; }
.tp-switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--tp-ease); }
.tp-switch.on { background: var(--tp-accent); }
.tp-switch.on i { transform: translateX(16px); }
.tp-delay { display: flex; align-items: center; gap: 6px; padding: 8px 12px 12px; font-size: 13px; color: rgba(255, 255, 255, .75); border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 4px; }
.tp-delay > span:first-child { flex: 1; font-weight: 700; display: flex; align-items: center; gap: 6px; }
:is(.tp, .tp-portal) .tp-small { padding: 4px 8px; border-radius: 7px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .1); transition: background .15s; }
:is(.tp, .tp-portal) .tp-small:hover { background: rgba(255, 255, 255, .2); }
.tp-delay-val { min-width: 50px; text-align: center; color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-seg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; font-weight: 600; }
.tp-seg { display: flex; background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 3px; }
:is(.tp, .tp-portal) .tp-seg button { padding: 5px 11px; font-size: 12px; font-weight: 800; border-radius: 8px; color: rgba(255, 255, 255, .6); transition: background .2s, color .2s; }
:is(.tp, .tp-portal) .tp-seg button.on { background: rgba(255, 255, 255, .22); color: #fff; }
.tp-empty { padding: 10px 12px; color: rgba(255, 255, 255, .5); font-size: 13px; }

/* ---------- small players (phones) ---------- */
@container (max-width: 620px) {
  .tp-controls { padding: 30px 6px 2px; }
  .tp-bar { height: 42px; }
  .tp-btn { width: 38px; height: 38px; font-size: 17px; }
  .tp-time { font-size: 12px; margin-left: 4px; }
  .tp-sep, .tp-dur { display: none; }
  .tp-vol-slider, .tp-vol-label { display: none; }
  .tp-cbtn { width: 52px; height: 52px; font-size: 20px; }
  .tp .tp-c-play { width: 64px; height: 64px; font-size: 24px; }
  .tp-menu { bottom: 52px; right: 6px; max-height: calc(100% - 62px); }
  .tp:not(.tp-idle) .tp-subs { bottom: calc(6% + 54px); }
  .tp-preview-img { width: 160px; }
  .tp-title { font-size: 14px; }
  .tp-logo { width: 62cqw; }
  .tp-logo img { max-height: 30cqw; }
  .tp-stats { top: 50px; left: 8px; min-width: 0; right: 8px; }
  .tp-error-card { padding: 18px 16px; }
  .tp-error-icon { width: 46px; height: 46px; font-size: 19px; }
  .tp-error-text { font-size: 13px; margin-bottom: 8px; }
}
@media (max-width: 600px) {
  .tp { border-radius: 0; box-shadow: none; }
}

/* ---------- phones: settings as a bottom sheet over the whole screen ---------- */
.tp-portal {
  --tp-accent: #ff4f38; --tp-accent-2: #ff9a3d; --tp-ease: cubic-bezier(.2, .8, .2, 1);
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .5); color: #fff; font: 15px/1.4 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  animation: tp-fade .2s; -webkit-tap-highlight-color: transparent;
}
.tp-portal button { background: none; border: 0; color: inherit; padding: 0; font: inherit; cursor: pointer; }
.tp-portal .tp-menu {
  position: relative; right: auto; bottom: auto; width: min(560px, 100%); max-height: 78vh;
  border-radius: 22px 22px 0 0; padding: 22px 10px calc(14px + env(safe-area-inset-bottom));
  transform-origin: bottom center; animation: tp-sheet .32s var(--tp-ease);
  background: rgba(22, 23, 30, .98);
}
.tp-portal .tp-menu::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .25);
}
@keyframes tp-sheet { from { transform: translateY(100%); } }
.tp-portal .tp-mi, .tp-portal .tp-mo, .tp-portal .tp-mh { min-height: 50px; font-size: 15px; }
.tp-portal .tp-mi-icon { font-size: 17px; }

/* muted autoplay: "turn sound on" */
.tp-unmute {
  position: absolute; left: 14px; bottom: 76px; z-index: 9; display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 99px; font-weight: 700; font-size: 13px;
  background: rgba(255, 255, 255, .95) !important; color: #111 !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  animation: tp-card .4s var(--tp-ease);
}
.tp-unmute i { color: var(--tp-accent); }
.tp.tp-idle .tp-unmute { bottom: 20px; }

/* quality menu: "change source" button beside a quality */
.tp-mo-row { display: flex; align-items: center; gap: 4px; }
.tp-mo-row .tp-mo { flex: 1; min-width: 0; }
:is(.tp, .tp-portal) .tp-swap {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; margin-right: 4px; border-radius: 9px;
  font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .08);
  transition: background .2s, color .2s, transform .15s;
}
:is(.tp, .tp-portal) .tp-swap:hover { background: rgba(255, 79, 56, .25); color: #fff; }
:is(.tp, .tp-portal) .tp-swap:active { transform: scale(.94); }
:is(.tp, .tp-portal) .tp-swap:hover i { transform: rotate(180deg); }
.tp-swap i { transition: transform .4s var(--tp-ease); }

/* phones: the toast sits above the controls instead of over the title */
@media (max-width: 600px) {
  .tp-toast { top: auto; bottom: 64px; font-size: 12px; padding: 7px 13px; }
  .tp.tp-idle .tp-toast { bottom: 18px; }
}

/* ---------- language switch (top left): Dublaj / Altyazılı / Türkçe ---------- */
.tp-langs {
  position: absolute; top: 58px; left: 14px; z-index: 12; display: flex; gap: 4px; padding: 4px; border-radius: 99px;
  background: rgba(10, 11, 16, .62); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: opacity .35s, transform .35s var(--tp-ease);
}
.tp.tp-idle .tp-langs { opacity: 0; transform: translateY(-10px); pointer-events: none; }
:is(.tp, .tp-portal) .tp-lang {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 9px; border-radius: 99px;
  font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .72); transition: background .2s, color .2s, box-shadow .2s;
}
:is(.tp, .tp-portal) .tp-lang:hover { color: #fff; background: rgba(255, 255, 255, .08); }
:is(.tp, .tp-portal) .tp-lang.active { color: #fff; background: linear-gradient(135deg, rgba(255, 79, 56, .9), rgba(255, 128, 60, .85)); box-shadow: 0 4px 14px rgba(255, 79, 56, .35); }
.tp-lang i { font-size: 13px; opacity: .9; }
.tp-flag { width: 21px; height: 14px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.tp-lang.active .tp-flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
@media (max-width: 600px) {
  .tp-langs { top: 46px; left: 10px; padding: 3px; }
  .tp .tp-lang { height: 28px; padding: 0 10px 0 7px; font-size: 12px; gap: 6px; }
  .tp-flag { width: 18px; height: 12px; }
}

/* ---------- loading: the always-visible wait note ---------- */
.tp-wait {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 99px;
  font-size: clamp(12px, 1.3cqw, 15px); font-weight: 600; color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
}
.tp-wait i { color: var(--tp-accent-2); animation: tp-hourglass 2.4s ease-in-out infinite; }
.tp-wait b { font-weight: 800; color: #fff; }
@keyframes tp-hourglass { 0%, 40% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@media (max-width: 600px) { .tp-wait { padding: 6px 12px; } }

/* ---------- "Şu an bu içerik kullanılamıyor" ---------- */
.tp-error[data-variant="unavailable"] { background: #05060a; overflow: hidden; }
.tp-error[data-variant="unavailable"]::before {
  content: ""; position: absolute; inset: -20px; background: var(--bg) center / cover no-repeat;
  filter: blur(12px) saturate(.8) brightness(.6); transform: scale(1.05);
}
.tp-error[data-variant="unavailable"]::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(5, 6, 10, .2), rgba(5, 6, 10, .8)); }
.tp-error[data-variant="unavailable"] .tp-error-card { position: relative; z-index: 1; background: rgba(18, 19, 26, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tp-error[data-variant="unavailable"] .tp-error-icon {
  background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
  animation: tp-icon-breathe 3s ease-in-out infinite;
}
@keyframes tp-icon-breathe { 50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0), 0 0 0 1px rgba(255, 255, 255, .14); transform: scale(1.04); } }
.tp-stats { top: 104px; }
@media (max-width: 600px) {
  /* Small player: keep the loading screen clear of the language switch. */
  .tp-loading-body { padding-top: 58px; gap: 8px; }
  .tp-quote { display: none; }
}

/* subtitle sync: header line + four equal buttons, never wider than the menu */
.tp-delay { display: block; padding: 8px 12px 12px; }
.tp-delay-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.tp-delay-head b { flex: 1; font-weight: 700; }
.tp-delay-head .tp-delay-val { min-width: 0; }
.tp-delay-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
:is(.tp, .tp-portal) .tp-delay-btns .tp-small { padding: 7px 0; }

/* ---------- before playback: "Ek bilgiler yükleniyor" + options card ---------- */
.tp-prep { position: absolute; inset: 0; z-index: 11; display: grid; place-items: center; overflow: hidden; background: #05060a; animation: tp-fade .3s; }
.tp-prep-bg { position: absolute; inset: -20px; background: center / cover no-repeat; filter: blur(3px) brightness(.45) saturate(1.1); transform: scale(1.04); animation: kenburns-tp 18s ease-out forwards; }
@keyframes kenburns-tp { to { transform: scale(1.1); } }
.tp-prep::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(5, 6, 10, .15), rgba(5, 6, 10, .85)); }
.tp-prep.picking .tp-prep-bg { filter: blur(10px) brightness(.35); }
.tp-prep-body { position: relative; z-index: 1; width: 100%; max-height: 100%; overflow-y: auto; display: grid; place-items: center; padding: 56px 16px 16px; }
.tp-prep-info { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: tp-card .45s var(--tp-ease); }
.tp-prep-info h3 { margin: 0; font-size: clamp(16px, 2cqw, 22px); font-weight: 800; letter-spacing: -.01em; }
.tp-prep-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; font-size: 13px; color: rgba(255, 255, 255, .7); text-align: left; }
.tp-prep-steps li { display: flex; align-items: center; gap: 9px; transition: color .3s; }
.tp-prep-steps li i { width: 16px; text-align: center; }
.tp-prep-steps li:not(.done):not(.none) i { animation: tp-spin 1s linear infinite; color: rgba(255, 255, 255, .5); }
.tp-prep-steps li.done { color: #fff; }
.tp-prep-steps li.done i { color: #3ecf8e; }
.tp-prep-steps li.none i { color: rgba(255, 255, 255, .35); }
@keyframes tp-spin { to { transform: rotate(360deg); } }

.tp-pick {
  width: min(560px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 20px;
  background: rgba(16, 17, 24, .86); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); animation: tp-card .45s var(--tp-ease); color: #fff;
}
.tp-pick-head h3 { margin: 0; font-size: 19px; font-weight: 800; }
.tp-pick-head p { margin: 3px 0 0; font-size: 13px; color: rgba(255, 255, 255, .6); }
.tp-pick-sec h4 { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.tp-pick-langs { display: flex; flex-wrap: wrap; gap: 6px; }
:is(.tp, .tp-portal) .tp-pick .tp-lang { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); height: 38px; padding: 0 14px 0 11px; }
.tp-pick-opts { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
:is(.tp, .tp-portal) .tp-pick-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); transition: background .2s, border-color .2s;
}
:is(.tp, .tp-portal) .tp-pick-opt:hover { background: rgba(255, 255, 255, .09); }
:is(.tp, .tp-portal) .tp-pick-opt.on { background: rgba(255, 79, 56, .14); border-color: rgba(255, 110, 60, .6); }
.tp-pick-radio { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); transition: border-color .2s, box-shadow .2s; }
.tp-pick-opt.on .tp-pick-radio { border-color: var(--tp-accent); box-shadow: inset 0 0 0 4px #15161d, inset 0 0 0 9px var(--tp-accent); }
.tp-pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tp-pick-text b { font-size: 14px; }
.tp-pick-text small { font-size: 12px; color: rgba(255, 255, 255, .55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-pick-best { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; background: rgba(62, 207, 142, .16); color: #3ecf8e; white-space: nowrap; }
.tp-pick .tp-seg { display: flex; flex-wrap: wrap; }
:is(.tp, .tp-portal) .tp-pick .tp-seg button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; }
.tp-pick-remember { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255, 255, 255, .75); cursor: pointer; }
.tp-pick-remember input { width: 17px; height: 17px; accent-color: var(--tp-accent); }
:is(.tp, .tp-portal) .tp-pick-play {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 14px; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, var(--tp-accent), var(--tp-accent-2)); box-shadow: 0 10px 30px rgba(255, 79, 56, .35); transition: transform .15s, box-shadow .2s;
}
:is(.tp, .tp-portal) .tp-pick-play:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(255, 79, 56, .45); }
.tp-flag-code { display: inline-grid; place-items: center; font-size: 8px; font-weight: 900; background: rgba(255, 255, 255, .85); color: #111; }
/* on a phone the card is a bottom sheet over the page */
.tp-pick-portal { align-items: flex-end; }
.tp-pick-portal .tp-pick { border-radius: 22px 22px 0 0; max-height: 88vh; overflow-y: auto; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: tp-sheet .32s var(--tp-ease); }
.tp-pick-head { display: flex; align-items: flex-start; gap: 12px; }
.tp-pick-head > div { flex: 1; min-width: 0; }
:is(.tp, .tp-portal) .tp-pick-close { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08); flex: none; }

/* ---------- phones: player options in a bar under the video ---------- */
.tp-dock { display: none; }
@media (max-width: 600px) {
  .tp-dock:not([hidden]) {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #0d0e13; border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff; font: 13px/1.2 Inter, system-ui, sans-serif; -webkit-tap-highlight-color: transparent;
  }
  .tp-dock button { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
  .tp-dock-langs { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tp-dock-langs::-webkit-scrollbar { display: none; }
  .tp-dock .tp-lang {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 9px; border-radius: 99px; flex: none;
    font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
  }
  .tp-dock .tp-lang.active { color: #fff; background: linear-gradient(135deg, rgba(255, 79, 56, .9), rgba(255, 128, 60, .85)); border-color: transparent; }
  .tp-dock-btns { display: flex; gap: 6px; flex: none; }
  .tp-dock .tp-dock-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 10px; border-radius: 10px;
    background: rgba(255, 255, 255, .07); font-size: 12px; font-weight: 800;
  }
  .tp-dock .tp-dock-btn i { font-size: 14px; }
  .tp-dock .tp-dock-btn.active { color: var(--tp-accent-2, #ff9a3d); }
  .tp-dock .tp-dock-btn[data-dock="subs"] span { display: none; }
  /* the in-video copies are too small here — only in fullscreen do they come back */
  .tp:not(.tp-is-fs) .tp-langs, .tp:not(.tp-is-fs) .tp-quality-chip, .tp:not(.tp-is-fs) .tp-cc, .tp:not(.tp-is-fs) .tp-settings { display: none !important; }
  .tp:not(.tp-is-fs) .tp-loading-body { padding-top: 0; }
}
.tp-pick-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tp-pick-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.tp, .tp-portal) .tp-pick-opt .tp-speed { flex: none; }
@media (max-width: 600px) {
  .tp-dock:not([hidden]) { gap: 6px; padding: 7px 8px; }
  .tp-dock .tp-lang { height: 34px; padding: 0 10px 0 8px; gap: 5px; font-size: 12.5px; }
  .tp-dock .tp-lang .tp-flag { width: 17px; height: 12px; }
  .tp-dock .tp-lang i { display: none; } /* the flag already says it */
  .tp-dock-btns { gap: 5px; }
  .tp-dock .tp-dock-btn { height: 34px; min-width: 34px; padding: 0 8px; gap: 5px; }
}
.tp-pick-pending { display: flex; align-items: center; gap: 8px; margin: -2px 0 8px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .6); }
.tp-pick-pending i { animation: tp-spin 1s linear infinite; }
.tp .tp-action.requested, .tp .tp-action:disabled { opacity: 1; cursor: default; background: rgba(62, 207, 142, .16); color: #8ef0bd; }
.tp .tp-action.requested i { color: #3ecf8e; }
.tp-pick-admin { background: rgba(255, 193, 94, .16) !important; color: #ffc15e !important; }

/* ---------- lighter visuals (Safari on Mac/iPhone, TVs, low-memory phones) ----------
   A live blur behind an overlay is recomputed for every video frame there, and big blurred,
   animated backgrounds keep the GPU busy: solid tints and still backgrounds instead. */
.lite :is(.tp, .tp-portal) *, .lite :is(.tp, .tp-portal) *::before { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.lite .tp-cbtn { background: rgba(12, 13, 18, .72); }
.lite .tp-langs { background: rgba(10, 11, 16, .86); }
.lite :is(.tp-menu, .tp-toast, .tp-stats, .tp-pick) { background: rgba(18, 19, 26, .97); }
.lite .tp-loading-bg { filter: brightness(.3); animation: none; transform: none; }
.lite .tp-prep-bg, .lite .tp-prep.picking .tp-prep-bg { filter: brightness(.35); animation: none; }
.lite .tp-seekshot img { filter: brightness(.7); animation: none; }
.lite .tp-error[data-variant="unavailable"] .tp-error-card { background: rgba(18, 19, 26, .95); }

/* iPhone / iPad: the hardware buttons set the volume (pages can't) — mute stays, slider goes */
.ios .tp-vol-slider, .ios .tp-vol-label { display: none !important; }

/* ---------- phones: "taking longer than expected" as a sheet over the page ---------- */
.tp-slow-portal { background: rgba(0, 0, 0, .55); animation: tp-fade .2s; }
.tp-slow-card {
  width: 100%; max-width: 520px; max-height: 80vh; overflow-y: auto; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0; background: #15161d; color: #fff; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
  animation: tp-sheet .3s var(--tp-ease); font: 14px/1.4 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tp-slow-head { display: flex; align-items: center; gap: 10px; }
.tp-slow-head i { color: var(--tp-accent-2); font-size: 18px; }
.tp-slow-head h3 { margin: 0; font-size: 16px; }
.tp-slow-card p { margin: 8px 0 14px; color: rgba(255, 255, 255, .7); font-size: 13.5px; }
.tp-slow-card .tp-slow-options { display: grid; gap: 8px; max-width: none; }
.tp-portal .tp-slow-opt {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; width: 100%; padding: 12px 14px; text-align: left;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .07); color: #fff; font: inherit; cursor: pointer;
}
.tp-portal .tp-slow-opt:active { background: rgba(255, 255, 255, .16); }
.tp-slow-wait { width: 100%; margin-top: 12px; padding: 12px; border-radius: 12px; border: 0; background: transparent; color: rgba(255, 255, 255, .75); font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- iPhone full screen: our player fills the screen (the system player isn't used) ---------- */
.tp.tp-pseudo-fs {
  position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; max-width: none;
  aspect-ratio: auto; border-radius: 0; box-shadow: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
html.tp-pseudo-fs-on, html.tp-pseudo-fs-on body { overflow: hidden; overscroll-behavior: none; }
html.tp-pseudo-fs-on .topbar, html.tp-pseudo-fs-on .tabbar { visibility: hidden; }

/* ---------- video ads before the film (playIntro) ---------- */
.tp-intro { position: absolute; inset: 0; z-index: 30; background: #000; display: grid; }
.tp-intro video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tp-intro.linked video { cursor: pointer; }
.tp-intro-tag { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; border-radius: 99px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); color: rgba(255, 255, 255, .85); font-size: 12px; font-weight: 600; pointer-events: none; }
.tp-intro-tag b { padding: 2px 7px; border-radius: 99px; background: #ffc300; color: #111; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.tp-intro-tag span:empty, .tp-intro-host[hidden] { display: none; }
.tp-intro-host::before { content: '·'; margin-right: 8px; opacity: .6; }
.tp .tp-intro-skip {
  position: absolute; right: 0; bottom: 30px; display: inline-flex; align-items: center; gap: 12px; padding: 0 8px 0 18px; height: 48px;
  border: 0; border-radius: 12px 0 0 12px; background: rgba(12, 12, 16, .78); backdrop-filter: blur(8px); border-left: 3px solid rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .75); font: inherit; font-size: 14.5px; font-weight: 700; cursor: default; transition: background .2s, color .2s, border-color .2s;
}
.tp-intro-ring { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp .tp-intro-skip.ready { color: #fff; cursor: pointer; border-left-color: #ffc300; }
.tp-intro-skip.ready .tp-intro-ring { background: #ffc300; color: #111; }
.tp .tp-intro-skip.ready:hover, .tp .tp-intro-skip.ready:focus-visible { background: rgba(255, 255, 255, .95); color: #111; }
.tp-intro-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.tp-intro-bar i { display: block; height: 100%; width: 0; background: #ffc300; transition: width .25s linear; }
@container (max-width: 620px) {
  .tp .tp-intro-skip { bottom: 18px; height: 40px; padding: 0 6px 0 12px; font-size: 13px; gap: 8px; }
  .tp-intro-ring { width: 28px; height: 28px; }
  .tp-intro-tag { top: 10px; left: 10px; }
}

/* Options card: the automatically chosen source, folded ("Değiştir" opens the full list). */
.tp-pick-autorow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; background: rgba(62, 207, 142, .07); border: 1px solid rgba(62, 207, 142, .28); }
.tp-pick-autoic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(62, 207, 142, .16); color: #3ecf8e; font-size: 14px; }
.tp-pick-autorow .tp-pick-line { display: flex; align-items: center; gap: 8px; }
:is(.tp, .tp-portal) .tp-pick-more { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
:is(.tp, .tp-portal) .tp-pick-more:hover, :is(.tp, .tp-portal) .tp-pick-more:focus-visible { background: rgba(255, 255, 255, .13); }
.tp-pick-more .fa-solid { font-size: 10px; }

/* "Ek bilgiler yükleniyor": the title on the left, the look-ups on the right (stacked when narrow). */
.tp-prep-wrap { width: min(860px, 100%); display: grid; gap: 22px; align-items: center; justify-items: center; animation: tp-card .45s var(--tp-ease); }
.tp-prep-wrap.has-info { grid-template-columns: minmax(0, 1.25fr) minmax(250px, 1fr); justify-items: stretch; }
.tp-prep-title { display: flex; gap: 20px; align-items: center; min-width: 0; }
.tp-prep-poster { width: clamp(90px, 13cqw, 150px); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; flex: none; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .1); }
.tp-prep-meta { min-width: 0; text-align: left; }
.tp-prep-meta h2 { margin: 0; font-size: clamp(20px, 2.8cqw, 32px); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.tp-prep-sub { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.tp-prep-ov { margin: 10px 0 0; font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, .62); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tp-prep-ov:empty, .tp-prep-sub:empty { display: none; }
.tp-prep-wrap .tp-prep-info { align-items: stretch; text-align: left; gap: 14px; padding: 20px 22px; border-radius: 18px; background: rgba(12, 13, 18, .62); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(14px); animation: none; }
.tp-prep-status { display: flex; align-items: center; gap: 14px; }
.tp-prep-status .tp-ring { width: 38px; height: 38px; flex: none; margin: 0; }
.tp-prep-status h3 { margin: 0; font-size: 16px; font-weight: 800; }
.tp-prep-hint { margin: 2px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.tp-prep-wrap .tp-prep-steps { margin: 0; gap: 9px; }
.tp-prep-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tp-prep-bar i { display: block; height: 100%; width: 12%; border-radius: inherit; background: var(--tp-accent); transition: width .5s var(--tp-ease); }
.lite .tp-prep-wrap .tp-prep-info { backdrop-filter: none; background: rgba(12, 13, 18, .88); }
@container (max-width: 700px) {
  .tp-prep-wrap.has-info { grid-template-columns: 1fr; gap: 14px; }
  .tp-prep-title { display: none; }
  .tp-prep-wrap .tp-prep-info { padding: 16px; background: none; border: 0; backdrop-filter: none; }
}

/* ======================================================================
   TV player (player-tv.js): Netflix-style layout for a remote
   ====================================================================== */
.tp.tp-tv { font-size: 18px; }
.tp-tv .tp-center, .tp-tv .tp-volume, .tp-tv .tp-fs, .tp-tv .tp-ten, .tp-tv .tp-time, .tp-tv .tp-ripple { display: none !important; }
.tp-tv .tp-top { padding: 3.2vh 4vw 9vh; gap: 1.4vw; background: linear-gradient(rgba(0, 0, 0, .78), transparent); }
.tp-tv .tp-title { font-size: clamp(22px, 2.3vw, 44px); letter-spacing: -.01em; }
.tp-tv .tp-subtitle { font-size: clamp(14px, 1.25vw, 24px); margin-top: .3em; }
.tp-tv .tp-controls {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1.4vw;
  padding: 14vh 4vw 4.5vh; background: linear-gradient(transparent, rgba(0, 0, 0, .55) 35%, rgba(0, 0, 0, .9));
}
.tp-tv .tp-bar { grid-column: 1 / -1; height: auto; margin-top: 2.4vh; justify-content: flex-start; gap: 1vw; }
.tp-tv .tp-group { gap: .9vw; }
.tp-tv .tp-group:last-child { margin-left: auto; }
.tp-tv .tp-remain { font-size: clamp(16px, 1.3vw, 26px); font-weight: 700; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .85); }
/* progress bar: thick, and thicker with a big knob when it has the focus */
.tp-tv .tp-seek { height: 40px; margin: 0; border-radius: 99px; }
.tp-tv .tp-track { height: 6px; }
.tp-tv .tp-seek:is(:focus, .tv-focus) .tp-track, .tp-tv.tp-scrubbing .tp-track { height: 10px; }
.tp-tv .tp-thumb { width: 22px; height: 22px; }
.tp-tv .tp-seek:is(:focus, .tv-focus) .tp-thumb, .tp-tv.tp-scrubbing .tp-thumb { transform: translate(-50%, -50%) scale(1.25); box-shadow: 0 0 0 6px rgba(255, 79, 56, .5), 0 2px 10px rgba(0, 0, 0, .5); }
.tp-tv .tp-seek:focus-visible { outline: none; }
.tp-tv .tp-preview { bottom: 52px; }
.tp-tv .tp-preview-img { width: clamp(280px, 22vw, 440px); border-width: 3px; }
.tp-tv .tp-preview-time { font-size: clamp(16px, 1.3vw, 24px); padding: 5px 12px; }
/* buttons: pills, the focused one white with its name (Netflix) */
.tp-tv .tp-btn {
  width: auto; min-width: 58px; height: 58px; padding: 0 19px; border-radius: 99px; gap: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 24px;
  background: rgba(255, 255, 255, .1); transition: background .18s, color .18s, transform .18s var(--tp-ease), gap .2s;
}
.tp-tv .tp-btn::after {
  content: attr(data-label); max-width: 0; overflow: hidden; white-space: nowrap;
  font-size: 18px; font-weight: 800; transition: max-width .25s var(--tp-ease);
}
.tp-tv .tp-btn:hover { transform: none; }
.tp-tv .tp-btn:is(:focus, :focus-visible, .tv-focus) { outline: none; background: #fff; color: #0a0b0f; transform: scale(1.06); gap: 10px; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); }
.tp-tv .tp-btn:is(:focus, .tv-focus)::after { max-width: 280px; }
.tp-tv .tp-chip { height: 58px; padding: 0 20px; border-radius: 99px; font-size: 17px; background: rgba(255, 255, 255, .1); }
.tp-tv .tp-chip:is(:focus, .tv-focus) { outline: none; background: #fff; color: #0a0b0f; }
.tp-tv .tp-close { min-width: 58px; }
/* subtitles stay clear of the bigger controls */
.tp-tv:not(.tp-idle) .tp-subs { bottom: calc(6% + 22vh); }
.tp-tv .tp-subs { font-size: calc(max(22px, 2.6cqw) * var(--tp-sub-scale, 1)); }
/* the settings menu: larger rows for the remote */
.tp-tv .tp-menu { font-size: 18px; min-width: 380px; }
.tp-tv .tp-mi, .tp-tv .tp-mo { min-height: 56px; }
.tp-tv :is(.tp-mi, .tp-mo, .tp-mh):is(:focus, .tv-focus) { outline: none; background: rgba(255, 255, 255, .9); color: #0a0b0f; }
/* toasts / notices sit above the controls */
.tp-tv .tp-toast { font-size: 18px; }
/* Full screen inside the page: the theater is its own stacking context (isolation), which kept
   the fixed player under the title page that follows it — lift the whole theater above it. */
html.tp-pseudo-fs-on .theater { isolation: auto !important; z-index: 1000 !important; }
html.tp-pseudo-fs-on .promo-bar, html.tp-pseudo-fs-on .site-footer { visibility: hidden; }
/* TV: Dublaj / Altyazılı chips on the right of the top bar, clear of the title */
.tp-tv .tp-langs { left: auto; right: 4vw; top: 3.2vh; }
.tp-tv .tp-lang { height: 46px; padding: 0 18px; font-size: 16px; }
.tp-tv .tp-lang:is(:focus, .tv-focus) { outline: none; background: #fff; color: #0a0b0f; }
