/* ═══════════════════════════════════════════════════════════════
   WEBPTOPNG.FUN — Main Stylesheet
   Design: Deep space dark theme, violet/cyan/rose accents
   Fonts: Syne (headings) + Inter (body)
═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────────────────────────── */
:root {
  --bg:           #07070f;
  --bg2:          #0c0c18;
  --surface:      #10101e;
  --surface2:     #171728;
  --surface3:     #1e1e35;

  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(124,77,255,0.45);

  --violet:       #7c4dff;
  --violet-mid:   #6237e0;
  --violet-light: #a78bfa;
  --violet-glow:  rgba(124,77,255,0.3);
  --cyan:         #00e5ff;
  --cyan-glow:    rgba(0,229,255,0.15);
  --rose:         #ff4d8d;
  --green:        #00e587;

  --text:         #eeeef8;
  --text-muted:   #9090b8;
  --text-dim:     #55557a;

  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  22px;
  --r-xl:  30px;
  --r-full: 999px;

  --shadow-card:  0 8px 48px rgba(0,0,0,0.5);
  --shadow-glow:  0 0 60px rgba(124,77,255,0.1);
  --ease:         cubic-bezier(0.4,0,0.2,1);
  --trans:        all 0.25s var(--ease);

  /* Light mode overrides (applied via body.light-mode) */
  --lm-bg:        #f4f4fb;
  --lm-bg2:       #ededf8;
  --lm-surface:   #ffffff;
  --lm-surface2:  #f0f0fa;
  --lm-border:    rgba(0,0,0,0.08);
  --lm-text:      #1a1a2e;
  --lm-text-muted:#555577;
  --lm-text-dim:  #9999bb;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

/* mesh bg */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% -5%,  rgba(124,77,255,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 85% 105%,  rgba(0,229,255,0.1)  0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%,   rgba(255,77,141,0.04) 0%, transparent 70%);
}

/* subtle dot grid */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── LIGHT MODE ──────────────────────────────────────────────── */
body.light-mode {
  --bg:       var(--lm-bg);
  --bg2:      var(--lm-bg2);
  --surface:  var(--lm-surface);
  --surface2: var(--lm-surface2);
  --surface3: #e8e8f8;
  --border:   var(--lm-border);
  --border-hover: rgba(124,77,255,0.4);
  --text:     var(--lm-text);
  --text-muted: var(--lm-text-muted);
  --text-dim:   var(--lm-text-dim);
  --shadow-card: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 40px rgba(124,77,255,0.07);
}

body.light-mode::before { opacity: 0.4; }
body.light-mode::after  { background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px); }

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

/* ── HELPERS ─────────────────────────────────────────────────── */
.wrapper   { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sr-only   { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.gradient-text {
  background: linear-gradient(135deg, var(--violet-light) 0%, var(--cyan) 55%, var(--rose) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp     { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes floatUpDn  { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }
@keyframes spin       { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@keyframes pulse      { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes slideInR   { from { transform:translateX(110%); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes slideUpFade{ from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes orbFloat   { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-30px) scale(1.05); } }
@keyframes blink      { 0%,100% { opacity:1; } 50% { opacity:0.2; } }

/* ── NAVBAR ──────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(7,7,15,0.8);
  border-bottom: 1px solid var(--border);
}

body.light-mode .navbar { background: rgba(244,244,251,0.85); }

.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 14px var(--violet-glow);
}

.logo-mark.small { width: 28px; height: 28px; font-size: 0.75rem; border-radius: 7px; }
.logo-dot { color: var(--violet-light); }

.nav-right {
  display: flex; align-items: center; gap: 20px;
}

.nav-link {
  text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--violet-light); }

.darkmode-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-dim);
}

/* ── TOGGLE SWITCH ───────────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute; inset: 0;
  background: var(--surface3); border-radius: var(--r-full);
  cursor: pointer; border: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.slider::before {
  content: '';
  position: absolute; left: 4px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-dim); transition: transform 0.3s, background 0.3s;
}

input:checked + .slider { background: var(--violet); border-color: var(--violet); }
input:checked + .slider::before { transform: translateX(20px); background: #fff; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 90px 0 72px; text-align: center;
  animation: fadeUp 0.8s var(--ease) both;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); animation: orbFloat 6s ease-in-out infinite;
}

.orb-1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(124,77,255,0.25), transparent 70%);
  animation-delay: 0s;
}

.orb-2 {
  width: 400px; height: 400px;
  top: -50px; right: -50px;
  background: radial-gradient(circle, rgba(0,229,255,0.15), transparent 70%);
  animation-delay: -2s;
}

.orb-3 {
  width: 300px; height: 300px;
  bottom: -100px; left: 40%;
  background: radial-gradient(circle, rgba(255,77,141,0.12), transparent 70%);
  animation-delay: -4s;
}

.grid-overlay {
  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: 60px 60px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--r-full);
  border: 1px solid rgba(124,77,255,0.3);
  background: rgba(124,77,255,0.08);
  font-size: 0.78rem; font-weight: 500;
  color: var(--violet-light); letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 28px;
}

.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  animation: blink 2s ease-in-out infinite;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 580px; margin: 0 auto 36px;
  font-weight: 300;
}

.hero-sub strong { color: var(--text); font-weight: 600; }

/* Pills */
.hero-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-bottom: 44px;
}

.pill {
  padding: 6px 16px; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); cursor: default;
  transition: var(--trans);
}

.pill:hover, .pill-active {
  border-color: var(--violet); background: rgba(124,77,255,0.12);
  color: var(--violet-light);
  box-shadow: 0 0 16px rgba(124,77,255,0.15);
}

/* Hero counters */
.hero-counters {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 720px; margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.counter-item {
  flex: 1; min-width: 140px;
  padding: 20px 12px; text-align: center;
}

.counter-sep {
  width: 1px; background: var(--border);
  align-self: stretch;
}

.counter-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(135deg, var(--violet-light), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
  margin-bottom: 4px;
}

.counter-val sup { font-size: 0.8em; vertical-align: super; }
.counter-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; }

/* ── MAIN WRAPPER ────────────────────────────────────────────── */
.main-wrapper { padding-top: 48px; padding-bottom: 64px; }

/* ── TOOL CARD ───────────────────────────────────────────────── */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  margin-bottom: 36px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: fadeUp 0.9s var(--ease) 0.1s both;
}

.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--rose));
}

/* ── TRUST BAR ───────────────────────────────────────────────── */
.trust-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
}

.trust-item {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: rgba(0,229,255,0.04);
  font-size: 0.78rem; font-weight: 500; color: var(--text-muted);
}

.trust-item i { color: var(--cyan); font-size: 0.8rem; }

/* ── SECTION LABEL ───────────────────────────────────────────── */
.section-label {
  display: block;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}

.section-label i { color: var(--violet-light); font-size: 0.75rem; }

/* ── UPLOAD ZONE ─────────────────────────────────────────────── */
.upload-section {
  border: 2px dashed rgba(124,77,255,0.22);
  border-radius: var(--r-lg);
  padding: 56px 32px;
  text-align: center;
  margin-bottom: 32px;
  cursor: pointer;
  position: relative; overflow: hidden;
  background: rgba(124,77,255,0.025);
  transition: var(--trans);
}

.upload-section:hover, .upload-section.active {
  border-color: var(--violet);
  background: rgba(124,77,255,0.06);
  box-shadow: 0 0 50px rgba(124,77,255,0.1), inset 0 0 50px rgba(124,77,255,0.03);
}

.upload-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(124,77,255,0.08), transparent 70%);
  pointer-events: none; border-radius: 50%;
}

.upload-icon-wrap {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(124,77,255,0.18), rgba(0,229,255,0.08));
  border-radius: 20px; border: 1px solid rgba(124,77,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--violet-light);
  animation: floatUpDn 3s ease-in-out infinite;
}

.upload-icon { font-size: 2rem; }

.drag-text {
  font-size: 1.1rem; color: var(--text); margin-bottom: 6px;
}

.drag-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 22px; }

.upload-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 30px;
  background: linear-gradient(135deg, var(--violet), var(--violet-mid));
  color: #fff; border: none; border-radius: var(--r-full);
  font-size: 0.95rem; font-weight: 600; font-family: inherit;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 4px 20px var(--violet-glow);
  transition: var(--trans);
  animation: pulse 3s ease-in-out infinite;
}

.upload-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0; transition: opacity 0.2s;
}

.upload-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 32px var(--violet-glow); animation: none; }
.upload-btn:hover::after { opacity: 1; }
.upload-btn:active { transform: translateY(0); }

.file-input { display: none; }

.file-counter {
  position: absolute; top: -10px; right: -10px;
  background: var(--rose); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}

.supported-formats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 20px;
}

.format-tag {
  padding: 4px 11px; border-radius: var(--r-full);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  background: rgba(124,77,255,0.08);
  border: 1px solid rgba(124,77,255,0.2);
  color: var(--violet-light);
  transition: var(--trans);
}

.format-tag:hover { background: rgba(124,77,255,0.18); }

/* ── REALTIME STATS ──────────────────────────────────────────── */
.real-time-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
  margin-bottom: 28px;
}

.real-time-stats .stat-item {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.88rem; color: var(--text-muted);
  transition: var(--trans);
}

.real-time-stats .stat-item:hover { border-color: var(--border-hover); }
.real-time-stats .stat-item i { color: var(--violet-light); font-size: 0.9rem; flex-shrink: 0; }
.real-time-stats .stat-item span { color: var(--text); font-weight: 700; }

/* ── OPTIONS SECTION ─────────────────────────────────────────── */
.options-section {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 14px; margin-bottom: 28px;
}

.option-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 20px;
  transition: var(--trans);
}

.option-card:hover { border-color: var(--border-hover); }

.select-label {
  display: block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 10px;
}

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
select, input[type="text"], input[type="number"], input[type="color"] {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit; font-size: 0.9rem;
  outline: none; transition: var(--trans);
  -webkit-appearance: none; appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath fill='%23777799' d='M5.5 7L0 0h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px; cursor: pointer;
}

select:focus, input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124,77,255,0.15);
}

select option { background: var(--surface2); color: var(--text); }

input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: var(--surface3); border-radius: var(--r-full);
  outline: none; padding: 0; border: none; cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--violet);
  cursor: pointer;
  box-shadow: 0 0 8px var(--violet-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 18px var(--violet-glow);
}

input[type="range"]:disabled, input[type="number"]:disabled { opacity: 0.35; cursor: not-allowed; }

.range-row {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 0.72rem; color: var(--text-dim);
}

.range-val { color: var(--violet-light); font-weight: 700; }

/* Rename input */
.rename-input {
  width: 100%; padding: 10px 14px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 0.9rem; outline: none; transition: var(--trans);
}

.rename-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,77,255,0.15); }

/* Resize */
.resize-container { display: flex; gap: 10px; }
.resize-container select { flex: 1; }
.resize-container input[type="number"] { flex: 1; }

.resize-dimensions {
  display: none; gap: 10px; margin-top: 12px;
}

.resize-dimensions.visible { display: flex; }

.dimension-input label {
  display: block; font-size: 0.72rem; color: var(--text-dim); margin-bottom: 4px;
}

.dimension-input input { width: 100%; }
.imgsize-setting { width: 100%; }

/* ── ADVANCED OPTIONS ────────────────────────────────────────── */
.advanced-options {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; margin-bottom: 28px;
}

.advanced-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer;
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}

.advanced-title:hover { border-bottom-color: var(--border); }

.advanced-title h2 {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}

.advanced-title h2 i { color: var(--violet-light); }

.toggle-advanced {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px; height: 30px; border-radius: var(--r-sm);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: var(--trans);
}

.toggle-advanced:hover { border-color: var(--violet); color: var(--violet-light); }

.option-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 16px; padding: 20px;
}

.option-item {
  display: flex; flex-direction: column; gap: 8px;
}

.option-item label:first-child {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim);
}

.toggle-row {
  flex-direction: row; align-items: center; justify-content: space-between;
  flex-wrap: nowrap;
}

.watermark-full { grid-column: 1 / -1; }

/* Color row for watermark */
.color-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}

.color-row label {
  font-size: 0.7rem; color: var(--text-dim); margin-bottom: 4px; display: block;
}

/* Watermark preview */
.watermark-preview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px; margin-top: 12px;
  display: none;
}

.watermark-preview.visible { display: block; }
.watermark-preview p { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 8px; }
.watermark-preview-image { width: 100%; height: auto; border-radius: 4px; display: block; }

/* ── PROCESS BUTTON ──────────────────────────────────────────── */
.process-btn {
  width: 100%; padding: 18px 32px;
  background: linear-gradient(135deg, var(--violet), #4c1d95, var(--rose));
  background-size: 200% 200%; background-position: 0% 50%;
  color: #fff; border: none; border-radius: var(--r-full);
  font-size: 1.05rem; font-weight: 700; font-family: 'Syne', sans-serif;
  letter-spacing: 0.02em; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 28px; position: relative; overflow: hidden;
  transition: all 0.4s var(--ease);
  animation: pulse 6s ease-in-out infinite;
}

.process-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 60%);
}

.process-btn:hover:not(:disabled) {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,77,255,0.5);
  animation: none;
}

.process-btn:active:not(:disabled) { transform: translateY(0); }

.process-btn:disabled {
  background: var(--surface3); opacity: 0.4;
  cursor: not-allowed; transform: none; box-shadow: none; animation: none;
}

.spinner { animation: spin 0.8s linear infinite; }

/* ── TABLE SECTION ───────────────────────────────────────────── */
.table-section { overflow: hidden; }

.search-container {
  margin-bottom: 16px;
}

.search-wrap { position: relative; }

.search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text);
  font-family: inherit; font-size: 0.9rem; outline: none; transition: var(--trans);
}

.search-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,77,255,0.15); }

.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 0.82rem; pointer-events: none;
}

/* Table */
.images-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface2); border-radius: var(--r-md);
  overflow: hidden; border: 1px solid var(--border);
  display: none; animation: fadeUp 0.4s var(--ease);
}

.images-table.visible { display: table; }

.images-table th {
  padding: 12px 16px;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); text-align: left;
  background: linear-gradient(135deg, var(--violet), var(--violet-mid));
  color: rgba(255,255,255,0.85);
}

.images-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem; color: var(--text-muted);
  vertical-align: middle;
}

.images-table tr:last-child td { border-bottom: none; }
.images-table tr:hover td { background: rgba(124,77,255,0.04); }

.thumbnail {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: var(--trans);
}

.thumbnail:hover { transform: scale(1.08); border-color: var(--violet); }
.thumbnail.processing { filter: brightness(0.8); opacity: 0.75; }

.file-info { display: flex; flex-direction: column; gap: 3px; }
.file-name { font-weight: 600; color: var(--text); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 0.78rem; color: var(--text-dim); }

/* Progress */
.progress-container { width: 100%; background: var(--surface3); border-radius: var(--r-full); height: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); width: 0%; transition: width 0.3s; }

/* Status */
.status {
  font-size: 0.78rem; display: flex; align-items: center; gap: 5px;
  margin-top: 4px; color: var(--text-dim);
}

.status.completed { color: var(--green); }
.status.processing { color: var(--cyan); }
.status.error { color: var(--rose); }

/* Action buttons in table */
.action-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; cursor: pointer; transition: var(--trans);
  color: var(--text-dim);
}

.delete-btn:hover   { border-color: var(--rose);  color: var(--rose);  background: rgba(255,77,141,0.08); }
.download-btn:hover { border-color: var(--green); color: var(--green); background: rgba(0,229,135,0.08); }
.enhance-btn:hover  { border-color: var(--violet); color: var(--violet-light); background: rgba(124,77,255,0.1); }

.no-files { text-align: center; padding: 40px; color: var(--text-dim); font-size: 0.9rem; }

/* Batch actions */
.batch-actions {
  display: none; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  padding: 14px 16px; margin-top: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md);
  animation: fadeUp 0.4s var(--ease);
}

.batch-actions.visible { display: flex; }
.batch-right-actions   { display: flex; gap: 10px; flex-wrap: wrap; }

.batch-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r-sm);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  transition: var(--trans); font-family: inherit;
}

.batch-btn:hover { border-color: var(--border-hover); color: var(--text); }

.clear-all-btn:hover { border-color: var(--rose); color: var(--rose); }

.download-all-btn {
  background: linear-gradient(135deg, var(--violet), var(--violet-mid));
  color: #fff; border-color: transparent;
}

.download-all-btn:hover { box-shadow: 0 4px 18px var(--violet-glow); color: #fff; transform: translateY(-1px); }

.share-btn {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff; border-color: transparent;
}

.share-btn:hover { box-shadow: 0 4px 18px rgba(14,165,233,0.3); color: #fff; transform: translateY(-1px); }

/* ── PREVIEW ─────────────────────────────────────────────────── */
.preview-container {
  display: none; margin-top: 24px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 24px;
  animation: fadeUp 0.5s var(--ease);
}

.preview-container.visible { display: block; }

.preview-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

.preview-title i { color: var(--cyan); }

.preview-comparison {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px;
}

.preview-box {
  position: relative; background: var(--bg2);
  border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--border);
}

.preview-box img {
  width: 100%; height: 200px; object-fit: contain; display: block;
}

.preview-label {
  position: absolute; bottom: 8px; left: 8px;
  padding: 3px 10px; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); border-radius: var(--r-full);
  font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--border);
}

.preview-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px;
}

.pstat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 14px;
  text-align: center;
}

.pstat-val {
  font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--violet-light), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 4px;
}

.pstat-label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; }

/* ── SEO BLOCK ───────────────────────────────────────────────── */
.seo-block { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.seo-block h2 { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.seo-block h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); margin: 16px 0 8px; }
.seo-block p  { font-size: 0.88rem; color: var(--text-dim); line-height: 1.7; }
.seo-block ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.seo-block ul li { font-size: 0.85rem; color: var(--text-dim); display: flex; align-items: flex-start; gap: 8px; }
.seo-block ul li::before { content: '→'; color: var(--violet-light); flex-shrink: 0; }

/* ── STATS SECTION ───────────────────────────────────────────── */
.stats-section {
  margin-bottom: 36px;
  background: linear-gradient(135deg, var(--violet-mid), #4c1d95, #1e1e35);
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid rgba(124,77,255,0.25);
  box-shadow: 0 0 60px rgba(124,77,255,0.15);
}

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  text-align: center;
}

.stats-section .stat-item {
  padding: 36px 20px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.stats-section .stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem; font-weight: 800; color: #fff;
  margin-bottom: 8px; line-height: 1;
}

.stats-section .stat-label {
  font-size: 0.78rem; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ── FEATURES ────────────────────────────────────────────────── */
.features-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 48px 40px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
}

.features-container { width: 100%; }

.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 800;
  letter-spacing: -0.02em; color: var(--text); margin-bottom: 10px;
}

.section-title p { color: var(--text-muted); font-size: 0.95rem; }

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 14px;
}

.feature-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 24px;
  transition: var(--trans); position: relative; overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
  opacity: 0; transition: opacity 0.3s;
}

.feature-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.feature-card:hover::after { opacity: 1; }

.feature-icon {
  width: 46px; height: 46px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 16px;
}

.fv { background: rgba(124,77,255,0.12); color: var(--violet-light); }
.fc { background: rgba(0,229,255,0.08); color: var(--cyan); }
.fr { background: rgba(255,77,141,0.1); color: var(--rose); }
.fg { background: rgba(0,229,135,0.1); color: var(--green); }

.feature-card h3 { font-family: 'Syne', sans-serif; font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.feature-card p  { font-size: 0.84rem; color: var(--text-muted); line-height: 1.55; }
.feature-card code { font-size: 0.8em; color: var(--violet-light); background: rgba(124,77,255,0.1); padding: 1px 5px; border-radius: 4px; }

/* ── TESTIMONIALS ────────────────────────────────────────────── */
.testimonials-section {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 48px 40px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
}

.testimonials-container { width: 100%; }

.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 16px;
}

.testimonial-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 24px;
  transition: var(--trans); position: relative;
}

.testimonial-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-card); }

.rating { color: #fbbf24; font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 14px; }

.testimonial-quote {
  font-size: 0.9rem; color: var(--text-muted);
  line-height: 1.6; font-style: italic;
  margin-bottom: 20px; position: relative;
}

.testimonial-quote::before {
  content: '"'; font-size: 3.5rem; font-family: Georgia, serif;
  color: rgba(124,77,255,0.12); position: absolute;
  top: -20px; left: -10px; line-height: 1; pointer-events: none;
}

.testimonial-author { display: flex; align-items: center; gap: 12px; }

.author-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--violet); flex-shrink: 0;
}

.author-info h4 { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.author-info p  { font-size: 0.75rem; color: var(--text-dim); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg2);
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}

.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 0.95rem; color: var(--text);
}

.footer-copy { font-size: 0.78rem; color: var(--text-dim); }

.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 0.8rem; color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--violet-light); }

/* ── PRIVACY NOTICE ──────────────────────────────────────────── */
.privacy-notice {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  max-width: 380px; width: calc(100% - 48px);
}

.privacy-notice-content {
  background: var(--surface2); border: 1px solid var(--border);
  border-left: 3px solid var(--violet);
  border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  position: relative;
  animation: slideUpFade 0.4s var(--ease);
}

.close-privacy-notice {
  position: absolute; top: 14px; right: 14px;
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); width: 28px; height: 28px;
  border-radius: var(--r-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; transition: var(--trans);
}

.close-privacy-notice:hover { border-color: var(--rose); color: var(--rose); }

.privacy-notice h2 {
  font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}

.privacy-notice h2 i { color: var(--cyan); }
.privacy-notice p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.privacy-notice p strong { color: var(--text); }

.privacy-notice-actions { display: flex; gap: 10px; margin-top: 16px; }

.privacy-btn {
  flex: 1; padding: 10px; border-radius: var(--r-sm);
  font-size: 0.84rem; font-weight: 600; cursor: pointer;
  transition: var(--trans); font-family: inherit;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
}

.privacy-btn:hover { border-color: var(--border-hover); color: var(--text); }

.privacy-accept {
  background: linear-gradient(135deg, var(--violet), var(--violet-mid));
  color: #fff; border-color: transparent;
}

.privacy-accept:hover { box-shadow: 0 4px 16px var(--violet-glow); color: #fff; }

/* ── LIMIT NOTICE ────────────────────────────────────────────── */
.limit-notice {
  display: none; position: fixed;
  top: 80px; right: 24px; z-index: 400;
  background: var(--surface2); border: 1px solid rgba(255,77,141,0.35);
  border-radius: var(--r-md); padding: 16px 20px;
  max-width: 320px; box-shadow: var(--shadow-card);
  animation: slideInR 0.35s var(--ease);
}

.limit-notice.visible { display: block; }
.limit-notice strong { color: var(--rose); display: block; margin-bottom: 6px; font-size: 0.88rem; }
.limit-notice p       { font-size: 0.8rem; color: var(--text-muted); }

.close-notice {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.82rem;
}

/* ── TOAST ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 600;
  background: var(--surface2); border: 1px solid rgba(0,229,135,0.25);
  border-radius: var(--r-full); padding: 13px 24px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--text);
  box-shadow: var(--shadow-card);
  opacity: 0; white-space: nowrap;
  transition: transform 0.35s var(--ease), opacity 0.35s;
}

.toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast i { color: var(--green); }
.toast.error { border-color: rgba(255,77,141,0.3); }
.toast.error i { color: var(--rose); }
.toast.info { border-color: rgba(0,229,255,0.25); }
.toast.info i { color: var(--cyan); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tool-card         { padding: 24px 18px; }
  .options-section   { grid-template-columns: 1fr; }
  .hero              { padding: 60px 0 48px; }
  .hero-counters     { grid-template-columns: repeat(2,1fr); }
  .counter-sep       { display: none; }
  .hero-counters     { display: grid; border-radius: var(--r-md); }
  .counter-item      { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
  .counter-item:nth-child(2n) { border-right: none; }
  .counter-item:nth-last-child(-n+2) { border-bottom: none; }
  .preview-comparison { grid-template-columns: 1fr; }
  .preview-stats      { grid-template-columns: 1fr; }
  .real-time-stats    { grid-template-columns: 1fr; }
  .option-grid        { grid-template-columns: 1fr; }
  .stats-grid         { grid-template-columns: repeat(2,1fr); }
  .features-section   { padding: 32px 20px; }
  .testimonials-section { padding: 32px 20px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .batch-actions { flex-direction: column; align-items: stretch; }
  .batch-right-actions { flex-direction: column; }
  .resize-container { flex-direction: column; }
  .images-table { display: block; overflow-x: auto; }
  .images-table thead { display: none; }
  .images-table tr { display: block; margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
  .images-table td { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.04); padding: 10px 14px; }
  .images-table td::before { content: attr(data-label); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
  .images-table tr:last-child td:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .trust-bar  { gap: 6px; }
  .trust-item { font-size: 0.72rem; padding: 5px 10px; }
  .stats-grid { grid-template-columns: 1fr; }
}
