/* ==========================================================================
   SMARTDOCIFY - IMAGE COMPRESSOR STYLESHEET
   Professional, Modern, Accessible Design matching SmartDocify Reference UI
   Light & Dark Theme Support, Responsive Grid, High-Performance Canvas
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & THEMES
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.12);
  --primary-border: rgba(37, 99, 235, 0.3);
  --secondary: #7c3aed;
  --secondary-hover: #6d28d9;
  --secondary-light: rgba(124, 58, 237, 0.12);
  --accent: #06b6d4;
  --success: #10b981;
  --success-hover: #059669;
  --success-light: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.3);
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.3);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.3);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Default Dark Theme */
  --bg-page: #080d1a;
  --bg-card: #111c30;
  --bg-card-alt: #16233b;
  --bg-card-hover: #192742;
  --bg-backdrop: rgba(3, 7, 18, 0.75);
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-color: #1e293b;
  --border-light: #162032;
  --border-hover: #334155;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.25);
  --shadow-glow-success: 0 0 24px rgba(16, 185, 129, 0.25);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --bg-backdrop: rgba(15, 23, 42, 0.6);
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-hover: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE ELEMENTS
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

button, input, select {
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   3. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

.logo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-svg {
  width: 32px;
  height: 32px;
}

.logo-text {
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-card-alt);
}

.nav-link.active {
  color: #60a5fa;
  background: var(--primary-light);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: var(--bg-card-alt);
}

/* Theme Toggle Icons */
.icon-sun, .icon-moon {
  width: 20px;
  height: 20px;
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Hamburger Menu Toggle */
.menu-toggle {
  display: none;
}

.hamburger-box {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-fast);
}

/* Mobile Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-backdrop);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  z-index: 210;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.mobile-nav-item:hover {
  background: var(--bg-card-alt);
  color: var(--text-main);
}

.mobile-nav-item.active {
  background: var(--primary-light);
  color: #60a5fa;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   4. HERO SECTION
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  padding: 40px 20px 60px;
}

.content-wrapper {
  max-width: 1060px;
  margin: 0 auto;
}

.hero-section {
  text-align: center;
  margin-bottom: 32px;
}

.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: #60a5fa;
  border: 1px solid var(--primary-border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #38bdf8;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 20px;
  line-height: 1.55;
}

.privacy-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 100%;
}

.privacy-banner span {
  white-space: normal;
  text-align: left;
}

.privacy-icon {
  width: 17px;
  height: 17px;
  color: var(--success);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   5. TOOL APPLICATION CARD
   -------------------------------------------------------------------------- */
.tool-app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  margin-bottom: 48px;
  transition: all var(--transition-normal);
}

/* --------------------------------------------------------------------------
   6. UPLOAD SECTION & DROPZONE
   -------------------------------------------------------------------------- */
.upload-dropzone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  background: var(--bg-card-alt);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-normal);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: var(--shadow-glow);
}

.upload-dropzone:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.dropzone-inner {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dropzone-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid var(--primary-border);
}

.dropzone-icon-box svg {
  width: 32px;
  height: 32px;
}

.dropzone-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.dropzone-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dropzone-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 6px 0 18px;
}

.dropzone-divider::before,
.dropzone-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.dropzone-divider span {
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
}

.btn-upload {
  padding: 13px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.dropzone-format-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-format-info strong {
  color: var(--text-secondary);
}

/* Alert Boxes */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-top: 18px;
  font-size: 0.92rem;
}

.alert-error {
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: #fca5a5;
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   7. BUTTONS & CONTROLS SYSTEM
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-card-alt);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover:not(:disabled) {
  background: var(--success-hover);
  box-shadow: var(--shadow-glow-success);
}

.btn-outline-danger {
  background: transparent;
  color: #f87171;
  border-color: var(--danger-border);
}

.btn-outline-danger:hover:not(:disabled) {
  background: var(--danger-light);
  border-color: var(--danger);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. ACTIVE WORKSPACE SECTION
   -------------------------------------------------------------------------- */
.workspace-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workspace-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 14px;
}

.batch-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: #60a5fa;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   9. SETTINGS PANEL CARD
   -------------------------------------------------------------------------- */
.settings-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.settings-header-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-header-icon svg {
  width: 17px;
  height: 17px;
}

.settings-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.setting-item.full-span {
  grid-column: 1 / -1;
}

.setting-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.setting-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Presets Pills */
.preset-pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preset-pill {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all var(--transition-fast);
}

.preset-pill:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.preset-pill.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #60a5fa;
  box-shadow: 0 0 0 1px var(--primary);
}

.pill-subtext {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
}

.preset-pill.active .pill-subtext {
  color: #93c5fd;
}

/* Quality Slider */
.quality-display-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #60a5fa;
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.slider-min-label,
.slider-max-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Select & Inputs */
.select-wrapper {
  position: relative;
}

.form-select,
.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-select:focus,
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.format-note {
  font-size: 0.82rem;
  color: var(--warning);
  background: var(--warning-light);
  border: 1px solid var(--warning-border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

/* Custom Checkbox */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.form-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-hover);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.form-checkbox:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.form-checkbox:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.checkbox-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-text.font-medium {
  font-weight: 600;
  color: var(--text-main);
}

/* Resize Controls Box */
.resize-controls-box {
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.resize-inputs-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.resize-col {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resize-col.aspect-col {
  align-self: flex-end;
  padding-bottom: 8px;
}

.sub-setting-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.resize-hint {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 10px;
}

/* Output Filename Row */
.filename-input-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filename-input {
  flex: 1;
  min-width: 240px;
}

.brand-checkbox-label {
  white-space: nowrap;
}

/* Settings Action Row */
.settings-action-row {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-compress-all {
  width: 100%;
}

/* Compression Progress Box */
.compression-progress-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.progress-title {
  color: var(--text-main);
}

.progress-percent {
  color: #60a5fa;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-card-alt);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 4px;
  transition: width 0.2s ease;
}

/* --------------------------------------------------------------------------
   10. BEFORE / AFTER SUMMARY CARD
   -------------------------------------------------------------------------- */
.summary-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-glow-success);
}

.summary-card-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-badge-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #34d399;
}

.summary-check-icon {
  width: 22px;
  height: 22px;
}

.summary-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.summary-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-value.highlight {
  color: #60a5fa;
}

.stat-value.success {
  color: #34d399;
}

.stat-value.badge-reduction {
  color: #a78bfa;
}

.summary-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-download-zip {
  padding: 12px 28px;
}

/* --------------------------------------------------------------------------
   11. IMAGE CARDS WORKSPACE GRID
   -------------------------------------------------------------------------- */
.image-cards-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cards-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cards-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

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

/* Individual Image Card */
.image-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.image-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.image-card-thumb-box {
  width: 100%;
  height: 180px;
  background: #000000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.card-thumbnail-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.card-status-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.status-ready {
  background: rgba(148, 163, 184, 0.25);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.status-compressing {
  background: rgba(37, 99, 235, 0.35);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.6);
  animation: pulse-ring 1.5s infinite;
}

.status-compressed {
  background: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.6);
}

.status-error {
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.6);
}

.image-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card-filename {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
}

.meta-val {
  font-weight: 600;
  color: var(--text-secondary);
}

.meta-val.saved-badge {
  color: #34d399;
  background: var(--success-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.meta-val.no-reduction {
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.image-card-footer {
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-card-download {
  flex: 1;
}

/* --------------------------------------------------------------------------
   12. SEO CONTENT & GUIDE STYLES
   -------------------------------------------------------------------------- */
.seo-content-section {
  margin-top: 20px;
}

.seo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.seo-heading {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--text-main);
}

.seo-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.feature-item {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 6-Step Guide */
.guide-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 40px;
}

.guide-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-main);
}

.guide-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: 3px;
}

.step-content strong {
  color: var(--text-main);
}

/* FAQ Accordion */
.faq-section {
  margin-bottom: 32px;
}

.faq-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-item[open] {
  border-color: var(--primary-border);
}

.faq-question {
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
  color: #60a5fa;
}

.faq-answer {
  padding: 0 20px 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Disclaimer Card */
.disclaimer-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.disclaimer-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.disclaimer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 48px 20px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

.footer-col-heading {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 14px;
  display: block;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-main);
}

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

.copyright {
  font-size: 0.82rem;
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   14. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .seo-features-grid {
    grid-template-columns: 1fr;
  }
  .summary-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .privacy-banner {
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.82rem;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .images-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .preset-pill-group {
    grid-template-columns: 1fr;
  }

  .summary-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .summary-actions {
    justify-content: stretch;
  }

  .btn-download-zip {
    width: 100%;
  }

  .filename-input-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 24px 12px 40px;
  }

  .hero-title {
    font-size: 1.6rem;
    word-break: break-word;
  }

  .hero-subtitle {
    font-size: 0.98rem;
  }

  .privacy-banner {
    border-radius: var(--radius-lg);
    text-align: left;
  }

  .tool-app-card {
    padding: 16px;
  }

  .upload-dropzone {
    padding: 32px 14px;
  }

  .summary-stats-grid {
    grid-template-columns: 1fr;
  }
}
