/* =========================
   MOD Star Map
   ========================= */

.mod-map-section {
  width: 100%;
  margin: 0 auto;
}

.mod-star-map {
  position: relative;

  width: 100%;
  min-height: 650px;

  overflow: hidden;

  border: 1px solid rgba(0, 220, 255, 0.18);
  border-radius: 18px;

  background:
    radial-gradient(
      circle at 50% 52%,
      rgba(0, 110, 145, 0.12) 0%,
      rgba(0, 60, 90, 0.06) 25%,
      transparent 48%
    ),
    linear-gradient(
      180deg,
      #01070d 0%,
      #02111a 45%,
      #031a22 100%
    );

  box-shadow:
    inset 0 0 70px rgba(0, 180, 220, 0.04),
    0 0 22px rgba(0, 180, 220, 0.05);
}

/* =========================
   Full-width layout for mods page
   ========================= */

.mods-page-main {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.mod-map-section {
  width: 100vw;
  max-width: none;

  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  padding-left: 0;
  padding-right: 0;
}

/* =========================
   Decorative background stars
   ========================= */

.mod-star-map::before,
.mod-star-map::after {
  content: "";
  position: absolute;
  inset: 0;

  pointer-events: none;
}

.mod-star-map::before {
  background-image:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.78) 0 1px,
      transparent 1.3px
    ),
    radial-gradient(
      circle,
      rgba(175, 220, 255, 0.55) 0 0.8px,
      transparent 1.1px
    ),
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.38) 0 0.65px,
      transparent 1px
    );

  background-size:
    83px 91px,
    137px 121px,
    59px 73px;

  background-position:
    11px 17px,
    41px 66px,
    29px 8px;

  opacity: 0.6;
}

.mod-star-map::after {
  background:
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(0, 0, 0, 0.18) 75%,
      rgba(0, 0, 0, 0.42) 100%
    );
}


/* =========================
   MOD star base
   ========================= */

.mod-star {
  position: absolute;

  left: var(--x);
  top: var(--y);

  transform: translate(-50%, -50%);

  text-decoration: none;
  color: inherit;

  z-index: 3;

  /*
   * Default star color.
   * MODs without a custom color use white.
   */
  --star-color: 255, 255, 255;
}


/* =========================
   Star core
   ========================= */

.star-core {
  position: relative;

  display: block;

  margin: auto;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      #ffffff 0%,
      #ffffff 20%,
      #eaf8ff 38%,
      rgba(190, 225, 255, 0.75) 52%,
      rgba(255, 255, 255, 0) 76%
    );

  box-shadow:
    0 0 3px rgba(255, 255, 255, 1),
    0 0 8px rgba(220, 240, 255, 0.85),
    0 0 15px rgba(170, 220, 255, 0.36);

  animation: star-pulse 3.8s ease-in-out infinite;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}


/* =========================
   Star pulse
   ========================= */

@keyframes star-pulse {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.3);
  }
}


/* =========================
   Labels - Common
   ========================= */

.star-label {
  position: absolute;

  left: 50%;

  transform: translateX(-50%);

  white-space: nowrap;

  letter-spacing: 0.025em;

  text-shadow:
    0 0 3px #001018,
    0 0 8px #001018,
    0 0 12px #001018;

  transition:
    color 0.25s ease,
    opacity 0.25s ease,
    filter 0.25s ease;
}


/* =========================
   Minor MODs
   ========================= */

.mod-star.minor .star-core {
  width: 20px;
  height: 20px;
}

.minor-label {
  top: 30px;

  font-size: 0.95rem;
  font-weight: 500;

  color: rgba(220, 245, 255, 0.82);

  opacity: 0.85;
}

.mod-star.minor:hover .star-core {
  transform: scale(1.45);

  box-shadow:
    0 0 4px #ffffff,
    0 0 10px rgba(230, 245, 255, 1),
    0 0 20px rgba(170, 220, 255, 0.65);
}

.mod-star.minor:hover .minor-label {
  color: #ffffff;
  opacity: 1;
}


/* =========================
   Large MODs
   ========================= */

.mod-star.major {
  z-index: 5;
}

.mod-star.major .star-core {
  width: 30px;
  height: 30px;
}

.major-label {
  top: 40px;

  font-size: 1.05rem;
  font-weight: 600;

  opacity: 1;
}

.mod-star.major:hover .star-core {
  transform: scale(1.2);
}

.mod-star.major:hover .major-label {
  filter: brightness(1.2);
}


/* =========================
   Prototype Expansion
   ========================= */

.mod-star.prototype {
  --star-color: 130, 255, 190;
}

.mod-star.prototype .star-core {
  background:
    radial-gradient(
      circle,
      #ffffff 0%,
      #eafff4 18%,
      #80ffbd 38%,
      rgba(40, 255, 150, 0.62) 58%,
      transparent 78%
    );

  box-shadow:
    0 0 5px #ffffff,
    0 0 12px #8affbd,
    0 0 28px rgba(40, 255, 135, 0.85),
    0 0 52px rgba(20, 220, 110, 0.55);
}

.mod-star.prototype .major-label {
  color: #aaffcf;
}


/* =========================
   Completed MOD cross glow
   ========================= */

.mod-star.completed .star-core::before,
.mod-star.completed .star-core::after {
  content: "";

  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  pointer-events: none;
}

.mod-star.completed .star-core::before {
  width: 95px;
  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(var(--star-color), 0.08),
      rgba(var(--star-color), 0.75),
      #ffffff,
      rgba(var(--star-color), 0.75),
      rgba(var(--star-color), 0.08),
      transparent
    );
}

.mod-star.completed .star-core::after {
  width: 2px;
  height: 95px;

  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(var(--star-color), 0.08),
      rgba(var(--star-color), 0.75),
      #ffffff,
      rgba(var(--star-color), 0.75),
      rgba(var(--star-color), 0.08),
      transparent
    );
}

/* Small completed MOD cross glow */

.mod-star.minor.completed .star-core::before {
  width: 70px;
}

.mod-star.minor.completed .star-core::after {
  height: 70px;
}

/* =========================
   Red Plague
   ========================= */

.mod-star.red-plague {
  --star-color: 255, 95, 95;
}

.mod-star.red-plague .star-core {
  background:
    radial-gradient(
      circle,
      #ffffff 0%,
      #ffe8e8 17%,
      #ff6464 38%,
      rgba(255, 35, 35, 0.62) 58%,
      transparent 78%
    );

  box-shadow:
    0 0 5px #ffffff,
    0 0 13px #ff7b7b,
    0 0 29px rgba(255, 30, 30, 0.84),
    0 0 54px rgba(200, 0, 0, 0.52);
}

.mod-star.red-plague .major-label {
  color: #ff9b9b;
}


/* =========================
   Return of the Ancients
   ========================= */

.mod-star.rota {
  --star-color: 255, 180, 90;
}

.mod-star.rota .star-core {
  background:
    radial-gradient(
      circle,
      #ffffff 0%,
      #fff2dc 17%,
      #ffad4f 39%,
      rgba(255, 125, 20, 0.62) 58%,
      transparent 78%
    );

  box-shadow:
    0 0 5px #ffffff,
    0 0 13px #ffc06f,
    0 0 29px rgba(255, 135, 30, 0.82),
    0 0 52px rgba(230, 90, 0, 0.5);
}

.mod-star.rota .major-label {
  color: #ffc47d;
}


/* =========================
   Call of the Void
   ========================= */

.mod-star.cotv {
  --star-color: 105, 125, 255;
}

.mod-star.cotv .star-core {
  background:
    radial-gradient(
      circle,
      #ffffff 0%,
      #e7edff 17%,
      #5c75ff 38%,
      rgba(35, 60, 200, 0.65) 57%,
      transparent 78%
    );

  box-shadow:
    0 0 5px #ffffff,
    0 0 13px #718aff,
    0 0 29px rgba(55, 75, 220, 0.82),
    0 0 55px rgba(15, 25, 120, 0.62);
}

.mod-star.cotv .major-label {
  color: #92a4ff;
}


/* =========================
   MOD creature preview
   ========================= */

.mod-preview {
  position: absolute;

  left: 0;
  top: 0;

  width: 460px;
  height: 280px;

  max-width: 34vw;

  overflow: hidden;

  border: 1px solid rgba(150, 230, 255, 0.16);
  border-radius: 12px;

  background: #001018;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transform: scale(0.96);
  transform-origin: top left;

  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s;

  z-index: 20;
}

.mod-preview.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}


/* Images */

.mod-preview-image {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  opacity: 0;

  transition:
    opacity 0.8s ease;

  filter:
    drop-shadow(0 0 12px rgba(100, 220, 255, 0.12));
}

.mod-preview-image.visible {
  opacity: 1;
}


/* =========================
   We saw the stars
   ========================= */

.star-map-quote {
  position: absolute;

  left: 50%;
  bottom: 18px;

  transform: translateX(-50%);

  margin: 0;

  color: rgba(205, 235, 245, 0.28);

  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.18em;

  white-space: nowrap;

  text-shadow:
    0 0 8px rgba(100, 210, 240, 0.12);

  pointer-events: none;

  z-index: 2;
}


/* =========================
   Mobile
   ========================= */

@media (max-width: 700px) {

  .mod-star-map {
    min-height: 980px;
  }

  .minor-label {
    font-size: 0.72rem;
  }

  .major-label {
    font-size: 0.8rem;
  }

  .mod-star.completed .star-core::before {
    width: 58px;
  }

  .mod-star.completed .star-core::after {
    height: 58px;
  }
}