/* Pixlane video studio — shared styles for /video-tools/ pages. */

:root {
  --vx-bg: #0b0e14;
  --vx-panel: #11151f;
  --vx-panel-2: #161b28;
  --vx-line: rgba(255, 255, 255, 0.08);
  --vx-line-strong: rgba(255, 255, 255, 0.16);
  --vx-text: #eef2f9;
  --vx-dim: #9aa4b5;
  --vx-accent: #6c8cff;
  --vx-accent-2: #38d9a9;
  --vx-danger: #ff6b6b;
  --vx-radius: 14px;
}
html[data-theme="light"] {
  --vx-bg: #f4f6fa;
  --vx-panel: #ffffff;
  --vx-panel-2: #eef1f7;
  --vx-line: rgba(10, 14, 22, 0.1);
  --vx-line-strong: rgba(10, 14, 22, 0.2);
  --vx-text: #10141d;
  --vx-dim: #5a6475;
}


/* `hidden` must always win over component display values. */
.vx-page [hidden] { display: none !important; }
.vx-page { background: var(--vx-bg); color: var(--vx-text); min-height: 100vh; }
.vx-wrap { max-width: 1240px; margin: 0 auto; padding: 18px clamp(12px, 3vw, 28px) 64px; }
.vx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin: 10px 0 16px; }
.vx-head h1 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); margin: 0; letter-spacing: -0.02em; }
.vx-head .vx-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.vx-badge { font-size: 0.74rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--vx-line-strong); color: var(--vx-dim); white-space: nowrap; }
.vx-badge--ai { color: var(--vx-accent-2); border-color: color-mix(in srgb, var(--vx-accent-2) 45%, transparent); }
.vx-sub { color: var(--vx-dim); margin: 0 0 18px; max-width: 70ch; line-height: 1.55; }


/* ── Site header (standalone pages ship no global stylesheet) ─────── */
.pl-nav {
  display: flex; align-items: center; gap: 22px;
  padding: 14px clamp(14px, 3vw, 30px);
  background: color-mix(in srgb, var(--vx-bg) 86%, #000);
  border-bottom: 1px solid var(--vx-line);
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px);
}
.pl-nav .brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--vx-text); text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.pl-nav .pip { display: grid; grid-template-columns: 7px 7px; gap: 2.5px; }
.pl-nav .pip span { width: 7px; height: 7px; border-radius: 2px; background: var(--vx-accent); }
.pl-nav .pip span:nth-child(2), .pl-nav .pip span:nth-child(3) { opacity: .45; }
.pl-nav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-nav nav a {
  color: var(--vx-dim); text-decoration: none; font-size: .9rem; font-weight: 550;
  padding: 7px 12px; border-radius: 9px; transition: color .15s ease, background .15s ease;
}
.pl-nav nav a:hover { color: var(--vx-text); background: var(--vx-panel-2); }
.pl-nav nav a[aria-current] { color: var(--vx-text); background: var(--vx-panel-2); }
.pl-nav .theme-toggle {
  margin-left: auto; width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--vx-line-strong); background: var(--vx-panel-2);
  color: var(--vx-text); cursor: pointer; display: grid; place-items: center;
}
.pl-nav .theme-toggle svg { width: 17px; height: 17px; }
html[data-theme="light"] .pl-nav .theme-toggle .tt-moon { display: none; }
html[data-theme="dark"] .pl-nav .theme-toggle .tt-sun { display: none; }
html:not([data-theme="light"]) .pl-nav .theme-toggle .tt-sun { display: none; }

/* ── Stage / dropzone ─────────────────────────────────────────────── */
.vx-stage { position: relative; }
.vx-drop {
  border: 1.5px dashed var(--vx-line-strong);
  border-radius: calc(var(--vx-radius) + 4px);
  background:
    radial-gradient(1200px 500px at 20% -10%, color-mix(in srgb, var(--vx-accent) 14%, transparent), transparent 60%),
    var(--vx-panel);
  min-height: 380px; display: grid; place-items: center; text-align: center;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.vx-drop.is-drag { border-color: var(--vx-accent); transform: scale(1.004); }
.vx-drop__inner { padding: 44px 24px; }
.vx-drop__icon { width: 64px; margin: 0 auto 14px; color: var(--vx-accent); opacity: 0.9; }
.vx-drop h2 { margin: 0 0 6px; font-size: 1.35rem; }
.vx-drop__meta { color: var(--vx-dim); margin: 0 0 22px; font-size: 0.92rem; }
.vx-drop__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.vx-btn {
  appearance: none; border: 1px solid var(--vx-line-strong); background: var(--vx-panel-2);
  color: var(--vx-text); border-radius: 10px; padding: 10px 18px; font-size: 0.95rem;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.vx-btn:hover { transform: translateY(-1px); border-color: var(--vx-accent); }
.vx-btn--primary {
  background: linear-gradient(135deg, var(--vx-accent), color-mix(in srgb, var(--vx-accent) 55%, #9d6cff));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--vx-accent) 35%, transparent);
}
.vx-btn--ghost { background: transparent; }
.vx-btn--icon { padding: 10px; border-radius: 999px; }
.vx-btn--icon svg { width: 20px; height: 20px; }
.vx-btn:disabled { opacity: 0.55; cursor: default; transform: none; }

/* ── Editor layout ────────────────────────────────────────────────── */
.vx-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
@media (max-width: 940px) { .vx-editor { grid-template-columns: 1fr; } }
.vx-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.vx-player {
  position: relative; background: #000; border-radius: var(--vx-radius);
  overflow: hidden; border: 1px solid var(--vx-line);
  aspect-ratio: 16 / 9; display: grid; place-items: center;
}
.vx-player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.vx-overlay { position: absolute; inset: 0; pointer-events: none; }
.vx-bigplay {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  border-radius: 999px; border: 0; cursor: pointer;
  background: color-mix(in srgb, #000 45%, transparent);
  backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.vx-bigplay svg { width: 34px; height: 34px; margin-left: 4px; }
.vx-bigplay:hover { transform: scale(1.06); }
.vx-bigplay.is-hidden { opacity: 0; pointer-events: none; }

/* crop box */
.vx-cropbox {
  position: absolute; pointer-events: auto; cursor: move;
  outline: 1.5px solid var(--vx-accent);
  box-shadow: 0 0 0 9999px color-mix(in srgb, #000 55%, transparent);
  border-radius: 4px; touch-action: none;
}
.vx-cropbox__grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), var(--vx-line-strong) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to right, transparent calc(66.66% - 0.5px), var(--vx-line-strong) 66.66%, transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), var(--vx-line-strong) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.66% - 0.5px), var(--vx-line-strong) 66.66%, transparent calc(66.66% + 0.5px));
}
.vx-handle {
  position: absolute; width: 14px; height: 14px; background: #fff;
  border: 2px solid var(--vx-accent); border-radius: 4px; pointer-events: auto;
}
.vx-handle--nw { top: -7px; left: -7px; cursor: nwse-resize; }
.vx-handle--ne { top: -7px; right: -7px; cursor: nesw-resize; }
.vx-handle--sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.vx-handle--se { bottom: -7px; right: -7px; cursor: nwse-resize; }
.vx-handle--n { top: -7px; left: calc(50% - 7px); cursor: ns-resize; }
.vx-handle--s { bottom: -7px; left: calc(50% - 7px); cursor: ns-resize; }
.vx-handle--e { right: -7px; top: calc(50% - 7px); cursor: ew-resize; }
.vx-handle--w { left: -7px; top: calc(50% - 7px); cursor: ew-resize; }

/* safe zones (reels) */
.vx-safezone { position: absolute; pointer-events: none; }
.vx-safezone__band {
  position: absolute; left: 0; right: 0; height: 12%;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--vx-danger) 22%, transparent) 0 8px, transparent 8px 16px);
  display: flex; align-items: center; justify-content: center;
}
.vx-safezone__band--top { top: 0; border-bottom: 1px dashed color-mix(in srgb, var(--vx-danger) 60%, transparent); }
.vx-safezone__band--bottom { bottom: 0; height: 17%; border-top: 1px dashed color-mix(in srgb, var(--vx-danger) 60%, transparent); }
.vx-safezone__side {
  position: absolute; top: 30%; bottom: 30%; width: 13%;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--vx-danger) 16%, transparent) 0 8px, transparent 8px 16px);
  display: flex; align-items: center; justify-content: center;
}
.vx-safezone__side--right { right: 0; border-left: 1px dashed color-mix(in srgb, var(--vx-danger) 50%, transparent); }
.vx-safezone span {
  font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; opacity: 0.85; text-shadow: 0 1px 2px #000;
  transform: rotate(0deg); white-space: nowrap;
}
.vx-safezone__side span { writing-mode: vertical-rl; }

/* ── Timeline ─────────────────────────────────────────────────────── */
.vx-timeline { user-select: none; }
.vx-strip {
  position: relative; height: 56px; border-radius: 10px; overflow: hidden;
  background: var(--vx-panel-2); border: 1px solid var(--vx-line); cursor: pointer;
  touch-action: none;
}
.vx-strip__thumbs { display: flex; height: 100%; }
.vx-strip__thumbs img, .vx-strip__thumbs span { flex: 1 1 0; min-width: 0; object-fit: cover; height: 100%; background: var(--vx-panel); }
.vx-thumbs-fallback { display: grid; place-items: center; width: 100%; color: var(--vx-dim); font-size: 0.8rem; }
.vx-strip__shade { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, #000 62%, transparent); pointer-events: none; }
.vx-strip__shade--left { left: 0; width: 0; }
.vx-strip__shade--right { right: 0; left: 100%; }
.vx-trimhandle {
  position: absolute; top: 0; bottom: 0; width: 12px; margin-left: -6px;
  background: var(--vx-accent); cursor: ew-resize; border-radius: 3px;
  touch-action: none;
}
.vx-trimhandle::after {
  content: ""; position: absolute; inset: 14px 4px; border-left: 2px solid #fff;
  border-right: 2px solid #fff; opacity: 0.9;
}
.vx-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; box-shadow: 0 0 6px rgba(255, 255, 255, 0.7); }
.vx-timeline__times { display: flex; justify-content: space-between; color: var(--vx-dim); font-size: 0.8rem; padding: 6px 2px 0; font-variant-numeric: tabular-nums; }
.vx-timeline__cur { color: var(--vx-text); font-weight: 600; }

/* ── Action bar ───────────────────────────────────────────────────── */
.vx-actionbar {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--vx-panel); border: 1px solid var(--vx-line); border-radius: var(--vx-radius);
}
.vx-actionbar__spacer { flex: 1; }
.vx-timefields { display: flex; gap: 10px; }
.vx-timefields label { display: flex; align-items: center; gap: 6px; color: var(--vx-dim); font-size: 0.82rem; }
.vx-timefields input {
  width: 72px; background: var(--vx-panel-2); color: var(--vx-text);
  border: 1px solid var(--vx-line-strong); border-radius: 8px; padding: 7px 9px;
  font-variant-numeric: tabular-nums; font-size: 0.9rem;
}

/* ── Settings rail ────────────────────────────────────────────────── */
.vx-rail {
  background: var(--vx-panel); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); padding: 16px; height: fit-content;
  position: sticky; top: 14px;
}
.vx-rail__title { margin: 0 0 14px; font-size: 1rem; }
.vx-field { margin-bottom: 16px; }
.vx-field__label { display: block; color: var(--vx-dim); font-size: 0.8rem; margin-bottom: 8px; letter-spacing: 0.02em; }
.vx-field--row { display: flex; align-items: end; gap: 8px; }
.vx-field--row label { flex: 1; display: flex; flex-direction: column; gap: 6px; color: var(--vx-dim); font-size: 0.78rem; }
.vx-field input[type="number"], .vx-field input[type="text"] {
  width: 100%; background: var(--vx-panel-2); color: var(--vx-text);
  border: 1px solid var(--vx-line-strong); border-radius: 8px; padding: 8px 10px; font-size: 0.92rem;
}
.vx-lock { background: var(--vx-panel-2); border: 1px solid var(--vx-line-strong); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.vx-lock[aria-pressed="false"] { opacity: 0.4; }
.vx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vx-chips button {
  background: var(--vx-panel-2); color: var(--vx-text); border: 1px solid var(--vx-line-strong);
  border-radius: 999px; padding: 7px 13px; font-size: 0.84rem; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vx-chips button:hover { border-color: var(--vx-accent); }
.vx-chips button.is-on {
  background: color-mix(in srgb, var(--vx-accent) 22%, var(--vx-panel-2));
  border-color: var(--vx-accent); color: var(--vx-text);
}
.vx-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--vx-text); font-size: 0.9rem; }
.vx-note { color: var(--vx-dim); font-size: 0.82rem; line-height: 1.5; margin: 10px 0 0; }
.vx-fileinfo { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--vx-line); color: var(--vx-dim); font-size: 0.82rem; line-height: 1.5; }
.vx-fileinfo strong { color: var(--vx-text); word-break: break-all; }

/* ── Progress ─────────────────────────────────────────────────────── */
.vx-progress { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: color-mix(in srgb, #000 62%, transparent); backdrop-filter: blur(4px); }
.vx-progress__card {
  background: var(--vx-panel); border: 1px solid var(--vx-line-strong);
  border-radius: 18px; padding: 30px 36px; text-align: center; max-width: 360px;
}
.vx-progress__ring { position: relative; width: 96px; margin: 0 auto 14px; }
.vx-progress__ring svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.vx-progress__ring .ring-bg { fill: none; stroke: var(--vx-line-strong); stroke-width: 6; }
.vx-progress__ring .ring-fg {
  fill: none; stroke: var(--vx-accent); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 175.93; stroke-dashoffset: 175.93; transition: stroke-dashoffset 0.2s ease;
}
.vx-progress__ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.vx-progress__hint { color: var(--vx-dim); font-size: 0.8rem; margin: 6px 0 16px; }

/* ── Result ───────────────────────────────────────────────────────── */
.vx-result { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: color-mix(in srgb, #000 58%, transparent); backdrop-filter: blur(4px); padding: 18px; }
.vx-result__card {
  background: var(--vx-panel); border: 1px solid var(--vx-line-strong); border-radius: 18px;
  padding: 22px; width: min(720px, 94vw); max-height: 92vh; overflow: auto;
}
.vx-result__card h3 { margin: 0 0 12px; }
.vx-result__card video { width: 100%; border-radius: 10px; background: #000; max-height: 56vh; }
.vx-result__card audio { width: 100%; }
.vx-result__meta { color: var(--vx-dim); font-size: 0.86rem; margin: 10px 2px; }
.vx-result__actions { display: flex; gap: 12px; justify-content: end; }

/* toast */
.vx-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--vx-panel); color: var(--vx-text); border: 1px solid var(--vx-line-strong);
  padding: 12px 18px; border-radius: 12px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 70; max-width: min(520px, 92vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); font-size: 0.92rem;
}
.vx-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* SEO content under the editor */
.vx-seo { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.vx-seo h2 { font-size: 1.02rem; margin: 0 0 8px; }
.vx-seo p { color: var(--vx-dim); font-size: 0.9rem; line-height: 1.6; margin: 0; }
.vx-faq { margin-top: 40px; max-width: 860px; }
.vx-faq h2 { font-size: 1.15rem; }
.vx-faq details { border-bottom: 1px solid var(--vx-line); padding: 12px 2px; }
.vx-faq summary { cursor: pointer; font-weight: 600; }
.vx-faq p { color: var(--vx-dim); line-height: 1.6; }

/* ── Mobile (≤640px) ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pl-nav { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .pl-nav .brand { font-size: 0.98rem; }
  .pl-nav nav { gap: 0; flex: 1 1 100%; order: 3; overflow-x: auto; scrollbar-width: none; }
  .pl-nav nav::-webkit-scrollbar { display: none; }
  .pl-nav nav a { padding: 6px 9px; font-size: 0.84rem; white-space: nowrap; }
  .pl-nav .theme-toggle { margin-left: auto; width: 32px; height: 32px; }

  .vx-wrap { padding: 12px 12px 48px; }
  .vx-actionbar { flex-wrap: wrap; gap: 10px; padding: 10px; }
  .vx-timefields { order: 2; flex: 1 1 100%; justify-content: space-between; }
  .vx-timefields input { width: 64px; }
  .vx-actionbar__spacer { display: none; }
  .vx-actionbar .vx-btn--primary { flex: 1 1 auto; justify-content: center; }
  .vx-actionbar #vx-replace { flex: 0 0 auto; }
  .vx-rail { position: static; }
  .vx-result__card { padding: 14px; }
  .vx-progress__card { padding: 22px 18px; margin: 0 12px; }
}
/* hard guard: the studio never scrolls sideways */
.vx-page { overflow-x: hidden; }
