/* ══════════════════════════════════════════════════════
   CONVERTLY — style.css  v3
   Direção visual: Clean Premium Dark-capable
   Fontes: Bricolage Grotesque (display) + Instrument Sans (body)
   Paleta: Midnight Slate + Electric Blue accent
   Com melhorias de animação e micro-interações
══════════════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────────────────── */
:root {
  /* Base */
  --bg:          #FAFAF9;
  --surface:     #FFFFFF;
  --surface-2:   #F4F4F2;
  --surface-3:   #ECEAE6;
  --border:      #E2E0DC;
  --border-mid:  #CCCAC5;

  /* Text */
  --tx:          #18181B;
  --tx-2:        #52525B;
  --tx-3:        #A1A1AA;

  /* Accent — electric indigo */
  --accent:      #4F46E5;
  --accent-hi:   #6366F1;
  --accent-lo:   #EEF2FF;
  --accent-mid:  #C7D2FE;

  /* Status */
  --green-bg:    #DCFCE7;
  --green-fg:    #15803D;
  --red:         #EF4444;
  --yellow:      #EAB308;

  /* Shadows */
  --sh-xs:  0 1px 2px rgba(0,0,0,.04);
  --sh-sm:  0 2px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --sh-md:  0 8px 24px rgba(0,0,0,.08), 0 3px 8px rgba(0,0,0,.04);
  --sh-lg:  0 24px 64px rgba(0,0,0,.10), 0 8px 24px rgba(0,0,0,.05);
  --sh-xl:  0 40px 100px rgba(0,0,0,.12);

  /* Ring (progress) */
  --ring-track: #E2E0DC;

  /* Layout */
  --max:     1120px;
  --hh:      64px;
  --r:       12px;
  --r-lg:    20px;
  --r-xl:    28px;
  --ease:    cubic-bezier(.4,0,.2,1);
  --spring:  cubic-bezier(.34,1.56,.64,1);
}

[data-theme="dark"] {
  --bg:         #0C0C0E;
  --surface:    #18181B;
  --surface-2:  #27272A;
  --surface-3:  #3F3F46;
  --border:     #3F3F46;
  --border-mid: #52525B;
  --tx:         #FAFAFA;
  --tx-2:       #A1A1AA;
  --tx-3:       #71717A;
  --accent:     #6366F1;
  --accent-hi:  #818CF8;
  --accent-lo:  #1E1B4B;
  --accent-mid: #312E81;
  --green-bg:   #14532D;
  --green-fg:   #4ADE80;
  --ring-track: #3F3F46;
  --sh-sm:      0 2px 8px rgba(0,0,0,.3);
  --sh-md:      0 8px 24px rgba(0,0,0,.4);
  --sh-lg:      0 24px 64px rgba(0,0,0,.5);
  --sh-xl:      0 40px 100px rgba(0,0,0,.6);
}

/* ── RESET ───────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:16px; scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tx);
  background: var(--bg);
  transition: background .25s var(--ease), color .25s var(--ease);
  overflow-x: hidden;
}
h1,h2,h3,h4 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor:pointer; font-family:inherit; border:none; background:none; }
img { max-width:100%; display:block; }
[hidden] { display:none !important; }

/* ── GRAIN OVERLAY ───────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}
[data-theme="dark"] .grain { opacity: .04; }

/* ── LAYOUT ──────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

/* ── TYPOGRAPHY HELPERS ──────────────────────────────── */
.sec-label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.sec-head { margin-bottom: 48px; }
.sec-head--center { text-align: center; }
.sec-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 8px; }
.sec-head p { color: var(--tx-2); font-size: 1.05rem; }

/* ── AD STRIP ────────────────────────────────────────── */
.ad-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
  position: relative;
}
.ad-strip__label {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tx-3);
}
.ad-strip__slot { color: var(--tx-3); font-size: .8rem; }

/* ── HEADER ──────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--hh);
  background: rgba(250,250,249,.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background .25s var(--ease);
}
[data-theme="dark"] .header { background: rgba(12,12,14,.88); }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.wordmark {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 1.2rem;
  color: var(--tx); text-decoration: none;
  letter-spacing: -.04em;
  flex-shrink: 0;
}
.wordmark__bolt { color: var(--accent); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--tx-2);
  text-decoration: none;
  transition: all .18s var(--ease);
}
.nav__link:hover { background: var(--surface-2); color: var(--tx); }

.header__controls { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--tx-2);
  display: flex; align-items: center; justify-content: center;
  transition: all .18s var(--ease);
}
.icon-btn:hover { border-color: var(--border-mid); color: var(--tx); background: var(--surface-2); }

.lang-sel {
  height: 34px; padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--tx);
  font-size: .82rem; font-family: inherit;
  cursor: pointer;
  transition: border-color .18s var(--ease);
}
.lang-sel:hover { border-color: var(--border-mid); }

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(72px, 12vw, 140px) 0 0;
  overflow: hidden;
}

.hero__bg {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: drift 12s ease-in-out infinite;
}
.a1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.3), rgba(79,70,229,.1));
  top: -200px; left: -150px;
  animation-delay: 0s;
}
.a2 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(139,92,246,.2), rgba(59,130,246,.1));
  top: -80px; right: -100px;
  animation-delay: -4s;
}
.a3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(99,102,241,.15), transparent);
  bottom: -100px; left: 40%;
  animation-delay: -8s;
}
[data-theme="dark"] .a1 { background: radial-gradient(circle, rgba(99,102,241,.4), rgba(79,70,229,.2)); }
[data-theme="dark"] .a2 { background: radial-gradient(circle, rgba(139,92,246,.3), rgba(59,130,246,.15)); }

@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(30px,-40px) scale(1.06); }
  66%      { transform: translate(-20px,20px) scale(.94); }
}

.hero__grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 80%);
}
[data-theme="dark"] .hero__grid-lines { opacity: .25; }

.hero__body {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 28px;
  padding-bottom: 80px;
}

.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .78rem; font-weight: 600; color: var(--tx-2);
  box-shadow: var(--sh-xs);
  animation: popUp .6s var(--spring) both;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-fg);
  box-shadow: 0 0 0 3px rgba(21,128,61,.2);
  animation: pulse-green 2s ease infinite;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 3px rgba(21,128,61,.2); }
  50%      { box-shadow: 0 0 0 6px rgba(21,128,61,.05); }
}

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -.04em;
  animation: popUp .7s var(--spring) .1s both;
}
.hero__em {
  font-style: italic;
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.hero__em::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: .06em; height: .1em;
  background: var(--accent-mid);
  border-radius: 4px;
  opacity: .6;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--tx-2);
  max-width: 480px;
  animation: popUp .7s var(--spring) .2s both;
}

.hero__actions {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  animation: popUp .7s var(--spring) .3s both;
}

/* PRIMARY BUTTON */
.primary-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem; font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: all .2s var(--ease);
  box-shadow: 0 4px 20px rgba(79,70,229,.35), 0 1px 3px rgba(79,70,229,.2);
  position: relative; overflow: hidden;
}
.primary-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
  border-radius: inherit;
}
.primary-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.primary-btn:active::after {
  width: 200%;
  height: 200%;
}
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79,70,229,.45), 0 2px 6px rgba(79,70,229,.25);
  text-decoration: none; color: #fff;
}
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.primary-btn--wide { width: 100%; justify-content: center; }
.primary-btn__bar {
  position: absolute; left:0; top:0; bottom:0;
  background: rgba(255,255,255,.15);
  width: 0; transition: width .35s var(--ease);
  border-radius: inherit;
}

.trust-pills {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 8px;
}
.trust-pill {
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .75rem; color: var(--tx-2);
}

/* FLOATING FORMAT TAGS */
.fmt-cloud {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  pointer-events: none;
  animation: popUp .8s var(--spring) .5s both;
}
.fmt-tag {
  position: absolute;
  transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)));
  padding: 5px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .72rem; font-weight: 700;
  color: var(--tx-2);
  letter-spacing: .04em;
  box-shadow: var(--sh-sm);
  animation: floatTag 6s ease-in-out var(--delay) infinite;
  white-space: nowrap;
}
.fmt-tag--hi {
  background: var(--accent); color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(79,70,229,.3);
}
@keyframes floatTag {
  0%,100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))); }
  50%      { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) - 8px)); }
}

/* STATS BAR */
.stats-bar {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 0;
  margin-top: 0;
}
.stats-bar__inner {
  display: flex; align-items: center;
  justify-content: center; gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: 0 clamp(20px, 4vw, 48px);
}
.stat-item b {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800; color: var(--accent);
  letter-spacing: -.04em;
}
.stat-item span {
  font-size: .72rem; color: var(--tx-3);
  font-weight: 500; text-transform: uppercase;
  letter-spacing: .06em;
}
.stat-sep {
  width: 1px; height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── TOOLS SECTION ───────────────────────────────────── */
.tools-sec {
  padding: clamp(64px, 10vw, 112px) 0 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.tool-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  box-shadow: var(--sh-xs);
}
.tool-card:hover {
  border-color: var(--accent-mid);
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
}
.tool-card.active {
  border-color: var(--accent);
  background: var(--accent-lo);
  box-shadow: 0 0 0 3px var(--accent-mid);
}
[data-theme="dark"] .tool-card.active { background: var(--accent-lo); }

.tool-card__ico {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg); /* overridden by inline */
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg, #F4F4F2);
}
/* use inline CSS vars set in HTML */
.tool-card__ico { background: var(--bg); color: var(--fg); }
/* redefine with the card's custom properties */
.tool-card .tool-card__ico {
  background: var(--bg, var(--surface-2));
  color: var(--fg, var(--accent));
}

/* We use inline style vars --bg and --fg */
.tool-card__ico {
  background: var(--bg, #EEF2FF) !important;
  color: var(--fg, #4F46E5) !important;
}
[data-theme="dark"] .tool-card__ico {
  filter: brightness(.7);
}

.tool-card__txt { flex: 1; min-width: 0; }
.tool-card__txt strong {
  display: block; font-size: .92rem;
  font-weight: 600; color: var(--tx);
  margin-bottom: 2px;
  font-family: 'Bricolage Grotesque', sans-serif;
}
.tool-card__txt span { font-size: .78rem; color: var(--tx-2); }

.tool-card__chk {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: var(--tx-3);
  flex-shrink: 0;
  transition: all .2s var(--ease);
}
.tool-card.active .tool-card__chk {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-size: .75rem;
}

/* ── CONVERTER SECTION ───────────────────────────────── */
.conv-sec {
  padding: clamp(48px, 8vw, 96px) 0;
}

/* STEPPER */
.stepper {
  display: flex; align-items: center;
  justify-content: center; gap: 0;
  margin-bottom: 40px;
}
.stepper__step {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.stepper__dot {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  color: var(--tx-3);
  transition: all .25s var(--ease);
}
.stepper__lbl {
  font-size: .72rem; font-weight: 600;
  color: var(--tx-3); letter-spacing: .02em;
  text-transform: uppercase;
  transition: color .25s var(--ease);
}
.stepper__line {
  width: clamp(32px, 6vw, 80px); height: 2px;
  background: var(--border);
  margin-bottom: 22px;
}
.stepper__step.active .stepper__dot {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 5px var(--accent-mid);
}
.stepper__step.active .stepper__lbl { color: var(--accent); }
.stepper__step.done .stepper__dot {
  background: var(--green-fg); border-color: var(--green-fg);
  color: #fff;
}
.stepper__step.done .stepper__lbl { color: var(--green-fg); }

/* CONVERTER CARD */
.conv-card {
  max-width: 760px; margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  padding: clamp(24px, 4vw, 48px);
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.conv-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-xl);
}

/* DROPZONE */
.dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  cursor: pointer;
  transition: all .2s var(--ease);
  overflow: hidden;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  background: var(--accent-lo);
}
.dropzone.over { transform: scale(1.01); box-shadow: 0 0 0 4px var(--accent-mid); }
.dropzone__input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.dropzone__inner {
  padding: clamp(40px, 6vw, 72px) 24px;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  text-align: center; pointer-events: none;
}
.dropzone__icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  box-shadow: var(--sh-sm);
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.dropzone__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--tx);
}
.dropzone__hint { font-size: .88rem; color: var(--tx-2); }
.link-look { color: var(--accent); font-weight: 600; cursor: pointer; }
.dropzone__tags {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 6px;
  margin-top: 4px;
}
.dropzone__tags span {
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .7rem; font-weight: 700;
  color: var(--tx-2); letter-spacing: .05em;
}
.dropzone__limit { font-size: .72rem; color: var(--tx-3); }

/* AD BLOCKS */
.ad-block {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--r);
  padding: 14px;
  margin-block: 20px;
  min-height: 80px;
  position: relative;
}
.ad-block--sm { min-height: 60px; margin-bottom: 24px; }
.ad-label {
  position: absolute; top: 6px; left: 10px;
  font-size: .58rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--tx-3);
}
.ad-slot { font-size: .78rem; color: var(--tx-3); }

/* QUEUE */
.queue { margin-top: 20px; }
.queue__hdr {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.queue__hdr h3 {
  font-size: .95rem; color: var(--tx);
  font-family: 'Bricolage Grotesque', sans-serif;
}
.queue__list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.q-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .85rem;
  animation: slideIn 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1) both;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.q-item__ico { font-size: 1.1rem; flex-shrink: 0; }
.q-item__name {
  flex: 1; color: var(--tx); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.q-item__size { font-size: .75rem; color: var(--tx-3); flex-shrink: 0; }
.q-item__rm {
  width: 24px; height: 24px; border-radius: 50%;
  background: transparent; color: var(--tx-3);
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; border: none;
  transition: all .18s var(--ease);
}
.q-item__rm:hover { background: #FEE2E2; color: #EF4444; }

/* PREVIEW GRID */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px; margin-top: 14px;
}
.prev-thumb {
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: slideUp .25s var(--spring);
}
.prev-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* OPTIONS BOX */
.options-box {
  margin-top: 20px; padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.options-box__row {
  display: flex; align-items: center;
  gap: 14px; flex-wrap: wrap;
}
.options-box__row label {
  font-size: .85rem; font-weight: 600;
  color: var(--tx-2); white-space: nowrap;
}
.sel {
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--tx);
  font-size: .88rem; font-family: inherit;
  cursor: pointer; flex: 1; min-width: 180px;
  transition: border-color .18s var(--ease);
}
.sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-mid); }
.options-box__extras {
  margin-top: 12px; display: flex;
  flex-wrap: wrap; gap: 12px;
}
.extra-opt {
  display: flex; align-items: center; gap: 7px;
  font-size: .83rem; color: var(--tx-2);
}
.extra-opt input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.extra-opt select { padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--tx); font-size: .82rem; font-family: inherit; min-width: 130px; }

/* CONVERT BUTTON */
.primary-btn--wide {
  margin-top: 20px;
  border-radius: 12px;
}

/* GHOST BUTTON */
.ghost-btn {
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: transparent; color: var(--tx-2);
  font-family: inherit; font-size: .88rem; font-weight: 500;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.ghost-btn:hover { border-color: var(--border-mid); color: var(--tx); background: var(--surface-2); }
.ghost-btn.sm { padding: 5px 12px; font-size: .78rem; border-radius: 8px; }

/* PROGRESS VIEW */
.prog-view {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  padding: 48px 24px;
}
.prog-view__ring {
  position: relative; width: 88px; height: 88px;
  display: flex; align-items: center; justify-content: center;
}
.prog-svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.prog-track { stroke: var(--ring-track); stroke-width: 5; fill: none; }
.prog-fill {
  fill: none; stroke: var(--accent); stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 4px var(--accent));
}
.prog-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem; font-weight: 800; color: var(--accent);
}
.prog-label { font-size: .88rem; color: var(--tx-2); }

/* RESULT VIEW */
.result-view { padding-top: 4px; }
.result-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 0 24px;
}
.result-hero h3 {
  font-size: 1.3rem;
  font-family: 'Bricolage Grotesque', sans-serif;
}
.result-hero p { font-size: .88rem; color: var(--tx-2); margin-top: 2px; }
.result-check { flex-shrink: 0; animation: popBounce .5s var(--spring); }

.dl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.dl-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--accent-lo);
  border: 1px solid var(--accent-mid);
  border-radius: var(--r);
  animation: slideUp .2s var(--spring);
  transition: all 0.2s ease;
}
.dl-item:hover {
  transform: translateX(4px);
  background: var(--surface);
}
.dl-item__ico { font-size: 1.2rem; }
.dl-item__name { flex: 1; font-weight: 600; font-size: .88rem; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-item__size { font-size: .75rem; color: var(--tx-2); flex-shrink: 0; }
.dl-item__btn {
  padding: 7px 14px;
  background: var(--accent); color: #fff;
  border-radius: 8px;
  font-size: .78rem; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer; flex-shrink: 0;
  transition: all .18s var(--ease);
}
.dl-item__btn:hover { background: var(--accent-hi); }

.result-actions {
  display: flex; flex-direction: column; gap: 10px;
}

/* ── HOW SECTION ─────────────────────────────────────── */
.how-sec {
  padding: clamp(64px, 10vw, 112px) 0;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.how-row {
  display: flex; align-items: center;
  gap: 16px; flex-wrap: wrap;
  justify-content: center;
}
.how-card {
  flex: 1; min-width: 220px; max-width: 280px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  text-align: center;
  transition: all .2s var(--ease);
}
.how-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--accent-mid); }
.how-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 3rem; font-weight: 800;
  color: var(--accent-mid); line-height: 1;
  margin-bottom: 12px;
}
[data-theme="dark"] .how-num { color: var(--accent); opacity: .4; }
.how-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.how-card p { font-size: .84rem; color: var(--tx-2); }
.how-arr { font-size: 1.5rem; color: var(--border-mid); flex-shrink: 0; }

/* ── HISTORY SECTION ─────────────────────────────────── */
.hist-sec { padding: clamp(64px, 10vw, 96px) 0; }
.hist-card {
  max-width: 760px; margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--sh-sm);
}
.hist-empty { text-align: center; color: var(--tx-3); padding: 28px; font-size: .9rem; }
.hist-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.h-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r);
  font-size: .83rem;
  animation: slideUp .2s var(--spring);
}
.h-item__ico { font-size: 1.1rem; }
.h-item__name { flex: 1; color: var(--tx); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-item__type {
  padding: 2px 8px;
  background: var(--accent-lo);
  color: var(--accent);
  border-radius: 100px;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
}
.h-item__time { font-size: .72rem; color: var(--tx-3); flex-shrink: 0; }

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: flex; gap: 40px; flex-wrap: wrap;
  padding-top: 48px; padding-bottom: 40px;
}
.footer__brand { flex: 1; min-width: 180px; }
.footer__brand p { margin-top: 8px; font-size: .84rem; color: var(--tx-2); }
.footer__links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col strong { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tx-3); margin-bottom: 4px; }
.footer__col a { font-size: .84rem; color: var(--tx-2); transition: color .18s; }
.footer__col a:hover { color: var(--accent); text-decoration: none; }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  font-size: .75rem; color: var(--tx-3);
}

/* ── TOASTS ──────────────────────────────────────────── */
.toasts {
  position: fixed; bottom: 20px; right: 20px; z-index: 9000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: rgba(24, 24, 27, 0.95);
  color: #fff;
  border-radius: 12px;
  font-size: .85rem; font-weight: 500;
  box-shadow: var(--sh-lg);
  max-width: 300px;
  pointer-events: all;
  animation: toastIn .3s var(--spring) both;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
}
[data-theme="light"] .toast {
  background: rgba(24, 24, 27, 0.95);
  color: white;
}
.toast.success { background: var(--green-fg); color: #fff; border: none; }
.toast.error   { background: var(--red); color: #fff; border: none; }
.toast.warning { background: var(--yellow); color: #1a1a1a; border: none; }

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes popUp {
  from { opacity:0; transform: translateY(16px) scale(.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
@keyframes popBounce {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes slideUp {
  from { opacity:0; transform: translateY(8px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity:0; transform: translateX(40px); }
  to   { opacity:1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity:1; transform: translateX(0); }
  to   { opacity:0; transform: translateX(40px); }
}

/* ── LOADING SKELETON ───────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { display: none; }
  .fmt-cloud { display: none; }
  .stats-bar__inner { gap: 0; }
  .stat-sep { height: 24px; }
  .stat-item { padding: 0 clamp(10px, 3vw, 24px); }
  .tools-grid { grid-template-columns: 1fr; }
  .how-row { flex-direction: column; }
  .how-card { max-width: 100%; width: 100%; }
  .how-arr { display: none; }
  .result-actions { flex-direction: column; }
  .toasts { left: 16px; right: 16px; }
  .toast { max-width: 100%; }
  
  /* Touch targets */
  button, 
  .tool-card,
  .q-item__rm,
  .dl-item__btn {
    min-height: 44px;
  }
  
  .tool-card {
    padding: 14px;
  }
  
  .dropzone__inner {
    padding: 32px 20px;
  }
}

@media (max-width: 520px) {
  .hero__title { letter-spacing: -.03em; }
  .conv-card { padding: 18px 14px; }
  .stepper__line { width: 24px; }
  .options-box__row { flex-direction: column; align-items: flex-start; }
  .sel { min-width: unset; width: 100%; }
}

/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── FOCUS ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── SELECTION COLOR ─────────────────────────────────── */
::selection {
  background: var(--accent);
  color: white;
}
::-moz-selection {
  background: var(--accent);
  color: white;
}

/* ── GLASS MORPHISM ENHANCEMENT ──────────────────────── */
@supports (backdrop-filter: blur(10px)) {
  .conv-card {
    backdrop-filter: blur(0px);
  }
  
  .header {
    backdrop-filter: blur(20px) saturate(180%);
  }
}

/* ── PRINT STYLES ────────────────────────────────────── */
@media print {
  .ad-strip,
  .ad-block,
  .footer,
  .grain,
  .hero__bg,
  .fmt-cloud,
  .stats-bar,
  .header {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .conv-card {
    box-shadow: none;
    border: 1px solid #ccc;
    padding: 20px;
  }
}