/* ===== Fonts ===== */
@font-face {
  font-family: LovecraftST;
  src: url('fonts/KS Bistra.otf');
}

@font-face {
  font-family: Humaroid;
  src: url('fonts/Humaroid.otf');
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  box-sizing: border-box;
  text-shadow: 1px 1px 1px rgba(90, 90, 90, 0.9);
}

/* ===== Body ===== */
body {
  background-image: url('images/background.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  cursor: url('cursors/cursor32.png'), auto;
}

/* ===== Header ===== */
.intro-container {
  text-align: center;
  font-family: Humaroid;
  color: #ffffff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.intro-title {
  font-size: 60px;
  padding-top: 8px;
}

.intro-text {
  font-size: 38px;
}

/* ===== Servers Layout ===== */
.servers-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  text-align: center;
  padding: 20px 40px 80px;
  gap: clamp(30px, 5vw, 150px);
}

/* ===== Shared Server Card Styles ===== */
.server-block-krashly,
.server-block-mankind,
.server-block-andromeda {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #ffffff;
  background-size: cover;
  width: min(30%, 500px);
  flex-shrink: 1;
  min-height: 750px;
  max-height: 750px;
  padding-top: 20px;
  border-radius: 100px;
  overflow: hidden;
  transition:
    transform 300ms ease,
    box-shadow 300ms ease,
    filter 300ms ease;
}

.server-block-krashly:hover,
.server-block-mankind:hover,
.server-block-andromeda:hover {
  transform: translateY(-12px) scale(1.01);
}

/* ===== Krashly Build Card ===== */
.server-block-krashly {
  font-family: LovecraftST;
  background-image: url('images/krashly-bg.jpg');
  background-position: center;
  background-size: cover;
  box-shadow:
    0px 14px 100px #000000,
    0px -10px 10px #000000 inset,
    1px 1px 40px #000000 inset;
  border: 1px solid rgba(110, 75, 45, 0.8);
}

.server-block-krashly::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      transparent 20%,
      rgba(0, 0, 0, 0.35) 90%,
      rgba(0, 0, 0, 0.8) 100%
    );
  pointer-events: none;
}

.server-block-krashly .particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particles span {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 3px;
  background: rgba(200, 180, 140, 0.5);
  border-radius: 50%;
  animation: krashlyParticles 10s linear infinite;
}

.particles span:nth-child(1) { left: 10%; animation-delay: 0s; }
.particles span:nth-child(2) { left: 25%; animation-delay: 2s; }
.particles span:nth-child(3) { left: 40%; animation-delay: 4s; }
.particles span:nth-child(4) { left: 60%; animation-delay: 1s; }
.particles span:nth-child(5) { left: 75%; animation-delay: 3s; }
.particles span:nth-child(6) { left: 90%; animation-delay: 5s; }
.particles span:nth-child(7) { left: 55%; animation-delay: 6s; }
.particles span:nth-child(8) { left: 30%; animation-delay: 7s; }

@keyframes krashlyParticles {
  from {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  to {
    transform: translateY(-700px) translateX(20px);
    opacity: 0;
  }
}

.server-block-krashly > * {
  position: relative;
  z-index: 1;
}

.server-block-krashly .logo-img {
  animation: krashlyPulse 5s ease-in-out infinite;
}

@keyframes krashlyPulse {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(63, 47, 37, 0.8))
            drop-shadow(0 0 35px rgba(0, 0, 0, 0.9));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(196, 66, 43, 0.9))
            drop-shadow(0 0 50px rgba(70, 10, 10, 0.7));
    transform: scale(1.03);
  }
}

.server-block-krashly:hover .logo-img {
  transform: scale(1.06);
  filter:
    drop-shadow(0 0 20px rgb(59, 47, 37))
    drop-shadow(0 0 50px rgba(0, 0, 0, 1));
}

.server-block-krashly .logo-text {
  color: #d6c1a3;
  text-shadow:
    0 0 5px rgba(0, 0, 0, 1),
    0 0 20px rgba(80, 50, 30, 0.6);
}

/* ===== Mankind Card ===== */
.server-block-mankind {
  font-family: Humaroid;
  background-image:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.15),
      transparent 40%,
      rgba(0, 0, 0, 0.4)
    ),
    url('images/mankind-bg.jpg');
  background-position: center;
  background-size: cover;
  box-shadow:
    0px 14px 100px rgba(255, 255, 255, 0.4),
    0px -10px 10px rgba(255, 255, 255, 0.25) inset,
    1px 1px 40px rgba(255, 255, 255, 0.2) inset;
  border: 2px solid #ffffff;
}

/* ===== Mankind Smoke Effect ===== */
.server-block-mankind::before {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;

  background:
    radial-gradient(
      ellipse at 20% 80%,
      rgba(180, 190, 200, 0.28),
      transparent 55%
    ),
    radial-gradient(
      ellipse at 80% 30%,
      rgba(230, 230, 230, 0.2),
      transparent 60%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(140, 150, 160, 0.18),
      transparent 50%
    );

  filter: blur(35px);
  opacity: 0.7;
  animation:
    mankindSmokeA 18s ease-in-out infinite alternate,
    mankindFadeA 6s ease-in-out infinite alternate;
}

.server-block-mankind::after {
  content: "";
  position: absolute;
  inset: -50%;
  pointer-events: none;

  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(200, 210, 220, 0.25),
      transparent 40%
    ),
    radial-gradient(
      ellipse at 70% 70%,
      rgba(160, 170, 180, 0.15),
      transparent 45%
    ),
    radial-gradient(
      ellipse at 10% 60%,
      rgba(220, 230, 240, 0.2),
      transparent 50%
    );

  filter: blur(25px);
  opacity: 0.5;
  animation:
    mankindSmokeB 22s ease-in-out infinite alternate,
    mankindFadeB 8s ease-in-out infinite alternate;
}

@keyframes mankindSmokeA {
  0% {
    transform: translate(-5%, 5%) scale(1);
  }
  33% {
    transform: translate(4%, -2%) scale(1.15);
  }
  66% {
    transform: translate(-3%, 6%) scale(0.95);
  }
  100% {
    transform: translate(6%, -4%) scale(1.1);
  }
}

@keyframes mankindSmokeB {
  0% {
    transform: translate(5%, -5%) scale(0.9);
  }
  40% {
    transform: translate(-4%, 3%) scale(1.05);
  }
  70% {
    transform: translate(2%, 5%) scale(1.15);
  }
  100% {
    transform: translate(-5%, -2%) scale(0.95);
  }
}

@keyframes mankindFadeA {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.4;
  }
}

@keyframes mankindFadeB {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 0.3;
  }
}

.server-block-mankind .logo-img {
  filter:
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.7))
    drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
  transition:
    transform 300ms ease,
    filter 300ms ease;
}

.server-block-mankind:hover .logo-img {
  transform: scale(1.05);
  filter:
    drop-shadow(0 0 15px #ffffff)
    drop-shadow(0 0 45px rgba(255, 255, 255, 0.6));
}

.server-block-mankind > * {
  position: relative;
  z-index: 1;
}

.server-block-mankind .logo-text {
  letter-spacing: 3px;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.8),
    0 0 25px rgba(255, 255, 255, 0.4);
}

/* ===== Andromeda Card ===== */
.server-block-andromeda {
  font-family: Humaroid;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(255, 183, 0, 0.22) 0%,
      rgba(255, 183, 0, 0.06) 25%,
      transparent 55%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 183, 0, 0.08),
      transparent 40%
    ),
    linear-gradient(
      160deg,
      #151515 0%,
      #050505 50%,
      #111111 100%
    );
  border: 2px solid #ffb700;
  border-radius: 100px;
  box-shadow:
    0px 14px 100px rgba(255, 183, 0, 0.25),
    0px 0px 30px rgba(255, 183, 0, 0.15) inset,
    0px 0px 80px #000000 inset;
}

/* ===== Andromeda Stars Animation ===== */
.server-block-andromeda::before,
.server-block-andromeda::after {
  content: "";
  position: absolute;
  inset: -50%;
  pointer-events: none;
  background-repeat: repeat;
}

.server-block-andromeda::before {
  background-image:
    radial-gradient(circle, #ffffff 1px, transparent 1px),
    radial-gradient(circle, #ffb700 1.5px, transparent 1.5px);
  background-size:
    70px 70px,
    120px 120px;
  background-position:
    10px 20px,
    40px 80px;
  opacity: 0.4;
  animation:
    starsMove 40s linear infinite,
    starsTwinkle 3s ease-in-out infinite alternate;
}

.server-block-andromeda::after {
  background-image:
    radial-gradient(circle, #ffffff 2px, transparent 2px),
    radial-gradient(circle, #ffb700 2.5px, transparent 2.5px);
  background-size:
    180px 180px,
    250px 250px;
  background-position:
    100px 30px,
    150px 60px;
  opacity: 0.3;
  animation:
    starsMoveReverse 60s linear infinite,
    starsTwinkle 4s ease-in-out infinite alternate;
}

@keyframes starsMove {
  from {
    transform: translateX(0px);
  }
  to {
    transform: translateX(650px);
  }
}

@keyframes starsMoveReverse {
  from {
    transform: translateX(0px);
  }
  to {
    transform: translateX(-650px);
  }
}

@keyframes starsTwinkle {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 0.2;
  }
}

.server-block-andromeda > * {
  position: relative;
  z-index: 1;
}

.server-block-andromeda .logo-img {
  filter:
    drop-shadow(0 0 10px rgba(255, 183, 0, 0.8))
    drop-shadow(0 0 30px rgba(255, 183, 0, 0.5))
    drop-shadow(0 0 60px rgba(255, 183, 0, 0.25));
  transition:
    transform 300ms ease,
    filter 300ms ease;
}

.server-block-andromeda:hover .logo-img {
  transform: scale(1.05);
  filter:
    drop-shadow(0 0 15px rgba(255, 183, 0, 1))
    drop-shadow(0 0 45px rgba(255, 183, 0, 0.7))
    drop-shadow(0 0 90px rgba(255, 183, 0, 0.4));
}

.server-block-andromeda .logo-text {
  color: #ffb700;
  font-size: 42px;
  letter-spacing: 4px;
  text-shadow:
    0 0 5px rgba(255, 183, 0, 0.8),
    0 0 20px rgba(255, 183, 0, 0.5),
    0 0 50px rgba(255, 183, 0, 0.25);
}

/* ===== Shared Logo & Text Styles ===== */
.logo-img {
  width: 200px;
  height: 200px;
  align-self: center;
  margin-bottom: 20px;
}

.logo-text {
  font-size: 38px;
}

/* ===== Server Description Text ===== */
.server-text-krashly,
.server-text-mankind,
.server-text-andromeda {
  margin: 30px 20px 0px 20px;
}

.server-text-mankind {
  font-size: 22px;
}

.server-text-krashly {
  font-size: 19px;
}

.server-text-andromeda {
  font-size: 22px;
}

/* ===== Button Base & Link ===== */
.server-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
}

.goto-button-krashly,
.goto-button-mankind,
.goto-button-andromeda {
  width: 100%;
  height: 60px;
  border-radius: 0 0 100px 100px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  transition: background-color 100ms ease;
  color: #ffffff;
  background-color: #00000080;
}

.a-button {
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
  text-decoration: none;
}

/* ===== Krashly Button ===== */
.goto-button-krashly {
  font-family: LovecraftST;
  border-top: 2px solid rgba(56, 37, 24, 0.6);
  font-size: 26px;
}

/* ===== Mankind Button ===== */
.goto-button-mankind {
  font-family: Humaroid;
  border-top: 2px solid #ffffff;
  font-size: 30px;
}

/* ===== Andromeda Button ===== */
.goto-button-andromeda {
  font-family: Humaroid;
  font-size: 30px;
  letter-spacing: 2px;
  color: #ffb700;
  background:
    linear-gradient(
      90deg,
      rgba(255, 183, 0, 0.05),
      rgba(255, 183, 0, 0.18),
      rgba(255, 183, 0, 0.05)
    );
  border-top: 2px solid #ffb700;
  text-shadow:
    0 0 8px rgba(255, 183, 0, 0.8);
  transition:
    background 200ms ease,
    color 200ms ease,
    box-shadow 200ms ease;
}

.goto-button-andromeda:hover {
  color: #000000;
  background: #ffb700;
  box-shadow:
    0 0 30px rgba(255, 183, 0, 0.8),
    0 0 60px rgba(255, 183, 0, 0.4);
  cursor: url('cursors/pointer32.png'), pointer;
}

/* ===== Shared Button Hover & Active ===== */
.goto-button-krashly:hover,
.goto-button-mankind:hover,
.goto-button-andromeda:hover {
  background-color: #4747476c;
  cursor: url('cursors/pointer32.png'), pointer;
}

.goto-button-krashly:active {
  background-color: #4232299d;
}

.goto-button-mankind:active {
  background-color: #9999999d;
}

.goto-button-andromeda:active {
  background-color: #9999999d;
}

/* ===== Footer ===== */
.footer {
  font-family: Humaroid;
  font-size: 20px;
  color: #ffffff;
  position: fixed;
  left: 0;
  bottom: 0;
  height: 2.8%;
  width: 100%;
  background: #0000007c;
}

/* ===== Glitch Animation ===== */
.glitch {
  font-weight: bold;
  text-transform: uppercase;
  position: relative;
  text-shadow:
    0.05em 0 0 #00fffc,
    -0.03em -0.04em 0 #fc00ff,
    0.025em 0.04em 0 #fffc00;
  animation: glitch 725ms infinite;
}

.glitch span {
  position: absolute;
  top: 0;
  left: 0;
}

.glitch span:first-child {
  animation: glitch 500ms infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-0.04em, -0.03em);
  opacity: 0.75;
}

.glitch span:last-child {
  animation: glitch 375ms infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(0.04em, 0.03em);
  opacity: 0.75;
}

@keyframes glitch {
  0% {
    text-shadow:
      0.05em 0 0 #00fffc,
      -0.03em -0.04em 0 #fc00ff,
      0.025em 0.04em 0 #fffc00;
  }
  15% {
    text-shadow:
      0.05em 0 0 #00fffc,
      -0.03em -0.04em 0 #fc00ff,
      0.025em 0.04em 0 #fffc00;
  }
  16% {
    text-shadow:
      -0.05em -0.025em 0 #00fffc,
      0.025em 0.035em 0 #fc00ff,
      -0.05em -0.05em 0 #fffc00;
  }
  49% {
    text-shadow:
      -0.05em -0.025em 0 #00fffc,
      0.025em 0.035em 0 #fc00ff,
      -0.05em -0.05em 0 #fffc00;
  }
  50% {
    text-shadow:
      0.05em 0.035em 0 #00fffc,
      0.03em 0 0 #fc00ff,
      0 -0.04em 0 #fffc00;
  }
  99% {
    text-shadow:
      0.05em 0.035em 0 #00fffc,
      0.03em 0 0 #fc00ff,
      0 -0.04em 0 #fffc00;
  }
  100% {
    text-shadow:
      -0.05em 0 0 #00fffc,
      -0.025em -0.04em 0 #fc00ff,
      -0.04em -0.025em 0 #fffc00;
  }
}