/* Oylama alanının yayın ekranı katmanı.
   live.css ve motion.css'ten sonra yüklenir; oylama bölümünün çıktı kartını
   (eski .compact-side) bir medya oynatıcısına çevirir. Marka renkleri, tipografi
   ve oylama akışı değişmez: A tarafı mavi, B tarafı kırmızı, seçim sarıdır.
   Hareket bölümü html.motion / html.motion-ready ile kademelidir; "az hareket"
   tercihinde styles.css'teki genel kapatma kuralı hepsini durdurur. */

/* ---------- 1. Taraf paleti ---------- */

.duel-side.side-a,.deck.side-a{--side:var(--blue);--side-edge:#344985;--side-skin:#111726;--side-deep:#152860}
.duel-side.side-b,.deck.side-b{--side:var(--red);--side-edge:#6c3235;--side-skin:#231316;--side-deep:#53181d}

.duel-side{
  position:relative;display:flex;flex-direction:column;min-width:0;
  background:var(--side-skin);border:1px solid var(--side-edge);
}
.duel-side.is-selected{border-color:var(--yellow);outline:1px solid var(--yellow)}
.duel-side .compact-person{flex:1}
/* Türkçe büyük harf JS tarafında yapılıyor; CSS "i" harfini bozmasın. */
.duel-side .person-line h3,.compact-heading h3{text-transform:none}
.duel-side .output-title{margin:12px 0 0}
.output-note{
  font-size:11px;line-height:1.6;color:#a5aaba;margin:7px 0 0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.duel-side .choose-output{margin-top:14px}

/* ---------- 2. Künye şeridi ---------- */

.deck{display:flex;flex-direction:column;min-width:0}
.deck-bar{
  display:flex;align-items:center;gap:9px;padding:7px 10px;
  background:#00000038;border-bottom:1px solid #ffffff12;
}
.deck-side{
  flex:none;width:21px;height:21px;display:grid;place-items:center;
  background:var(--side);color:#fff;font:800 15px/1 ArenaDisplay,Impact,sans-serif;
}
.deck-kind{font-size:9px;letter-spacing:1.2px;color:#b3b8c7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.deck-format{
  flex:none;margin-left:auto;padding:4px 7px;
  font:700 9px/1 ArenaSans,Arial,sans-serif;letter-spacing:1.1px;
  background:var(--yellow);color:#0b0b0f;
}

/* ---------- 3. Ekran ---------- */

.deck-screen{
  position:relative;aspect-ratio:16/10;max-height:330px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:radial-gradient(130% 120% at 50% 0%,var(--side-deep) 0%,#0b0b0f 76%);
}
/* Yayın ızgarası: ekranın boş kalan kenarlarını doldurur, içeriği örtmez. */
.deck-screen::before{
  content:'';position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.5;
  background-image:linear-gradient(#ffffff12 1px,transparent 1px),linear-gradient(90deg,#ffffff12 1px,transparent 1px);
  background-size:34px 34px;
  -webkit-mask-image:radial-gradient(72% 72% at 50% 50%,#000,transparent);
  mask-image:radial-gradient(72% 72% at 50% 50%,#000,transparent);
}
.deck-screen>img,.deck-screen>video{
  position:relative;z-index:2;width:100%;height:100%;
  object-fit:contain;display:block;background:transparent;
}
/* Oranı tutmayan görselin kenar boşluğu: aynı görselin bulanık kopyası. */
.deck-backdrop{
  position:absolute;z-index:1;inset:0;pointer-events:none;
  background-size:cover;background-position:50% 50%;
  filter:blur(24px) saturate(1.25) brightness(.5);transform:scale(1.12);
}
.deck-screen>audio{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.deck-empty{position:relative;z-index:1;padding:20px;text-align:center;font-size:11px;line-height:1.6;color:#9ea3b2}

/* Ekranın tamamı tek bir hedef: medyada oynat/duraklat, görselde büyüt,
   belge ve bağlantıda dosyayı açar. Metin paneli kaydırılabilir kalsın diye
   metin çıktısına bu katman eklenmez. */
.deck-hit{position:absolute;inset:0;z-index:4;width:100%;height:100%;background:transparent;padding:0;display:block}
.deck-hit:focus-visible{outline:3px solid var(--yellow);outline-offset:-5px}

.deck-cue{
  position:absolute;z-index:3;left:50%;top:50%;translate:-50% -50%;
  width:62px;height:62px;border-radius:50%;pointer-events:none;
  background:#0b0b0fbf;border:2px solid var(--yellow);
}
.deck-cue::after{
  content:'';position:absolute;left:55%;top:50%;translate:-50% -50%;
  border-left:17px solid var(--yellow);border-block:11px solid transparent;
}
.deck.is-playing .deck-cue{opacity:0}

.deck-glare{
  position:absolute;inset:0;z-index:5;pointer-events:none;
  background:linear-gradient(115deg,transparent 40%,#ffffff26 50%,transparent 60%);
  transform:translateX(-130%);
}
.deck-stamp{
  position:absolute;z-index:6;right:9px;top:9px;pointer-events:none;opacity:0;
  padding:5px 9px;background:var(--yellow);color:#0b0b0f;
  font:800 13px/1 ArenaDisplay,Impact,sans-serif;letter-spacing:.6px;
  transform:translateY(-10px) rotate(-3deg);
}
.duel-side.is-selected .deck-stamp{opacity:1;transform:rotate(-3deg)}
.theater .deck-stamp{display:none}

/* ---------- 4. Kontrol çubuğu ---------- */

.deck-controls{
  display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 8px;
  background:#00000040;border-top:1px solid #ffffff12;
}
.deck-button{
  flex:none;width:32px;height:32px;display:grid;place-items:center;padding:0;
  background:#ffffff0f;color:var(--white);border:0;border-radius:2px;
}
.deck-button svg{width:17px;height:17px;fill:currentColor}
.deck-button svg .stroke{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.deck-play{background:var(--yellow);color:#0b0b0f}
.deck-hint{flex:1;min-width:0;margin:0;font-size:10px;color:#a9aebd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.deck-time{flex:none;font-size:10px;color:#c3c7d4;font-variant-numeric:tabular-nums}

.deck-track{position:relative;flex:1;min-width:44px;height:18px;display:flex;align-items:center}
.deck-rail,.deck-buffer,.deck-fill{position:absolute;left:0;height:4px;border-radius:2px;pointer-events:none}
.deck-rail{right:0;background:#ffffff1f}
.deck-buffer{width:calc(var(--b,0) * 100%);background:#ffffff33}
.deck-fill{width:calc(var(--p,0) * 100%);background:var(--yellow)}
.deck-fill::after{
  content:'';position:absolute;right:-5px;top:50%;translate:0 -50%;
  width:10px;height:10px;border-radius:50%;background:var(--yellow);
}
/* Görünmez aralık girdisi: klavye ve dokunma erişimini standart bırakır,
   görsel çubuk yukarıdaki katmanlarla çizilir. */
.deck-seek{-webkit-appearance:none;appearance:none;position:absolute;inset:0;width:100%;margin:0;opacity:0;background:transparent;cursor:pointer}
.deck-track:has(.deck-seek:focus-visible){outline:3px solid var(--yellow);outline-offset:5px}

/* ---------- 5. Ses çıktısı: seviye çubukları ---------- */

.deck-wave{position:relative;z-index:1;display:flex;align-items:flex-end;justify-content:center;gap:5px;width:min(74%,320px);height:44%}
.deck-wave i{flex:1;max-width:8px;background:linear-gradient(180deg,var(--yellow),var(--side));transform-origin:50% 100%;height:26%}
.deck-wave i:nth-child(3n){height:54%}
.deck-wave i:nth-child(4n){height:80%}
.deck-wave i:nth-child(5n){height:40%}
/* Ses ekranında oynat düğmesi çubukların üstüne binmesin. */
.deck[data-kind=audio] .deck-wave{position:absolute;left:50%;translate:-50% 0;bottom:13%;height:34%}
.deck[data-kind=audio] .deck-cue{top:37%}

/* ---------- 6. Belge çıktısı ---------- */

.deck-doc{position:relative;z-index:1;width:112px;height:66%;max-height:158px}
.doc-sheet{position:absolute;inset:0;background:#e7e7ee;border:1px solid #b5b5c1}
.deck-doc .doc-sheet:nth-child(1){transform:rotate(-7deg) translate(-9px,4px);opacity:.3}
.deck-doc .doc-sheet:nth-child(2){transform:rotate(4deg) translate(8px,2px);opacity:.55}
.doc-front{display:flex;flex-direction:column;justify-content:space-between;padding:12px 10px;background:#f5f5f8;color:#16161c}
.doc-front::after{content:'';position:absolute;right:-1px;top:-1px;width:20px;height:20px;background:linear-gradient(225deg,#0b0b0f 50%,transparent 50%)}
.doc-front b{font:800 24px/1 ArenaDisplay,Impact,sans-serif;color:var(--red)}
.doc-front em{
  font-style:normal;font-size:9px;line-height:1.45;color:#4a4a55;word-break:break-word;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}

/* ---------- 7. Metin çıktısı ---------- */

.deck-text{
  position:absolute;z-index:1;inset:0;padding:18px 20px;overflow:auto;
  font-size:12.5px;line-height:1.75;color:#d7dae5;scrollbar-width:thin;
  -webkit-mask-image:linear-gradient(#000 84%,transparent);
  mask-image:linear-gradient(#000 84%,transparent);
}
.deck-text p{margin:0 0 11px;white-space:pre-wrap}
.deck-text p:last-child{margin-bottom:0}

/* ---------- 8. Canlı çalışma bağlantısı ---------- */

.deck-web{position:relative;z-index:1;width:min(78%,300px);background:#15151c;border:1px solid #3a3a48;box-shadow:0 14px 30px #00000066}
.web-chrome{display:flex;align-items:center;gap:5px;padding:7px 9px;background:#22222c;border-bottom:1px solid #3a3a48}
.web-chrome i{flex:none;width:7px;height:7px;border-radius:50%;background:#4a4a58}
.web-host{margin-left:6px;min-width:0;font-size:9px;color:#b1b6c4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.web-body{display:flex;flex-direction:column;gap:6px;padding:22px 14px;text-align:center}
.web-body strong{font:800 20px/1 ArenaDisplay,Impact,sans-serif;color:var(--yellow)}
.web-body small{font-size:10px;color:#a6abba}

/* ---------- 9. Tiyatro penceresi ---------- */

.theater{
  width:min(1200px,calc(100% - 28px));max-width:none;max-height:calc(100dvh - 28px);
  padding:0;overflow:hidden;background:#0c0c11;border:1px solid #3a3a46;border-radius:6px;
  color:var(--white);
}
/* Yerlesim yalnizca acikken: dialog'un kapali halini gizleyen tarayici kurali
   yazar katmanindaki bir display bildirimi tarafindan eziliyor; kutu sayfanin
   altinda bos bir cerceve olarak goruluyordu. */
.theater[open]{display:flex;flex-direction:column}
.theater::backdrop{background:#04040ae6;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.theater-top{display:flex;align-items:center;gap:14px;padding:13px 16px;border-bottom:1px solid #26262f}
.theater-code{flex:none;font-size:10px;letter-spacing:1.4px;color:var(--yellow)}
.theater-title{min-width:0;font:800 clamp(19px,2.3vw,29px)/1.08 ArenaDisplay,Impact,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.theater-top .icon-button{margin-left:auto}
.theater-stage{flex:1;min-height:0;padding:16px;overflow:auto}
.theater-stage .deck{background:#0f0f15;border:1px solid #2b2b36}
.theater-stage .deck-screen{aspect-ratio:auto;max-height:none;height:min(58dvh,620px)}
.theater-stage .deck-screen>img{object-fit:contain}
.theater-foot{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid #26262f;background:#0f0f15}
.theater-switch{flex:none;display:flex;gap:6px}
.theater-nav{min-height:40px;padding:9px 13px;border-radius:2px;font-size:11px;background:#1b1b24;border:1px solid #33333f;color:#c7cad6}
.theater-nav[aria-pressed=true]{background:var(--white);color:#0b0b0f;border-color:var(--white)}
.theater-note{
  flex:1;min-width:170px;margin:0;font-size:11px;line-height:1.6;color:#a5aaba;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.theater-pick{flex:none;min-height:44px;padding:12px 18px;border-radius:2px;background:var(--yellow);color:#0b0b0f;font:700 11px ArenaSans,Arial,sans-serif;letter-spacing:.3px}

/* ---------- 10. Hareket ---------- */

html.motion .deck-cue{transition:opacity .28s var(--ease),transform .4s var(--ease)}
html.motion .deck.is-playing .deck-cue{transform:scale(.55)}
html.motion .deck-glare{transition:transform .8s var(--ease)}
html.motion .deck-stamp{transition:opacity .35s var(--ease),transform .45s cubic-bezier(.2,1.4,.4,1)}
html.motion .deck-button{transition:background-color .2s,color .2s,transform .2s var(--ease)}
html.motion .deck-fill,html.motion .deck-buffer{transition:width .18s linear}
html.motion .theater-nav,html.motion .theater-pick{transition:background-color .2s,color .2s,border-color .2s,transform .2s var(--ease)}
html.motion .duel-side{transition:border-color .2s ease-out,transform .3s var(--ease),box-shadow .3s var(--ease)}
html.motion .duel-side.is-selected{animation:deck-lock .55s cubic-bezier(.2,1.3,.4,1)}
@keyframes deck-lock{from{box-shadow:0 0 0 0 #fbbc0466}to{box-shadow:0 0 0 15px #fbbc0400}}

/* Yayındaki çıktı: künye rozetinde kayıt ışığı. */
html.motion .deck.is-playing .deck-format{animation:deck-signal 1.6s ease-in-out infinite}
@keyframes deck-signal{0%,100%{box-shadow:0 0 0 0 #fbbc0400}50%{box-shadow:0 0 0 5px #fbbc041f}}
html.motion .deck.is-playing .deck-fill::after{box-shadow:0 0 0 5px #fbbc0433}

/* Ses seviyesi yalnızca çalarken oynar. */
html.motion .deck.is-playing .deck-wave i{animation:deck-level .9s ease-in-out infinite alternate}
html.motion .deck.is-playing .deck-wave i:nth-child(2n){animation-duration:1.25s}
html.motion .deck.is-playing .deck-wave i:nth-child(3n){animation-duration:.72s}
html.motion .deck.is-playing .deck-wave i:nth-child(4n){animation-duration:1.05s}
html.motion .deck.is-playing .deck-wave i:nth-child(5n){animation-duration:.85s}
@keyframes deck-level{from{transform:scaleY(.35)}to{transform:scaleY(1.9)}}

/* Kart görünüme girerken: taraflar kendi kenarından gelir, ekran açılır. */
html.motion-ready .compact-matchup .duel-side{
  opacity:0;
  transition:opacity .62s var(--ease),transform .62s var(--ease),border-color .2s ease-out,box-shadow .3s var(--ease);
}
html.motion-ready .compact-matchup .duel-side.side-a{transform:translateX(-26px)}
html.motion-ready .compact-matchup .duel-side.side-b{transform:translateX(26px)}
html.motion-ready .compact-matchup.in-view .duel-side{opacity:1;transform:none}
html.motion-ready .compact-matchup .deck-screen{clip-path:inset(46% 0 46% 0)}
html.motion-ready .compact-matchup.in-view .deck-screen{clip-path:inset(0 0 0 0);transition:clip-path .62s var(--ease) .12s}
html.motion-ready .compact-matchup .deck-bar>*,
html.motion-ready .compact-matchup .deck-controls>*{opacity:0}
html.motion-ready .compact-matchup.in-view .deck-bar>*,
html.motion-ready .compact-matchup.in-view .deck-controls>*{opacity:1;transition:opacity .45s var(--ease) .4s}

/* Tiyatro açılışı */
html.motion .theater[open]{animation:theater-in .34s var(--ease)}
html.motion .theater[open]::backdrop{animation:theater-fade .34s var(--ease)}
@keyframes theater-in{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}
@keyframes theater-fade{from{opacity:0}to{opacity:1}}

@media(hover:hover) and (pointer:fine){
  html.motion .duel-side:hover{transform:translateY(-3px);box-shadow:0 12px 26px #00000099}
  html.motion .duel-side.side-a:hover{border-color:var(--blue)}
  html.motion .duel-side.side-b:hover{border-color:var(--red)}
  html.motion .duel-side:hover .deck-glare{transform:translateX(130%)}
  html.motion .deck-button:hover{background:#ffffff26}
  html.motion .deck-play:hover{background:#ffd146}
  html.motion .theater-nav:hover{border-color:var(--yellow);color:var(--white)}
  html.motion .theater-pick:hover{background:#ffd146;transform:translateY(-2px)}
  html.motion .deck-screen:has(.deck-hit:hover) .deck-cue{transform:scale(1.07)}
  html.motion .deck.is-playing .deck-screen:has(.deck-hit:hover) .deck-cue{transform:scale(.55)}
}

/* ---------- 11. Dar ekran ---------- */

@media(max-width:1000px){
  .deck-screen{aspect-ratio:16/11}
  .deck-kind{display:none}
  .deck-cue{width:52px;height:52px}
  .deck-cue::after{border-left-width:14px;border-block-width:9px}
}

/* Telefonda iki taraf alt alta: ekranlar okunaklı kalsın. */
@media(max-width:620px){
  .compact-versus{grid-template-columns:minmax(0,1fr);gap:10px}
  .motion-vs{height:40px}
  .motion-vs::before{inset:auto 0;width:auto;height:2px;transform:skewY(-2deg)}
  html.motion .motion-vs::after{width:44px;height:44px}
  html.motion-ready .compact-matchup .duel-side.side-a,
  html.motion-ready .compact-matchup .duel-side.side-b{transform:translateY(16px)}
  /* 03.10.2026: yukarıdaki kural .in-view ile eşit öncelikte ve sonra geldiği için
     kartlar yerine hiç oturmuyor, "Örnek içerik…" yazısının üstüne biniyordu. */
  html.motion-ready .compact-matchup.in-view .duel-side.side-a,
  html.motion-ready .compact-matchup.in-view .duel-side.side-b{transform:none}
  .compact-vote-footer{padding-top:16px}
  .deck-screen{aspect-ratio:16/10}
  .deck-kind{display:block}
  .duel-side .compact-person{padding:14px}
  .duel-side .output-title{font-size:12px}
  .output-note{font-size:11px}
  .theater{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}
  .theater-top{padding:11px 13px;gap:10px}
  .theater-stage{padding:11px}
  .theater-stage .deck-screen{height:min(44dvh,380px)}
  .theater-foot{padding:11px 13px;gap:10px}
  .theater-switch{flex:1 1 100%}
  .theater-nav{flex:1;padding:9px 8px;min-height:44px}
  .theater-note{flex:1 1 100%;min-width:0}
  .theater-pick{flex:1 1 100%;text-align:center}
}
