/* ============================================================
   CONVERTEXT — Design System & Styles
   Premium dark-mode file converter UI
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Background */
  --bg-primary: #06080f;
  --bg-secondary: #0c1020;
  --bg-tertiary: #111730;
  --bg-card: rgba(15, 20, 45, 0.65);
  --bg-card-hover: rgba(20, 28, 60, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-border: rgba(255, 255, 255, 0.06);

  /* Accent Colors */
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --primary-glow: rgba(124, 58, 237, 0.3);
  --secondary: #06b6d4;
  --secondary-light: #67e8f9;
  --secondary-glow: rgba(6, 182, 212, 0.25);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #c4b5fd;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-active: rgba(124, 58, 237, 0.4);

  /* Sizing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-primary: 0 0 30px rgba(124, 58, 237, 0.15);
  --shadow-glow-secondary: 0 0 30px rgba(6, 182, 212, 0.15);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Z-index layers */
  --z-dropdown: 100;
  --z-modal: 200;
  --z-toast: 300;
  --z-tooltip: 400;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Animated Background ── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(245, 158, 11, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── Main Container ── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Hero ── */
.hero {
  text-align: center;
  padding: 48px 0 40px;
  position: relative;
}

.hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.hero__logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-glow-primary);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

  0%,
  100% {
    box-shadow: var(--shadow-glow-primary);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.3);
    transform: scale(1.05);
  }
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--secondary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero__subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 10px;
  letter-spacing: 0.01em;
}

.hero__badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge__icon {
  font-size: 0.9rem;
}

/* ── Category Selector ── */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.category-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card.active {
  border-color: var(--border-active);
  background: rgba(124, 58, 237, 0.08);
  box-shadow: var(--shadow-glow-primary);
}

.category-card.active::before {
  opacity: 1;
}

.category-card__icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  display: block;
}

.category-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.category-card__desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Main Workspace ── */
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

/* ── Panel (Glass Card) ── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.panel:hover {
  border-color: var(--border-medium);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel__title-icon {
  font-size: 1.1rem;
}

/* ── Drop Zone ── */
.dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.05), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.dropzone:hover {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.03);
}

.dropzone:hover::before {
  opacity: 1;
}

.dropzone.dragover {
  border-color: var(--secondary);
  background: rgba(6, 182, 212, 0.05);
  border-style: solid;
  transform: scale(1.01);
  box-shadow: var(--shadow-glow-secondary);
}

.dropzone.has-file {
  border-color: var(--accent-emerald);
  border-style: solid;
  background: rgba(16, 185, 129, 0.03);
}

.dropzone__icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.7;
  transition: transform var(--transition-smooth);
}

.dropzone:hover .dropzone__icon {
  transform: translateY(-4px) scale(1.1);
}

.dropzone__text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.dropzone__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dropzone__browse-btn {
  margin-top: 16px;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
}

.dropzone__browse-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.dropzone__browse-btn:active {
  transform: translateY(0);
}

#fileInput {
  display: none;
}

/* ── File Info ── */
.file-info {
  display: none;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.file-info.visible {
  display: flex;
}

.file-info__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.file-info__details {
  flex: 1;
  min-width: 0;
}

.file-info__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.file-info__remove {
  width: 32px;
  height: 32px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent-rose);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.file-info__remove:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
}

/* ── Conversion Options ── */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.option-group__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.format-btn {
  padding: 8px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
}

.format-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.format-btn.active {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
}

/* Range sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.slider-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.slider-value {
  font-size: 0.8rem;
  color: var(--primary-light);
  font-family: var(--font-mono);
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  cursor: pointer;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
  transition: transform var(--transition-fast);
}

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

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

/* Number inputs */
input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Inline input pair */
.input-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.input-pair__separator {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Resize mode tabs */
.resize-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.resize-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.resize-tab:hover {
  color: var(--text-secondary);
}

.resize-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* Checkbox / Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.toggle-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.toggle__slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-base);
}

.toggle input:checked+.toggle__slider {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle input:checked+.toggle__slider::before {
  transform: translateX(20px);
  background: white;
}

/* ── Convert Button ── */
.convert-btn {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary), #6d28d9, var(--primary-dark));
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.convert-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.convert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
  background-position: right center;
}

.convert-btn:hover::before {
  transform: translateX(100%);
}

.convert-btn:active {
  transform: translateY(0);
}

.convert-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.convert-btn:disabled:hover::before {
  transform: translateX(-100%);
}

.convert-btn__icon {
  font-size: 1.1rem;
  transition: transform var(--transition-base);
}

.convert-btn:hover .convert-btn__icon {
  transform: rotate(90deg);
}

/* ── Progress Bar ── */
.progress-container {
  display: none;
  margin-top: 16px;
}

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

.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width var(--transition-base);
  position: relative;
}

.progress-bar__fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  width: 10px;
  height: 10px;
  background: var(--secondary-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--secondary-glow);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* ── Preview Area ── */
.preview-area {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.preview-area.visible {
  display: flex;
}

.preview-container {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-container img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.preview-container pre {
  width: 100%;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.5;
}

.preview-label {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

/* ── Output / Download ── */
.output-section {
  display: none;
  margin-top: 0;
}

.output-section.visible {
  display: block;
}

.download-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.download-card__icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.download-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.download-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.download-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px var(--accent-emerald-glow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.35);
}

.download-btn:active {
  transform: translateY(0);
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
  pointer-events: all;
  animation: toastIn 0.4s var(--transition-smooth) forwards;
  max-width: 380px;
}

.toast.toast--success {
  border-color: rgba(16, 185, 129, 0.3);
}

.toast.toast--error {
  border-color: rgba(244, 63, 94, 0.3);
}

.toast.toast--info {
  border-color: rgba(6, 182, 212, 0.3);
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
  }
}

.toast__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 40px;
}

.footer__text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Animations ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.5s var(--transition-smooth) forwards;
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-container {
    padding: 0 16px;
  }

  .hero {
    padding: 32px 0 28px;
  }

  .categories {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .category-card {
    padding: 14px 10px;
  }

  .category-card__icon {
    font-size: 1.4rem;
  }

  .category-card__desc {
    display: none;
  }

  .panel {
    padding: 20px;
  }

  .dropzone {
    padding: 32px 16px;
    min-height: 180px;
  }
}

@media (max-width: 480px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__badges {
    gap: 6px;
  }

  .badge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }

  .format-selector {
    gap: 6px;
  }

  .format-btn {
    padding: 6px 12px;
    font-size: 0.72rem;
  }
}

/* ── Batch File List ── */
.batch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.batch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.batch-item__name {
  flex: 1;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-item__size {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.batch-item__status {
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Resize Section Specifics ── */
.resize-preview-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.resize-stat {
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: center;
}

.resize-stat__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.resize-stat__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ── Hidden Utility ── */
.hidden {
  display: none !important;
}

/* ── Multiple outputs grid ── */
.output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.output-thumb {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.output-thumb:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.output-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.output-thumb__label {
  padding: 8px 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}