:root {
  --primary-color: #e3342f;
  --primary-hover: #cc1f1a;
  --secondary-color: #fc1c0c; 
  
  --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;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.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;
}

.hidden { display: none !important; }

.site-header {
  background-color: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gray-800);
}

.logo img {
  display: block;
  height: 100px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 600;
  transition: color 0.2s;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-color);
}

main {
  flex: 1;
  padding: 2rem 1rem;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
}

.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1.5rem 0;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--gray-600);
  max-width: 650px;
  margin: 0 auto 1.5rem;
}

.features-highlight {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.feature-badge {
  background: #ffdfe9;
  color: var(--secondary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #fedbe1;
}

.upload-container {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--gray-200);
}

.dropzone {
  border: 2px dashed var(--secondary-color);
  border-radius: 0.75rem;
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover {
  background: #eff6ff;
  border-color: #eb1265;
  transform: scale(1.005);
}

.upload-icon {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  width: 64px;
  height: 64px;
}

.dropzone-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.dropzone-subtitle {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.browse-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease;
  box-shadow: 0 4px 6px rgba(227, 52, 47, 0.2);
}

.browse-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(227, 52, 47, 0.3);
}

.dropzone-hint {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-top: 1rem;
}

.file-input { display: none; }

.preview-container, .pdf-options {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px 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 {
  color: var(--danger);
  background: none;
  border: 1px solid var(--danger);
  padding: 0.4rem 1rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.remove-all:hover {
  background: #fef2f2;
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.image-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background: white;
  border: 1px solid var(--gray-200);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.options-grid {
  display: grid;
  gap: 1.5rem;
}

.option-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.button-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.option-button {
  flex: 1;
  min-width: 100px;
  padding: 0.6rem 1rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 0.4rem;
  cursor: pointer;
  color: var(--gray-600);
}

.option-button.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.margins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.margin-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.number-input {
  display: flex;
  border: 1px solid var(--gray-300);
  border-radius: 0.4rem;
  overflow: hidden;
}

.number-input button {
  padding: 0.3rem 0.6rem;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
}

.number-input input {
  width: 40px;
  text-align: center;
  border: none;
  appearance: textfield; 
  -moz-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: 1rem;
  padding: 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 15px -3px rgba(227, 52, 47, 0.3);
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.convert-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.seo-content {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.content-block {
  margin-bottom: 3rem;
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--gray-100);
}

.content-block h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--gray-800);
}

.content-block p, .content-block li {
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.7;
}

.step-list {
  padding-left: 1.5rem;
  margin-top: 1rem;
}

.step-list li {
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
}

.feature-item h3 {
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 1rem;
}

.faq-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.text-page {
  background: white;
  padding: 3rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-top: 0;
  border: 1px solid var(--gray-200);
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.text-page h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  color: var(--gray-800);
  border-bottom: 2px solid var(--gray-100);
  padding-bottom: 1rem;
}

.text-page h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.text-page p, .text-page li {
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.text-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.text-page a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.text-page a:hover {
  text-decoration: underline;
}

.guide-step {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.tips-box {
  background-color: #f0f9ff;
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-top: 2rem;
}

.tips-box h3 {
  color: var(--gray-800);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.contact-box {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
  margin-top: 2rem;
}

.email-link {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-block;
  margin-top: 0.5rem;
}

.site-footer {
  background-color: white;
  border-top: 1px solid var(--gray-200);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-info h3 {
  margin-bottom: 0.5rem;
  color: var(--gray-800);
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--gray-600);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--gray-200);
  padding-top: 1.5rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .hero-section h1 { font-size: 2rem; }
  .dropzone { padding: 2rem 1rem; }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .text-page { padding: 1.5rem; }
  .text-page h1 { font-size: 1.75rem; }
  
  .convert-button {
    font-size: 1.25rem;
    padding: 1rem;
    position: sticky;
    bottom: 20px;
    z-index: 100;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }
}