/* MODERN Page Loader - Dark Background - Always Hides */
#page-loader {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(35, 38, 47, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  transition: opacity 0.3s ease;
}

/* Modern spinning loader */
.loader {
  height: 80px;
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 50%;
  box-sizing: border-box;
  position: relative;
  mask: conic-gradient(#000 0 0) content-box exclude,conic-gradient(#000 0 0);
  filter: blur(12px);
}

.loader:before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(#0000 0 5%, #E4B34E, #0000 20% 50%);
  animation: l2 1.5s linear infinite;
}

/* Remove loading text */
.loading-text {
  display: none;
}

@keyframes l2 {
  to {rotate: 1turn}
}

/* AUTO-HIDE after 1 second - CSS Animation */
#page-loader {
  animation: autoHide 0.5s ease-in-out 1s forwards;
}

@keyframes autoHide {
  to { 
    opacity: 0; 
    visibility: hidden; 
    display: none; 
  }
}

/* Hidden states */
#page-loader.hidden,
#page-loader[style*="display: none"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Mobile - Larger size for better visibility */
@media (max-width: 768px) {
  .loader { 
    height: 60px; 
    width: 60px; 
  }
}

/* Print */
@media print {
  #page-loader { display: none !important; }
}