/* Global Reset and Base Styles */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  background-color: #ffffff;
  scroll-behavior: smooth;
}

/* Loader Container */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
}

/* Spinner Base */
.spinner {
  position: relative;
  width: 80px;
  height: 80px;
}

/* Circles for ripple effect */
.spinner div {
  position: absolute;
  border: 4px solid #2E8B57; /* SeaGreen */
  border-radius: 50%;
  opacity: 0.7;
  animation: ripple 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 10px rgba(46, 139, 87, 0.6);
}

/* Each circle is bigger and delayed */
.spinner div:nth-child(1) {
  width: 20px;
  height: 20px;
  top: 30px;
  left: 30px;
  animation-delay: 0s;
  border-color: #2E8B57;
}

.spinner div:nth-child(2) {
  width: 40px;
  height: 40px;
  top: 20px;
  left: 20px;
  animation-delay: 0.6s;
  border-color: #3CB371; /* MediumSeaGreen */
  box-shadow: 0 0 12px rgba(60, 179, 113, 0.7);
}

.spinner div:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  animation-delay: 1.2s;
  border-color: #66CDAA; /* MediumAquamarine */
  box-shadow: 0 0 14px rgba(102, 205, 170, 0.8);
}

/* Ripple animation scaling & fading */
@keyframes ripple {
  0% {
    transform: scale(0.5);
    opacity: 0.7;
  }
  70% {
    opacity: 0.15;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Responsive tweaks */
@media (max-width: 480px) {
  .spinner {
    width: 50px;
    height: 50px;
  }
  .spinner div:nth-child(1) {
    width: 12px;
    height: 12px;
    top: 19px;
    left: 19px;
  }
  .spinner div:nth-child(2) {
    width: 25px;
    height: 25px;
    top: 12px;
    left: 12px;
  }
  .spinner div:nth-child(3) {
    width: 38px;
    height: 38px;
    top: 6px;
    left: 6px;
  }
}

@media (min-width: 1440px) {
  .spinner {
    width: 100px;
    height: 100px;
  }
  .spinner div:nth-child(1) {
    width: 30px;
    height: 30px;
    top: 35px;
    left: 35px;
  }
  .spinner div:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 20px;
    left: 20px;
  }
  .spinner div:nth-child(3) {
    width: 90px;
    height: 90px;
    top: 5px;
    left: 5px;
  }
}
