/* Klipler sayfası. app.css'teki tokenları (.btn, .top, .who, .av, .x) kullanır; yalnız .kl-page altında geçerli. */

.kl { padding: 12px 32px 96px; max-width: 1360px; margin: 0 auto; }

/* başlık */
.kl-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 8px 0 24px; }
.kl-head h1 { font: 900 clamp(40px, 6vw, 72px)/0.95 var(--display); letter-spacing: -0.03em; margin: 0 0 8px; }
.kl-head p { margin: 0; color: var(--fg-2); font-size: 16px; }

/* sıralama sekmeleri */
.kl-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.kl-tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.kl-tab {
  appearance: none; border: 0; background: transparent; color: var(--fg-2); cursor: pointer;
  min-height: 38px; padding: 0 18px; border-radius: 999px; font: 600 15px/1 var(--text);
  transition: color 0.15s, background-color 0.2s, scale 0.16s var(--hk-out, ease-out);
}
.kl-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.kl-tab:active { scale: 0.97; }
.kl-tab[aria-pressed='true'] { color: var(--ink); background: #fff; }
.kl-tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.who-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 14px; }
.who-chip .av { width: 22px; height: 22px; font-size: 11px; }
.who-chip .x { width: 26px; height: 26px; display: grid; place-items: center; text-decoration: none; border-radius: 999px; }
.kl-note { margin: -8px 0 16px; color: var(--fg-3); font-size: 14px; }
.kl-people { display: flex; gap: 6px; min-width: 0; flex: 1 1 320px; overflow-x: auto; scrollbar-width: none; justify-content: end; }
.kl-people::-webkit-scrollbar { display: none; }
.pp {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px 0 6px; border-radius: 999px;
  color: var(--fg-2); text-decoration: none; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.pp:hover { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.pp:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pp .av { width: 26px; height: 26px; font-size: 11px; }
.pp span { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp b { font-size: 12px; color: var(--fg-3); font-weight: 600; }

/* ortak satırlar */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-2); white-space: nowrap; }
.tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--fg-3)); }
.when { font-size: 13px; color: var(--fg-3); white-space: nowrap; }
.by { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 14px; }
.by:hover span { text-decoration: underline; text-underline-offset: 3px; }
.by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.by .av { width: 24px; height: 24px; font-size: 11px; }
.clip-row { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.clip-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* beğeni ve yorum hapları */
.like, .cmt {
  appearance: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  min-height: 34px; padding: 0 12px 0 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); color: var(--fg);
  font: 600 14px/1 var(--text);
  transition: background-color 0.15s, border-color 0.15s, scale 0.16s var(--hk-out, ease-out);
}
.like:hover, .cmt:hover { background: rgba(255, 255, 255, 0.1); }
.like:active, .cmt:active { scale: 0.95; }
.like svg, .cmt svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.like[aria-pressed='true'] { color: #fff; background: rgba(229, 32, 45, 0.18); border-color: rgba(255, 59, 63, 0.55); }
.like[aria-pressed='true'] svg { fill: var(--red-hi); stroke: var(--red-hi); }
.like.big, .cmt.big { min-height: 42px; padding: 0 16px 0 13px; font-size: 16px; }
.like.big svg, .cmt.big svg { width: 20px; height: 20px; }
.like.pop svg { animation: kl-pop 380ms var(--hk-out, ease-out); }
@keyframes kl-pop { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 100% { transform: scale(1); } }

/* kapak: resim, yoksa harita zemini; önizleme videosu üstüne yumuşakça biner */
.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.ph {
  background:
    linear-gradient(180deg, rgba(10, 9, 13, 0.25), rgba(10, 9, 13, 0.75)),
    var(--img, none) center / cover,
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--c, #4a4655) 55%, transparent), transparent 70%),
    #16141b;
}
.peek { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity 0.22s var(--hk-out, ease-out); }
.peek.on { opacity: 1; }
.clip-media > span:not(.thumb), .hero-media > span:not(.thumb) { z-index: 2; }

/* haftanın klibi */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 0;
  border-radius: 32px; overflow: hidden; margin-bottom: 32px; isolation: isolate;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(255, 110, 80, 0.45), transparent 60%),
    linear-gradient(135deg, #c51a26 0%, #8e0b16 60%, #4d0610 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 40px 80px -40px rgba(229, 32, 45, 0.7);
}
.hero-media { position: relative; display: block; padding: 0; border: 0; cursor: pointer; background: #16141b; aspect-ratio: 16 / 9; overflow: hidden; }
.hero-media::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 40%); }
.hero-play {
  position: absolute; left: 24px; bottom: 24px; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--ink);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.7);
  transition: scale 0.2s var(--hk-out, ease-out), opacity 0.2s;
}
.hero-play svg { width: 26px; height: 26px; fill: currentColor; margin-left: 3px; }
.hero-media:hover .hero-play { scale: 1.06; }
.hero-media:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.hero-body { padding: 28px; display: grid; align-content: end; gap: 14px; min-width: 0; }
.hero-kicker { display: flex; align-items: center; gap: 12px; margin: 0; font: 700 15px/1.2 var(--display); color: rgba(255, 255, 255, 0.85); }
.crown { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #fff; color: var(--red); font: 900 24px/1 var(--display); }
.hero-title {
  font: 800 clamp(22px, 2vw, 30px)/1.12 var(--display); letter-spacing: -0.015em; margin: 0;
  text-wrap: balance; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.hero .when, .hero .tag { color: rgba(255, 255, 255, 0.75); }
.hero .like, .hero .cmt { border-color: rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.18); }
.hero .like[aria-pressed='true'] { background: #fff; color: var(--red); border-color: #fff; }
.hero .like[aria-pressed='true'] svg { fill: var(--red); stroke: var(--red); }

/* kart ızgarası */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 20px; }
.clip { min-width: 0; display: grid; gap: 12px; align-content: start; }
.clip-media {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #16141b;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.clip-media::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent 45%); }
.clip-play {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: var(--ink);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.8);
  opacity: 0; scale: 0.9; transition: opacity 0.16s ease, scale 0.2s var(--hk-out, ease-out);
  pointer-events: none;
}
.clip-play svg { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.clip-media:hover .clip-play, .clip-media:focus-visible .clip-play { opacity: 1; scale: 1; }
@media (hover: none) { .clip-play { opacity: 0.9; scale: 1; width: 44px; height: 44px; margin: -22px 0 0 -22px; } }
.clip-media:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9), inset 0 0 0 2px rgba(255, 255, 255, 0.5); }
.clip-media:active { scale: 0.98; }
.clip-media:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.rank {
  position: absolute; left: 12px; bottom: 6px; font: 900 56px/1 var(--display); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, 0.9); text-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.dur {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.7); font-size: 12px; font-weight: 600; pointer-events: none;
}
.clip-body { display: grid; gap: 8px; min-width: 0; }
.clip-title {
  margin: 0; font: 700 17px/1.25 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}

/* boş durum */
.kl-empty {
  display: grid; justify-items: start; gap: 12px; padding: 48px; border-radius: 32px;
  border: 1px dashed rgba(255, 255, 255, 0.2); background: var(--surface);
}
.kl-empty h2 { margin: 0; font: 800 28px/1.1 var(--display); letter-spacing: -0.01em; }
.kl-empty p { margin: 0 0 8px; color: var(--fg-2); max-width: 52ch; }
.kl-page .gate { max-width: 560px; margin: 72px auto; padding: 0 16px; text-align: center; }
.kl-page .gate p { color: var(--fg-2); margin-bottom: 24px; }

/* maçlardan anlar (video değil: raunt + demo) */
.mo-wrap { margin-top: 48px; display: grid; gap: 16px; }
.mo-titles h2 { margin: 0 0 6px; font: 800 28px/1.1 var(--display); letter-spacing: -0.01em; }
.mo-titles p { margin: 0; max-width: 72ch; color: var(--fg-2); font-size: 15px; line-height: 1.5; }
.mo-match { border-radius: 24px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.mo-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.mo-score { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.mo-score b { font: 700 16px/1.2 var(--display); }
.mo-score b .mono { padding: 0 4px; }
.mo-list { list-style: none; margin: 0; padding: 6px 0; }
.mo {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 130px; align-items: center; gap: 16px;
  min-height: 52px; padding: 6px 16px 6px 20px;
}
.mo + .mo { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.mo-kind {
  display: grid; place-items: center; height: 30px; border-radius: 10px; font: 800 14px/1 var(--display);
  color: var(--fg); background: rgba(255, 255, 255, 0.08);
}
.mo-kind.ace { background: var(--red); color: #fff; box-shadow: 0 8px 20px -10px rgba(229, 32, 45, 0.9); }
.mo-kind.k4 { background: #fff; color: var(--ink); }
.mo-kind.clutch { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.mo-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mo-what { color: var(--fg-2); font-size: 14px; white-space: nowrap; }
.mo-round { color: var(--fg-3); font-size: 13px; white-space: nowrap; }
.mo-act { display: flex; justify-content: end; }

/* ---------- pencereler ---------- */
.kl-dlg {
  padding: 0; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 28px; color: var(--fg);
  background: linear-gradient(170deg, #1a1720, #0f0e13); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
  max-width: calc(100vw - 48px); max-height: calc(100vh - 48px); overflow: hidden;
  opacity: 1; transform: none;
  transition: opacity 0.2s var(--hk-out, ease-out), transform 0.24s var(--hk-out, ease-out), overlay 0.24s allow-discrete, display 0.24s allow-discrete;
}
.kl-dlg::backdrop { background: rgba(6, 5, 9, 0.78); backdrop-filter: blur(10px); transition: opacity 0.2s; opacity: 1; }
@starting-style {
  .kl-dlg[open] { opacity: 0; transform: scale(0.96) translateY(8px); }
  .kl-dlg[open]::backdrop { opacity: 0; }
}
.kl-dlg:not([open]) { opacity: 0; transform: scale(0.98); }
.kl-dlg h2 { margin: 0; font: 800 22px/1.15 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kl-dlg .x { flex: none; font-size: 22px; width: 36px; height: 36px; }

/* izleme */
.kl-view { width: min(1400px, calc(100vw - 48px)); }
.v-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: min(760px, calc(100vh - 48px)); }
.v-player { background: #000; display: grid; place-items: center; min-width: 0; min-height: 0; }
.v-player video { width: 100%; height: 100%; max-height: 100%; object-fit: contain; display: block; outline: none; }
.v-side { display: flex; flex-direction: column; gap: 14px; padding: 20px; min-width: 0; min-height: 0; border-left: 1px solid var(--line); }
.v-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.v-sub { margin: 8px 0 0; font: 700 15px/1 var(--display); display: flex; align-items: baseline; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.v-sub small { font: 500 13px/1 var(--text); color: var(--fg-3); }
.v-cmts { flex: 1; min-height: 80px; overflow-y: auto; overscroll-behavior: contain; margin-right: -8px; padding-right: 8px; }
.cmts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cmt-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.cmt-row .av { width: 28px; height: 28px; font-size: 12px; }
.cmt-txt p { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cmt-txt p:first-child { margin-bottom: 2px; }
.cmt-txt a { color: #fff; font-weight: 600; text-decoration: none; }
.cmt-txt a:hover { text-decoration: underline; }
.cmt-row .x { width: 28px; height: 28px; font-size: 16px; opacity: 0; transition: opacity 0.15s; }
.cmt-row:hover .x, .cmt-row .x:focus-visible { opacity: 1; }
.v-form { display: flex; gap: 8px; }
.v-form input { flex: 1; min-width: 0; }
.btn.danger:hover { background: var(--red); border-color: var(--red); }

/* yükleme */
.kl-up { width: min(960px, calc(100vw - 48px)); }
.up-form { padding: 24px; display: grid; gap: 20px; max-height: calc(100vh - 48px); overflow-y: auto; }
.up-head { display: flex; align-items: center; justify-content: space-between; }
.up-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
.up-main { display: grid; gap: 14px; align-content: start; }
.up-main .fld { font-size: 14px; }
.opt { color: var(--fg-3); }
.drop {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 20px; cursor: pointer; overflow: hidden;
  border: 1.5px dashed rgba(255, 255, 255, 0.28); background: rgba(0, 0, 0, 0.3);
  transition: border-color 0.15s, background-color 0.15s;
}
.drop:hover, .drop.over { border-color: #fff; background: rgba(255, 255, 255, 0.05); }
.drop.has { border-style: solid; border-color: var(--line); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.drop-txt { display: grid; gap: 6px; text-align: center; padding: 16px; pointer-events: none; }
.drop-txt b { font: 800 20px/1.2 var(--display); }
.drop-txt span { color: var(--fg-2); font-size: 14px; }
.drop-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.prog { position: relative; height: 36px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.prog-bar { position: absolute; inset: 0; background: linear-gradient(90deg, var(--red), var(--red-hi)); transform-origin: left; transform: scaleX(0); transition: transform 0.25s linear; }
.prog-txt { position: relative; display: flex; align-items: center; height: 100%; padding: 0 14px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.up-acts { display: flex; gap: 8px; }
.howto { padding: 20px; border-radius: 20px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); align-self: start; }
.howto h3 { margin: 0 0 6px; font: 800 17px/1.2 var(--display); }
.howto-lead { margin: 0 0 14px; color: var(--fg-2); font-size: 14px; }
.howto ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.howto li { counter-increment: s; position: relative; min-height: 26px; padding: 3px 0 0 36px; font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.howto li::before {
  content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); color: #fff; font: 800 13px/1 var(--display);
}
.howto li:last-child::before { background: var(--red); }
.howto li b { color: #fff; font-weight: 600; }
.howto i { font-style: normal; color: #fff; }
.howto-fine { margin: 14px 0 0; font-size: 13px; color: var(--fg-3); }

/* açılış: başlık, sekmeler, liste sırayla */
@media (prefers-reduced-motion: no-preference) {
  .kl-head { animation: hk-gir 0.4s var(--hk-out, ease-out) both; }
  .kl-bar { animation: hk-gir 0.4s 0.05s var(--hk-out, ease-out) both; }
  .hero { animation: hk-gir 0.5s 0.1s var(--hk-out, ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
  .kl-dlg, .kl-dlg::backdrop { transition: none; }
  .like.pop svg { animation: none; }
}

/* ---------- dar ekran ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-body { padding: 24px; }
  .v-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 48px); }
  .v-player { aspect-ratio: 16 / 9; }
  .v-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .kl { padding-left: 16px; padding-right: 16px; }
  .kl-head { flex-direction: column; align-items: start; }
  .kl-people { flex-basis: 100%; justify-content: start; margin: 0 -16px; padding: 0 16px; }
  .up-cols { grid-template-columns: minmax(0, 1fr); }
  .kl-dlg { max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 20px; }
  .kl-view, .kl-up { width: calc(100vw - 16px); }
  .v-wrap { height: calc(100vh - 16px); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .kl-empty { padding: 28px 20px; }
  .mo { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .mo-what { display: none; }
  .mo-act { grid-column: 2 / -1; justify-content: start; }
  .mo-act:empty { display: none; }
}
