:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f18;
  --card: #14141e;
  --card-2: #1c1c2a;
  --border: #1e1e30;
  --border-2: #2e2e44;
  --text: #f0f0f8;
  --muted: #78789a;
  --accent: #818cf8;
  --accent-2: #a5b4fc;
  --accent-dark: #6366f1;
  --accent-glow: rgba(129, 140, 248, .2);
  --green: #34d399;
  --red: #f87171;
  --gradient-1: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
  --gradient-2: linear-gradient(135deg, #818cf8 0%, #7c3aed 100%);
  --radius: 16px;
  --shadow: 0 16px 64px rgba(0, 0, 0, .5);
  --shadow-accent: 0 0 60px rgba(129, 140, 248, .12);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(129,140,248,.14), transparent 62%),
    radial-gradient(900px 500px at 100% 0%, rgba(124,58,237,.12), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1200px; margin: 0 auto; padding: 20px 24px;
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,10,15,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30,30,48,.75);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand strong { display: block; font-size: 1.02rem; letter-spacing: .1px; }
.brand small { display: block; color: var(--muted); font-size: .72rem; }
nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: .9rem; font-weight: 500; }
nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  color: var(--text) !important; border: 1px solid var(--border-2);
  padding: 9px 16px; border-radius: 8px; background: rgba(255,255,255,.025);
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent-2) !important; }
main { max-width: 1200px; margin: 0 auto; padding: 10px 24px 80px; }

.hero { display: grid; grid-template-columns: 1fr; gap: 34px; padding: 34px 0 10px; }
.eyebrow {
  display: inline-block; color: var(--accent-2); font-weight: 600; font-size: .76rem;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px;
}
.hero h1, .page-head h1 {
  font-size: clamp(2rem, 4.6vw, 3.35rem); line-height: 1.08; margin: 0 0 16px;
  letter-spacing: -.035em; font-weight: 800;
}
.hero p { color: var(--muted); font-size: 1.04rem; max-width: 650px; margin: 0; }
.hero-copy { max-width: 760px; }

.converter-card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--card);
  border: 1px solid var(--border); border-radius: 20px; padding: 18px;
  box-shadow: var(--shadow), var(--shadow-accent);
}
.dropzone {
  border: 2px dashed var(--border-2); border-radius: 14px; padding: 36px 20px; text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s;
  background: rgba(255,255,255,.012);
}
.dropzone:hover, .dropzone.drag, .dropzone:focus-visible {
  border-color: var(--accent); background: rgba(129,140,248,.06); outline: none;
}
.dz-icon { font-size: 2rem; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.dz-title { font-size: 1.06rem; font-weight: 600; }
.dz-title span { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.dz-hint { color: var(--muted); font-size: .82rem; margin-top: 7px; }
.controls { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; flex: 1; }
.field > span { color: var(--muted); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; }
.field-inline { flex-direction: row; align-items: center; min-width: auto; flex: 0 0 auto; padding-bottom: 12px; }
.field-inline span { text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--text); }
select, .search {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 12px; font-size: .92rem; outline: none; font-family: inherit;
}
select:focus, .search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
select:disabled { opacity: .55; }
.btn {
  border: 1px solid var(--border-2); background: var(--card-2); color: var(--text);
  padding: 11px 20px; border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: .2s;
}
.btn:hover { border-color: var(--border-2); background: #232338; }
.btn.primary { background: var(--gradient-1); border: 0; color: #fff; box-shadow: 0 4px 16px rgba(129,140,248,.3); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(129,140,248,.4); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.privacy-note { color: var(--muted); font-size: .79rem; margin-top: 12px; }

.pro-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 14px; padding: 16px 18px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(129,140,248,.14), rgba(124,58,237,.10));
  border: 1px solid rgba(129,140,248,.32);
}
.pro-card h3 { margin: 0 0 3px; font-size: 1rem; }
.pro-card p { margin: 0; color: var(--text-secondary, #b0b0c8); font-size: .84rem; }
.pro-card .btn { white-space: nowrap; }

.queue { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.queue:empty { display: none; }
.job {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.job-name { font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { color: var(--muted); font-size: .78rem; grid-column: 1 / 2; }
.job-actions { grid-row: 1 / span 2; display: flex; gap: 8px; align-items: center; }
.progress { height: 6px; border-radius: 999px; background: #07070c; overflow: hidden; grid-column: 1 / 2; }
.progress > i { display: block; height: 100%; width: 0; background: var(--gradient-1); transition: width .25s; }
.badge { font-size: .72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.badge.done { color: #a7f3d0; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.badge.error { color: #fecaca; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.dl { background: var(--green); color: #052e1e; border: 0; padding: 8px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.dl:hover { filter: brightness(1.08); text-decoration: none; }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 34px 0 8px; }
.trust > div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; }
.trust strong { display: block; font-size: 1.45rem; letter-spacing: -.02em; }
.trust span { color: var(--muted); font-size: .82rem; }

.how, .popular, .related, .faq, .lib-group, .formats { margin-top: 54px; }
.how h2, .popular h2, .related h2, .faq h2, .lib-group h2, .prose h2, .formats h2 {
  font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 700;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps > div { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.steps span {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: rgba(129,140,248,.14); color: var(--accent-2); font-weight: 700; margin-bottom: 10px;
}
.steps h3 { margin: 0 0 6px; font-size: 1rem; }
.steps p { margin: 0; color: var(--muted); font-size: .9rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--text);
  padding: 8px 13px; border-radius: 999px; font-size: .86rem; cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: var(--accent); background: rgba(129,140,248,.07); text-decoration: none; }

.page-head { padding: 34px 0 6px; max-width: 860px; }
.page-head.compact h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); }
.page-head p { color: var(--muted); font-size: 1.02rem; }
.search { margin-top: 18px; max-width: 560px; }
.library { margin-top: 20px; }
.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.format-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  color: var(--text); text-align: left; cursor: pointer; font-family: inherit; transition: .18s;
}
.format-card:hover { border-color: var(--accent); background: var(--card-2); text-decoration: none; transform: translateY(-1px); }
.format-card strong { font-size: .98rem; }
.format-card small { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.lib-group h2 span { color: var(--muted); font-size: .95rem; font-weight: 500; }
.lib-group[hidden] { display: none; }
.prose { max-width: 820px; color: var(--muted); }
.prose h2 { color: var(--text); margin-top: 32px; }
.prose pre { background: #07070c; border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow: auto; color: #d7d7e8; font-size: .85rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.faq details { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: rgba(255,255,255,.012); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.site-footer {
  border-top: 1px solid var(--border); margin-top: 70px; padding: 34px 24px 50px;
  max-width: 1200px; margin-left: auto; margin-right: auto;
  display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: .86rem;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-note { color: #616180; font-size: .78rem; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.footer-brand img { height: 38px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: #1c1c2a; border: 1px solid var(--border-2); color: var(--text);
  padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .22s; z-index: 50; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(248,113,113,.55); }

@media (min-width: 980px) {
  .hero { grid-template-columns: .9fr 1.1fr; align-items: start; padding-top: 44px; }
  .hero h1 { font-size: clamp(2.3rem, 3.4vw, 3.4rem); }
}
@media (max-width: 760px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; position: static; }
  nav { gap: 14px; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .controls { align-items: stretch; }
  .field { min-width: 100%; }
  .job { grid-template-columns: 1fr; }
  .job-actions { grid-row: auto; justify-content: flex-start; }
}

/* Account / conversion history */
.history-section { margin-top: 54px; }
.history-section .section-head { margin-bottom: 14px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card);
}
.history-item .hi-main { font-size: .9rem; font-weight: 600; }
.history-item .hi-meta { margin-top: 3px; color: var(--muted); font-size: .76rem; }
[hidden] { display: none !important; }
