@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&display=swap");

/* Universal Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
  border: none;
  text-transform: capitalize;
  transition: all 0.2s linear;
}

/* Base HTML & Body Styles */
html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  background: #130000;
  font-family: "Poppins", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: scroll;
  transition: background 0.3s ease;
  /* Prevent flash */
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.4s ease;
  /* Smooth fade */
}

*::selection {
  background: #2b3dda;
  color: #fff;
}

html::-webkit-scrollbar {
  width: 0.8rem;
}

html::-webkit-scrollbar-track {
  background: rgb(235, 202, 245);
}

html::-webkit-scrollbar-thumb {
  background: #420177;
}

/* Pre Loader */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  background: rgba(19, 0, 0, 0.95);
  /* semi-transparent to prevent black flash */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* Fade out instead of jump */
.loader-container.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Smooth tab switching */
.tab-switching {
  opacity: 0 !important;
}

.tab-active {
  opacity: 1 !important;
  transition: opacity 0.4s ease-in;
}

/* Common Section Heading Style */
.heading {
  font-size: 3.5rem;
  color: rgb(255, 255, 255);
  font-weight: 800;
  text-align: center;
}

.heading span {
  color: rgb(173, 255, 10);
}

/* Common Button Styles */
.btn {
  position: relative;
  line-height: 0;
  padding: 1.6rem 3rem;
  border-radius: .5em;
  transition: 0.5s;
  color: #fff;
  background: #2506ad;
  box-shadow: 0px 5px 10px rgba(48, 68, 247, .6);
  text-align: center;
  font-family: "Nunito", sans-serif;
  animation: hue-rotate 3s linear infinite;
}

.btn span {
  font-weight: 600;
  font-size: 2.3rem;
  letter-spacing: 0.1rem;
}

.btn i {
  margin-left: 0.3rem;
  font-size: 1.5rem;
  transition: 0.3s;
}

.btn:hover {
  background: #006638;
}

.btn:hover i {
  transform: translateX(20px);
}

/* Scroll Top Button */
#scroll-top {
  position: fixed;
  top: -140%;
  right: 2rem;
  padding: 1rem 1.5rem;
  font-size: 2rem;
  background: #ffae00;
  color: rgb(13, 0, 44);
  border-radius: 50%;
  transition: 1s linear;
  z-index: 1000;
}

#scroll-top.active {
  top: calc(100% - 12rem);
}

/* Common Media Queries */
@media (max-width: 450px) {
  html {
    font-size: 55%;
  }

  body {
    padding-right: 0;
  }
}

/* ================= Animations ================= */
@keyframes bounce {
  to {
    transform: translateY(-10px);
  }
}

@keyframes wiggle {
  to {
    transform: rotate(5deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  to {
    opacity: 0.5;
  }
}

@keyframes slide {
  to {
    transform: translateX(10px);
  }
}

@keyframes tilt {
  to {
    transform: skewY(5deg);
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes zoom-in {
  to {
    transform: scale(1.3);
  }
}

@keyframes zoom-out {
  to {
    transform: scale(0.7);
  }
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes flip-x {
  to {
    transform: rotateX(180deg);
  }
}

@keyframes flip-y {
  to {
    transform: rotateY(180deg);
  }
}

@keyframes swing {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(15deg);
  }

  50% {
    transform: rotate(-15deg);
  }

  75% {
    transform: rotate(10deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes glow {
  to {
    box-shadow: 0 0 20px #ff0;
  }
}

@keyframes blur {
  to {
    filter: blur(4px);
  }
}

@keyframes hue-rotate {
  to {
    filter: hue-rotate(360deg);
  }
}

@keyframes stretch {
  to {
    transform: scaleX(1.3);
  }
}

@keyframes squash {
  to {
    transform: scaleY(0.7);
  }
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

@keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 150, 255, 0.7);
  }

  100% {
    box-shadow: 0 0 0 20px rgba(0, 150, 255, 0);
  }
}

@keyframes swing-down {
  0% {
    transform: rotateX(-90deg);
    opacity: 0;
  }

  100% {
    transform: rotateX(0);
    opacity: 1;
  }
}

@keyframes rise {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fall {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin-slow {
  to {
    transform: rotate(720deg);
  }
}


/* Page Preloader (only on section switch) */
#page-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(19, 0, 0, 0.9);
  /* dark overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#page-preloader.active {
  opacity: 1;
  visibility: visible;
}

/* Spinner */
#page-preloader .spinner {
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #ff4c60;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
