/* ---------- Global ---------- */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(to bottom right, #0f172a, #1e1b4b, #0f172a);
  color: #e5e7eb;
  transition: background 1s ease, color 1s ease;
}

/* Force dark mode */
body.dark {
  background: linear-gradient(to bottom right, #0f172a, #1e1b4b, #0f172a) !important;
  color: #e5e7eb !important;
}

/* ---------- Animations ---------- */
@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-blur {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes gradient-breathe {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.fade-slide-up {
  animation: fade-slide-up 0.6s ease-out forwards;
}

.fade-slide-down {
  animation: fade-slide-down 0.6s ease-out forwards;
}

.fade-blur {
  animation: fade-blur 0.6s ease-out forwards;
}

/* ---------- Title Gradient ---------- */
.title-gradient {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  background: linear-gradient(90deg, #ce9bdd, #71baff, #ce9bdd);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  animation: gradient-breathe 3s ease-in-out infinite;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  height: 4px;
  background: linear-gradient(90deg, #ce9bdd, #71baff, #ce9bdd);
  background-size: 200% 100%;
  animation: gradient-breathe 3s ease-in-out infinite;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ---------- Toggle Switch ---------- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #475569;
  transition: 0.4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* ---------- Price Display ---------- */
.price-display {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  background: linear-gradient(90deg, #ce9bdd, #71baff, #ce9bdd);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-breathe 3s ease-in-out infinite;
}

/* ---------- Modal ---------- */
.modal-overlay {
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  backdrop-filter: blur(20px);
  background: rgba(30, 41, 59, 0.95);
  border: 2px solid rgba(124, 58, 237, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .title-gradient {
    font-size: 2.5rem;
  }
  
  .price-display {
    font-size: 2rem;
  }
}

/* ---------- Loading Spinner ---------- */
.spinner {
  border: 3px solid rgba(124, 58, 237, 0.2);
  border-top: 3px solid #7c3aed;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Input Styles ---------- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}
