/* Applying base fonts */
body {
  font-family: "Vazirmatn", sans-serif;
  background-color: #0c0a09;
}

/* Canvas background */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
}

.font-minecraft {
  font-family: "Press Start 2P", cursive;
}

/* Custom styles for glowing effects */
.glow-red {
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.9), 0 0 20px rgba(239, 68, 68, 0.6);
}
.glow-blue {
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.9), 0 0 20px rgba(59, 130, 246, 0.6);
}

/* Glassmorphism card with glow */
.glass-card {
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(239, 68, 68, 0.5); /* Red hover */
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.2);
}

/* --- Header Scroll Effect --- */
#main-header {
  transition: background-color 0.3s ease-in-out,
    backdrop-filter 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
#main-header.scrolled {
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- Custom Range Slider --- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  background: #334155;
  border-radius: 5px;
  outline: none;
  padding: 0;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  cursor: pointer;
  background: linear-gradient(
    to left,
    #ef4444 var(--slider-progress, 10%),
    #475569 var(--slider-progress, 10%)
  );
  border-radius: 5px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 28px;
  width: 28px;
  border-radius: 50%;
  background: white;
  border: 4px solid #ef4444;
  cursor: pointer;
  margin-top: -9px;
  transition: transform 0.2s ease;
}
input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.1);
}

/* --- Button Click Animation --- */
.control-btn:active {
  transform: scale(0.9);
  transition: transform 0.1s ease-in-out;
}

/* Flowing down arrow animation */
@keyframes flow-down {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(15px);
  }
}
.scroll-flow-down i {
  animation: flow-down 2.2s infinite ease-in-out;
}
.scroll-flow-down i:nth-child(2) {
  animation-delay: 0.3s;
}
.scroll-flow-down i:nth-child(3) {
  animation-delay: 0.6s;
}

/* --- Live Indicator Animation --- */
.live-indicator {
  position: relative;
  width: 12px;
  height: 12px;
  background-color: #ef4444;
  border-radius: 50%;
}
.live-indicator::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulse-wave 2s infinite;
}
@keyframes pulse-wave {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* --- DollarMine Card Pulse Animation --- */
@keyframes dollarmine-pulse-anim {
  0%,
  100% {
    transform: scale(1);
    box-shadow: none;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
  }
}
.dollarmine-pulse {
  animation: dollarmine-pulse-anim 0.4s ease-in-out;
}

/* --- Section Background --- */
.section-bg-wrapper {
  position: relative;
  overflow: hidden;
}
.section-bg-image {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: -1;
  background-color: rgba(59, 130, 246, 0.2);
  background-blend-mode: overlay;
  filter: grayscale(80%);
  mask-image: linear-gradient(
    to bottom,
    black 0%,

    transparent 80%
  );
}

/* --- Modal Styles --- */
#auth-modal-overlay {
  transition: opacity 0.3s ease-in-out;
}
#auth-modal {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
#auth-modal-overlay.hidden #auth-modal {
  transform: scale(0.95);
  opacity: 0;
}
code {
  direction: ltr !important;
}

@keyframes end_crystal {
  0% {
    top: -30%;
    filter: grayscale(100%);
  }
  50% {
    top: -31%;
    filter: grayscale(20%);
  }
  100% {
    top: -30%;
    filter: grayscale(100%);
  }
}
