:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --primary: #ef4444;
  --primary-dark: #dc2626;
  --orange: #f97316;
  --line: #e5e7eb;
  --dark: #111827;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.13), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 52%, #edf2f7 100%);
  color: var(--text);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
  backdrop-filter: blur(16px);
}

.navbar {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.nav-brand strong {
  display: block;
  font-size: 17px;
  line-height: 1;
}

.nav-brand small {
  color: var(--muted);
  font-size: 12px;
}

.brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.25);
}

.brand-icon.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 13px;
  box-shadow: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: #374151;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
  background: #fee2e2;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: #f3f4f6;
  padding: 12px;
}

.menu-toggle span {
  display: block;
  height: 3px;
  margin: 4px 0;
  border-radius: 99px;
  background: var(--dark);
}

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 34px;
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero {
  min-height: 330px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: center;
  padding: 30px;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #fee2e2;
  font-weight: 800;
  font-size: 13px;
}

.hero h1,
.page-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: -1.8px;
}

.hero p,
.page-hero p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  max-width: 650px;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
}

.upload-box {
  min-height: 240px;
  border: 2px dashed #fca5a5;
  border-radius: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  background: #fff7f7;
  transition: 0.2s ease;
}

.upload-box:hover,
.upload-box.dragging {
  border-color: var(--primary);
  transform: translateY(-2px);
  background: #fff1f2;
}

.upload-box input {
  display: none;
}

.upload-icon {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: #fee2e2;
  color: var(--primary-dark);
  font-size: 38px;
  font-weight: 900;
}

.upload-box strong {
  margin-top: 12px;
  font-size: 20px;
}

.upload-box small {
  color: var(--muted);
}

.controls {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr auto auto;
  gap: 12px;
  align-items: end;
}

.control label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

select,
input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 15px;
}

select:focus,
input:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15);
}

button {
  border: 0;
  height: 48px;
  border-radius: 15px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s ease;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: linear-gradient(135deg, var(--primary), var(--orange));
  color: #fff;
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.2);
}

.primary:not(:disabled):hover {
  transform: translateY(-1px);
}

.secondary {
  background: #f3f4f6;
  color: #374151;
}

.status {
  margin-top: 18px;
  padding: 18px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.progress {
  width: 100%;
  height: 12px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

#progressBar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  transition: width 0.2s ease;
}

.result-head {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.result-head h2 {
  margin: 0;
  font-size: 26px;
}

.result-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.page-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.preview-wrap {
  background: #f9fafb;
  padding: 12px;
}

.preview-wrap img {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.page-actions {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.page-actions strong {
  font-size: 15px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 13px;
  padding: 0 14px;
  background: var(--dark);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

.features {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-card span {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #fff1f2;
  font-size: 28px;
}

.feature-card h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.page-hero {
  padding: 34px;
}

.content-page {
  margin-top: 18px;
  padding: 30px;
}

.content-page h2 {
  margin: 28px 0 8px;
  font-size: 22px;
}

.content-page h2:first-child {
  margin-top: 0;
}

.content-page p {
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 14px;
}

.updated {
  margin-top: 28px !important;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f9fafb;
  color: var(--muted) !important;
  font-weight: 800;
}

.site-footer {
  background: #0f172a;
  color: #e5e7eb;
  padding: 4px 16px 20px;
}

.footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
}

.site-footer p {
  color: #94a3b8;
  line-height: 1.6;
  margin: 12px 0 0;
}

.site-footer h4 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer a {
  color: #cbd5e1;
  display: block;
  text-decoration: none;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-brand {
  color: #fff !important;
  margin: 0 !important;
}

.footer-bottom {
  max-width: 1120px;
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 880px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    border-radius: 14px;
  }

  .hero,
  .controls,
  .features,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 20px;
  }

  .upload-box {
    min-height: 190px;
  }

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

  .result-head {
    align-items: stretch;
    flex-direction: column;
  }

  .result-head button,
  .controls button,
  .hero-actions .link-button {
    width: 100%;
  }

  .content-page,
  .page-hero {
    padding: 22px;
  }
}


/* Footer simples e centralizado */
.site-footer.simple-footer {
  padding: 22px 16px;
  text-align: center;
  background: #0f172a;
}

.site-footer.simple-footer p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

/* Recursos sem ícones */
.feature-card {
  text-align: left;
}

.feature-card h3 {
  margin-top: 0;
}


/* Logo em imagem no navegador */
.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.22);
}

.nav-brand strong {
  letter-spacing: -0.2px;
}

@media (max-width: 420px) {
  .brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .nav-brand strong {
    font-size: 15px;
  }

  .nav-brand small {
    font-size: 11px;
  }
}
