:root {
  --bg: #0f1220;
  --bg-elev: #171a2e;
  --card: #1e2238;
  --border: #2a2f4a;
  --text: #e7e9f7;
  --muted: #9199b8;
  --accent: #7c5cff;
  --accent-2: #4ec8ff;
  --good: #2bd47d;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(78,200,255,.18), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 1.2rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.accent { color: var(--accent-2); }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.brand-icon { font-size: 1.5rem; }
.brand-name { font-size: 1.1rem; }
.site-nav { display: flex; gap: 1.2rem; align-items: center; font-size: .95rem; }
.site-nav a { color: var(--muted); transition: color .15s; }
.site-nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .7rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5d8bff); color: #fff; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-2); }
.btn-lg { padding: .9rem 1.4rem; font-size: 1rem; }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* Hero / main */
main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero .lede { color: var(--muted); max-width: 640px; margin: 1rem auto 2rem; font-size: 1.05rem; }

/* Drop zone */
.drop-zone {
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  transition: border-color .15s, background .15s, transform .15s;
  cursor: pointer;
  max-width: 780px;
  margin: 0 auto;
}
.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-drag {
  border-color: var(--accent);
  background: linear-gradient(180deg, #1b2040, #161a34);
}
.drop-zone.is-drag { transform: scale(1.01); }
.drop-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.drop-title { font-size: 1.25rem; font-weight: 700; }
.drop-sub { color: var(--muted); margin: .35rem 0 1.2rem; }

/* Controls */
.controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  max-width: 780px;
  margin: 1.2rem auto 0;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}
.control label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.slider-row { display: flex; align-items: center; gap: .75rem; }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); }
.slider-val { min-width: 3.5ch; font-variant-numeric: tabular-nums; color: var(--accent-2); font-weight: 600; }
.control select {
  width: 100%;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .6rem;
}
.control-actions { display: flex; gap: .6rem; align-items: end; }

/* Summary */
.summary {
  max-width: 780px;
  margin: 1rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.summary-cell {
  background: var(--card);
  padding: .8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.summary-cell.accent { color: var(--good); }
.summary-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }

/* File list */
.file-list {
  max-width: 780px;
  margin: 1rem auto 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.file-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem .85rem;
  text-align: left;
}
.file-thumb {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-elev);
}
.file-meta { min-width: 0; }
.file-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-sub { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.file-saved {
  font-weight: 700;
  color: var(--good);
  min-width: 4ch;
  text-align: right;
}
.file-saved.bad { color: var(--danger); }
.file-actions { display: flex; gap: .4rem; }
.file-row.is-error { border-color: rgba(255,107,107,.4); }
.file-row.is-working { opacity: .6; }
.file-progress {
  grid-column: 1 / -1;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.file-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .2s;
}

/* Upsell */
.upsell {
  max-width: 780px;
  margin: 1.5rem auto 0;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(78,200,255,.1));
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.upsell-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.2rem;
  align-items: center;
  justify-content: space-between;
}
.upsell-inner strong { color: var(--accent-2); }

/* Features */
.features { margin: 5rem 0 3rem; text-align: center; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
}
.feature-icon { font-size: 1.6rem; margin-bottom: .4rem; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Pricing */
.pricing { margin: 4rem 0; text-align: center; }
.plans {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  text-align: left;
}
.plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}
.plan h3 { font-size: 1.15rem; }
.plan .price { display: flex; align-items: baseline; gap: .3rem; }
.plan .amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.plan .period { color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.plan ul li::before { content: "✓"; color: var(--good); margin-right: .5rem; font-weight: 700; }
.plan-featured { border-color: var(--accent); box-shadow: var(--shadow); }
.plan-badge {
  position: absolute;
  top: -.7rem;
  left: 1.5rem;
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 6px;
}

/* FAQ */
.faq { margin: 4rem auto; max-width: 780px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: .6rem;
}
.faq details[open] { border-color: var(--accent); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::marker { content: ""; }
.faq summary::after { content: "+"; float: right; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); margin: .7rem 0 0; }

/* Footer */
.site-footer {
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 1.5rem 1.5rem 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  font-size: .9rem;
}
.foot-col { display: flex; flex-direction: column; gap: .3rem; }
.foot-col a { color: var(--muted); }
.foot-col a:hover { color: var(--text); }
@media (max-width: 640px) {
  .site-footer { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr 1fr; }
  .site-nav a:not(.btn) { display: none; }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem 1rem;
  box-shadow: var(--shadow);
  max-width: 90vw;
  z-index: 50;
}

/* Payment pages */
.page-card {
  max-width: 560px;
  margin: 4rem auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.page-card h1 { margin-bottom: 1rem; }
.page-card p { color: var(--muted); }

/* Ad slot */
.ad-slot { max-width: 1080px; margin: 2rem auto; padding: 0 1rem; }

/* License display on success page */
.license-card {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 12px;
  text-align: left;
}
.license-label { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.license-key-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.license-key-row code {
  flex: 1 1 auto;
  padding: .55rem .8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  letter-spacing: .04em;
  word-break: break-all;
}

/* Nav link */
.site-nav-link { cursor: pointer; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: min(440px, 92vw);
  z-index: 1;
}
.modal-card h2 { margin: 0 0 .5rem; }
.modal-card label { display: block; margin: 1rem 0 .35rem; font-weight: 600; font-size: .92rem; }
.modal-card input[type=email], .modal-card input[type=text] {
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.modal-card input:focus { outline: 2px solid rgba(99,102,241,.35); outline-offset: 1px; }
.modal-card .small { font-size: .78rem; margin-top: .3rem; }
.modal-close {
  position: absolute; top: .6rem; right: .6rem;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: #f1f5f9; cursor: pointer;
  font-size: 1.2rem; line-height: 1;
}
.modal-close:hover { background: #e2e8f0; }
.modal-actions { display: flex; gap: .6rem; margin-top: 1.25rem; }
.modal-actions .btn { flex: 1; }
.modal-error {
  margin-top: .8rem;
  padding: .6rem .8rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: .9rem;
}
