/* === GIRAMILLE — estilos globais === */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fredoka:wght@500;600;700&display=swap');

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

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1a1a1a;
  background: #FAFAFA;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Container central */
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* Header com logo */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header img.logo {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.header h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

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

/* Cards de plano */
.plans {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.plan:hover {
  border-color: #3A9DA8;
  transform: translateY(-1px);
}

.plan.selected {
  border: 2px solid #3A9DA8;
  background: #F0FAFB;
  padding: 19px 23px;
  box-shadow: 0 0 0 4px rgba(58, 157, 168, 0.15);
}

.plan .plan-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.plan .plan-info p {
  color: #888;
  font-size: 13px;
}

.plan .plan-info p.highlight {
  color: #3A9DA8;
  font-weight: 500;
}

.plan .plan-price {
  text-align: right;
}

.plan .plan-price .price {
  font-size: 22px;
  font-weight: 700;
}

.plan .plan-price .period {
  color: #888;
  font-size: 12px;
}

.plan .badge {
  position: absolute;
  top: -10px;
  left: 20px;
  background: #3A9DA8;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Botão principal */
.btn-primary {
  width: 100%;
  background: #1a1a1a;
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: none;
  padding: 14px;
  border-radius: 10px;
  margin-top: 24px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: #2a2a2a;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  background: white;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid #E5E5E5;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: #F5F5F5;
}

/* Rodapé */
.footer-text {
  text-align: center;
  color: #888;
  font-size: 12px;
  margin-top: 14px;
}

/* Página de obrigado — token box */
.token-box {
  background: #F5F5F5;
  border: 1px solid #E5E5E5;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  color: #1a1a1a;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.token-box .token-value {
  flex: 1;
  user-select: all;
}

.token-box .btn-copy {
  background: #3A9DA8;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif;
}

.token-box .btn-copy:hover {
  background: #2D7A82;
}

.token-box .btn-copy.copied {
  background: #22C55E;
}

/* Instruções (obrigado) */
.instructions {
  background: white;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 24px;
}

.instructions h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

.instructions ol {
  padding-left: 20px;
  font-size: 14px;
  color: #444;
}

.instructions ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Estados de loading / erro */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E5E5E5;
  border-top-color: #3A9DA8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 10px;
  padding: 16px;
  color: #991B1B;
  font-size: 14px;
  margin: 16px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #22C55E;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  stroke: white;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .header h1 {
    font-size: 26px;
  }

  .plan {
    padding: 16px 18px;
  }

  .plan.selected {
    padding: 15px 17px;
  }

  .plan .plan-price .price {
    font-size: 20px;
  }
}