:root {
  --primary: #6c5ce7;
  --primary-dark: #5649c0;
  --secondary: #00cec9;
  --wa-green: #25d366;
  --wa-green-dark: #1da851;
  --success: #00b894;
  --error: #d63031;
  --light: #f5f6fa;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: var(--light);
  min-height: 100vh;
  overflow-x: hidden;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  background: transparent;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.header {
  text-align: center;
  margin-bottom: 28px;
}

.header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  line-height: 1.5;
}

.stats {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.06);
  padding: 14px 32px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease;
}

.stat-box:hover { transform: translateY(-3px); }

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group {
  position: relative;
  margin-bottom: 24px;
}

.form-group input {
  width: 100%;
  padding: 15px 18px;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.form-group input:focus {
  border-color: var(--secondary);
  background: rgba(255, 255, 255, 0.12);
}

.form-group input::placeholder { color: rgba(255, 255, 255, 0.35); }

.form-group.valid input { border-color: var(--success); }
.form-group.invalid input { border-color: var(--error); }

.field-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  padding-left: 4px;
  display: block;
}

.form-group.invalid .field-hint { color: var(--error); }

.submit-btn {
  width: 100%;
  padding: 15px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 18px rgba(108, 92, 231, 0.35);
  position: relative;
  overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(108, 92, 231, 0.5);
}

.submit-btn:active:not(:disabled) { transform: translateY(0); }

.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }

.submit-btn .btn-text { display: inline-block; transition: opacity 0.2s; }
.submit-btn .btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .btn-spinner { display: block; }

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

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleAnim 0.7s linear;
  pointer-events: none;
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

.message-area {
  margin-top: 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.message-area.show {
  max-height: 200px;
  padding: 14px 18px;
}

.message-area.error {
  background: rgba(214, 48, 49, 0.15);
  border: 1px solid rgba(214, 48, 49, 0.4);
  color: #ff7675;
}

.message-area.warning {
  background: rgba(253, 203, 110, 0.12);
  border: 1px solid rgba(253, 203, 110, 0.35);
  color: #fdcb6e;
}

.success-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  gap: 12px;
}

.success-overlay.show { display: flex; animation: fadeIn 0.5s ease-out; }

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #55efc4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 184, 148, 0.4);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.success-icon svg { width: 36px; height: 36px; }

.success-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #55efc4;
}

.success-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  text-align: center;
}

.footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.footer > p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 14px;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: linear-gradient(45deg, var(--wa-green), var(--wa-green-dark));
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg { width: 22px; height: 22px; flex-shrink: 0; }

@media (max-width: 600px) {
  .card { padding: 28px 20px; }
  .header h1 { font-size: 1.5rem; }
  .stat-number { font-size: 1.6rem; }
  .whatsapp-btn { width: 100%; justify-content: center; }
}
