/* =============================================
   ImageShift v2 – Complete Stylesheet
   ============================================= */

:root {
  --bg:           #0a0c18;
  --bg2:          #0f1120;
  --bg3:          #161928;
  --surface:      #1c2038;
  --surface2:     #222740;
  --surface3:     #282e4a;
  --border:       rgba(255,255,255,0.07);
  --border2:      rgba(255,255,255,0.12);
  --border-hover: rgba(255,255,255,0.20);

  --text:         #eef0ff;
  --text-2:       #8b93c4;
  --text-3:       #4e5680;

  --accent:       #2ECECE;
  --accent2:      #7C6FFF;
  --accent3:      #FF6B9D;
  --accent-rgb:   46,206,206;
  --accent2-rgb:  124,111,255;

  --success:      #34d399;
  --danger:       #f87171;
  --warn:         #fbbf24;

  --radius-xs:    4px;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    22px;
  --radius-xl:    32px;

  --shadow-sm:    0 2px 8px rgba(0,0,0,0.5);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-lg:    0 24px 64px rgba(0,0,0,0.7);
  --shadow-glow:  0 0 40px rgba(46,206,206,0.15);

  --font-d: 'Syne', sans-serif;
  --font-b: 'DM Sans', sans-serif;
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --t:      0.22s;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: #fff; }
button { font-family: var(--font-b); cursor: pointer; }

/* ── Utility ───────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── TOAST ─────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  pointer-events: all;
  animation: toastIn 0.3s var(--ease) forwards;
  max-width: 340px;
  backdrop-filter: blur(12px);
}
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }
.toast.success { border-color: rgba(52,211,153,0.3); color: var(--success); }
.toast.error   { border-color: rgba(248,113,113,0.3); color: var(--danger); }
.toast.info    { border-color: rgba(46,206,206,0.3);  color: var(--accent); }
@keyframes toastIn  { from { opacity:0; transform:translateY(12px) scale(0.96); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; transform:none; } to { opacity:0; transform:translateY(8px) scale(0.96); } }

/* ── MODAL ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,10,20,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.3s var(--ease);
}
.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  z-index: 10;
  transition: all var(--t) var(--ease);
}
.modal-close:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }

.modal-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  padding: 48px 32px 24px;
  align-items: start;
}
.compare-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-align: center;
}
.compare-side img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  object-fit: contain;
  max-height: 320px;
  background: var(--bg3);
}
.compare-meta {
  font-size: 0.82rem;
  color: var(--text-2);
  text-align: center;
  line-height: 1.5;
}
.compare-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  margin-top: 40px;
  color: var(--text-3);
}
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── HEADER ────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,12,24,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t) var(--ease);
}
.site-header.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.5); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 66px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-d);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo strong { color: var(--accent); }
.logo-icon { display: flex; align-items: center; }

.site-nav { display: flex; gap: 24px; }
.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t);
  position: relative;
  padding-bottom: 2px;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width var(--t) var(--ease);
  border-radius: 2px;
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { width: 100%; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.privacy-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2.5s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity:1; box-shadow: 0 0 6px var(--success); }
  50%       { opacity:0.7; box-shadow: 0 0 14px var(--success); }
}
.header-badge {
  background: linear-gradient(135deg, rgba(46,206,206,0.12), rgba(124,111,255,0.12));
  border: 1px solid rgba(46,206,206,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ── HERO ──────────────────────────────────── */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(46,206,206,0.08);
  border: 1px solid rgba(46,206,206,0.22);
  border-radius: 100px;
  padding: 6px 18px;
  letter-spacing: 0.03em;
  margin-bottom: 32px;
}
.tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease infinite;
}

h1 {
  font-family: var(--font-d);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto 44px;
  line-height: 1.75;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
  gap: 2px;
}
.stat-num {
  font-family: var(--font-d);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-d);
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 500;
  white-space: nowrap;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* Format pills */
.hero-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.fmt-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  user-select: none;
}
.fmt-pill:hover, .fmt-pill.active {
  background: rgba(46,206,206,0.1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb),0.2);
}

/* ── CONVERTER ─────────────────────────────── */
.converter-section { padding: 0 0 96px; }

/* Settings Panel */
.settings-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.settings-row {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}
.setting-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Select */
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%;
  appearance: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 36px 10px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
}
.select-wrap select:hover { border-color: var(--border2); }
.select-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15);
}
.select-arrow {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-3);
}

/* Slider */
.slider-wrap {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}
.slider-wrap input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 4px;
  background: var(--bg3);
  border-radius: 100px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  border: none;
}
.slider-track-fill {
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  pointer-events: none;
  z-index: 1;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.2), var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t);
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb),0.25);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  cursor: pointer;
}
.quality-num {
  font-family: var(--font-d);
  font-weight: 700;
  color: var(--accent);
  font-size: 1em;
}
.quality-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-3);
  width: 200px;
  margin-top: 2px;
}

/* Toggle */
.toggle-row { display: flex; align-items: center; gap: 10px; }
input[type="checkbox"]#resizeToggle { display: none; }
.toggle-label {
  display: inline-block;
  width: 44px; height: 24px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  transition: background var(--t), border-color var(--t);
  flex-shrink: 0;
}
.toggle-label::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform var(--t) var(--ease), background var(--t);
}
input#resizeToggle:checked + .toggle-label {
  background: rgba(var(--accent-rgb),0.2);
  border-color: var(--accent);
}
input#resizeToggle:checked + .toggle-label::after {
  transform: translateX(20px);
  background: var(--accent);
}
.toggle-hint {
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 500;
  transition: color var(--t);
}

/* Resize fields */
.resize-fields {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 18px;
}
.resize-inner {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.resize-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.resize-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.resize-field input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 0.9rem;
  padding: 9px 12px;
  outline: none;
  width: 110px;
  transition: border-color var(--t), box-shadow var(--t);
}
.resize-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15);
}
.btn-swap-dims {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
  flex-shrink: 0;
}
.btn-swap-dims:hover { border-color: var(--border2); color: var(--text); background: var(--surface3); }

.aspect-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg3);
  transition: all var(--t);
}
.aspect-lock input { display: none; }
.aspect-lock:has(input:checked) { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),0.08); }
.lock-icon { display: flex; align-items: center; }

/* ── DROP ZONE ─────────────────────────────── */
.drop-zone {
  position: relative;
  background: var(--bg2);
  border: 2px dashed rgba(var(--accent-rgb),0.25);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.28s var(--ease);
  overflow: hidden;
}
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(var(--accent-rgb),0.06) 0%, transparent 65%);
  pointer-events: none;
  transition: opacity var(--t);
}
.drop-zone:hover, .drop-zone.drag-over {
  background: var(--bg3);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.1), var(--shadow-md);
}
.drop-zone.drag-over { transform: scale(1.008); }
.drop-zone.drag-over::before { opacity: 2; }
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.drop-zone-content {
  position: relative;
  z-index: 1;
  pointer-events: none;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

/* Drop animation */
.drop-animation {
  position: relative;
  width: 80px; height: 80px;
  margin-bottom: 4px;
}
.drop-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),0.15), transparent 70%);
  animation: orbPulse 2.8s ease infinite;
}
.drop-icon-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.drop-zone:hover .drop-icon-wrap svg,
.drop-zone.drag-over .drop-icon-wrap svg {
  animation: bounceUp 0.6s var(--ease) infinite alternate;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.15); opacity: 1; }
}
@keyframes bounceUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-5px); }
}

.drop-text {}
.drop-primary {
  font-family: var(--font-d);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.drop-secondary { font-size: 0.92rem; color: var(--text-2); }
.drop-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.drop-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.fmt-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.05em;
}
.drop-limit {
  font-size: 0.75rem;
  color: var(--text-3);
  background: var(--surface);
  padding: 5px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ── ERROR BANNER ──────────────────────────── */
.error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.25);
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideDown 0.25s var(--ease);
}
.error-banner svg { flex-shrink: 0; }
.error-banner span { flex: 1; }
.error-close {
  background: none; border: none;
  color: var(--danger); font-size: 1.3rem; line-height: 1;
  opacity: 0.7; transition: opacity var(--t);
  padding: 0 4px;
}
.error-close:hover { opacity: 1; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }

/* ── QUEUE ─────────────────────────────────── */
.queue-area {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.queue-title-group { display: flex; align-items: center; gap: 12px; }
.queue-title {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 700;
}
.queue-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
}
.queue-controls { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-b);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
  padding: 10px 20px;
  line-height: 1;
}
.btn:disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1fb5b5);
  color: #0a0c18;
  font-weight: 700;
}
.btn-primary:hover {
  box-shadow: 0 4px 24px rgba(var(--accent-rgb),0.45);
  transform: translateY(-1px);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent2), #5b51d4);
  color: #fff;
  font-weight: 700;
}
.btn-accent:hover {
  box-shadow: 0 4px 24px rgba(var(--accent2-rgb),0.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-ghost:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* ── GLOBAL PROGRESS ───────────────────────── */
.global-progress {
  margin: 0;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.gp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.gp-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
}
.gp-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.gp-pct {
  font-family: var(--font-d);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
}
.progress-track {
  height: 6px;
  background: var(--bg);
  border-radius: 100px;
  overflow: visible;
  position: relative;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 100px;
  transition: width 0.45s var(--ease);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.gp-footer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ── FILE LIST ─────────────────────────────── */
.file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 8px;
}

.file-item {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color var(--t), box-shadow var(--t);
  animation: itemIn 0.3s var(--ease) both;
  position: relative;
  overflow: hidden;
}
@keyframes itemIn {
  from { opacity:0; transform:translateY(8px) scale(0.98); }
  to   { opacity:1; transform:none; }
}
.file-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--border);
  transition: background var(--t);
}
.file-item:hover { border-color: var(--border2); }
.file-item.converting::before { background: var(--accent); }
.file-item.done::before { background: var(--success); }
.file-item.error::before { background: var(--danger); }
.file-item.done { border-color: rgba(52,211,153,0.2); }
.file-item.error { border-color: rgba(248,113,113,0.2); }

/* Thumb */
.file-thumb-wrap {
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}
.file-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  transition: transform var(--t);
}
.file-thumb-wrap:hover .file-thumb { transform: scale(1.05); }
.file-thumb-wrap::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity var(--t);
  border-radius: var(--radius-sm);
}
.file-thumb-wrap:hover::after { opacity: 1; }
.file-thumb-placeholder {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* File info */
.file-info { min-width: 0; }
.file-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  color: var(--text);
}
.file-meta {
  font-size: 0.74rem;
  color: var(--text-3);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.file-meta .sep { color: var(--border2); }

/* Per-file progress */
.file-progress {
  height: 3px;
  background: var(--bg3);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 4px;
}
.file-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 100px;
  transition: width 0.4s var(--ease);
  animation: progressShimmer 1.5s ease infinite;
}
@keyframes progressShimmer {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.3); }
}

/* Status */
.file-status-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 110px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.status-pill.idle       { background: var(--surface2); color: var(--text-3); border: 1px solid var(--border); }
.status-pill.converting { background: rgba(var(--accent-rgb),0.1); color: var(--accent); border: 1px solid rgba(var(--accent-rgb),0.25); }
.status-pill.done       { background: rgba(52,211,153,0.1); color: var(--success); border: 1px solid rgba(52,211,153,0.25); }
.status-pill.error      { background: rgba(248,113,113,0.1); color: var(--danger); border: 1px solid rgba(248,113,113,0.25); }

.file-saving {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(52,211,153,0.08);
  padding: 2px 8px;
  border-radius: 100px;
}
.file-saving.worse { color: var(--warn); background: rgba(251,191,36,0.08); }

/* Actions */
.file-actions {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  align-items: center;
}
.btn-file-action {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.btn-download-file {
  background: rgba(var(--accent-rgb),0.08);
  border-color: rgba(var(--accent-rgb),0.25);
  color: var(--accent);
}
.btn-download-file:hover { background: rgba(var(--accent-rgb),0.18); border-color: var(--accent); }
.btn-retry {
  background: rgba(251,191,36,0.08);
  border-color: rgba(251,191,36,0.25);
  color: var(--warn);
}
.btn-retry:hover { background: rgba(251,191,36,0.18); }
.btn-remove-file {
  background: transparent;
  border-color: transparent;
  color: var(--text-3);
  padding: 6px 8px;
}
.btn-remove-file:hover { color: var(--danger); background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.2); }

/* ── SUMMARY STATS ─────────────────────────── */
.summary-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.summary-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  border-right: 1px solid var(--border);
}
.summary-item:last-child { border-right: none; }
.success-icon { color: var(--success); }

/* ── BULK DOWNLOAD ─────────────────────────── */
.bulk-download {
  border-top: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(var(--accent2-rgb),0.06), rgba(var(--accent-rgb),0.06));
}
.bulk-download-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.bulk-info { display: flex; align-items: center; gap: 16px; }
.bulk-icon {
  width: 44px; height: 44px;
  background: rgba(var(--accent-rgb),0.12);
  border: 1px solid rgba(var(--accent-rgb),0.25);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.bulk-title {
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.bulk-sub { font-size: 0.8rem; color: var(--text-2); }
.bulk-actions { display: flex; gap: 10px; align-items: center; }

/* ── FEATURES ──────────────────────────────── */
.features-strip {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  opacity: 0;
  transition: opacity var(--t);
}
.feature-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-card:hover::before { opacity: 1; }
.feature-icon-wrap {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(var(--accent2-rgb),0.12), rgba(var(--accent-rgb),0.12));
  border: 1px solid rgba(var(--accent-rgb),0.18);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card h3 {
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-card p { font-size: 0.875rem; color: var(--text-2); line-height: 1.65; }

/* ── FORMATS TABLE ─────────────────────────── */
.formats-section { padding: 96px 0; background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-header { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent2);
  background: rgba(var(--accent2-rgb),0.1);
  border: 1px solid rgba(var(--accent2-rgb),0.25);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-d);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}
.section-header p { color: var(--text-2); font-size: 1rem; max-width: 480px; margin: 0 auto; }

.formats-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.formats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.formats-table thead { background: var(--surface); }
.formats-table th {
  padding: 14px 20px;
  text-align: left;
  font-family: var(--font-d);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.formats-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
.formats-table tbody tr:last-child td { border-bottom: none; }
.formats-table tbody tr { background: var(--bg2); transition: background var(--t); }
.formats-table tbody tr:nth-child(even) { background: var(--bg3); }
.formats-table tbody tr:hover { background: var(--surface); }

.fmt-tag {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-d);
  color: var(--text);
  letter-spacing: 0.07em;
}
.fmt-tag.accent {
  background: rgba(var(--accent-rgb),0.1);
  border-color: rgba(var(--accent-rgb),0.3);
  color: var(--accent);
}
.saving { color: var(--success); font-weight: 600; font-size: 0.82rem; }
.saving.neutral { color: var(--text-2); font-weight: 400; }

.table-convert-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  transition: all var(--t);
  white-space: nowrap;
}
.table-convert-btn:hover { background: rgba(var(--accent-rgb),0.1); }

/* ── HOW IT WORKS ──────────────────────────── */
.how-section { padding: 96px 0; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: all var(--t) var(--ease);
}
.step-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step-num {
  font-family: var(--font-d);
  font-size: 3rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 2px rgba(var(--accent-rgb),0.2);
  line-height: 1;
  margin-bottom: 16px;
}
.step-card h3 {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.step-card p { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; }
.step-visual {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  opacity: 0.7;
}
.step-svg { overflow: visible; }

/* ── FAQ ───────────────────────────────────── */
.faq-section { padding: 96px 0; background: var(--bg2); border-top: 1px solid var(--border); }
.faq-grid { max-width: 820px; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--t);
}
.faq-item:hover { border-color: var(--border2); }
.faq-item.open { border-color: rgba(var(--accent-rgb),0.3); }
.faq-q {
  padding: 18px 24px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color var(--t);
  list-style: none;
}
.faq-q::after {
  content: '';
  width: 20px; height: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2 4l3 3 3-3' stroke='%235c6490' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--t), background-color var(--t);
  margin-left: 16px;
}
.faq-item.open .faq-q { color: var(--accent); }
.faq-item.open .faq-q::after {
  transform: rotate(180deg);
  background-color: rgba(var(--accent-rgb),0.1);
  border-color: rgba(var(--accent-rgb),0.3);
}
.faq-a {
  padding: 0 24px;
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.75;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s var(--ease), padding 0.25s;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 24px 20px; }

/* ── ARTICLE ───────────────────────────────── */
.article-section { padding: 96px 0; border-top: 1px solid var(--border); }
.article-inner { max-width: 760px; margin: 0 auto; }
article h2 {
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 40px 0 14px;
}
article h2:first-child { margin-top: 0; }
article p { font-size: 0.94rem; color: var(--text-2); line-height: 1.8; margin-bottom: 14px; }
article strong { color: var(--text); }
article code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.85em;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}
article ol, article ul { padding-left: 22px; margin-bottom: 16px; }
article li { font-size: 0.94rem; color: var(--text-2); line-height: 1.8; margin-bottom: 6px; }
article li strong { color: var(--text); }

/* ── FOOTER ────────────────────────────────── */
.site-footer { padding: 64px 0 32px; border-top: 1px solid var(--border); }
.footer-top {
  display: flex;
  gap: 64px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { max-width: 320px; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; color: var(--text-3); line-height: 1.65; }
.footer-nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav-col strong {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.footer-nav-col a { font-size: 0.85rem; color: var(--text-2); transition: color var(--t); }
.footer-nav-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-3); }
.footer-trust { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 10px;
}

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid    { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  .site-nav { display: none; }
  .header-badge { display: none; }
  .hero { padding: 72px 0 56px; }
  .hero-stats { gap: 0; padding: 16px; }
  .stat-item { padding: 0 16px; }
  .stat-num  { font-size: 1.5rem; }
  .settings-row { flex-direction: column; gap: 20px; }
  .slider-wrap input[type="range"] { width: 100%; }
  .quality-hints { width: 100%; }
  .file-item { grid-template-columns: 52px 1fr auto; }
  .file-status-col { display: none; }
  .modal-compare { grid-template-columns: 1fr; gap: 16px; padding: 40px 20px 20px; }
  .compare-divider { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-top { gap: 32px; }
  .footer-nav { gap: 32px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.9rem; letter-spacing: -0.04em; }
  .hero-stats { flex-wrap: wrap; }
  .stat-divider { display: none; }
  .stat-item { padding: 10px 16px; }
  .hero-sub { font-size: 0.96rem; }
  .hero-formats { gap: 6px; }
  .fmt-pill { font-size: 0.76rem; padding: 6px 12px; }
  .queue-header { flex-direction: column; align-items: flex-start; }
  .bulk-download-inner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

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