/* ============================================
   Convertly — Universal Document Conversion
   Clean, modern, minimalist design
   ============================================ */

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

:root {
  --deep-blue: #1a1a2e;
  --deep-blue-light: #16213e;
  --deep-blue-lighter: #0f3460;
  --accent: #e94560;
  --accent-hover: #d63851;
  --accent-light: rgba(233, 69, 96, 0.1);
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --error: #ef4444;
  --error-light: rgba(239, 68, 68, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--deep-blue);
  letter-spacing: -0.02em;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
}

.nav-logo span.accent {
  color: var(--accent);
}

.nav-tools {
  position: relative;
}

.nav-tools-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-tools-btn:hover {
  color: var(--deep-blue);
  background: var(--gray-100);
}

.nav-tools-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.nav-tools.open .nav-tools-btn svg {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s ease;
}

.nav-tools.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-dropdown a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-dropdown a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-mobile-btn {
  display: none;
  padding: 0.5rem;
  color: var(--gray-600);
}

.nav-mobile-btn svg {
  width: 24px;
  height: 24px;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--deep-blue) 0%, var(--deep-blue-light) 50%, var(--deep-blue-lighter) 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(15, 52, 96, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.4);
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
}

/* --- Trust badges --- */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* --- How It Works --- */
.how-it-works {
  padding: 4rem 1.5rem;
  background: var(--off-white);
}

.how-it-works-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--deep-blue);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--gray-500);
  font-size: 1rem;
  margin-bottom: 3rem;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
}

.step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.step-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: 0.35rem;
}

.step p {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* --- Tools Grid --- */
.tools-section {
  padding: 4rem 1.5rem 5rem;
}

.tools-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  text-align: left;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.tool-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: 0.35rem;
}

.tool-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
  flex: 1;
}

.tool-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}

.tool-card:hover .tool-card-arrow {
  gap: 0.6rem;
}

.tool-card-arrow svg {
  width: 16px;
  height: 16px;
}

/* --- Footer --- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--gray-200);
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--off-white);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-weight: 600;
  color: var(--deep-blue);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--gray-500);
  transition: color var(--transition);
}

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

.footer-note {
  width: 100%;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* ============================================
   Tool Page Layout
   ============================================ */
.tool-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tool-header {
  background: linear-gradient(135deg, var(--deep-blue) 0%, var(--deep-blue-lighter) 100%);
  color: var(--white);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.tool-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.tool-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.tool-body {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* --- Upload Zone --- */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-zone.has-files {
  border-style: solid;
  border-color: var(--gray-200);
  padding: 1.5rem;
  cursor: default;
}

.upload-zone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.upload-zone:hover .upload-zone-icon,
.upload-zone.dragover .upload-zone-icon {
  background: rgba(233, 69, 96, 0.15);
}

.upload-zone-icon svg {
  width: 24px;
  height: 24px;
  color: var(--gray-400);
}

.upload-zone:hover .upload-zone-icon svg,
.upload-zone.dragover .upload-zone-icon svg {
  color: var(--accent);
}

.upload-zone h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.upload-zone p {
  font-size: 0.85rem;
  color: var(--gray-400);
}

.upload-zone .browse-link {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.upload-zone .browse-link:hover {
  text-decoration: underline;
}

.upload-zone input[type="file"] {
  display: none;
}

/* --- File List --- */
.file-list {
  margin-top: 1.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  transition: all var(--transition);
}

.file-item.dragging {
  opacity: 0.5;
  background: var(--accent-light);
  border-color: var(--accent);
}

.file-item-drag {
  cursor: grab;
  color: var(--gray-400);
  padding: 0.25rem;
  flex-shrink: 0;
}

.file-item-drag:active {
  cursor: grabbing;
}

.file-item-drag svg {
  width: 16px;
  height: 16px;
}

.file-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-item-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

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

.file-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.file-item-remove {
  flex-shrink: 0;
  padding: 0.35rem;
  color: var(--gray-400);
  border-radius: 50%;
  transition: all var(--transition);
}

.file-item-remove:hover {
  color: var(--error);
  background: var(--error-light);
}

.file-item-remove svg {
  width: 16px;
  height: 16px;
}

/* --- Options Panel --- */
.options-panel {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.options-panel h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.options-panel h3 svg {
  width: 18px;
  height: 18px;
  color: var(--gray-400);
}

.option-group {
  margin-bottom: 1rem;
}

.option-group:last-child {
  margin-bottom: 0;
}

.option-group label {
  display: block;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 0.4rem;
}

.option-group select,
.option-group input[type="text"],
.option-group input[type="number"],
.option-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition);
}

.option-group select:focus,
.option-group input:focus,
.option-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.option-group textarea {
  min-height: 120px;
  resize: vertical;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}

.option-row {
  display: flex;
  gap: 1rem;
}

.option-row .option-group {
  flex: 1;
}

/* Radio / checkbox option buttons */
.option-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.option-btn {
  padding: 0.5rem 1rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: all var(--transition);
  cursor: pointer;
}

.option-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.option-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* --- Action Button --- */
.action-bar {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.5rem;
  background: var(--accent);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.4);
}

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

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

/* --- Progress --- */
.progress-section {
  margin-top: 1.5rem;
  display: none;
}

.progress-section.active {
  display: block;
}

.progress-bar-container {
  background: var(--gray-200);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #ff6b81 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-bar.indeterminate {
  width: 30%;
  animation: indeterminate 1.5s ease infinite;
}

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

.progress-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.75rem;
}

/* --- Result / Download --- */
.result-section {
  margin-top: 2rem;
  display: none;
}

.result-section.active {
  display: block;
}

.result-card {
  padding: 1.5rem;
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius);
  text-align: center;
}

.result-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--success);
}

.result-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.result-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--success);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.btn-download:hover {
  background: #0ea572;
  transform: translateY(-1px);
}

.btn-download svg {
  width: 18px;
  height: 18px;
}

/* --- Error --- */
.error-message {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--error-light);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
}

.error-message.active {
  display: flex;
}

.error-message svg {
  width: 20px;
  height: 20px;
  color: var(--error);
  flex-shrink: 0;
  margin-top: 1px;
}

.error-message-text {
  font-size: 0.875rem;
  color: var(--error);
}

/* --- BibtTeX specific --- */
.bibtex-input {
  margin-top: 1.5rem;
}

.bibtex-or {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-400);
  margin: 1rem 0;
  position: relative;
}

.bibtex-or::before,
.bibtex-or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 1.5rem);
  height: 1px;
  background: var(--gray-200);
}

.bibtex-or::before { left: 0; }
.bibtex-or::after { right: 0; }

.bibtex-output {
  margin-top: 1.5rem;
  display: none;
}

.bibtex-output.active {
  display: block;
}

.bibtex-output pre {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}

.output-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  justify-content: flex-end;
}

/* --- Add more files link --- */
.add-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  transition: opacity var(--transition);
}

.add-more:hover {
  opacity: 0.8;
}

.add-more svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 1.25rem 3rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .trust-bar {
    gap: 1.25rem;
  }

  .steps {
    gap: 2rem;
  }

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

  .tool-header h1 {
    font-size: 1.6rem;
  }

  .tool-body {
    padding: 1.5rem 1.25rem 3rem;
  }

  .option-row {
    flex-direction: column;
    gap: 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .nav-tools-btn span {
    display: none;
  }

  .upload-zone {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .tools-grid {
    gap: 0.75rem;
  }

  .tool-card {
    padding: 1.25rem;
  }

  .option-buttons {
    flex-direction: column;
  }

  .option-btn {
    text-align: center;
  }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Smooth appearance animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.4s ease forwards;
}

/* Spinner for buttons */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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