* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: #1a1a1a;
  padding: 48px 24px;
  line-height: 1.5;
}

/* === Layout Principal === */
.campaign-container {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
  align-items: start;
}

/* === Coluna Esquerda === */
.campaign-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.image-wrapper {
  position: relative;
}

.campaign-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.heart-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.heart-btn:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: scale(1.05);
}

.campaign-info {
  padding: 24px 28px 28px;
}

.campaign-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.campaign-title {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.campaign-id {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 16px;
  font-weight: 500;
}

.campaign-description {
  font-size: 15px;
  line-height: 1.7;
  color: #4b5563;
  max-height: 4.2em;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.campaign-description.expanded {
  max-height: 600px;
}

.campaign-description-wrapper {
  position: relative;
}

.btn-ler-mais {
  background: none;
  border: none;
  color: #00a86b;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s;
}

.btn-ler-mais:hover {
  color: #008f5a;
}

.ver-tudo {
  color: #00a86b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.ver-tudo:hover {
  color: #008f5a;
  text-decoration: underline;
}

/* === Coluna Direita === */
.campaign-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.card-donation {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.card-trust {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* === Barra de Progresso === */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00a86b, #00c97b);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* === Info de Doação === */
.donation-info {
  padding-bottom: 4px;
}

.label-arrecadado {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
  display: block;
}

.valor-arrecadado {
  font-size: 34px;
  font-weight: 800;
  color: #00a86b;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.meta {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
}

/* === Estatísticas === */
.stats {
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.divider {
  height: 1px;
  background: #f0f0f0;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.stat-value {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

/* === Botões === */
.btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #00a86b, #00c97b);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.2px;
  animation: pulse 2.5s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 168, 107, 0.35);
  animation: none;
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

/* === Valores de Doação === */
.valores-container {
  display: none;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.valores-container.active {
  display: flex;
  animation: slideDown 0.4s ease forwards;
}

.valores-titulo {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.valor-btn {
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  transform: scale(1);
}

.valor-btn:hover {
  border-color: #00a86b;
  background: #ecfdf5;
  color: #00a86b;
  transform: scale(1.05);
}

.valor-btn.selected {
  border-color: #00a86b;
  background: #00a86b;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* === Botão Confirmar (Gerar PIX) === */
.btn-confirmar {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #00a86b, #00c97b);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-confirmar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 168, 107, 0.3);
}

.btn-confirmar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* === Resultado PIX === */
.pix-result {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 0 0;
}

.pix-result.active {
  display: flex;
  animation: slideUp 0.5s ease forwards;
}

.pix-titulo {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

.qr-code-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

.qr-code-container .qr-img {
  width: 220px;
  height: 220px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  animation: fadeIn 0.5s ease;
}

.qr-code-container canvas {
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  animation: fadeIn 0.5s ease;
}

.pix-copia-cola {
  display: flex;
  width: 100%;
  gap: 8px;
}

.pix-copia-cola input {
  flex: 1;
  padding: 10px 12px;
  font-size: 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #374151;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copiar {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #00a86b;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-copiar:hover {
  background: #008f5a;
}

.pix-aviso {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

/* === Status de Pagamento === */
.pix-status {
  width: 100%;
  text-align: center;
}

.status-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}

.status-loading span {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #e5e7eb;
  border-top-color: #00a86b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Mensagem de Agradecimento (Modal) === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  padding: 20px;
}

.modal-thank-you {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: bounceIn 0.5s ease;
}

.thank-you-icon {
  font-size: 52px;
}

.thank-you-title {
  font-size: 22px;
  font-weight: 700;
  color: #065f46;
}

.thank-you-text {
  font-size: 15px;
  color: #047857;
  line-height: 1.5;
}

.thank-you-valor {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 4px;
}

.btn-fechar-modal {
  margin-top: 12px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #00a86b;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fechar-modal:hover {
  background: #008f5a;
  transform: translateY(-1px);
}

@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

/* === Doação Protegida === */
.doacao-protegida {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shield-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doacao-text {
  font-size: 11px;
  font-weight: 700;
  color: #00a86b;
  letter-spacing: 0.8px;
}

/* === Organizador === */
.organizer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.organizer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a86b, #00c97b);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.organizer-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.organizer-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.organizer-since {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}

/* === Responsivo === */
@media (max-width: 768px) {
  body {
    padding: 0;
    background: #fff;
  }

  .campaign-container {
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .campaign-left {
    border-radius: 0;
    box-shadow: none;
  }

  .campaign-right {
    position: static;
    padding: 0 16px 24px;
  }

  .campaign-image {
    height: 220px;
    border-radius: 0;
  }

  .image-wrapper {
    border-radius: 0;
  }

  .campaign-info {
    padding: 16px 16px 12px;
  }

  .campaign-title {
    font-size: 22px;
  }

  .campaign-id {
    margin-bottom: 10px;
  }

  .campaign-description {
    font-size: 14px;
    max-height: 3.5em;
    line-height: 1.6;
  }

  .card-donation {
    padding: 18px;
    border-radius: 10px;
  }

  .card-trust {
    padding: 14px 16px;
  }

  .valor-arrecadado {
    font-size: 26px;
  }

  .valores-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .valor-btn {
    padding: 10px 6px;
    font-size: 13px;
  }

  .btn-primary {
    padding: 14px;
    font-size: 16px;
  }

  .stats {
    padding: 12px 14px;
  }

  .qr-code-container canvas,
  .qr-code-container img {
    width: 180px !important;
    height: 180px !important;
  }
}
