/* ── Custom Animations & Overrides ────────────────── */

/* Floating emoji decorations */
@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes gentle-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(168, 130, 255, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(168, 130, 255, 0.6);
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  z-index: 100;
  pointer-events: none;
  border-radius: 50%;
  /* Make them round like falling dust */
  animation: confetti-fall linear forwards;
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Floating emoji background */
.floating-emoji {
  position: fixed;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 0;
  animation: float-up linear infinite;
  opacity: 0;
}

/* Glassmorphism card */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1.5rem;
  box-shadow:
    0 8px 32px rgba(168, 130, 255, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@import url('https://fonts.googleapis.com/css2?family=Sacramento&family=Montserrat:wght@300;400;700;900&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --primary: #9d8df1;
  /* Soft Lavender */
  --primary-glow: rgba(157, 141, 241, 0.4);
  --accent-pink: #ffb7c5;
  --accent-blue: #a3d8f4;
  --accent-mint: #b9e9c9;
  --accent-peach: #ffd8b1;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
}

body {
  font-family: 'Quicksand', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  /* Little Prince Royal Background */
  background:
    radial-gradient(circle at 10% 20%, rgba(30, 64, 115, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(202, 138, 4, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(134, 239, 172, 0.1) 0%, transparent 40%),
    /* Mint hint */
    #ffffff;
  color: #4a4e69;
  overflow-x: hidden;
}

h1,
h2,
h3,
.font-script {
  font-family: 'Sacramento', cursive;
  font-weight: 400;
  letter-spacing: 0px;
}

.font-premium {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.3em;
}

/* ── Stability & Decoration Layer ────────────────── */

.decoration-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sparkle-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  /* Truly in front of everything */
  overflow: hidden;
}

/* SVG Decorations */
.baby-svg {
  position: absolute;
  opacity: 0.4;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

.stork {
  width: 120px;
  animation: soar 25s linear infinite;
}

.bottle {
  width: 60px;
  animation: float-rotate 15s ease-in-out infinite;
}

.rattle {
  width: 50px;
  animation: swing 8s ease-in-out infinite;
}

@keyframes soar {
  from {
    transform: translate(-150px, 10vh) rotate(5deg);
  }

  to {
    transform: translate(110vw, 5vh) rotate(-5deg);
  }
}

@keyframes float-rotate {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(20deg);
  }
}

@keyframes swing {

  0%,
  100% {
    transform: rotate(-15deg);
  }

  50% {
    transform: rotate(15deg);
  }
}

/* ── Magical Effects ────────────────────────────── */

/* Falling Confetti/Sparkles Effect (Defined Above) */

/* ── UI Components ──────────────────────────────── */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.05),
    inset 0 0 10px rgba(255, 255, 255, 0.3);
  /* Rainbow border effect */
  position: relative;
}

.glass-card::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 2rem;
  background: linear-gradient(45deg, var(--accent-pink), var(--accent-blue), var(--accent-mint), var(--accent-peach));
  z-index: -1;
  opacity: 0.15;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8171d1);
  color: white;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-primary-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
  padding: 1rem;
  cursor: pointer;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
  transition: all 0.3s ease;
}

.btn-primary-ghost:hover {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.1));
}

/* Glass Divider (Transparent Scalloped) */
.scalloped {
  height: 20px;
  width: 100%;
  background-image: radial-gradient(circle at 10px -5px, transparent 12px, rgba(255, 255, 255, 0.4) 13px);
  background-size: 20px 20px;
}

/* Map Widget Container */
.map-widget {
  width: 100%;
  height: 200px;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  background: #eee;
}

/* Radio Card Styling */
.radio-card input {
  display: none;
}

.radio-card label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 4.5rem;
  /* Fixed height for symmetry */
  padding: 0 1.5rem;
  white-space: nowrap;
  background: white;
  border: 2px solid transparent;
  border-radius: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.radio-card input:checked+label {
  border-color: var(--primary);
  background: #fdfbff;
  box-shadow: 0 4px 10px rgba(157, 141, 241, 0.2);
  transform: scale(1.05);
}

/* ── Animations ─────────────────────────────────── */

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 0%,
      rgba(255, 255, 255, 0.2) 50%,
      transparent 100%);
  animation: shimmerMove 3s infinite;
}

@keyframes shimmerMove {
  0% {
    transform: translate(-30%, -30%) rotate(25deg);
  }

  100% {
    transform: translate(30%, 30%) rotate(25deg);
  }
}

.btn-primary {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ca8a04;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.6);
}

.btn-primary:active {
  transform: scale(0.95);
}


/* Responsive Overrides */
@media (max-width: 640px) {
  .glass-card {
    border-radius: 1.5rem;
  }
}

/* Admin Table Styling */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.admin-table th {
  text-align: left;
  padding: 1rem;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.admin-table tr {
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s;
}

.admin-table tr:hover {
  transform: scale(1.005);
  background: rgba(255, 255, 255, 0.8);
}

.admin-table td {
  padding: 1rem;
}

.admin-table td:first-child {
  border-radius: 1rem 0 0 1rem;
}

.admin-table td:last-child {
  border-radius: 0 1rem 1rem 0;
}

@media (max-width: 768px) {

  .admin-table td,
  .admin-table th {
    padding: 0.75rem 0.5rem;
  }
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Mobile responsive overrides */
@media (max-width: 640px) {
  .glass-card {
    border-radius: 1rem;
  }

  .floating-emoji {
    font-size: 1rem;
  }
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 500;
  z-index: 9999;
  animation: fade-in-up 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.toast-success {
  background: linear-gradient(135deg, #34d399, #10b981);
}

.toast-error {
  background: linear-gradient(135deg, #f87171, #ef4444);
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 130, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 130, 255, 0.5);
}