:root {
  --fire-yellow: #ffd54f;
  --fire-orange: #ff9800;
  --fire-deep: #e65100;
  --fire-red: #bf360c;
  --fire-dark: #1a0a00;
  --bg-dark: #0d0500;
  --glow: rgba(255, 152, 0, 0.4);
  --text: #fff5e6;
  --text-muted: #c4a574;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Tajawal', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-dark);
  color: var(--text);
  position: relative;
}

.bg-glow {
  position: fixed;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 150vw;
  height: 100vh;
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite;
}

.fire-bg {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 152, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(191, 54, 12, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: fireBgPulse 6s ease-in-out infinite;
}

@keyframes fireBgPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 24px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-wrap {
  margin-bottom: 16px;
  animation: logoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255, 152, 0, 0.5));
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.title {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--fire-yellow), var(--fire-orange), var(--fire-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  animation: fadeUp 0.6s 0.2s ease-out both;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  animation: fadeUp 0.6s 0.3s ease-out both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form {
  width: 100%;
  animation: fadeUp 0.6s 0.4s ease-out both;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 152, 0, 0.06);
  border: 1px solid rgba(255, 152, 0, 0.25);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.input-group input::placeholder {
  color: rgba(196, 165, 116, 0.5);
}

.input-group input:focus {
  border-color: var(--fire-orange);
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}

.input-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fire-orange), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.input-group input:focus + .input-glow {
  opacity: 0.6;
}

.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--fire-dark);
  background: linear-gradient(135deg, var(--fire-yellow), var(--fire-orange));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(255, 152, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.6s 0.5s ease-out both;
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:hover {
  box-shadow: 0 6px 28px rgba(255, 152, 0, 0.45);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.5s;
}

.btn-submit:hover .btn-shine {
  left: 100%;
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.result {
  width: 100%;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  display: none;
  animation: fadeUp 0.4s ease-out;
}

.result.show {
  display: block;
}

.result.success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #c8e6c9;
}

.result.error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.4);
  color: #ffcdd2;
}

.result .code {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin: 8px 0 4px;
  color: var(--fire-yellow);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.6s 0.6s ease-out both;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

.loading .btn-text::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
