/* ZeroServerImg - Main Stylesheet */

/* CSS Variables */
:root {
  --bg-primary: #f0fdfa;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.78);
  --bg-glass-dark: rgba(30, 30, 40, 0.72);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #0d9488;
  --accent-light: #2dd4bf;
  --accent-dark: #0f766e;
  --accent-50: rgba(13, 148, 136, 0.08);
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
  --gradient-1: linear-gradient(135deg, #0d9488, #06b6d4);
  --gradient-2: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-3: linear-gradient(135deg, #f59e0b, #ef4444);
  --danger: #ef4444;
  --success: #10b981;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0c1222;
  --bg-secondary: #162032;
  --bg-glass: rgba(22, 32, 50, 0.78);
  --bg-glass-dark: rgba(12, 18, 34, 0.88);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 800;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.navbar-logo:hover { opacity: 0.8; }

.navbar-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
}
.nav-link:hover {
  color: var(--accent);
  background: var(--accent-50);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-50);
  font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

/* Dropdown */
.has-dropdown {
  position: relative;
}
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 8px;
  z-index: 1000;
}
.has-dropdown:hover .dropdown {
  display: block;
}
.dropdown li a {
  display: block;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.dropdown li a:hover {
  color: var(--accent);
  background: var(--accent-50);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
  background: var(--accent-50);
}
.theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity var(--transition), transform var(--transition);
}
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0); }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.mobile-menu-toggle .hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
  display: block;
}
.mobile-menu-toggle:hover .hamburger-line { background: var(--accent); }
.mobile-menu-toggle:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.header-ads {
  max-width: 728px;
  margin: 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-1);
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(13, 148, 136, 0.1) 40%, var(--bg-primary) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 60px 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dd4bf;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.45);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.3);
}
.btn-primary:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  background: transparent;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px) scale(1.02);
}
.btn-outline:active { transform: translateY(0); }
.btn-outline:focus { outline: 2px solid #fff; outline-offset: 2px; }

.btn-outline-dark {
  border: 2px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}
.btn-outline-dark:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-50);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ========== DROP ZONE ========== */
.drop-zone {
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: #fff;
  transition: all var(--transition);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: visible;
}
.drop-zone:hover {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 0 2px rgba(255, 255, 255, 0.15);
  transform: scale(1.01);
}
.drop-zone.drag-over {
  border-color: transparent;
  background: rgba(13, 148, 136, 0.12);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.4), 0 0 30px rgba(13, 148, 136, 0.25), 0 0 60px rgba(6, 182, 212, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
  animation: glowPulse 1.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.4), 0 0 30px rgba(13, 148, 136, 0.25), 0 0 60px rgba(6, 182, 212, 0.15); }
  50% { box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.6), 0 0 40px rgba(13, 148, 136, 0.35), 0 0 80px rgba(6, 182, 212, 0.25); }
}
.drop-zone.drag-over::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius) + 4px);
  background: conic-gradient(from 0deg, #0d9488, #06b6d4, #3b82f6, #06b6d4, #0d9488);
  z-index: -1;
  animation: glowSpin 3s linear infinite;
  opacity: 0.6;
}
@keyframes glowSpin {
  to { transform: rotate(360deg); }
}
.drop-zone .dz-idle-icon {
  transition: transform 0.3s ease, color 0.3s ease;
}
.drop-zone.drag-over .dz-idle-icon {
  transform: scale(1.2) translateY(-4px);
  color: #2dd4bf;
}
.drop-zone.drag-over .dz-idle-title {
  color: #2dd4bf;
}
.drop-zone svg { color: #fff; margin-bottom: 12px; opacity: 0.9; }
.drop-zone-link { color: #2dd4bf; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.drop-zone-hint {
  font-size: 0.8rem;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
}

/* ========== HERO DROPZONE — ADVANCED ========== */
.drop-zone.has-preview {
  padding: 16px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Idle State */
.dz-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dz-idle-ring {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dz-ring-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  animation: dzSpin 12s linear infinite;
}

@keyframes dzSpin {
  to { transform: rotate(360deg); }
}

.dz-idle-icon {
  color: #fff;
  position: relative;
  z-index: 1;
}

.dz-idle-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dz-idle-sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.dz-idle-link {
  color: #2dd4bf;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dz-idle-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.dz-tag {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dz-idle-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Active State */
.dz-active {
  width: 100%;
}

.dz-active-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.dz-thumb-strip {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}

.dz-thumb-strip::-webkit-scrollbar { display: none; }

.dz-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.dz-thumb:hover { opacity: 0.95; border-color: rgba(255, 255, 255, 0.5); }
.dz-thumb.active { opacity: 1; border-color: #2dd4bf; box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.35); }

.dz-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dz-add-more {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dz-add-more:hover { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: rgba(255, 255, 255, 0.6); }

/* Main Layout */
.dz-active-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 768px) {
  .dz-active-main { grid-template-columns: 1fr; }
}

/* Preview Box */
.dz-preview-box {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dz-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Info Panel */
.dz-info-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dz-info-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dz-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.dz-info-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dz-info-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.dz-info-val {
  font-size: 0.8rem;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Compress Section */
.dz-compress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dz-quality-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dz-quality-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.dz-quality-row .slider-val {
  color: #2dd4bf;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Progress */
.dz-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dz-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.dz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf, #06b6d4);
  border-radius: 2px;
  transition: width 0.25s ease;
  width: 0%;
}

.dz-progress-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  min-width: 28px;
  text-align: right;
  font-weight: 600;
}

/* Compare */
.dz-compare-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: dzFadeIn 0.3s ease;
}

.dz-compare-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  aspect-ratio: 16/10;
  cursor: ew-resize;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dz-compare-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dz-compare-after-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 50%);
}

.dz-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  z-index: 5;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.dz-compare-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dz-compare-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Action Buttons */
.dz-action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dz-action-btn {
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dz-action-btn:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

.dz-action-compress:hover { border-color: #2dd4bf; color: #2dd4bf; }
.dz-action-convert:hover { border-color: #3b82f6; color: #3b82f6; }
.dz-action-resize:hover { border-color: #f59e0b; color: #f59e0b; }
.dz-action-crop:hover { border-color: #a78bfa; color: #a78bfa; }
.dz-action-delete:hover { border-color: #ef4444; color: #ef4444; }

.dz-action-download {
  border-color: rgba(16, 185, 129, 0.6);
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}
.dz-action-download:hover { background: #10b981; color: #fff; border-color: #10b981; }
.dz-action-download:disabled { opacity: 0.35; cursor: not-allowed; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.3); }

@keyframes dzFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .dz-active-main { grid-template-columns: 1fr; gap: 12px; }
  .dz-thumb { width: 44px; height: 44px; }
  .dz-info-grid { grid-template-columns: 1fr; }
  .dz-action-row { flex-wrap: wrap; }
  .dz-action-btn { min-width: calc(50% - 3px); }
}

/* Tool page drop zone (light theme compatible) */
.tool-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  background: var(--bg-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.tool-drop-zone:hover {
  border-color: var(--accent);
  background: var(--accent-50);
}
.tool-drop-zone.drag-over {
  border-color: transparent;
  background: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3), 0 0 24px rgba(13, 148, 136, 0.15);
  animation: glowPulseTool 1.5s ease-in-out infinite;
}
@keyframes glowPulseTool {
  0%, 100% { box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3), 0 0 24px rgba(13, 148, 136, 0.15); }
  50% { box-shadow: 0 0 0 5px rgba(13, 148, 136, 0.5), 0 0 36px rgba(13, 148, 136, 0.25); }
}
.tool-drop-zone svg { color: var(--accent); margin-bottom: 12px; transition: transform 0.3s ease; }
.tool-drop-zone.drag-over svg { transform: scale(1.15) translateY(-3px); }
.tool-drop-zone .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ========== TOOLS SECTION (Home page) ========== */
.tools-section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

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

.tool-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-50), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(13, 148, 136, 0.15), 0 0 0 1px rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.3);
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover::after { opacity: 1; }
.tool-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(6, 182, 212, 0.1));
  color: var(--accent);
  transition: all 0.3s ease;
  border: 1px solid rgba(13, 148, 136, 0.1);
}

.tool-card:hover .tool-icon {
  transform: scale(1.1) rotate(-3deg);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.25), rgba(6, 182, 212, 0.15));
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.2);
}

.tool-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.tool-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
}
.tool-open { width: 100%; }

/* ========== FEATURES ========== */
.features-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

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

.feature-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(13, 148, 136, 0.2);
}
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; font-weight: 700; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ========== STATS COUNTER ========== */
.stats-section {
  padding: 48px 0;
  background: var(--gradient-1);
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.stat-item {
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease;
}
.stat-item:hover {
  transform: translateY(-4px);
}
.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-number { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ========== FAQ ========== */
.faq-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}
.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item:hover {
  border-color: rgba(13, 148, 136, 0.25);
}
.faq-item[open] {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.1);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  list-style: none;
  transition: color 0.2s;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; content: ''; }
.faq-question:hover { color: var(--accent); }
.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}
.faq-answer {
  padding: 0 24px 20px;
}
.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ========== BEFORE / AFTER ========== */
.beforeafter-section { padding: 80px 0; }
.beforeafter-section .section-header h2 { margin-bottom: 8px; }
.beforeafter-section .section-header p { margin-bottom: 32px; }

.beforeafter-container {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.beforeafter-wrapper {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  margin-bottom: 24px;
}

.ba-track { position: relative; width: 100%; height: 100%; }

.beforeafter-slider {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

.ba-before, .ba-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.ba-before canvas, .ba-before img,
.ba-after canvas, .ba-after img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-after { overflow: hidden; clip-path: inset(0 0 0 50%); will-change: clip-path; }

.ba-label {
  position: absolute;
  top: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}
.ba-label-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.ba-label-text strong {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.ba-label-text small {
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.02em;
  text-transform: none;
}
.ba-label-before {
  left: 12px;
  background: rgba(239, 68, 68, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.ba-label-after {
  right: 12px;
  background: rgba(16, 185, 129, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.ba-savings-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
  white-space: nowrap;
}

.ba-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10b981, #06b6d4, #10b981, transparent);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6), 0 0 30px rgba(6, 182, 212, 0.3);
  z-index: 4;
  animation: scanDown 3s ease-in-out infinite;
  pointer-events: none;
}

.ba-demo-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #06b6d4);
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: badgePulse 2.5s ease-in-out infinite;
  box-shadow: 0 2px 12px rgba(13, 148, 136, 0.4);
  pointer-events: none;
}

@keyframes scanDown {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.1);
  z-index: 5;
  cursor: ew-resize;
  will-change: left;
  transition: left 0.05s linear;
}
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ba-handle:hover::after {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.ba-handle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
}

.beforeafter-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.ba-select {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.ba-select:hover { border-color: var(--accent); }
.ba-select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* BA Controls Panel */
.ba-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.ba-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ba-file-info {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 100%;
  overflow: hidden;
}

.ba-file-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ba-quality-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ba-quality-row label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.ba-size-row {
  transition: all var(--transition);
}

.ba-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ba-actions-row .btn {
  flex: 1;
  min-width: 120px;
}

@media (max-width: 768px) {
  .ba-top-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ba-file-info {
    width: 100%;
  }
  .ba-actions-row {
    flex-direction: column;
  }
  .ba-actions-row .btn {
    width: 100%;
  }
}

/* ========== PRICING ========== */
.pricing-section {
  padding: 48px 0;
  background: var(--bg-secondary);
}

.pricing-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(13, 148, 136, 0.2);
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12); }

.pricing-badge {
  display: inline-block;
  background: var(--gradient-1);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  margin: 16px 0;
  text-align: left;
}
.pricing-features li {
  padding: 5px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-features li::before {
  content: '\2713';
  color: var(--success);
  font-weight: 700;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-brand .navbar-logo { font-size: 1.1rem; }
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-weight: 700;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
  display: block;
  padding: 4px 0;
}
.footer-links a:hover { color: var(--accent); }

.footer-share h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 700;
}
.footer-share p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.footer-share .btn { margin-bottom: 16px; }

.social-icons { display: flex; gap: 10px; }
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.social-icon:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.1);
}
.si-facebook:hover { background: #1877f2; border-color: #1877f2; box-shadow: 0 4px 16px rgba(24,119,242,0.4); }
.si-twitter:hover { background: #000; border-color: #000; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.si-instagram:hover { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: #dc2743; box-shadow: 0 4px 16px rgba(220,39,67,0.4); }
.si-youtube:hover { background: #ff0000; border-color: #ff0000; box-shadow: 0 4px 16px rgba(255,0,0,0.4); }
.si-github:hover { background: #333; border-color: #333; box-shadow: 0 4px 16px rgba(51,51,51,0.4); }
.si-linkedin:hover { background: #0a66c2; border-color: #0a66c2; box-shadow: 0 4px 16px rgba(10,102,194,0.4); }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== FLOATING BAR — ADVANCED ========== */
.floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.floating-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.floating-bar.fb-hidden {
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.fb-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 100px;
  background: linear-gradient(135deg, #0d9488, #06b6d4, #3b82f6, #0d9488);
  background-size: 300% 300%;
  animation: fbPulse 4s ease infinite;
  opacity: 0.5;
  filter: blur(6px);
  z-index: -1;
}

@keyframes fbPulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.fb-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

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

.fb-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.fb-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.fb-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.fb-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  line-height: 1.2;
}

.fb-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.fb-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.fb-tool span {
  font-size: 0.55rem;
  font-weight: 600;
  white-space: nowrap;
}

.fb-tool:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.fb-tool[data-tip="Compress"]:hover { color: #2dd4bf; }
.fb-tool[data-tip="Convert"]:hover { color: #3b82f6; }
.fb-tool[data-tip="Resize"]:hover { color: #f59e0b; }
.fb-tool[data-tip="Crop"]:hover { color: #a78bfa; }
.fb-tool[data-tip="Batch"]:hover { color: #f472b6; }

.fb-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 4px;
}

.fb-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

@media (max-width: 768px) {
  .floating-bar {
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: translateX(0) translateY(100px);
  }
  .floating-bar.visible {
    transform: translateX(0) translateY(0);
  }
  .floating-bar.fb-hidden {
    transform: translateX(0) translateY(100px);
  }
  .fb-inner {
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .fb-text { display: none; }
  .fb-tools { border-left: none; padding-left: 0; }
  .fb-tool { padding: 8px 12px; }
  .fb-tool span { font-size: 0.6rem; }
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-overlay.closing { opacity: 0; }

.modal-container {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition);
  position: relative;
}
.modal-overlay.open .modal-container { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  z-index: 10;
  cursor: pointer;
}
.modal-close:hover {
  background: var(--danger);
  color: #fff;
  transform: rotate(90deg);
}
.modal-close:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal-body {
  padding: 32px;
  overflow-y: auto;
  max-height: calc(90vh - 64px);
}

/* ========== TOOL PAGE LAYOUT ========== */
.tool-page {
  padding: 40px 0 80px;
  min-height: calc(100vh - 72px);
}

.tool-page-header {
  text-align: center;
  margin-bottom: 40px;
}
.tool-page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 8px;
}
.tool-page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.tool-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.tool-preview {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  overflow: hidden;
  position: relative;
}
.tool-preview img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}
.tool-preview canvas {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}
.tool-preview .placeholder-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== TOOL CONTROLS ========== */
.tool-controls {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.control-group { margin-bottom: 20px; }
.control-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.value-display { color: var(--accent); font-weight: 700; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-row input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform var(--transition);
}
.slider-row input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }

.slider-val {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
}

/* Format Options */
.format-options { display: flex; gap: 8px; flex-wrap: wrap; }

.format-option {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}
.format-option:hover { border-color: var(--accent); color: var(--accent); }
.format-option.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Aspect Presets */
.aspect-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.aspect-preset {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}
.aspect-preset:hover { border-color: var(--accent); color: var(--accent); }
.aspect-preset.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* File Size Readout */
.file-size-readout {
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Progress Bar */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-1);
  width: 0%;
  transition: width 0.3s ease;
}

/* Tool Actions */
.tool-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tool-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* ========== BATCH PROCESSOR ========== */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.batch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  transition: all var(--transition);
}
.batch-item:hover {
  border-color: rgba(13, 148, 136, 0.3);
}
.batch-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}
.batch-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  word-break: break-all;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.batch-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  line-height: 1;
  transition: all var(--transition);
}
.batch-remove:hover { transform: scale(1.1); }

.batch-actions {
  display: flex;
  gap: 12px;
}
.batch-actions .btn { flex: 1; }

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== CROPPER ========== */
.cropper-container {
  max-height: 400px;
  margin-bottom: 16px;
}
.cropper-container img {
  max-width: 100%;
}

/* ========== INPUT NUMBER ========== */
input[type="number"] {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}
input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.unit-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hero-content { padding: 40px 16px; }
  .tools-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-share { text-align: center; }
  .social-icons { justify-content: center; }

  .tool-workspace {
    grid-template-columns: 1fr;
  }

  .modal-container { width: 95%; max-height: 95vh; }
  .modal-body { padding: 20px; }
  .tool-controls { padding: 16px; }
  .beforeafter-controls { flex-direction: column; align-items: stretch; }
  .ba-select { width: 100%; }
  .batch-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .tool-actions { flex-direction: column; }
  .tool-actions .btn { width: 100%; }
  .batch-actions { flex-direction: column; }
  .batch-actions .btn { width: 100%; }
}

/* ========== MOBILE NAV OPEN ========== */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow);
  }
  .navbar-links.open {
    display: flex;
    animation: slideDown 0.3s ease;
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .mobile-menu-toggle { display: flex; }
  .mobile-menu-toggle.open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .mobile-menu-toggle.open .hamburger-line:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle.open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .nav-link { padding: 12px 16px; border-radius: 8px; }
  .has-dropdown { position: static; }
  .dropdown {
    display: block;
    position: static;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    border-radius: 0;
  }
  .dropdown li a { padding: 10px 16px; }
}

/* ========== LOADING SPINNER ========== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
