:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --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;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --warning: #f59e0b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  background-color: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  flex: 1;
  padding: 2rem 1rem;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.features-highlight {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.feature-badge {
  padding: 0.5rem 1rem;
  border-radius: 9999px; /* This makes it pill-shaped / fully rounded */
  font-size: 0.875rem;
  font-weight: 500;
  border: -2px solid;
}

.feature-badge:nth-child(1) {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

.feature-badge:nth-child(2) {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.feature-badge:nth-child(3) {
  background-color: #f5f3ff;
  border-color: #ddd6fe;
  color: #7c3aed;
}

.feature-badge:nth-child(4) {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #d97706;
}

.upload-container {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--gray-200);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
}

.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  transition: all 0.3s ease;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.dropzone:hover,
.dropzone.drag-active {
  border-color: var(--primary-color);
  background-color: var(--gray-50);
}

.upload-icon {
  color: var(--gray-400);
  margin-bottom: 0;
}

.dropzone-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: -0.75rem;
}

.dropzone-hint {
  font-size: 1rem;
  color: var(--gray-500);
}

.file-input {
  display: none;
}

.browse-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 0.5rem;
}

.browse-btn:hover {
  background-color: var(--primary-hover);
}

.preview-container {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--gray-200);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.remove-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--danger);
  background: none;
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-weight: 500;
}

.remove-all:hover {
  background-color: #fef2f2;
  color: var(--danger-hover);
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1.5rem;
}

.image-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: grab;
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-card .remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: var(--danger);
  color: white;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.image-card:hover .remove {
  opacity: 1;
}

.image-card .remove:hover {
  background-color: var(--danger-hover);
  transform: scale(1.1);
}

.image-card .page-number {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.pdf-options {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--gray-200);
}

.options-grid {
  display: grid;
  gap: 2rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-group label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 1rem;
}

.button-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.option-button {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  background-color: white;
  border: 2px solid var(--gray-300);
  border-radius: 0.5rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.875rem;
}

.option-button:hover {
  background-color: var(--gray-50);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.option-button.selected {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.margins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.margin-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.margin-input label {
  min-width: 60px;
  font-weight: 500;
  color: var(--gray-600);
}

.number-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--gray-300);
  border-radius: 0.5rem;
  overflow: hidden;
  background: white;
  transition: border-color 0.2s;
}

.number-input:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.number-input button {
  background-color: var(--gray-100);
  border: none;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--gray-600);
  font-weight: 600;
  transition: all 0.2s;
}

.number-input button:hover {
  background-color: var(--gray-200);
  color: var(--gray-800);
}

.number-input input {
  width: 4rem;
  text-align: center;
  border: none;
  padding: 0.5rem;
  font-weight: 500;
  -moz-appearance: textfield;
  appearance: textfield;
}

.number-input input::-webkit-outer-spin-button,
.number-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.convert-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.convert-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.convert-button:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hidden {
  display: none;
}

.seo-content {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--gray-200);
}

.content-block {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--gray-200);
}

.step-list {
  list-style: none;
  counter-reset: step-counter;
  margin: 1.5rem 0;
}

.step-list li {
  counter-increment: step-counter;
  margin-bottom: 1rem;
  padding-left: 3rem;
  position: relative;
  line-height: 1.6;
}

.step-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: var(--primary-color);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  background: var(--gray-50);
  transition: all 0.2s;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-item p {
  color: var(--gray-600);
  line-height: 1.6;
}

.faq-section {
  margin-top: 1.5rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-item h3 {
  color: var(--gray-800);
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.faq-item p {
  color: var(--gray-600);
  line-height: 1.6;
}

.feature-item h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem; 
}

.feature-item h3 svg {
  width: 24px;
  height: 24px;
  color: var(--primary-color); 
  flex-shrink: 0;
}