/* Custom CSS for HTML version */
body {
  background-color: #000000;
  color: #ffffff;
  font-family: "Nunito", sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

/* Starfield animations */
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.star {
  animation: twinkle 2s infinite;
}

.star:nth-child(2n) {
  animation-delay: 0.5s;
}

.star:nth-child(3n) {
  animation-delay: 1s;
}

.star:nth-child(4n) {
  animation-delay: 1.5s;
}

/* Navigation hover effects */
.nav-btn:hover,
#home-btn:hover {
  background-color: rgba(156, 163, 175, 1) !important;
  color: #000000 !important;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(156, 163, 175, 0.3);
}

/* Navigation active state styling */
.nav-btn.active,
#home-btn.active {
  background-color: rgba(156, 163, 175, 0.2) !important;
  color: #ffffff !important;
  border: 1px solid rgba(156, 163, 175, 0.4);
}

/* Improved focus states for accessibility */
.nav-btn:focus,
#home-btn:focus {
  outline: 2px solid rgba(156, 163, 175, 0.8);
  outline-offset: 2px;
}

/* Enhanced form styling */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  ring: 2px solid rgba(156, 163, 175, 0.8);
  border-color: rgba(156, 163, 175, 0.8);
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

/* Button hover animations */
button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Improved card styling */
.bg-black\/40 {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Responsive breakpoints for custom styles */
@media (max-width: 480px) {
  .nav-btn,
  #home-btn {
    font-size: 0.625rem;
    padding: 0.25rem 0.125rem;
  }
}

@media (min-width: 481px) and (max-width: 640px) {
  .nav-btn,
  #home-btn {
    font-size: 0.75rem;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .nav-btn,
  #home-btn {
    font-size: 0.875rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-btn,
  #home-btn {
    font-size: 1rem;
  }
}

@media (min-width: 1025px) {
  .nav-btn,
  #home-btn {
    font-size: 1.125rem;
  }
}

/* Loading animation for forms */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading {
  animation: spin 1s linear infinite;
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-btn,
  #home-btn {
    border: 2px solid #ffffff;
  }

  .nav-btn:hover,
  #home-btn:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
}

/* Updated Auramir button hover to include both border glow and reduced central shining effect */
.nav-btn[data-href="auramir.html"]:hover {
  background-color: rgba(156, 163, 175, 1) !important;
  color: #000000 !important;
  transform: scale(1.15) !important;
  border: 3px solid rgba(255, 248, 220, 0.675) !important; /* Increased from 0.54 to 0.675 (75%) */
  box-shadow: 0 0 18.75px rgba(255, 248, 220, 0.6), 0 0 37.5px rgba(255, 255, 255, 0.45), inset 0 0 22.5px
    rgba(255, 248, 220, 0.3) !important; /* All values increased to 75% */
  transition: all 0.3s ease !important;
  animation: whitishGoldenBorderGlow 2s ease-in-out infinite !important;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.nav-btn[data-href="auramir.html"]:hover::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 248, 220, 0.24) 0%, rgba(255, 255, 255, 0.12) 50%, transparent 80%); /* Reduced to 60% */
  transform: translate(-50%, -50%);
  animation: whitishGoldenCentralShine 2s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.nav-btn[data-href="auramir.html"]:hover::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 248, 220, 0.24) /* Reduced from 0.48 to 0.24 (30%) */,
    transparent,
    rgba(255, 255, 255, 0.18) /* Reduced from 0.36 to 0.18 (30%) */,
    transparent
  );
  border-radius: inherit;
  /* slowed firework rotation from 1.5s to 2.25s (50% slower) */
  animation: fireworkBorder 2.25s linear infinite;
  pointer-events: none;
  z-index: -2;
}

/* Whitish-golden border glow animation */
@keyframes whitishGoldenBorderGlow {
  0% {
    border-color: rgba(255, 248, 220, 0.45); /* Increased from 0.36 to 0.45 (75%) */
    box-shadow: 0 0 11.25px rgba(255, 248, 220, 0.375), 0 0 22.5px rgba(255, 248, 220, 0.225), inset 0 0 15px
      rgba(255, 248, 220, 0.15); /* All values increased to 75% */
  }
  50% {
    border-color: rgba(255, 255, 255, 0.75); /* Increased from 0.6 to 0.75 (75%) */
    box-shadow: 0 0 26.25px rgba(255, 248, 220, 0.675), 0 0 52.5px rgba(255, 255, 255, 0.525), inset 0 0 30px
      rgba(255, 248, 220, 0.375); /* All values increased to 75% */
  }
  100% {
    border-color: rgba(255, 248, 220, 0.45);
    box-shadow: 0 0 11.25px rgba(255, 248, 220, 0.375), 0 0 22.5px rgba(255, 248, 220, 0.225), inset 0 0 15px
      rgba(255, 248, 220, 0.15);
  }
}

/* Whitish-golden central shining animation */
@keyframes whitishGoldenCentralShine {
  0% {
    opacity: 0.24; /* Reduced from 0.4 to 0.24 (60%) */
    transform: translate(-50%, -50%) scale(0.7);
  }
  50% {
    opacity: 0.48; /* Reduced from 0.8 to 0.48 (60%) */
    transform: translate(-50%, -50%) scale(1.4);
  }
  100% {
    opacity: 0.24;
    transform: translate(-50%, -50%) scale(0.7);
  }
}

/* Firework-like effect moving along the border */
@keyframes fireworkBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Improved zoom transition overlay and animations for better visibility */
.zoom-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.zoom-transition-overlay.active {
  display: flex;
  opacity: 1;
}

#transition-logo {
  position: absolute;
  transition: none;
  z-index: 10000;
  transform-origin: center center;
}

/* More prominent and seamless zoom animations - significantly slower */
.logo-zoom-in {
  /* Updated zoom-in animation to 1 second duration */
  animation: dramaticZoomIn 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.logo-zoom-out {
  /* Updated zoom-out animation to 1 second duration */
  animation: dramaticZoomOut 0.75s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

/* Updated keyframes with smoother intermediate steps at specified percentages */
@keyframes dramaticZoomIn {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  5% {
    transform: scale(1.2);
    opacity: 0.99;
    filter: brightness(1.01);
  }
  10% {
    transform: scale(1.5);
    opacity: 0.98;
    filter: brightness(1.02);
  }
  20% {
    transform: scale(2.2);
    opacity: 0.97;
    filter: brightness(1.05);
  }
  30% {
    transform: scale(3.1);
    opacity: 0.96;
    filter: brightness(1.08);
  }
  40% {
    transform: scale(4.2);
    opacity: 0.95;
    filter: brightness(1.12);
  }
  50% {
    transform: scale(5.5);
    opacity: 0.94;
    filter: brightness(1.16);
  }
  60% {
    transform: scale(6.9);
    opacity: 0.93;
    filter: brightness(1.21);
  }
  70% {
    transform: scale(8.5);
    opacity: 0.92;
    filter: brightness(1.26);
  }
  80% {
    transform: scale(10.2);
    opacity: 0.91;
    filter: brightness(1.32);
  }
  90% {
    transform: scale(11.1);
    opacity: 0.905;
    filter: brightness(1.36);
  }
  100% {
    transform: scale(12);
    opacity: 0.9;
    filter: brightness(1.4);
  }
}

@keyframes dramaticZoomOut {
  0% {
    transform: scale(12);
    opacity: 0.9;
    filter: brightness(1.4);
  }
  10% {
    transform: scale(13.1);
    opacity: 0.87;
    filter: brightness(1.48);
  }
  20% {
    transform: scale(15.2);
    opacity: 0.83;
    filter: brightness(1.58);
  }
  30% {
    transform: scale(17.5);
    opacity: 0.78;
    filter: brightness(1.69);
  }
  40% {
    transform: scale(19.9);
    opacity: 0.72;
    filter: brightness(1.81);
  }
  50% {
    transform: scale(22.5);
    opacity: 0.65;
    filter: brightness(1.94);
  }
  60% {
    transform: scale(25.2);
    opacity: 0.57;
    filter: brightness(2.08);
  }
  70% {
    transform: scale(27.8);
    opacity: 0.47;
    filter: brightness(2.23);
  }
  80% {
    transform: scale(30.2);
    opacity: 0.35;
    filter: brightness(2.39);
  }
  90% {
    transform: scale(32.5);
    opacity: 0.21;
    filter: brightness(2.56);
  }
  95% {
    transform: scale(33.8);
    opacity: 0.1;
    filter: brightness(2.65);
  }
  100% {
    transform: scale(35);
    opacity: 0;
    filter: brightness(2.8);
  }
}
