:root {
  --bg: #0b0f17;
  --bg2: #101624;
  --panel: #121a29;
  --border: #1f2a3d;
  --border-strong: #2a3a55;
  --text: #e7edf6;
  --text-dim: #8b98ad;
  --accent: #4b6bd8;
  --accent-2: #7c5cff;
  --accent-soft: rgba(75, 107, 216, 0.16);
  --ok: #4cc38a;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }
.hidden-input { display: none; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 26px;
  background: rgba(11, 15, 23, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; }
.logo { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.logo .accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav-links a { color: var(--text-dim); transition: color .12s; }
.nav-links a:hover { color: var(--text); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 7px;
  padding: 7px 13px; font-family: var(--sans); font-size: 13px;
  cursor: pointer; transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #3f5cc7; border-color: #3f5cc7; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; font-weight: 600; }
.btn-block { display: block; width: 100%; padding: 10px; font-size: 14px; }

/* ---- hero ---- */
.hero {
  position: relative; padding: 84px 26px 64px; text-align: center; overflow: hidden;
  background:
    radial-gradient(55% 70% at 18% 0%, rgba(75, 107, 216, 0.20), transparent 60%),
    radial-gradient(50% 65% at 82% 8%, rgba(124, 92, 255, 0.16), transparent 55%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(60% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 880px; margin: 0 auto; }
.eyebrow {
  display: inline-block; padding: 5px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 13px; color: var(--text-dim); background: var(--panel);
}
.hero h1 { font-size: clamp(32px, 5.2vw, 54px); line-height: 1.1; letter-spacing: -1.4px; margin: 22px 0 18px; font-weight: 800; }
.grad { background: linear-gradient(92deg, #7b96ff 0%, #a78bfa 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 17.5px; color: var(--text-dim); max-width: 680px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 26px; font-weight: 800; }
.stat span { font-size: 13px; color: var(--text-dim); }

/* ---- tools ---- */
.tools-section { max-width: 1100px; margin: 0 auto; padding: 56px 26px 24px; scroll-margin-top: 80px; }
.tools-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.tools-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.4px; }
.hint { color: var(--text-dim); font-size: 12.5px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 18px; cursor: pointer; color: var(--text); font-family: var(--sans);
  transition: border-color .15s, transform .15s, background .15s;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-3px); background: var(--panel); }
.tc-icon { font-size: 26px; line-height: 1; }
.tc-name { font-weight: 700; font-size: 15.5px; }
.tc-desc { font-size: 12.8px; color: var(--text-dim); line-height: 1.45; }

/* ---- tool panel ---- */
.tool-panel { border: 1px solid var(--border); border-radius: 16px; background: var(--bg2); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.panel-title { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.panel-icon { font-size: 20px; }
.panel-title h3 { margin: 0; font-size: 16px; }
.panel-privacy { font-size: 12px; color: var(--ok); white-space: nowrap; }
.panel-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.dropzone {
  border: 2px dashed var(--border-strong); border-radius: 12px;
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { font-size: 30px; color: var(--text-dim); line-height: 1; margin-bottom: 8px; }
.dz-main { margin: 0; font-weight: 600; }
.dz-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text-dim); }

.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 12px;
}
.file-idx { font-family: var(--mono); font-size: 12px; color: var(--text-dim); min-width: 20px; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.file-size { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.file-actions { display: flex; gap: 4px; }
.file-btn {
  background: transparent; border: 1px solid var(--border-strong); color: var(--text-dim);
  border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.file-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.file-btn:disabled { opacity: .3; cursor: default; }

.options { display: flex; flex-direction: column; gap: 14px; }
.opt-group { display: flex; flex-direction: column; gap: 6px; }
.opt-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.opt-input, .opt-select {
  background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 7px; padding: 9px 11px; font-size: 14px; font-family: var(--sans); width: 100%;
}
.opt-input:focus, .opt-select:focus { outline: none; border-color: var(--accent); }
.opt-help { font-size: 12px; color: var(--text-dim); }
.opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.panel-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.progress { height: 6px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }

.result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid rgba(76,195,138,.35); background: rgba(76,195,138,.08);
  border-radius: 10px; padding: 14px 16px;
}
.result-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { font-size: 12px; color: var(--text-dim); }
.result.plain { border-color: var(--border-strong); background: var(--panel); }

/* ---- faq ---- */
.faq { max-width: 1100px; margin: 0 auto; padding: 48px 26px; }
.faq h2 { font-size: 24px; letter-spacing: -0.4px; margin: 0 0 20px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.faq-item h3 { margin: 0 0 8px; font-size: 15.5px; }
.faq-item p { margin: 0; color: var(--text-dim); font-size: 13.5px; }

/* ---- footer ---- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px 26px; color: var(--text-dim); font-size: 12.5px;
  border-top: 1px solid var(--border);
}
.foot-actions { display: flex; gap: 8px; }
.support-btn {
  background: transparent; border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 7px; padding: 6px 12px; font-size: 12.5px; cursor: pointer;
  transition: background .12s, border-color .12s; display: inline-flex; align-items: center;
}
.support-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ---- modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative; background: var(--bg2); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 24px; width: 380px; max-width: 92%;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal-text { color: var(--text-dim); font-size: 13px; line-height: 1.5; margin: 0 0 16px; }
.modal-close { position: absolute; top: 10px; right: 12px; background: transparent; border: none; color: var(--text-dim); font-size: 22px; cursor: pointer; line-height: 1; }
.amount-row { display: flex; gap: 8px; margin-bottom: 14px; }
.amount {
  flex: 1; background: var(--panel); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 7px; padding: 9px 0; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.amount:hover { border-color: var(--accent); }
.amount.active { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
.modal-note { color: var(--text-dim); font-size: 11px; text-align: center; margin: 12px 0 0; }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 8px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 200; max-width: 90%;
}
.toast[hidden] { display: none; }
.toast.err { background: #c0392b; }

/* ---- pro / freemium ---- */
.pro-area { display: inline-flex; align-items: center; gap: 8px; }
.plan-badge { font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; }
.plan-badge.pro { background: rgba(232,181,74,.18); color: #e8b54a; border: 1px solid rgba(232,181,74,.4); }
.plan-badge.free { background: var(--panel); color: var(--text-dim); border: 1px solid var(--border-strong); }
.tool-card { position: relative; }
.tc-lock {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: #e8b54a; background: rgba(232,181,74,.14);
  border: 1px solid rgba(232,181,74,.45); border-radius: 999px; padding: 2px 8px;
}
.up-sub { margin: 16px 0 2px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.field-label { display: block; font-size: 12px; color: var(--text-dim); margin: 10px 0 5px; }
.field { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); border-radius: 7px; padding: 9px 11px; font-size: 14px; font-family: var(--sans); }
.field:focus { outline: none; border-color: var(--accent); }
.form-error { color: #f1a8a8; font-size: 12.5px; min-height: 18px; margin-top: 8px; }
.link-btn { display: block; width: 100%; margin-top: 12px; background: none; border: none; color: var(--accent); font-size: 13px; cursor: pointer; text-align: center; }
.link-btn:hover { text-decoration: underline; }
.pro-list { margin: 0 0 14px; padding-left: 18px; color: var(--text); font-size: 13.5px; line-height: 1.9; }
.pay-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-dim); text-align: center; }
.pay-note strong { color: var(--text); }

/* ---- payment trust badges ---- */
.foot-left { display: flex; flex-direction: column; gap: 2px; }
.pay-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.pay-badges-label { font-size: 12px; color: var(--text-dim); margin-right: 2px; }
.pay-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #1a1a1a; border-radius: 6px;
  padding: 3px 9px; font-size: 11.5px; font-weight: 700;
  font-family: var(--sans); letter-spacing: .01em; line-height: 1.5;
}
.pay-badge.paypal { color: #003087; }
.pay-badge.visa { color: #1a1f71; font-style: italic; letter-spacing: .04em; }
.mc-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }
.mc-dot.mc-r { background: #eb001b; }
.mc-dot.mc-o { background: #f79e1b; margin-left: -5px; }

/* ---- responsive ---- */
@media (max-width: 960px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 60px 20px 44px; }
  .hero-stats { gap: 28px; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .tools-section { padding: 40px 18px 20px; }
  .hint { display: none; }
  .opt-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .tool-grid { grid-template-columns: 1fr; } }
