/* NigiStudio - a dark, professional editor; Rubik for Hebrew + English, right-to-left in Hebrew (the timeline always runs left to right) */
@font-face { font-family: Rubik; src: url(fonts/rubik-hebrew-400-normal.woff2) format('woff2'); font-weight: 400; unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: Rubik; src: url(fonts/rubik-hebrew-700-normal.woff2) format('woff2'); font-weight: 700; unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: Rubik; src: url(fonts/rubik-hebrew-900-normal.woff2) format('woff2'); font-weight: 900; unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-400-normal.woff2) format('woff2'); font-weight: 400; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-700-normal.woff2) format('woff2'); font-weight: 700; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-900-normal.woff2) format('woff2'); font-weight: 900; }
@font-face { font-family: Bungee; src: url(fonts/bungee-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Orbitron; src: url(fonts/orbitron-latin-700-normal.woff2) format('woff2'); font-weight: 700; }
@font-face { font-family: Cinzel; src: url(fonts/cinzel-decorative-latin-900-normal.woff2) format('woff2'); font-weight: 900; }
* { box-sizing: border-box; }
:root { --bg: #0d1117; --p1: #161b22; --p2: #1f2630; --p3: #2a3340; --line: #2f3a48; --text: #e6edf3; --muted: #8b98a8; --acc: #7c5cff; --acc2: #22d3ee; --sel: #fbbf24; --hd: 96px; --rowh: 54px; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Rubik, "Segoe UI", system-ui, sans-serif; font-size: 14px; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
.app { height: 100%; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--p1); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 6px; font-size: 18px; } .brand b span { background: linear-gradient(90deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .logo { font-size: 22px; }
.pname { background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; min-width: 120px; max-width: 260px; font-weight: 700; }
.pname:hover, .pname:focus { border-color: var(--line); background: var(--p2); outline: none; }
select, input[type=text], input[type=number], textarea { background: var(--p2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.grp { display: flex; gap: 2px; } .grow { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--p2); border-radius: 9px; padding: 7px 14px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.btn:hover { background: var(--p3); } .btn.primary { background: linear-gradient(135deg, var(--acc), #5b3df5); border: 0; color: #fff; box-shadow: 0 4px 14px rgba(124,92,255,.35); }
.ib { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--p2); cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.ib:hover { background: var(--p3); } .ib.play { width: 44px; height: 44px; border-radius: 50%; background: var(--acc); border: 0; color: #fff; font-size: 18px; }
.mobtabs { display: none; }
.work { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr 290px; gap: 1px; background: var(--line); }
.panel { background: var(--p1); min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.tabs button { border: 0; background: none; padding: 6px 9px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 700; white-space: nowrap; font-size: 13px; }
.tabs button.on { background: var(--p3); color: var(--text); }
.binbody { flex: 1; overflow: auto; padding: 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; font-size: 12px; } .crumbs a { color: var(--acc2); cursor: pointer; }
.mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.mi { background: var(--p2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: grab; position: relative; }
.mi:hover { border-color: var(--acc); }
.mi .th { aspect-ratio: 16/9; background: #000 center/cover; display: grid; place-items: center; font-size: 26px; }
.mi .nm { font-size: 11.5px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: start; }
.mi .add { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--acc); color: #fff; font-weight: 900; cursor: pointer; }
.mi.dir .th { background: var(--p3); }
.upl { width: 100%; margin-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.card { background: var(--p2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; text-align: center; font-weight: 700; min-height: 64px; display: grid; place-items: center; }
.card:hover { border-color: var(--acc); }
.hint { color: var(--muted); font-size: 12.5px; margin: 6px 0; }
.view { background: #05070a; }
.canvas-wrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px; }
#cv { max-width: 100%; max-height: 100%; background: #000; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.transport { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--p1); border-top: 1px solid var(--line); direction: ltr; }
.tc { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.insp { padding: 10px; overflow: auto; }
.insp h3 { margin: 4px 0 10px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.insp .f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.insp .f > div { display: flex; gap: 6px; align-items: center; }
.insp .f input[type=range] { flex: 1; accent-color: var(--acc); }
.insp .f b { color: var(--text); min-width: 42px; text-align: center; font-size: 12px; }
.insp textarea { width: 100%; min-height: 70px; resize: vertical; }
.insp .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.insp .chk { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--text) !important; }
.insp .empty { color: var(--muted); text-align: center; margin-top: 40px; line-height: 1.7; }
.seg { display: inline-flex; background: var(--p2); border-radius: 8px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 4px 9px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted); }
.seg button.on { background: var(--acc); color: #fff; }
.tl { height: 300px; flex: none; display: flex; flex-direction: column; background: var(--p1); border-top: 1px solid var(--line); }
.tlbar { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.tb { border: 1px solid var(--line); background: var(--p2); border-radius: 8px; padding: 5px 9px; cursor: pointer; white-space: nowrap; font-size: 12.5px; }
.tb:hover { background: var(--p3); } .tb.on { border-color: var(--acc); color: #c4b5fd; }
#zoom { width: 110px; accent-color: var(--acc); }
.tlbody { flex: 1; min-height: 0; display: flex; direction: ltr; overflow: hidden; }
.heads { width: var(--hd); flex: none; padding-top: 26px; background: var(--p1); border-right: 1px solid var(--line); z-index: 2; }
.head { height: var(--rowh); display: flex; align-items: center; gap: 4px; padding: 0 6px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.head button { border: 0; background: var(--p2); border-radius: 5px; width: 22px; height: 20px; font-size: 10px; cursor: pointer; color: var(--muted); }
.head button.on { background: #ef4444; color: #fff; }
.lanes { flex: 1; overflow: auto; position: relative; }
.ruler { position: sticky; top: 0; height: 26px; background: var(--p2); border-bottom: 1px solid var(--line); z-index: 3; cursor: pointer; }
.ruler i { position: absolute; top: 0; height: 100%; border-left: 1px solid var(--line); font-size: 10px; color: var(--muted); padding: 2px 3px; font-style: normal; white-space: nowrap; }
.rows { position: relative; }
.lane { height: var(--rowh); border-bottom: 1px solid var(--line); position: relative; }
.lane.drop { background: rgba(124,92,255,.12); }
.clip { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; overflow: hidden; cursor: grab; border: 2px solid rgba(255,255,255,.12); user-select: none; touch-action: none; }
.clip.v { background: #1d4ed8 left/auto 100% repeat-x; } .clip.i { background: #0f766e left/auto 100% repeat-x; } .clip.a { background: #065f46; } .clip.t { background: #7c3aed; }
.clip.sel { border-color: var(--sel); box-shadow: 0 0 0 1px var(--sel); }
.clip .cn { position: absolute; top: 2px; left: 6px; right: 6px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; z-index: 1; }
.clip canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .75; }
.clip .eh { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 2; } .clip .eh.l { left: 0; } .clip .eh.r { right: 0; }
.clip .eh:hover, .clip.sel .eh { background: rgba(251,191,36,.45); }
.clip .tr { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255,255,255,.35), transparent); pointer-events: none; }
.clip .badge { position: absolute; bottom: 2px; right: 4px; font-size: 10px; background: rgba(0,0,0,.55); border-radius: 4px; padding: 0 4px; pointer-events: none; }
.ph { position: absolute; top: 0; width: 2px; background: #ef4444; pointer-events: none; z-index: 4; }
.ph::before { content: ''; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top-color: #ef4444; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; }
.modal[hidden] { display: none; }
.mcard { width: min(560px, 94vw); max-height: 88vh; overflow: auto; background: var(--p1); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.mcard h3 { margin: 0 0 12px; } .mcard .f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.mcard .rowb { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.plist { display: flex; flex-direction: column; gap: 6px; } .plist div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--p2); border-radius: 10px; }
.plist div b { flex: 1; cursor: pointer; } .plist button { border: 0; background: none; cursor: pointer; }
.bar { height: 10px; background: var(--p3); border-radius: 6px; overflow: hidden; margin: 10px 0; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); transition: width .4s; }
.toast { position: fixed; bottom: 320px; left: 50%; transform: translate(-50%, 10px); background: #111827; border: 1px solid var(--line); padding: 9px 16px; border-radius: 10px; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; } .panel { display: none; } .panel.on { display: flex; }
  .mobtabs { display: flex; gap: 4px; padding: 4px 8px; background: var(--p1); border-bottom: 1px solid var(--line); }
  .mobtabs button { flex: 1; border: 0; background: var(--p2); border-radius: 8px; padding: 7px; font-weight: 700; color: var(--muted); }
  .mobtabs button.on { background: var(--acc); color: #fff; }
  .brand b, #langBtn, .tb span { display: none; } .pname { min-width: 0; width: 34vw; }
  .tl { height: 42vh; } :root { --hd: 64px; --rowh: 48px; } .head span { display: none; }
  .top { flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
}
