* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  background: #0f172a;
}
.navbar {
  width: 100%;
  max-width: 1100px;
  margin: 25px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.navbar a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
}

.background {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #312e81, #4f46e5, #7c3aed);
  z-index: -2;
}

.background::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -120px;
  left: -120px;
  filter: blur(60px);
}

.background::before {
  content: "";
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  bottom: -150px;
  right: -150px;
  filter: blur(60px);
}

.container {
  width: 100%;
  max-width: 900px;
  padding: 30px;
}

.card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 40px;
  color: #fff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: fade 0.5s ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 35px;
}

#progressBar {
  width: 0%;
  height: 100%;
  border-radius: 50px;
  background: #22c55e;
  transition: 0.35s;
}

.welcome {
  text-align: center;
}

.welcome h1 {
  font-size: 56px;
  margin-bottom: 20px;
}

.welcome p {
  color: #d1d5db;
  font-size: 18px;
  margin-bottom: 40px;
}

.questionPage h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
}

#options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}

.option {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: 0.25s;
  font-weight: 500;
}

.option:hover {
  transform: translateY(-4px);
  border-color: #a855f7;
}

.option.active {
  background: #7c3aed;
  border-color: #fff;
}

input {
  width: 100%;
  padding: 16px;
  border: none;
  outline: none;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 17px;
}

.budget {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

button {
  border: none;
  cursor: pointer;
  border-radius: 12px;
  padding: 15px 25px;
  background: #7c3aed;
  color: white;
  font-size: 16px;
  font-weight: 600;
  transition: 0.25s;
}

button:hover {
  transform: translateY(-2px);
  background: #6d28d9;
}

#nextBtn {
  width: 100%;
}

.loading {
  text-align: center;
  padding: 60px 0;
}

.loader {
  width: 70px;
  height: 70px;
  margin: auto;
  border: 7px solid rgba(255, 255, 255, 0.2);
  border-top: 7px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 25px;
}

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

.topBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

#giftGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.giftCard {
  background: white;
  color: #111827;
  border-radius: 18px;
  overflow: hidden;
  transition: 0.25s;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.giftCard:hover {
  transform: translateY(-8px);
}

.giftCard img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.giftInfo {
  padding: 18px;
}

.giftInfo h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.giftInfo p {
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 14px;
}

.price {
  font-size: 22px;
  color: #7c3aed;
  font-weight: 700;
  margin-bottom: 15px;
}

.viewBtn {
  width: 100%;
}

.empty {
  text-align: center;
  padding: 80px 20px;
}

.empty h2 {
  margin-bottom: 15px;
}

.empty p {
  color: #d1d5db;
}

@media (max-width: 768px) {
  .card {
    padding: 25px;
  }

  .welcome h1 {
    font-size: 42px;
  }

  .questionPage h2 {
    font-size: 26px;
  }

  #options {
    grid-template-columns: 1fr;
  }

  .budget {
    grid-template-columns: 1fr;
  }

  .topBar {
    flex-direction: column;
    gap: 20px;
  }
}

/* ===========================
   ADMIN PAGE
=========================== */

.adminCard {
  max-width: 900px;
  margin: auto;
}

.adminCard h1 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #3f3
  margin-bottom: 35px;
}

#giftForm {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.formGroup label {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
}

.formGroup input,
.formGroup textarea,
.formGroup select {
  width: 100%;
  padding: 15px 18px;
  border: none;
  outline: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 2px solid transparent;
  transition: 0.25s;
  font-size: 15px;
}

.formGroup textarea {
  resize: vertical;
  min-height: 120px;
}

.formGroup input:focus,
.formGroup textarea:focus,
.formGroup select:focus {
  border-color: #7c3aed;
  background: rgba(255, 255, 255, 0.12);
}

.formGroup input::placeholder,
.formGroup textarea::placeholder {
  color: #cbd5e1;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.checkboxGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.checkboxGrid label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: 0.25s;
  user-select: none;
  border: 2px solid transparent;
}

.checkboxGrid label:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.checkboxGrid input {
  width: 18px;
  height: 18px;
  accent-color: #7c3aed;
  cursor: pointer;
}

.submitBtn {
  margin-top: 15px;
  width: 100%;
  padding: 18px;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.submitBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(124, 58, 237, 0.35);
}

.successBox,
.errorBox {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
}

.successBox {
  background: #22c55e;
  color: white;
}

.errorBox {
  background: #ef4444;
  color: white;
}

.preview {
  width: 100%;
  height: 260px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .row {
    grid-template-columns: 1fr;
  }

  .checkboxGrid {
    grid-template-columns: 1fr;
  }

  .adminCard {
    padding: 25px;
  }

  .adminCard h1 {
    font-size: 28px;
  }
}
