/* ========== Your existing CSS (keep exactly as you had) ========== */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --hover-bg: #fff7ed;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --hover-bg: rgba(255, 107, 0, 0.1);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4);
}

* {
  font-family: "Vazirmatn FD NL", "Vazirmatn", system-ui, sans-serif;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(255, 107, 0, 0.4);
  }

  50% {
    box-shadow:
      0 0 25px rgba(255, 107, 0, 0.8),
      0 0 15px rgba(232, 62, 140, 0.5);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bounce-mail {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.fade-scale {
  animation: fadeInScale 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

.spin-slow {
  animation: spin-slow 20s linear infinite;
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

.bounce-mail {
  animation: bounce-mail 1s ease-in-out infinite;
}

.theme-transition {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.form-input {
  transition: all 0.3s ease;
  background-color: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-input.error {
  border-color: #ef4444;
  animation: shake 0.3s ease-in-out;
}

.form-input.success {
  border-color: #22c55e;
}

.form-group-item {
  opacity: 0;
  transform: translateX(15px);
}

.form-group-item.animated {
  animation: slideInRight 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

.form-group-item:nth-child(1) {
  animation-delay: 0.05s;
}

.form-group-item:nth-child(2) {
  animation-delay: 0.1s;
}

.form-group-item:nth-child(3) {
  animation-delay: 0.15s;
}

.form-group-item:nth-child(4) {
  animation-delay: 0.2s;
}

.success-message {
  display: none;
  animation: slideInUp 0.4s ease-out;
}

.success-message.show {
  display: block;
}

.check-icon {
  animation: checkmark 0.5s ease-out;
}

.error-message {
  font-size: 0.7rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
  animation: slideInRight 0.3s ease-out;
}

.info-box {
  transition: all 0.3s ease;
}

.info-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-loading .btn-text {
  display: none;
}

.btn-loading .spinner {
  display: inline-block;
}

.spinner {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin-slow 0.6s linear infinite;
}

.submit-btn {
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px -5px rgba(255, 107, 0, 0.4);
}

.back-link {
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #ff6b00;
  transform: translateX(-3px);
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
  transition: all 0.3s ease;
}

.step-dot.active {
  width: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff6b00, #e83e8c);
}

.step-dot.completed {
  background-color: #22c55e;
}

.countdown-timer {
  font-family: monospace;
  font-weight: bold;
  color: #ff6b00;
}

.stage {
  display: none;
}

.stage.active {
  display: block;
}

.password-strength-bar {
  height: 4px;
  border-radius: 2px;
  transition: all 0.3s ease;
  width: 0;
}

.password-strength-bar.weak {
  width: 33%;
  background: #ef4444;
}

.password-strength-bar.medium {
  width: 66%;
  background: #f59e0b;
}

.password-strength-bar.strong {
  width: 100%;
  background: #22c55e;
}

button,
a,
[role="button"] {
  cursor: pointer;
}

/* ========== Responsive Action Buttons ========== */
.action-buttons-wrapper {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 50;
}

.action-buttons-wrapper > div {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-radius: 60px !important;
  padding: 6px 12px !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 0 0 2px rgba(255, 255, 255, 0.1) inset !important;
  gap: 8px;
  transition: all 0.3s ease;
}

.action-buttons-wrapper > div:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
}

body.dark .action-buttons-wrapper > div {
  background: rgba(0, 0, 0, 0.3) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 0 0 2px rgba(255, 255, 255, 0.05) inset !important;
}

body.dark .action-buttons-wrapper > div:hover {
  background: rgba(0, 0, 0, 0.45) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset !important;
}

.action-buttons-wrapper .action-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(4px) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset !important;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1) !important;
}

.action-buttons-wrapper .action-btn:hover {
  transform: scale(1.1) translateY(-2px) !important;
  background: white !important;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 107, 0, 0.6) inset !important;
}

.action-buttons-wrapper .action-btn:active {
  transform: scale(0.95) !important;
}

/* حالت دارک مود دکمه‌ها در دسکتاپ */
body.dark .action-buttons-wrapper .action-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
}

body.dark .action-buttons-wrapper .action-btn:hover {
  background: rgba(255, 255, 255, 0.35) !important;
  transform: scale(1.1) translateY(-2px) !important;
}

.action-buttons-wrapper .action-btn i {
  font-size: 1rem !important;
  color: #334155 !important;
  transition: all 0.3s ease !important;
}

.action-buttons-wrapper .action-btn:hover i {
  color: #ff6b00 !important;
  transform: scale(1.15) !important;
}

body.dark .action-buttons-wrapper .action-btn i {
  color: #e2e8f0 !important;
}

body.dark .action-buttons-wrapper .action-btn:hover i {
  color: #ff6b00 !important;
}

@media (max-width: 768px) {
  .action-buttons-wrapper {
    position: fixed !important;
    top: auto !important;
    left: auto !important;
    bottom: 25px;
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 50;
    width: auto;
  }

  .action-buttons-wrapper > div {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    padding: 10px 20px !important;
    gap: 15px;
  }

  .action-buttons-wrapper .action-btn {
    width: 52px !important;
    height: 52px !important;
    background: rgba(255, 255, 255, 0.7) !important;
  }

  .action-buttons-wrapper .action-btn i {
    font-size: 1.3rem !important;
  }

  main {
    padding-bottom: 100px !important;
  }
}

@media (max-width: 480px) {
  .action-buttons-wrapper {
    bottom: 15px;
  }

  .action-buttons-wrapper > div {
    padding: 8px 16px !important;
    gap: 12px;
  }

  .action-buttons-wrapper .action-btn {
    width: 46px !important;
    height: 46px !important;
  }

  .action-buttons-wrapper .action-btn i {
    font-size: 1.1rem !important;
  }

  main {
    padding-bottom: 90px !important;
  }
}
