/* ==========================================================================
   Imageconverter.info - Modern, Colorful & Vibrant Design System
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-inset: #e2e8f0;
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #6366f1;

  /* Brand Vibrant Accents */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.2);

  --accent-violet: #7c3aed;
  --accent-cyan: #06b6d4;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;

  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 10px -1px rgba(79, 70, 229, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 20px -3px rgba(79, 70, 229, 0.12), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(79, 70, 229, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  /* Radius & Transitions */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-subtle: #182234;
  --bg-inset: #1e293b;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --border-subtle: #1e293b;
  --border-strong: #334155;
  --border-focus: #818cf8;

  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-light: rgba(99, 102, 241, 0.18);
  --primary-glow: rgba(99, 102, 241, 0.35);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 10px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 20px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: 880px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.88);
}

.header-inner {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-img {
  height: 40px;
  width: auto;
}

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

.nav-link {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary), var(--accent-violet));
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

.mobile-menu-btn {
  display: none;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.mobile-nav-drawer {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.5rem 0;
}

.mobile-nav-link.active, .mobile-nav-link:hover {
  color: var(--primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  padding: 3.5rem 0 2rem;
  text-align: center;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: -10%;
  left: 25%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  filter: blur(50px);
}

.hero-glow-2 {
  position: absolute;
  top: 15%;
  right: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.16) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  filter: blur(50px);
}

.badge-privacy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.125rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-main);
  max-width: 860px;
  margin: 0 auto 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84375rem;
  font-weight: 700;
  color: var(--text-muted);
}

.trust-pill svg {
  color: var(--success);
}

/* ==========================================================================
   Vibrant Format Color Badges
   ========================================================================== */

.badge-fmt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.02em;
}

.badge-jpg { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-png { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-webp { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-heic { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-avif { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.badge-svg { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.badge-gif { background: #fdf4ff; color: #a21caf; border: 1px solid #f5d0fe; }
.badge-ico { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.badge-tiff { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.badge-bmp { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }

[data-theme="dark"] .badge-jpg { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border-color: rgba(37, 99, 235, 0.4); }
[data-theme="dark"] .badge-png { background: rgba(16, 185, 129, 0.2); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }
[data-theme="dark"] .badge-webp { background: rgba(124, 58, 237, 0.2); color: #a78bfa; border-color: rgba(124, 58, 237, 0.4); }
[data-theme="dark"] .badge-heic { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }
[data-theme="dark"] .badge-avif { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border-color: rgba(6, 182, 212, 0.4); }
[data-theme="dark"] .badge-svg { background: rgba(244, 63, 94, 0.2); color: #fb7185; border-color: rgba(244, 63, 94, 0.4); }
[data-theme="dark"] .badge-gif { background: rgba(217, 70, 239, 0.2); color: #e879f9; border-color: rgba(217, 70, 239, 0.4); }
[data-theme="dark"] .badge-ico { background: rgba(79, 70, 229, 0.2); color: #818cf8; border-color: rgba(79, 70, 229, 0.4); }
[data-theme="dark"] .badge-tiff { background: rgba(14, 165, 233, 0.2); color: #38bdf8; border-color: rgba(14, 165, 233, 0.4); }
[data-theme="dark"] .badge-bmp { background: rgba(100, 116, 139, 0.2); color: #94a3b8; border-color: rgba(100, 116, 139, 0.4); }

/* ==========================================================================
   Converter Workspace (Core Component)
   ========================================================================== */

.converter-container {
  max-width: 1000px;
  margin: 0 auto 4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.converter-container:hover {
  border-color: var(--border-strong);
}

/* Dropzone with Colorful Border & Animation */
.dropzone {
  position: relative;
  padding: 3.75rem 1.75rem;
  border-bottom: 2px dashed var(--border-subtle);
  background: var(--bg-surface);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.dropzone:hover, .dropzone.dragover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.dropzone.dragover {
  transform: scale(0.995);
}

.dropzone-icon-wrap {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.25rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
  transition: transform var(--transition-normal);
}

.dropzone:hover .dropzone-icon-wrap {
  transform: translateY(-4px) scale(1.05);
}

.dropzone-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.dropzone-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.dropzone-browse-text {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.format-badges-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

/* Converter Toolbar & Controls */
.converter-toolbar {
  padding: 1.25rem 1.75rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.toolbar-label {
  font-size: 0.84375rem;
  font-weight: 800;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.custom-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 0.5rem 2.25rem 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  transition: border-color var(--transition-fast);
}

.custom-select:focus {
  border-color: var(--border-focus);
}

.slider-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.slider-input {
  accent-color: var(--primary);
  cursor: pointer;
  width: 110px;
}

.slider-val-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  min-width: 44px;
  text-align: center;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.color-input {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
}

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

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #047857;
}

.btn-ghost-danger {
  color: var(--danger);
  background: transparent;
  padding: 0.45rem 0.75rem;
}

.btn-ghost-danger:hover {
  background: var(--danger-light);
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

/* Queue Container */
.queue-container {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.queue-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.queue-header-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.queue-item {
  display: grid;
  grid-template-columns: 58px 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

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

.queue-thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: #f1f5f9;
  border: 1px solid var(--border-subtle);
}

.queue-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.queue-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.queue-size {
  font-family: var(--font-mono);
}

.queue-target-select {
  padding: 0.3rem 1.6rem 0.3rem 0.5rem;
  font-size: 0.8125rem;
}

.queue-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 140px;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-ready { background: var(--bg-subtle); color: var(--text-muted); }
.status-processing { background: var(--primary-light); color: var(--primary); animation: pulse-op 1.5s infinite; }
.status-success { background: var(--success-light); color: var(--success); }
.status-failed { background: var(--danger-light); color: var(--danger); }

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  width: 0%;
  transition: width 0.3s ease;
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.batch-completed-banner {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.batch-completed-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 700;
}

.batch-completed-info svg {
  color: var(--success);
  flex-shrink: 0;
}

@keyframes pulse-op {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ==========================================================================
   Section Blocks & Typography
   ========================================================================== */

.section {
  padding: 4.5rem 0;
}

.section-subtle {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 3rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Tool Cards Grid
   ========================================================================== */

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

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

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

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.format-pair-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
}

.tag-arrow {
  color: var(--primary);
}

.tool-icon-circle {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.tool-card:hover .tool-icon-circle {
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  color: #fff;
}

.tool-card-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.tool-card-desc {
  font-size: 0.84375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
}

.tool-card-footer svg {
  transition: transform var(--transition-fast);
}

.tool-card:hover .tool-card-footer svg {
  transform: translateX(4px);
}

/* ==========================================================================
   How It Works (3 Steps)
   ========================================================================== */

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

.step-card {
  position: relative;
  padding: 2.25rem 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.step-num-watermark {
  position: absolute;
  top: -15px;
  right: -5px;
  font-size: 6rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--border-subtle);
  opacity: 0.45;
  user-select: none;
  line-height: 1;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  color: #fff;
  font-weight: 900;
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.625rem;
  position: relative;
  z-index: 2;
}

.step-desc {
  font-size: 0.90625rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Format Matrix & Comparison Table
   ========================================================================== */

.format-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.matrix-card {
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.matrix-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.matrix-format-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-main);
}

.matrix-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.matrix-specs-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.matrix-spec-item {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

.matrix-spec-item svg {
  color: var(--success);
  flex-shrink: 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.comparison-table th {
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 800;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.comparison-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: var(--bg-subtle);
}

/* ==========================================================================
   Benefits & FAQ
   ========================================================================== */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.benefit-card {
  display: flex;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.benefit-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(6, 182, 212, 0.12));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.benefit-desc {
  font-size: 0.84375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.faq-list {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

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

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

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

.faq-chevron {
  transition: transform var(--transition-normal);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.90625rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Article, Blog & Guides Layout
   ========================================================================== */

.article-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.75rem;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2rem 0 0.75rem;
}

.article-content h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.5rem 0 0.5rem;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  list-style: disc;
}

.article-content li {
  margin-bottom: 0.4rem;
}

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

.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

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

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-size: 1.1875rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.blog-card-link {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
  color: var(--primary);
  width: fit-content;
}

.footer-col-title {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-link {
  font-size: 0.84375rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--border-strong);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-menu-btn { display: block; }
  .converter-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-group { justify-content: space-between; }
  .queue-item { grid-template-columns: 48px 1fr; gap: 0.75rem; }
  .queue-status-col, .queue-actions { grid-column: 2 / 3; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-content { padding: 1.5rem; }
}
