:root {
  --ink: #05050A;
  --panel: #0B0B12;
  --panel2: #14141F;
  --line: rgba(255,255,255,.1);
  --muted: #9A9AB0;
  --accent: #00E5A8;
  --accent2: #7C5CFF;
  --rec: #FF2D55;
  --text: #F7F7FB;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font-family: Inter, system-ui, sans-serif; color-scheme: dark; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 42px; padding: 0 16px; border-radius: 14px; font-weight: 700; border: 1px solid transparent; cursor: pointer; background: transparent; }
.btn-primary { background: var(--accent); color: #04120E; box-shadow: 0 10px 28px -8px rgba(0,229,168,.55); }
.btn-ghost { border-color: var(--line); background: rgba(255,255,255,.04); }
.btn-rec { background: var(--rec); color: #fff; min-width: 140px; height: 54px; border-radius: 999px; font-weight: 900; letter-spacing: .08em; box-shadow: 0 12px 36px -8px rgba(255,45,85,.55); }
.btn-sm { height: 34px; padding: 0 12px; font-size: .82rem; border-radius: 10px; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.field { margin-bottom: 14px; }
.field label, .label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text); appearance: none;
}
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .8rem; cursor: pointer; background: transparent; white-space: nowrap; }
.chip-on { border-color: rgba(0,229,168,.55); color: #fff; background: rgba(0,229,168,.16); }
.card { border: 1px solid var(--line); border-radius: 1.25rem; background: var(--panel); padding: 16px; }
.alert { padding: 12px; border-radius: 12px; margin-bottom: 12px; }
.alert.err { background: rgba(255,45,85,.12); border: 1px solid rgba(255,45,85,.35); color: #ffb4c0; }
.page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background-image: radial-gradient(800px 400px at 20% -10%, rgba(0,229,168,.12), transparent 60%); overflow: auto; }
.auth-card { width: min(420px, 100%); }
.brand { font-family: "Space Grotesk", Inter, sans-serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.brand span { color: var(--accent); }

.shell { display: grid; grid-template-columns: 76px minmax(0,1fr) minmax(340px,420px); height: 100vh; height: 100dvh; background: var(--ink); }
.nav { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; align-items: center; padding: 14px 8px; gap: 4px; overflow-y: auto; }
.nav .logo { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg,#00E5A8,#7C5CFF); color: #04120E; display: grid; place-items: center; font-weight: 900; font-family: "Space Grotesk", sans-serif; margin-bottom: 12px; }
.nav button { width: 100%; border: 0; background: transparent; color: var(--muted); padding: 10px 4px; border-radius: 14px; cursor: pointer; font-size: .65rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.nav button .ico { font-size: 1.05rem; }
.nav button.is-on { background: rgba(0,229,168,.16); color: #fff; }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #000; }
.stage-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(11,11,18,.9); flex-shrink: 0; }
.stage-head input.title { flex: 1; border: 0; background: transparent; font-size: 1.05rem; font-weight: 600; font-family: "Space Grotesk", sans-serif; outline: none; min-width: 0; color: #fff; }
.save-status { color: var(--muted); font-size: .75rem; }
.preview-area { flex: 1; min-height: 0; display: grid; place-items: center; padding: 18px; background: radial-gradient(ellipse 50% 40% at 50% 20%, rgba(0,229,168,.08), transparent 70%), #050508; }
.stage-frame { position: relative; width: min(100%, 380px); aspect-ratio: 9/16; background: #000; border-radius: 22px; overflow: hidden; box-shadow: 0 28px 80px rgba(0,0,0,.65); }
.stage-frame video, .stage-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-frame video { opacity: 1; z-index: 1; background: #000; }
.stage-frame canvas { opacity: 0; z-index: 0; pointer-events: none; }
.stage-frame.is-filtered video { opacity: 0; }
.stage-frame.is-filtered canvas#stage-canvas { opacity: 1; z-index: 2; }
/* Eye Contact: NE takard el a live videót body-class alapján — csak is-filtered */

.tp-overlay { position: absolute; left: 7%; right: 7%; top: 10%; height: 40%; overflow: auto; pointer-events: none; z-index: 3; font-family: "Space Grotesk", sans-serif; font-size: clamp(17px,4vw,26px); line-height: 1.4; text-align: center; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.85); white-space: pre-wrap; }
.tp-overlay.mirrored { transform: scaleX(-1); }
.cap-overlay {
  position: absolute; left: 6%; right: 6%; top: 54%; z-index: 4; text-align: center; pointer-events: none;
  font-family: "Montserrat", Anton, sans-serif; font-weight: 900; font-size: clamp(18px,5.2vw,32px); line-height: 1.05;
  color: #fff; text-transform: uppercase; letter-spacing: -.02em;
  -webkit-text-stroke: 3px #000; paint-order: stroke fill;
  text-shadow: 0 3px 0 #000, 0 8px 20px rgba(0,0,0,.45);
}
.cap-overlay .w.on { color: #FFE14D; display: inline-block; transform: scale(1.06); }
.cap-overlay.pop { animation: capPop .18s ease; }
@keyframes capPop { from { transform: scale(.92); opacity: .55; } to { transform: scale(1); opacity: 1; } }

.rec-badge { position: absolute; top: 14px; left: 14px; z-index: 5; background: var(--rec); color: #fff; font-size: .7rem; font-weight: 800; padding: 5px 10px; border-radius: 8px; display: none; }
.rec-badge.on { display: inline-flex; align-items: center; gap: 6px; }
.rec-badge.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.record-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); background: rgba(11,11,18,.95); flex-shrink: 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 64px; text-align: center; font-family: "Space Grotesk", sans-serif; }

.aside { border-left: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 16px 16px 28px; }
.panel { display: none; }
.panel.is-on { display: block; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel h3 { margin: 0 0 4px; font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; font-weight: 700; }
.panel-sub { color: var(--muted); font-size: .82rem; margin: 0 0 16px; line-height: 1.4; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.meter { width: 100%; height: 10px; border-radius: 999px; background: #0a0a10; border: 1px solid var(--line); display: block; }
.take-list, .job-list, .clip-list { list-style: none; margin: 0; padding: 0; }
.take-list li, .job-list li, .clip-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.script-box { width: 100%; min-height: 180px; max-height: 32vh; resize: vertical; font-size: 1.05rem; line-height: 1.45; }

.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 10px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: min(52vh, 520px); overflow: auto; }
.tpl-card {
  position: relative; border: 1px solid var(--line); border-radius: 16px; min-height: 100px;
  padding: 12px 10px 28px; cursor: pointer; background: linear-gradient(180deg, #1a1a28, #101018);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tpl-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(0,229,168,.45), 0 12px 28px -12px rgba(0,229,168,.4); }
.tpl-card .preview { text-align: center; line-height: 1.05; font-size: 15px; font-weight: 900; paint-order: stroke fill; }
.tpl-card .name { position: absolute; left: 8px; right: 8px; bottom: 8px; color: var(--muted); font-size: .65rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-live-box {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #07070f;
  margin-bottom: 14px; min-height: 80px; display: grid; place-items: center; text-align: center;
}
.cap-live-box .sample {
  font-family: "Montserrat", Anton, sans-serif; font-weight: 900; font-size: 1.4rem;
  text-transform: uppercase; color: #fff; -webkit-text-stroke: 2.5px #000; paint-order: stroke fill;
}
.cap-live-box .sample .hi { color: #FFE14D; }

#toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%);
  z-index: 90; padding: 12px 18px; border-radius: 14px; background: rgba(11,11,18,.96);
  border: 1px solid rgba(0,229,168,.45); color: #fff; display: none; max-width: min(92vw, 360px);
  text-align: center; font-size: .9rem; box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.bottom-nav { display: none; }

@media (max-width: 980px) {
  .tpl-grid { max-height: 28dvh; }
  .tpl-card { min-height: 84px; }
  .bottom-nav button {
    flex: 1 0 auto; min-width: 62px; border: 0; background: transparent; color: var(--muted);
    padding: 8px 4px; border-radius: 12px; font-size: .6rem; font-weight: 700;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
  }
  .bottom-nav button .ico { font-size: 1rem; }
}

.studio-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; overflow: auto; height: 100%; }
.eyebrow { color: var(--muted); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.glass { border: 1px solid var(--line); border-radius: 1.25rem; background: var(--panel); padding: 16px; }
.grid-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.project-card { display: block; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--panel); padding: 18px; }
.project-card:hover { border-color: rgba(0,229,168,.55); }
.project-card h3 { font-family: "Space Grotesk", Inter, sans-serif; }
.clip-list li.on { color: #fff; }
.studio-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.studio-topbar .brand { margin: 0; font-size: 1.1rem; }
body:has(.studio-wrap), body:has(.page) { overflow: auto; }
/* VS-UI-2.0-RADICAL */
