/* Bora arayüzünün canlı kopyası (Görünüm bölümü).
   Renkler Bora.App/Themes/LightTheme.xaml ve DarkTheme.xaml'daki değerlerin aynısıdır.
   Tasarım 1100×680 sabit ölçüde yapılır; JS kapsayıcı genişliğine göre ölçekler. */

.live { position: relative; width: 100%; aspect-ratio: 1100 / 680; }
.live-scale { position: absolute; left: 0; top: 0; width: 1100px; height: 680px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.live-note { margin-top: 14px; font-size: .82rem; color: #8a8a93; }

.bw {
  --acc: #D0031C; --acc-h: #E0142C; --acc-soft: rgba(208,3,28,.08);
  --bg: #F3F3F5; --panel: #FFFFFF; --alt: #F7F7F9; --sel: #F1F1F4; --hov: #F8F8FA; --track: #E7E7EB;
  --bd: #E3E3E8; --bd2: #D3D4DA; --t1: #1A1B1F; --t2: #5D606A; --t3: #8D909A;
  --ok: #1F9A5C; --ok-soft: rgba(31,154,92,.10); --info: #2F6FED; --info-soft: rgba(47,111,237,.09);
  --warn: #B9780C; --warn-soft: rgba(232,160,40,.14); --title: #F3F3F5;
  position: relative; width: 1100px; height: 680px; border-radius: 10px; overflow: hidden; background: var(--bg); color: var(--t1);
  font: 400 12.5px/1.35 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif; letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(13,13,16,.08), 0 40px 90px -30px rgba(13,13,16,.45), 0 16px 32px -16px rgba(13,13,16,.25);
  user-select: none; -webkit-user-select: none; cursor: default;
}
.bw[data-theme="dark"] {
  --acc: #E5243B; --acc-h: #F03A50; --acc-soft: rgba(229,36,59,.14);
  --bg: #141518; --panel: #1B1C20; --alt: #222328; --sel: #26272D; --hov: #1F2025; --track: #2E3036;
  --bd: #2D2F35; --bd2: #383A41; --t1: #ECECEE; --t2: #A0A2AB; --t3: #6E717B;
  --ok: #3FB97A; --ok-soft: rgba(63,185,122,.14); --info: #5AA0FF; --info-soft: rgba(90,160,255,.13);
  --warn: #E8A93A; --warn-soft: rgba(232,169,58,.14); --title: #141518;
}
.bw, .bw * { transition: background-color .45s ease, border-color .45s ease, color .45s ease, fill .45s ease; }
.bw svg { display: inline-block; }

/* başlık çubuğu */
.bw-title { height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; background: var(--title); font-size: 12px; color: var(--t1); }
.bw-title .ic { width: 14px; height: 14px; }
.bw-title .ctl { margin-left: auto; display: flex; height: 100%; }
.bw-title .ctl span { width: 46px; display: grid; place-items: center; color: var(--t2); }
.bw-title .ctl svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 1.1; }

.bw-body { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 1fr 34px; height: calc(100% - 30px); }

/* kenar çubuğu */
.bw-side { grid-row: 1 / 3; background: var(--panel); border-right: 1px solid var(--bd); display: flex; flex-direction: column; padding: 14px 10px 10px; }
.bw-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; }
.bw-brand svg { width: 26px; height: 26px; }
.bw-brand b { display: block; font-size: 14px; font-weight: 600; }
.bw-brand small { display: block; font-size: 10.5px; color: var(--t3); }
.bw-new { height: 34px; border-radius: 6px; background: var(--acc); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 12.5px; margin-bottom: 18px; }
.bw-new svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 2; fill: none; }
.bw-label { font-size: 10px; color: var(--t3); letter-spacing: .04em; padding: 0 8px 6px; }
.bw-nav { display: flex; align-items: center; gap: 10px; height: 32px; border-radius: 6px; padding: 0 8px; color: var(--t2); position: relative; margin-bottom: 2px; cursor: pointer; }
.bw-nav svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.bw-nav .n { margin-left: auto; font-size: 11px; color: var(--t3); }
.bw-nav.on { background: var(--sel); color: var(--t1); font-weight: 600; }
.bw-nav.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--acc); }
.bw-side .sp { flex: 1; }
.bw-side hr { border: 0; border-top: 1px solid var(--bd); margin: 6px 4px 8px; }
.bw-ver { font-size: 10.5px; color: var(--t3); padding: 8px 8px 0; }

/* ana alan */
.bw-main { padding: 18px 20px 12px; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.bw-page { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.bw-page[hidden] { display: none; }
.bw-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.bw-head h4 { margin: 0; font: 600 19px/1 "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; color: var(--t1); }
.bw-seg { display: flex; padding: 3px; border-radius: 7px; background: var(--alt); border: 1px solid var(--bd); }
.bw-seg span { padding: 5px 10px; border-radius: 5px; font-size: 11.5px; font-weight: 600; color: var(--t2); }
.bw-seg span i { font-style: normal; font-weight: 400; color: var(--t3); margin-left: 3px; }
.bw-seg span.on { background: var(--panel); color: var(--t1); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.bw-search { margin-left: auto; width: 250px; height: 30px; border-radius: 6px; border: 1px solid var(--bd2); background: var(--panel); display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--t3); font-size: 11.5px; }
.bw-search svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.bw-tools { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; color: var(--t1); font-size: 12px; }
.bw-tools span { display: inline-flex; align-items: center; gap: 6px; }
.bw-tools svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.bw-tools .div { width: 1px; height: 16px; background: var(--bd2); }
.bw-tools .red { color: var(--acc); }
.bw-tools .hint { margin-left: auto; color: var(--t3); font-size: 11px; }

/* tablo */
.bw-card { background: var(--panel); border: 1px solid var(--bd); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.bw-table { flex: 1; min-height: 0; }
.bw-th, .bw-tr { display: grid; align-items: center; padding: 0 12px; gap: 12px; }
.files .bw-th, .files .bw-tr { grid-template-columns: minmax(0, 2.3fr) 1.35fr 1fr .62fr .62fr .7fr; }
.yt .bw-th, .yt .bw-tr { grid-template-columns: minmax(0, 2.6fr) 1.5fr 1.15fr .7fr .6fr; }
.bw-th { height: 34px; font-size: 11.5px; font-weight: 600; color: var(--t1); border-bottom: 1px solid var(--bd); }
.bw-tr { height: 50px; border-bottom: 1px solid var(--bd); font-size: 12px; position: relative; }
.bw-tr.sel { background: var(--sel); }
.bw-tr.sel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); }
.bw-tr.enter { animation: rowIn .6s cubic-bezier(.2,.7,.1,1); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-10px); background: var(--acc-soft); } }
.bw-tr.leave { animation: rowOut .5s ease forwards; }
@keyframes rowOut { to { opacity: 0; height: 0; } }
.bw-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bw-name > div { min-width: 0; }
.bw-badge { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: 8.5px; font-weight: 700; flex: none; }
.bw-name b { display: block; font-weight: 600; font-size: 12.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--t1); }
.bw-name small { display: block; font-size: 11px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-thumb { width: 58px; height: 33px; border-radius: 5px; flex: none; position: relative; overflow: hidden; }
.bw-thumb::after { content: "4K"; position: absolute; right: 3px; bottom: 2px; font-size: 7.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 0 3px; border-radius: 2px; }
.bw-thumb.mp3::after { content: "MP3"; }
.bw-prog { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; font-size: 11px; color: var(--t2); }
.bw-bar { grid-column: 1 / 3; height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bw-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--acc); }
.bw-bar.done i { background: var(--ok); }
.bw-bar.ind i { width: 35% !important; animation: ind 1.1s ease-in-out infinite; background: var(--info); }
@keyframes ind { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.bw-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.bw-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bw-chip.ok { color: var(--ok); background: var(--ok-soft); }
.bw-chip.run { color: var(--info); background: var(--info-soft); }
.bw-chip.run::before { animation: pulse 1s ease-in-out infinite; }
.bw-chip.wait { color: var(--warn); background: var(--warn-soft); }
@keyframes pulse { 50% { opacity: .25; } }
.bw-num { font-variant-numeric: tabular-nums; color: var(--t1); }
.bw-dim { color: var(--t3); }

/* ayrıntı paneli */
.bw-detail { margin-top: 12px; padding: 14px 16px; display: grid; grid-template-columns: 1fr 24px 320px; transform-origin: bottom; }
.bw-detail[hidden] { display: none; }
.bw-detail.show { animation: detIn .5s cubic-bezier(.2,.7,.1,1); }
@keyframes detIn { from { opacity: 0; transform: translateY(14px); } }
.bw-detail b.fn { font-size: 13px; font-weight: 600; display: block; margin-bottom: 9px; }
.bw-kv { display: grid; grid-template-columns: 70px 1fr; row-gap: 5px; font-size: 11.5px; }
.bw-kv span:nth-child(odd) { color: var(--t3); }
.bw-kv span:nth-child(even) { color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-kv .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 11px; }
.bw-map-h { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; grid-column: 3; }
.bw-map-h span { font-weight: 400; color: var(--t3); }
.bw-map { grid-column: 3; display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; margin-top: 9px; }
.bw-map i { height: 14px; border-radius: 3px; background: var(--track); position: relative; overflow: hidden; }
.bw-map i::after { content: ""; position: absolute; inset: 0; background: var(--acc); transform-origin: left; transform: scaleX(var(--p, 0)); }
.bw-map i.done::after { background: var(--ok); }
.bw-detail .right { grid-column: 3; }

/* durum çubuğu */
.bw-status { grid-column: 2; display: flex; align-items: center; gap: 18px; padding: 0 20px; border-top: 1px solid var(--bd); background: var(--panel); font-size: 11.5px; color: var(--t2); }
.bw-status b { color: var(--t1); font-variant-numeric: tabular-nums; }
.bw-status svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.6; vertical-align: -2px; margin-right: 4px; }
.bw-status .r { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.bw-status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.bw-select { height: 24px; border: 1px solid var(--bd2); border-radius: 5px; padding: 0 8px; display: inline-flex; align-items: center; gap: 30px; color: var(--t1); background: var(--panel); }

/* iletişim pencereleri */
.bw-overlay { position: absolute; inset: 30px 0 0 0; background: rgba(0,0,0,.18); opacity: 0; transition: opacity .3s ease; pointer-events: none; z-index: 5; }
.bw[data-theme="dark"] .bw-overlay { background: rgba(0,0,0,.45); }
.bw-overlay.on { opacity: 1; }
.bw-dlg { position: absolute; z-index: 6; left: 50%; top: 50%; width: 470px; background: var(--panel); border-radius: 9px; border: 1px solid var(--bd);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.4); transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .35s cubic-bezier(.2,.7,.1,1), opacity .25s ease; pointer-events: none; }
.bw-dlg.on { transform: translate(-50%, -50%); opacity: 1; }
.bw-dlg-t { height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 11.5px; color: var(--t2); border-bottom: 1px solid var(--bd); background: var(--alt); border-radius: 9px 9px 0 0; }
.bw-dlg-t svg { width: 12px; height: 12px; }
.bw-dlg-b { padding: 18px 20px 6px; }
.bw-dlg h5 { margin: 0 0 14px; font: 600 16px/1 "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; display: flex; align-items: center; gap: 10px; }
.bw-dlg h5 .badge { width: 30px; height: 30px; border-radius: 7px; background: var(--acc); display: grid; place-items: center; }
.bw-dlg h5 .badge svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 1.8; }
.bw-f { margin-bottom: 12px; }
.bw-f label { display: block; font-size: 11.5px; font-weight: 600; margin-bottom: 5px; color: var(--t1); }
.bw-in { height: 32px; border: 1px solid var(--bd2); border-radius: 6px; background: var(--panel); padding: 0 10px; display: flex; align-items: center; font-size: 12px; color: var(--t1); white-space: nowrap; overflow: hidden; }
.bw-in.focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.bw-in .caret { display: inline-block; width: 1px; height: 15px; background: var(--t1); margin-left: 1px; animation: caret 1s steps(1) infinite; }
.bw-in .ph { color: var(--t3); }
@keyframes caret { 50% { opacity: 0; } }
.bw-row2 { display: flex; gap: 8px; }
.bw-row2 .bw-in { flex: 1; }
.bw-btn { height: 32px; padding: 0 14px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; border: 1px solid var(--bd2); background: var(--panel); color: var(--t1); }
.bw-btn.pri { background: var(--acc); border-color: var(--acc); color: #fff; }
.bw-btn.press { transform: scale(.96); filter: brightness(.92); }
.bw-dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; }
.bw-small { width: 60px !important; flex: none !important; }
.bw-vid { display: flex; gap: 12px; align-items: center; padding: 0 10px; border: 0 solid var(--bd); border-radius: 7px; background: var(--alt); margin-bottom: 0; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .45s cubic-bezier(.2,.7,.1,1), opacity .35s ease .1s, padding .45s, margin .45s; }
.bw-vid.on { max-height: 90px; padding: 10px; border-width: 1px; margin-bottom: 12px; opacity: 1; }
.bw-vid .bw-thumb { width: 96px; height: 54px; }
.bw-vid b { font-size: 12.3px; display: block; }
.bw-vid small { font-size: 11px; color: var(--t3); }

/* ayarlar */
.bw-set { width: 480px; }
.bw-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--bd); margin: 0 -20px 14px; padding: 0 20px; }
.bw-tabs span { padding: 8px 0 9px; font-size: 12px; color: var(--t2); position: relative; }
.bw-tabs span.on { color: var(--t1); font-weight: 600; }
.bw-tabs span.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--acc); border-radius: 2px; }
.bw-pane { min-height: 248px; }
.bw-pane[hidden] { display: none; }
.bw-chk { display: flex; gap: 9px; margin-bottom: 13px; }
.bw-chk .box { width: 15px; height: 15px; border-radius: 3px; border: 1px solid var(--bd2); flex: none; margin-top: 1px; display: grid; place-items: center; }
.bw-chk .box.on { background: var(--acc); border-color: var(--acc); }
.bw-chk .box svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 2.2; opacity: 0; }
.bw-chk .box.on svg { opacity: 1; }
.bw-chk b { display: block; font-size: 12px; font-weight: 600; }
.bw-chk small { display: block; font-size: 11px; color: var(--t3); margin-top: 2px; line-height: 1.4; }
.bw-about { text-align: center; padding-top: 30px; }
.bw-about svg { width: 54px; height: 54px; margin: 0 auto 12px; display: block; }
.bw-about b { font-size: 16px; display: block; }
.bw-about small { color: var(--t3); }
.bw-toast { position: absolute; right: 20px; top: 62px; z-index: 4; width: 280px; padding: 12px 14px; border-radius: 9px; background: var(--panel); border: 1px solid var(--bd);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.35); display: flex; gap: 10px; align-items: center; transform: translateY(-12px); opacity: 0; transition: transform .45s cubic-bezier(.2,.7,.1,1), opacity .3s ease; }
.bw-toast.on { transform: none; opacity: 1; }
.bw-toast .ok { width: 28px; height: 28px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.bw-toast .ok svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.bw-toast b { display: block; font-size: 12px; }
.bw-toast small { display: block; font-size: 11px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }

/* imleç */
.bw-cursor { position: absolute; left: 0; top: 0; z-index: 20; width: 22px; height: 22px; pointer-events: none;
  transform: translate(var(--cx, 700px), var(--cy, 420px)); transition: transform var(--cd, .9s) cubic-bezier(.45,.05,.25,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.bw-cursor svg { width: 22px; height: 22px; }
.bw-cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: rgba(208,3,28,.35); transform: scale(0); opacity: 0; }
.bw-cursor.click::after { animation: clk .5s ease-out; }
@keyframes clk { from { transform: scale(.2); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .bw-cursor { display: none; } .bw, .bw * { transition: none !important; animation: none !important; } }
