:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07070f;
  --bg-deep: #050509;
  --card: rgba(255, 255, 255, 0.045);
  --card-soft: rgba(255, 255, 255, 0.03);
  --card-solid: #12131f;
  --text: #e9ebf5;
  --text-strong: #ffffff;
  --muted: #9aa3bf;
  --muted-soft: #6a7088;
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --primary-deep: #4f46e5;
  --accent: #c084fc;
  --accent-2: #f472b6;
  --cyan: #22d3ee;
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.14);
  --error: #f87171;
  --error-soft: rgba(248, 113, 113, 0.14);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 80px rgba(99, 102, 241, 0.22);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-aurora: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #22d3ee);
  --gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.14));
  --neon-glow: 0 0 32px rgba(139, 92, 246, 0.45);
  --neon-glow-soft: 0 0 18px rgba(139, 92, 246, 0.28);
  --grid-color: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-deep: #eaeefb;
  --card: #ffffff;
  --card-soft: #fbfcff;
  --card-solid: #ffffff;
  --text: #0b1220;
  --text-strong: #060912;
  --muted: #5b6478;
  --muted-soft: #8893a7;
  --primary: #5b6cff;
  --primary-dark: #3a4ce0;
  --primary-deep: #2435b8;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --cyan: #0891b2;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --error: #dc2626;
  --error-soft: #fee2e2;
  --border: #e3e8f4;
  --border-strong: #c9d2ea;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(36, 53, 184, 0.12);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-aurora: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #22d3ee);
  --gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.06));
  --neon-glow: 0 0 30px rgba(139, 92, 246, 0.25);
  --neon-glow-soft: 0 0 14px rgba(139, 92, 246, 0.15);
  --grid-color: rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
}

/* --- Aurora background ----------------------------------------------- */
.background-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 12% 18%, rgba(99, 102, 241, 0.45), transparent 55%),
    radial-gradient(900px 500px at 88% 8%, rgba(168, 85, 247, 0.38), transparent 60%),
    radial-gradient(1000px 700px at 50% 100%, rgba(236, 72, 153, 0.32), transparent 60%),
    radial-gradient(700px 500px at 0% 90%, rgba(34, 211, 238, 0.25), transparent 65%),
    var(--bg);
}

[data-theme="light"] .background-glow {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(91, 108, 255, 0.18), transparent 60%),
    radial-gradient(700px 400px at 50% 0%, rgba(236, 72, 153, 0.08), transparent 65%),
    var(--bg);
}

.background-glow::before,
.background-glow::after {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  animation: aurora 22s ease-in-out infinite;
  mix-blend-mode: screen;
}

[data-theme="light"] .background-glow::before,
[data-theme="light"] .background-glow::after {
  mix-blend-mode: normal;
  opacity: 0.6;
}

.background-glow::before {
  top: -200px;
  left: -160px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
}

.background-glow::after {
  bottom: -260px;
  right: -200px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  animation-delay: -11s;
}

[data-theme="light"] .background-glow::before {
  background: radial-gradient(circle, #a5b4fc, transparent 70%);
}
[data-theme="light"] .background-glow::after {
  background: radial-gradient(circle, #f0abfc, transparent 70%);
}

.background-glow .aurora-ribbon {
  position: absolute;
  width: 130%;
  height: 280px;
  left: -15%;
  top: 30%;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.28), rgba(34, 211, 238, 0.22), rgba(236, 72, 153, 0.28), transparent);
  filter: blur(60px);
  border-radius: 50%;
  transform: rotate(-8deg);
  animation: ribbon 28s ease-in-out infinite;
  mix-blend-mode: screen;
}

[data-theme="light"] .background-glow .aurora-ribbon { display: none; }

@keyframes aurora {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -50px) scale(1.12); }
}

@keyframes ribbon {
  0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.55; }
  50% { transform: translateY(-80px) rotate(4deg); opacity: 0.85; }
}

/* Subtle grid overlay (dark only) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* --- Layout ----------------------------------------------------------- */
.page {
  width: min(94vw, 960px);
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}

/* --- Header / Nav ----------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding: 0.7rem 1rem;
  background: var(--card);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0.75rem;
  z-index: 50;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-strong);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--gradient-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5), var(--neon-glow-soft);
  flex-shrink: 0;
  position: relative;
}

.site-logo-mark::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 11px;
  background: var(--gradient-aurora);
  z-index: -1;
  filter: blur(8px);
  opacity: 0.5;
  animation: logoGlow 4s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from { opacity: 0.35; }
  to { opacity: 0.7; }
}

.site-logo-mark svg {
  width: 18px;
  height: 18px;
}

.site-logo:hover { color: var(--primary); }

.site-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text-strong);
  background: var(--border);
}

.site-nav a[aria-current="page"] {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5), var(--neon-glow-soft);
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-soft);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(20deg);
  box-shadow: var(--neon-glow-soft);
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* --- Hero ------------------------------------------------------------- */
.hero {
  text-align: center;
  margin-bottom: 2.25rem;
  padding: 1.5rem 0.5rem 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin: 0 0 1rem;
  padding: 0.4rem 0.95rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.2), 0 0 12px var(--accent-2);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.2), 0 0 12px var(--accent-2); }
  50% { box-shadow: 0 0 0 7px rgba(244, 114, 182, 0.05), 0 0 20px var(--accent-2); }
}

h1 {
  margin: 0 0 0.95rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--text-strong);
}

h1 .gradient-text {
  background: var(--gradient-aurora);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 8s ease-in-out infinite;
}

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

.subtitle {
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.65;
  font-size: 1.02rem;
}

/* --- Tool cards row --------------------------------------------------- */
.tools-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 0 0 2rem;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.15rem 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: var(--gradient-aurora);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

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

.tool-card:hover::before { opacity: 1; }
.tool-card:hover::after { opacity: 1; }

.tool-card[aria-current="page"] {
  border-color: transparent;
  box-shadow: var(--shadow-lg), var(--neon-glow-soft);
}

.tool-card[aria-current="page"]::after { opacity: 1; }

.tool-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  margin-bottom: 0.4rem;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4), var(--neon-glow-soft);
  position: relative;
  z-index: 1;
}

.tool-card-icon svg { width: 20px; height: 20px; }

.tool-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-strong);
  position: relative;
  z-index: 1;
}

.tool-card-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

/* --- Card (form container) ------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-aurora);
  background-size: 200% 100%;
  animation: gradShift 8s ease-in-out infinite;
}

/* --- Dropzone --------------------------------------------------------- */
.dropzone {
  display: block;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2.6rem 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--card-soft);
  position: relative;
  overflow: hidden;
}

.dropzone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--primary);
  background: var(--card);
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(99, 102, 241, 0.22), var(--neon-glow-soft);
}

.dropzone:hover::after,
.dropzone.drag-over::after { opacity: 1; }

.dropzone-content { position: relative; z-index: 1; }

.dropzone-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.95rem;
  border-radius: 16px;
  background: var(--gradient-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4), var(--neon-glow);
  transition: transform 0.3s ease;
}

.dropzone:hover .dropzone-icon,
.dropzone.drag-over .dropzone-icon {
  transform: translateY(-4px) scale(1.06) rotate(-4deg);
}

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

.dropzone-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-strong);
}

.dropzone-subtitle,
.dropzone-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.dropzone-hint {
  font-size: 0.85rem;
  color: var(--muted-soft);
}

/* --- Form ------------------------------------------------------------- */
.converter-form {
  display: grid;
  gap: 1rem;
}

/* --- Format options --------------------------------------------------- */
.format-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.format-fieldset:disabled .format-options {
  opacity: 0.45;
  pointer-events: none;
}

.format-legend {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-strong);
  padding: 0;
  margin-bottom: 0.45rem;
}

.format-hint {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}

.format-option {
  display: block;
  cursor: pointer;
  margin: 0;
  position: relative;
}

.format-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.format-option-body {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 0.95rem;
  background: var(--card-soft);
  transition: all 0.2s ease;
  min-height: 5rem;
  height: 100%;
}

.format-option-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.format-option-icon svg { width: 18px; height: 18px; }

.format-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.format-option:hover .format-option-body {
  border-color: var(--primary);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: var(--neon-glow-soft);
}

.format-option input:focus-visible + .format-option-body {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.format-option input:checked:not(:disabled) + .format-option-body {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.3), 0 10px 22px rgba(99, 102, 241, 0.2), var(--neon-glow-soft);
}

.format-option input:checked:not(:disabled) + .format-option-body .format-option-icon {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

.format-option input:disabled + .format-option-body {
  cursor: not-allowed;
  opacity: 0.55;
}

.format-option-other .format-option-body { border-style: dashed; }

.format-option-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-strong);
}

.format-option-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* --- File details ----------------------------------------------------- */
.file-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  background: var(--card-soft);
}

.meta-label {
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meta-value {
  margin: 0.2rem 0 0;
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.95rem;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.link-btn:hover { background: var(--card); color: var(--text-strong); }

/* --- Primary button --------------------------------------------------- */
.primary-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--gradient-primary);
  background-size: 200% 100%;
  background-position: 0% 50%;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 1rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4), var(--neon-glow-soft);
  position: relative;
  overflow: hidden;
}

.primary-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}

.primary-btn:hover:not(:disabled) {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(99, 102, 241, 0.55), var(--neon-glow);
}

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

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

.primary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--border-strong);
  box-shadow: none;
}

/* --- Progress --------------------------------------------------------- */
.progress-area {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.progress-track {
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
  position: relative;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--gradient-aurora);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
  position: relative;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.55);
  animation: gradShift 4s linear infinite;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

/* --- Status message --------------------------------------------------- */
.status {
  margin-top: 1rem;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status.success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.status.error {
  background: var(--error-soft);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

[data-theme="light"] .status.success { color: #166534; border-color: #86efac; }
[data-theme="light"] .status.error { color: #991b1b; border-color: #fca5a5; }

/* --- Trust points ----------------------------------------------------- */
.trust-points {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.2rem;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.trust-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.trust-points li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 0.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234ade80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 8.5 6.5 12 13 5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(74, 222, 128, 0.5);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

[data-theme="light"] .trust-points li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2316a34a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 8.5 6.5 12 13 5'/%3E%3C/svg%3E");
  border-color: #86efac;
  box-shadow: none;
}

/* --- Merge: file list ------------------------------------------------- */
.merge-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.merge-file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-soft);
  transition: all 0.18s ease;
}

.merge-file-row:hover {
  border-color: var(--primary);
  box-shadow: var(--neon-glow-soft);
  transform: translateX(2px);
}

.merge-file-row::before {
  content: "";
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
  background-size: 18px;
  background-position: center;
  background-repeat: no-repeat;
}

[data-theme="light"] .merge-file-row::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6cff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

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

.merge-file-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merge-file-size {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--muted-soft);
}

.merge-row-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.3rem;
}

.merge-icon-btn {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--muted);
  transition: all 0.15s ease;
}

.merge-icon-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--neon-glow-soft);
}

.merge-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.merge-drop-hint {
  font-size: 0.88rem;
  color: var(--muted-soft);
  margin: 0.5rem 0 0;
  text-align: center;
}

/* --- PDF -> images: quality input ------------------------------------ */
.pti-quality-block { border: none; padding: 0; margin: 0; }
.pti-quality-label { display: block; margin-bottom: 0.4rem; }
.pti-quality-hint { margin-top: 0.5rem; }

.pti-quality-input {
  width: 100%;
  max-width: 180px;
  padding: 0.7rem 0.9rem;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  background: var(--card-soft);
  color: var(--text-strong);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.pti-quality-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25), var(--neon-glow-soft);
  background: var(--card);
}

/* --- Footer ----------------------------------------------------------- */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0.5rem 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted-soft);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover { color: var(--accent-2); text-decoration: underline; }

/* --- Confetti canvas ------------------------------------------------- */
#celebrate-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* --- Utilities -------------------------------------------------------- */
.hidden { display: none !important; }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 620px) {
  .site-header { padding: 0.6rem 0.75rem; top: 0.5rem; }
  .site-header-actions { width: 100%; justify-content: space-between; }
  .site-nav a { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
  .file-details { flex-direction: column; align-items: flex-start; }
  .hero { margin-bottom: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .background-glow::before,
  .background-glow::after,
  .background-glow .aurora-ribbon,
  .progress-fill::after,
  .progress-fill,
  h1 .gradient-text,
  .card::before,
  .site-logo-mark::after,
  .eyebrow::before { animation: none !important; }
  *, *::before, *::after { transition: none !important; }
}
