/* GURU ORACLE v25 - premium command-deck theme
   Dark mode is default, light mode via body.light.
   Pure CSS keyframe animations only (no libraries) to stay fast. */

:root {
  --bg: #0a0d1a;
  --bg2: #0e1226;
  --card: #141932;
  --card2: #171d3a;
  --border: #242b52;
  --text: #e9ebf8;
  --muted: #8f95bd;
  --accent: #77DD77;
  --accent-soft: rgba(119, 221, 119, .14);
  --accent-text: #b8e6c0;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --input-bg: #0d1125;
  --radius: 12px;
  /* premium motion + glow tokens */
  --ease: cubic-bezier(.22, .9, .32, 1);
  --glow: rgba(119, 221, 119, .35);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lift: 0 18px 46px rgba(0, 0, 0, .45), 0 0 0 1px rgba(119, 221, 119, .45);
}
body.light {
  --bg: #eef0fa;
  --bg2: #e6e9f7;
  --card: #ffffff;
  --card2: #f6f7fd;
  --border: #dfe3f5;
  --text: #191d38;
  --muted: #5d6389;
  --input-bg: #f0f2fb;
  --accent-soft: rgba(119, 221, 119, .1);
  --shadow-card: 0 10px 28px rgba(60, 60, 140, .12);
  --shadow-lift: 0 18px 44px rgba(60, 60, 140, .18), 0 0 0 1px rgba(119, 221, 119, .4);
}

/* ---------- keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes meshDrift {
  0%   { transform: translate3d(-4%, -3%, 0) scale(1); }
  50%  { transform: translate3d(3%, 4%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes popIn {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 0 60px rgba(119, 221, 119, .55); }
  50%      { transform: translateY(-12px) scale(1.04); box-shadow: 0 0 95px rgba(119, 221, 119, .8); }
}

@keyframes launchFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes launchGlow {
  0%, 100% { box-shadow: 0 6px 24px rgba(124, 58, 237, .35); }
  50%      { box-shadow: 0 8px 42px rgba(119, 221, 119, .65); }
}

@keyframes textShine {
  to { background-position: 200% center; }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}
/* animated mesh gradient backdrop - slowly drifting color orbs */
body::before {
  content: "";
  position: fixed; inset: -8%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 620px at 12% 16%, rgba(119, 221, 119, .17), transparent 62%),
    radial-gradient(520px 520px at 88% 10%, rgba(76, 29, 149, .38), transparent 62%),
    radial-gradient(720px 720px at 50% 108%, rgba(79, 70, 229, .13), transparent 62%),
    radial-gradient(420px 420px at 72% 62%, rgba(119, 221, 119, .07), transparent 62%);
  animation: meshDrift 26s ease-in-out infinite alternate;
  will-change: transform;
}
body.light { background: var(--bg); }
body.light::before {
  background:
    radial-gradient(620px 620px at 12% 16%, rgba(119, 221, 119, .10), transparent 62%),
    radial-gradient(520px 520px at 88% 10%, rgba(79, 70, 229, .07), transparent 62%),
    radial-gradient(720px 720px at 50% 108%, rgba(119, 221, 119, .06), transparent 62%);
}
.hidden { display: none !important; }
::selection { background: rgba(119, 221, 119, .35); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 13, 26, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}
body.light .topbar { background: rgba(255, 255, 255, .85); box-shadow: 0 4px 20px rgba(60, 60, 140, .08); }
.brand { font-weight: 800; font-size: 17px; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
#brandLogo { box-shadow: 0 0 16px var(--glow); }
.ver-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent-text); border: 1px solid var(--accent);
  background: var(--accent-soft); border-radius: 6px; padding: 3px 9px;
  box-shadow: 0 0 12px rgba(119, 221, 119, .25);
}
.top-actions { display: flex; gap: 8px; }
.top-actions button, .ghost-btn {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 7px 13px; font-size: 12.5px; cursor: pointer;
  transition: all .25s ease;
}
.top-actions button:hover, .ghost-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--glow);
  transform: translateY(-1px);
}
.top-actions button:active, .ghost-btn:active { transform: translateY(0); }
.ghost-btn { width: 100%; margin-top: 8px; }

/* ---------- layout ---------- */
.layout { display: flex; gap: 0; height: calc(100vh - 53px); }
.deck {
  width: 372px; min-width: 372px; overflow-y: auto;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
  border-right: 1px solid var(--border); background: var(--bg2);
}
/* staggered entrance for deck items */
.deck > * { animation: cardIn .45s var(--ease) backwards; }
.deck > *:nth-child(2) { animation-delay: .05s; }
.deck > *:nth-child(3) { animation-delay: .1s; }
.deck > *:nth-child(4) { animation-delay: .15s; }
.deck > *:nth-child(5) { animation-delay: .2s; }
.deck > *:nth-child(6) { animation-delay: .25s; }
.deck > *:nth-child(7) { animation-delay: .3s; }
.deck > *:nth-child(8) { animation-delay: .35s; }
.deck > *:nth-child(9) { animation-delay: .4s; }
.stage { flex: 1; overflow-y: auto; padding: 34px 28px; position: relative; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px;
  box-shadow: var(--shadow-card);
  transition: all .25s ease;
}
.card:hover { border-color: rgba(119, 221, 119, .45); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-head h2 { font-size: 12.5px; letter-spacing: 1.2px; margin: 0; font-weight: 800; }
.badge {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent-text); background: var(--accent-soft);
  border: 1px solid rgba(16,185,129,.4); border-radius: 6px; padding: 3px 8px;
  white-space: nowrap;
  transition: all .25s ease;
}
.badge.ok { color: var(--green); border-color: var(--green); background: rgba(52,211,153,.1); }
.badge.bad { color: var(--red); border-color: var(--red); background: rgba(248,113,113,.1); }
label { display: block; font-size: 12px; color: var(--muted); margin: 9px 0 5px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; background: var(--input-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 11px; font-size: 13px; font-family: inherit;
  transition: border-color .25s ease, box-shadow .25s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 20px rgba(119, 221, 119, .28);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.hint a { color: var(--accent-text); transition: color .25s ease; }
.hint a:hover { color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.check input { width: auto; accent-color: var(--accent); }
.link-btn { background: none; border: none; color: var(--red); font-size: 12px; cursor: pointer; transition: all .25s ease; }
.link-btn:hover { filter: brightness(1.2); }

/* niche chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chip {
  border: 1px solid var(--border); background: var(--input-bg); color: var(--text);
  border-radius: 9px; padding: 7px 12px; font-size: 12.5px; cursor: pointer;
  transition: all .25s ease;
}
.chip:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(119, 221, 119, .22); }
.chip.active {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 700;
  box-shadow: 0 0 14px rgba(119, 221, 119, .3);
}

/* cascade box */
.cascade-box {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 12px; margin-top: 10px;
  transition: all .25s ease;
}
.cascade-box:hover { border-color: rgba(119, 221, 119, .45); }
.cascade-box strong { font-size: 12.5px; }
.cascade-box p { font-size: 11px; color: var(--muted); margin: 4px 0 0; line-height: 1.45; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: #3a4166; border-radius: 20px; cursor: pointer; transition: .25s ease;
}
.switch span:before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .25s ease;
}
.switch input:checked + span { background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.switch input:checked + span:before { transform: translateX(20px); }

/* key row */
.keyrow { display: flex; gap: 8px; }
.keyrow input { flex: 1; }
.keyrow button {
  white-space: nowrap; background: var(--input-bg); color: var(--accent-text);
  border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; cursor: pointer; font-size: 12px;
  transition: all .25s ease;
}
.keyrow button:hover { border-color: var(--accent); box-shadow: 0 0 12px var(--glow); }

/* diag */
#diagOut { margin-top: 8px; font-size: 12px; }
.diag-step { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.diag-step:last-child { border-bottom: none; }
.diag-step .dot { font-weight: 800; }
.dot.ok { color: var(--green); } .dot.bad { color: var(--red); }
.diag-step small { color: var(--muted); display: block; }

/* history */
.hist-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  margin-bottom: 7px; cursor: pointer; font-size: 12px; background: var(--input-bg);
  transition: all .25s ease;
}
.hist-item:hover { border-color: var(--accent); transform: translateX(3px); box-shadow: 0 4px 14px rgba(119, 221, 119, .2); }
.hist-item .t { font-weight: 700; }
.hist-item .m { color: var(--muted); font-size: 11px; margin-top: 2px; }
.empty-note { color: var(--muted); font-size: 12px; }

/* shine sweep shared by primary buttons */
.launch, .clip-dl-btn, .cut-dl, .qbtns button, .sample-btn, .jump-link {
  position: relative; overflow: hidden;
}
.launch::after, .clip-dl-btn::after, .cut-dl::after,
.qbtns button::after, .sample-btn::after, .jump-link::after {
  content: ""; position: absolute; top: 0; left: -90%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.launch:hover::after, .clip-dl-btn:hover::after, .cut-dl:hover::after,
.qbtns button:hover::after, .sample-btn:hover::after, .jump-link:hover::after { left: 140%; }

/* launch */
.launch {
  background: linear-gradient(135deg, #5cb85c, #4a9e4a, #77DD77, #5cb85c);
  background-size: 220% 220%;
  color: #fff; border: none; border-radius: 12px;
  padding: 15px; font-size: 15px; font-weight: 800; cursor: pointer;
  letter-spacing: .4px;
  animation: launchFlow 5s ease infinite, launchGlow 2.8s ease-in-out infinite;
  transition: transform .25s ease, filter .25s ease;
}
.launch:hover { filter: brightness(1.12); transform: translateY(-2px); }
.launch:active { transform: translateY(0); }
.launch:disabled { opacity: .55; cursor: wait; animation: none; transform: none; }
.foot-note { text-align: center; color: var(--muted); font-size: 11px; margin: 2px 0 8px; }

/* ---------- stage: welcome ---------- */
.welcome { max-width: 860px; margin: 0 auto; text-align: center; animation: fadeIn .5s ease backwards; }
.orb {
  width: 92px; height: 92px; margin: 6px auto 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a7f3d0, #77DD77 45%, #2d5a2d 100%);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  box-shadow: 0 0 60px rgba(119, 221, 119, .55);
  animation: orbFloat 6s ease-in-out infinite;
  will-change: transform;
}
.welcome h1 {
  font-size: 30px; letter-spacing: 1px; margin: 0 0 14px; font-weight: 800;
  background: linear-gradient(90deg, var(--text), var(--accent-text), var(--text));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textShine 7s linear infinite;
}
.darood-pill {
  display: inline-block; color: var(--accent-text); background: var(--accent-soft);
  border: 1px solid rgba(16,185,129,.45); border-radius: 20px;
  padding: 9px 22px; font-size: 14px; margin-bottom: 18px;
  box-shadow: 0 0 18px rgba(119, 221, 119, .18);
  transition: all .25s ease;
}
.darood-pill:hover { box-shadow: 0 0 28px rgba(119, 221, 119, .35); transform: translateY(-1px); }
.welcome .instr { color: var(--muted); font-size: 14.5px; line-height: 1.7; max-width: 640px; margin: 0 auto 20px; }
.welcome .instr b { color: var(--text); }
.samples { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.sample-btn {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 16px; cursor: pointer; font-size: 13px;
  transition: all .25s ease;
}
.sample-btn:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(119, 221, 119, .3);
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.steps .step-card { animation: cardIn .55s var(--ease) backwards; }
.steps .step-card:nth-child(2) { animation-delay: .12s; }
.steps .step-card:nth-child(3) { animation-delay: .24s; }
.step-card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.step-card .n { color: var(--accent); font-size: 22px; font-weight: 800; }
.step-card h3 { margin: 8px 0; font-size: 14.5px; }
.step-card p { color: var(--muted); font-size: 12.5px; line-height: 1.65; margin: 0; }

/* ---------- stage: progress / error ---------- */
.center-box { max-width: 520px; margin: 60px auto; text-align: center; animation: fadeIn .4s ease backwards; }
.spinner {
  width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--accent);
  animation: spin 1s linear infinite;
  box-shadow: 0 0 24px rgba(119, 221, 119, .3);
}
.pbar { height: 18px; background: var(--input-bg); border-radius: 6px; overflow: hidden; margin: 16px 0; border: 1px solid var(--border); position: relative; }
#pbarFill { position: relative; height: 100%; min-width: 36px; }
#pbarPct { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); white-space: nowrap; }
.pbar > div {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #5cb85c, #b8e6c0);
  box-shadow: 0 0 12px rgba(119, 221, 119, .6);
  transition: width .4s;
}
.stage-text { color: var(--muted); font-size: 13px; }
.error-box {
  max-width: 640px; margin: 40px auto; background: var(--card);
  border: 1px solid var(--red); border-radius: 12px; padding: 22px;
  box-shadow: var(--shadow-card);
  animation: popIn .35s var(--ease) backwards;
}
.error-box h3 { color: var(--red); margin: 0 0 10px; }
.error-box p { line-height: 1.65; font-size: 13.5px; }
.error-box .tip { background: var(--input-bg); border-radius: 8px; padding: 10px 12px; margin-top: 12px; font-size: 12.5px; }

/* ---------- stage: results ---------- */
.results { max-width: 900px; margin: 0 auto; }
/* staggered entrance for result blocks */
.results > * { animation: cardIn .55s var(--ease) backwards; }
.results > *:nth-child(2) { animation-delay: .06s; }
.results > *:nth-child(3) { animation-delay: .12s; }
.results > *:nth-child(4) { animation-delay: .18s; }
.results > *:nth-child(5) { animation-delay: .24s; }
.results > *:nth-child(6) { animation-delay: .3s; }
.results > *:nth-child(7) { animation-delay: .36s; }
.results > *:nth-child(8) { animation-delay: .42s; }
.results > *:nth-child(9) { animation-delay: .48s; }
.results > *:nth-child(10) { animation-delay: .54s; }
.results > *:nth-child(11) { animation-delay: .6s; }
.results > *:nth-child(12) { animation-delay: .66s; }
.results > *:nth-child(13) { animation-delay: .72s; }
.results > *:nth-child(14) { animation-delay: .78s; }
.res-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.res-head h2 { margin: 0; font-size: 20px; }
.res-actions { display: flex; gap: 8px; }
.res-actions button {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 12.5px;
  transition: all .25s ease;
}
.res-actions button:hover {
  border-color: var(--accent); transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(119, 221, 119, .28);
}
.sweep-card, .longlist-card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.sweep-card:hover, .longlist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.sweep-card h3, .longlist-card h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: 1px; color: var(--accent-text); }
.sweep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
.sweep-grid .k { color: var(--muted); }
.longlist-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.9; }
.clip-card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.clip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.clip-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.clip-head h3 { margin: 0; font-size: 16px; }
.clip-head h3 .cn { color: var(--accent-text); }
.jump-link {
  flex-shrink: 0; font-size: 12px; color: var(--accent-text); text-decoration: none;
  border: 1px solid var(--accent); border-radius: 8px; padding: 6px 11px; background: var(--accent-soft);
  transition: all .25s ease;
}
.jump-link:hover { filter: brightness(1.15); box-shadow: 0 0 14px var(--glow); }
.frow { display: flex; gap: 8px; align-items: flex-start; margin: 9px 0; font-size: 13px; line-height: 1.6; }
.frow .fl { flex-shrink: 0; min-width: 118px; font-weight: 700; color: var(--accent-text); font-size: 12px; padding-top: 2px; }
.frow .fv { flex: 1; }
.copy-btn {
  flex-shrink: 0; background: var(--input-bg); border: 1px solid var(--border);
  color: var(--muted); border-radius: 6px; padding: 3px 9px; font-size: 11px; cursor: pointer;
  transition: all .25s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 10px var(--glow); }
.stamp-line {
  font-family: Consolas, monospace; font-size: 12.5px; background: var(--input-bg);
  border-radius: 8px; padding: 9px 12px; margin: 8px 0; line-height: 1.7; border: 1px solid var(--border);
}
.score-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.score-chip {
  font-size: 11px; background: var(--accent-soft); border: 1px solid rgba(16,185,129,.4);
  color: var(--accent-text); border-radius: 6px; padding: 3px 8px;
  transition: all .25s ease;
}
.score-chip:hover { box-shadow: 0 0 10px var(--glow); }
.ovl { font-size: 12.5px; padding: 3px 0; }
.ovl .off { font-family: Consolas, monospace; color: var(--accent-text); margin-right: 8px; }
.dropped-card {
  background: var(--card); border: 1px dashed var(--amber); border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; font-size: 13px;
  box-shadow: var(--shadow-card);
  transition: all .25s ease;
}
.dropped-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.dropped-card h3 { margin: 0 0 8px; color: var(--amber); font-size: 13px; }
.raw-toggle { margin-top: 10px; }
.raw-toggle summary { cursor: pointer; color: var(--muted); font-size: 12.5px; transition: color .25s ease; }
.raw-toggle summary:hover { color: var(--accent-text); }
.raw-toggle pre {
  white-space: pre-wrap; font-size: 11.5px; background: var(--input-bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px;
  max-height: 400px; overflow-y: auto; line-height: 1.6;
}

/* ---------- lock overlay ---------- */
.lock-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 7, 16, .92); backdrop-filter: blur(6px);
  animation: fadeIn .3s ease backwards;
}
.lock-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 30px; width: 320px; text-align: center;
  box-shadow: var(--shadow-lift);
  animation: popIn .35s var(--ease) backwards;
}
.lock-box h2 { margin: 0 0 8px; }
.lock-box p { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.lock-box input { text-align: center; font-size: 20px; letter-spacing: 8px; margin-bottom: 12px; }
.lock-box .launch { width: 100%; padding: 12px; font-size: 14px; }

/* auth overlay */
.auth-overlay {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 7, 16, .94);
  animation: fadeIn .3s ease backwards;
}
.auth-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 30px; width: 340px; text-align: center;
  box-shadow: var(--shadow-lift);
  animation: popIn .35s var(--ease) backwards;
}
.auth-box h2 { margin: 0 0 8px; } .auth-box p { color: var(--muted); font-size: 13px; }
.auth-box input { margin: 12px 0; } .auth-box .launch { width: 100%; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2c3563; border-radius: 6px; transition: background .25s ease; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
body.light ::-webkit-scrollbar-thumb { background: #c3c9ea; }
body.light ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 900px) {
  .layout { flex-direction: column; height: auto; }
  .deck { width: 100%; min-width: 0; border-right: none; }
  .steps { grid-template-columns: 1fr; }
}

/* 1080p clip cutter */
.cut-card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--accent); border-radius: 12px; padding: 14px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cut-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cut-card h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: 1px; color: var(--accent-text); }
.cut-bar { height: 10px; background: rgba(128,128,128,.25); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.cut-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #5cb85c, #b8e6c0);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(119, 221, 119, .6);
  transition: width .4s;
}
.cut-stage { font-size: 13px; opacity: .85; }
.cut-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(128,128,128,.25); font-size: 13px; }
.cut-dl {
  background: linear-gradient(135deg, #77DD77, #6d28d9);
  color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 8px; font-size: 13px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(119, 221, 119, .35);
  transition: all .25s ease;
}
.cut-dl:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(119, 221, 119, .5); }
.cut-note { font-size: 12px; opacity: .7; margin-top: 10px; }
.cut-err { border-color: #e5484d; }

/* per-clip 1080p download button */
.clip-dl-btn {
  background: linear-gradient(135deg, #77DD77, #6d28d9);
  color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(119, 221, 119, .35);
  transition: all .25s ease;
}
.clip-dl-btn:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(119, 221, 119, .5); }
.clip-dl-btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* quality picker modal */
.qmodal-ov {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 9999;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .25s ease backwards;
}
.qmodal {
  background: var(--card); border: 1px solid var(--accent); border-radius: 14px; padding: 22px 26px; text-align: center; min-width: 280px;
  box-shadow: var(--shadow-lift);
  animation: popIn .32s var(--ease) backwards;
}
.qmodal h3 { margin: 0 0 14px; color: var(--accent-text); font-size: 15px; }
.qbtns { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.qbtns button {
  background: linear-gradient(135deg, #77DD77, #6d28d9);
  color: #fff; border: 0; border-radius: 10px; padding: 10px 20px; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(119, 221, 119, .35);
  transition: all .25s ease;
}
.qbtns button:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(119, 221, 119, .55); }
.qcancel {
  background: transparent; border: 1px solid rgba(128,128,128,.5); border-radius: 8px; padding: 6px 16px; cursor: pointer; color: inherit;
  transition: all .25s ease;
}
.qcancel:hover { border-color: var(--accent); }

/* respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  body::before { display: none; }
}
