/* 
 * Modern Custom Cursor & Loading Screen Styles
 * Uses modern CSS features with graceful fallbacks
 */

/* -------------- LOADING SCREEN -------------- */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#loader-svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 12px rgba(125, 135, 255, 0.3));
}

#loader-svg circle {
  transition: stroke-dashoffset 0.35s;
  transform-origin: center;
}

#loader-text {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #6c757d;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* -------------- CUSTOM CURSOR -------------- */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  pointer-events: none;
  will-change: transform;
  mix-blend-mode: lighten;
}

#cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at center, #6c63ff 0%, #8e6fff 100%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(108, 99, 255, 0.7);
  transition: width 0.2s, height 0.2s, background 0.2s;
  will-change: transform;
}

#cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(142, 111, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
  will-change: transform;
}

/* Hover state */
.cursor-hover #cursor-dot {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at center, #ff6b6b 0%, #cc5de8 100%);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
}

.cursor-hover #cursor-ring {
  width: 40px;
  height: 40px;
  border-color: rgba(204, 93, 232, 0.6);
  opacity: 0.8;
}

/* Click state */
.cursor-click #cursor-dot {
  transform: translate(-50%, -50%) scale(0.8);
  background: radial-gradient(circle at center, #cc5de8 0%, #6c63ff 100%);
}

.cursor-click #cursor-ring {
  transform: translate(-50%, -50%) scale(1.2);
  opacity: 0.3;
}

/* Hide on touch devices or small screens */
@media (max-width: 768px), (pointer: coarse) {
  #cursor {
    display: none !important;
  }
}

/* For browsers that support backdrop-filter */
@supports (backdrop-filter: blur(4px)) {
  #cursor-ring {
    backdrop-filter: blur(4px) saturate(180%);
  }
}
