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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  padding: 16px;
}

.app {
  max-width: 480px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  padding: 28px 16px 20px;
}

.header h1 {
  font-size: 28px;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.brand-logo {
  display: block;
  margin: 0 auto 10px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.header p {
  color: #666;
  font-size: 14px;
}

.language-switch {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 3px;
  margin-top: 12px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 999px;
}

.lang-btn.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
}

.trust-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.trust-badges span {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  min-height: 74px;
  padding: 11px 6px 10px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.trust-badges b {
  color: #0f172a;
  display: block;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.trust-badges em {
  color: #1e293b;
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.upload-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-camera {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-gallery {
  background: linear-gradient(135deg, #047857, #15803d);
  color: white;
}

.options-panel {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.option-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.option-row strong {
  color: #0f172a;
  font-size: 15px;
}

.option-row small {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.option-row input {
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  accent-color: #2563eb;
}

.social-share {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.social-share p {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.social-btn {
  min-height: 76px;
  border: 0;
  border-radius: 14px;
  color: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.social-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
}

.social-btn:hover {
  filter: brightness(1.04);
}

.social-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.24);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.social-facebook {
  background: linear-gradient(135deg, #1877f2, #0b4fb3);
}

.social-instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b 48%, #8134af);
}

.social-whatsapp {
  background: linear-gradient(135deg, #15803d, #0f766e);
}

.tools-panel {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.tools-panel h2 {
  color: #0f172a;
  font-size: 16px;
  margin-bottom: 12px;
  text-align: center;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.tool-chip {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  color: #1e293b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 11px 8px;
}

.tool-chip:active {
  transform: scale(0.98);
}

.tool-chip.active {
  background: linear-gradient(135deg, #2563eb, #0f766e);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 9px 18px rgba(37, 99, 235, 0.22);
}

.btn.disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.55;
}

.file-card {
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  color: #1e293b;
  font-size: 13px;
  font-weight: 800;
  grid-column: 1 / -1;
  padding: 16px;
  text-align: center;
}

.tool-note {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 10px;
  text-align: center;
}

.btn-convert {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
  font-size: 18px;
  padding: 18px;
}

.btn-download {
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: white;
  margin-bottom: 10px;
}

.btn-whatsapp {
  background: #15803d;
  color: white;
  margin-bottom: 10px;
}

.btn-email {
  background: linear-gradient(135deg, #f7971e, #ffd200);
  color: #333;
  margin-bottom: 10px;
}

.btn-share {
  background: linear-gradient(135deg, #6d28d9, #be185d);
  color: white;
  margin-bottom: 10px;
}

.btn-reset {
  background: #e2e8f0;
  color: #334155;
}

/* Preview Section */
.preview-section {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.preview-header h3 {
  font-size: 15px;
  color: #333;
}

.btn-clear {
  background: #ffe0e0;
  color: #e53e3e;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.preview-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid #e2e8f0;
}

.preview-item img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  height: auto;
  object-fit: cover;
}

.preview-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 6px;
  background: #ffffff;
}

.mini-btn {
  border: 0;
  background: #e2e8f0;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 28px;
}

.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mini-btn.active {
  background: #1d4ed8;
  color: #ffffff;
}

.preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.preview-item .page-num {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
}

/* Convert Section */
.convert-section {
  margin-bottom: 16px;
}

/* Loading */
.loading-section {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #dbe4ef;
  border-top-color: #2563eb;
  border-radius: 50%;
  margin: 0 auto 14px;
}

.loading-section p {
  color: #334155;
  font-size: 15px;
}

/* Share Section */
.share-section {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.success-msg {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #38a169;
  margin-bottom: 18px;
  padding: 12px;
  background: #f0fff4;
  border-radius: 10px;
}

.site-footer {
  text-align: center;
  color: #475569;
  font-size: 13px;
  padding: 24px 8px 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-links a,
.back-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover,
.back-link:hover {
  text-decoration: underline;
}

.content-page {
  max-width: 760px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.content-page h1 {
  color: #0f172a;
  font-size: 30px;
  margin: 18px 0 14px;
}

.content-page h2 {
  color: #1e293b;
  font-size: 20px;
  margin: 24px 0 10px;
}

.content-page p,
.content-page li {
  color: #475569;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.content-page ul {
  padding-left: 22px;
  margin-bottom: 12px;
}

.contact-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0;
}

.seo-content {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 18px;
  margin: 20px 0 4px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.seo-content h2 {
  color: #0f172a;
  font-size: 19px;
  margin-bottom: 10px;
  text-align: center;
}

.seo-content p {
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 10px;
}

.seo-content p:last-child {
  margin-bottom: 0;
}

.faq-section {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 18px;
  margin: 16px 0 4px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.faq-section h2 {
  color: #0f172a;
  font-size: 19px;
  margin-bottom: 10px;
  text-align: center;
}

.faq-section details {
  border-top: 1px solid #e2e8f0;
  padding: 12px 0;
}

.faq-section details:first-of-type {
  border-top: 0;
}

.faq-section summary {
  color: #1e293b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.faq-section p {
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 8px;
}

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

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

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

  .tool-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .social-btn {
    min-height: 56px;
    flex-direction: row;
  }

  .content-page {
    padding: 22px 18px;
  }

  .content-page h1 {
    font-size: 26px;
  }
}
