*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #050816;
  color: #f9fafb;
}

.zp-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header {
  margin-bottom: 24px;
}

header h1 {
  font-size: 1.9rem;
  margin: 0 0 8px;
}

header p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.95rem;
}

.zp-card {
  background: #0b1120;
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 18px;
  border: 1px solid #111827;
}

.zp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 16px;
}

.zp-grid-2 {
  /* vira 2 colunas em telas maiores */
}

@media (min-width: 720px) {
  .zp-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.zp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zp-label {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.zp-label span {
  color: #f97316;
  margin-left: 4px;
}

.zp-input,
.zp-textarea,
.zp-select {
  width: 100%;
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1f2937;
  padding: 10px 12px;
  color: #f9fafb;
  font-size: 1rem; /* 16px evita zoom automático no iOS */
  outline: none;
}

.zp-input::placeholder,
.zp-textarea::placeholder {
  color: #6b7280;
}

.zp-input:focus,
.zp-textarea:focus,
.zp-select:focus {
  border-color: #6366f1;
}

.zp-textarea {
  min-height: 80px;
  resize: vertical;
}

.zp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.zp-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px; /* touch target mínimo recomendado */
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #111827;
  color: #e5e7eb;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.zp-btn:hover {
  background: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.6);
}

.zp-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.zp-btn-primary {
  background: #6366f1;
  color: #f9fafb;
}

.zp-btn-primary:hover {
  background: #4f46e5;
}

.zp-btn-outline {
  border: 1px solid #374151;
}

.zp-section-title {
  font-size: 1rem;
  margin: 0 0 8px;
}

.zp-output {
  width: 100%;
  min-height: 200px;
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1f2937;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #e5e7eb;
  resize: vertical;
}

.zp-output[readonly] {
  cursor: default;
}

.zp-helper {
  font-size: 0.8rem;
  color: #6b7280;
}

.zp-ad {
  width: 100%;
  margin: 4px 0 16px;
  text-align: center;
  min-height: 90px;
  overflow: hidden;
}

footer {
  margin-top: 24px;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.4rem;
  }

  .zp-container {
    padding: 16px 12px 40px;
  }

  .zp-card {
    padding: 14px 12px;
  }

  .zp-actions {
    flex-direction: column;
  }

  .zp-btn {
    width: 100%;
    justify-content: center;
  }
}