/* ===================================================================
   Electro Havoc — site styles
   =================================================================== */

/* Theme variables */
:root {
  --neon-blue: #00eeff;
  --neon-pink: #ff00ff;
  --neon-purple: #9d00ff;
  --dark-bg: #070b14;
  --fa-red: #ff3040;
}

/* Base */
html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--dark-bg);
  font-family: "Exo", sans-serif;
  color: #fff;
  scroll-behavior: smooth;
}

/* Animated background grid */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(0, 238, 255, 0.1) 1px,
      transparent 1px),
    linear-gradient(90deg, rgba(0, 238, 255, 0.1) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: grid-move 30s linear infinite;
  z-index: -1;
  opacity: 0.25;
}

@keyframes grid-move {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 44px 44px;
  }
}

/* Glitch title text */
.glitch-container {
  position: relative;
}

.glitch-text {
  font-family: "Orbitron", sans-serif;
  font-size: 60px;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue),
    0 0 40px var(--neon-blue);
  animation: flicker 4s infinite alternate;
}

.glitch-text::before,
.glitch-text::after {
  content: "ELECTRO HAVOC";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 var(--neon-pink);
  animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: 2px 0 var(--neon-purple);
  animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes flicker {

  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    opacity: 0.95;
    text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue),
      0 0 40px var(--neon-blue);
  }

  20%,
  24%,
  55% {
    opacity: 0.7;
    text-shadow: none;
  }
}

@keyframes glitch-1 {
  0% {
    clip-path: inset(20% 0 30% 0);
  }

  20% {
    clip-path: inset(60% 0 10% 0);
  }

  40% {
    clip-path: inset(40% 0 40% 0);
  }

  60% {
    clip-path: inset(80% 0 5% 0);
  }

  80% {
    clip-path: inset(10% 0 70% 0);
  }

  100% {
    clip-path: inset(30% 0 30% 0);
  }
}

@keyframes glitch-2 {
  0% {
    clip-path: inset(10% 0 60% 0);
  }

  20% {
    clip-path: inset(30% 0 20% 0);
  }

  40% {
    clip-path: inset(50% 0 30% 0);
  }

  60% {
    clip-path: inset(20% 0 60% 0);
  }

  80% {
    clip-path: inset(70% 0 10% 0);
  }

  100% {
    clip-path: inset(40% 0 50% 0);
  }
}

/* Layout */
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
  width: 100%;
  text-align: center;
}

/* Logo */
.logo-container {
  position: relative;
  margin-bottom: 10px;
}

.logo-glow {
  filter: drop-shadow(0 0 5px rgba(221, 8, 193, 0.6));
  animation: pulse 3s ease-in-out infinite alternate;
}

@keyframes pulse {
  0% {
    filter: drop-shadow(0 0 6px rgba(221, 8, 193, 0.45));
  }

  100% {
    filter: drop-shadow(0 0 16px rgba(221, 8, 193, 0.75));
  }
}

/* Badges */
.steam-badge {
  margin-top: 20px;
  padding: 6px 15px;
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
  border-radius: 4px;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
}

.steam-badge:hover {
  background-color: rgba(0, 238, 255, 0.2);
  transform: scale(1.05);
}

.social-badge {
  margin-top: 10px;
  padding: 6px 15px;
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
  border-radius: 4px;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
}

.social-badge:hover {
  background-color: rgba(255, 0, 255, 0.2);
  transform: scale(1.05);
}

.launch-date {
  margin-top: 10px;
  color: var(--neon-pink);
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Game description */
.game-description {
  max-width: 800px;
  text-align: center;
  margin: 30px auto;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 238, 255, 0.2);
  border-radius: 4px;
  line-height: 1.6;
}

.game-description a {
  color: var(--neon-blue);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.game-description a:hover {
  text-shadow: 0 0 8px var(--neon-blue);
}

.game-description a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--neon-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.game-description a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Trailer */
.trailer-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  padding-top: 56.25%;
  /* 16:9 ratio (9/16 = 0.5625) */
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 20px var(--neon-blue);
  border-radius: 4px;
  overflow: hidden;
}

.trailer-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Section titles */
.section-title {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 28px;
  margin: 40px 0 30px;
  position: relative;
  display: inline-block;
  text-align: center;
  width: 100%;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(to right,
      var(--neon-purple),
      var(--neon-blue));
}

/* Gallery */
.gallery-wrapper {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: -7.5px;
}

.gallery-item {
  flex: 0 0 calc(20% - 15px);
  /* 5 items wide */
  margin: 7.5px;
  position: relative;
  border: 2px solid var(--neon-purple);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(157, 0, 255, 0.5);
  transition: all 0.3s ease;
  /* reset button defaults */
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(157, 0, 255, 0.8);
  z-index: 2;
  border-color: var(--neon-blue);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease;
  text-align: center;
  font-family: "Orbitron", sans-serif;
}

.gallery-item:hover .gallery-item-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox modal */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 12, 0.92);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  border: 2px solid var(--neon-blue);
  border-radius: 4px;
  box-shadow: 0 0 30px var(--neon-blue);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 14px;
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-blue);
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
  border-radius: 4px;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  line-height: 1;
  transition: all 0.3s ease;
  z-index: 2;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--neon-blue);
  color: #000;
  box-shadow: 0 0 15px var(--neon-blue);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 28px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 64px;
  font-size: 26px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 600px) {
  .lightbox-nav {
    width: 40px;
    height: 52px;
    font-size: 20px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

/* Call to action */
.cta-button {
  display: block;
  margin: 60px auto 40px;
  padding: 15px 40px;
  font-family: "Orbitron", sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(45deg,
      var(--neon-purple),
      var(--neon-blue));
  color: white;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg,
      var(--neon-pink),
      var(--neon-purple));
  transition: left 0.5s ease;
  z-index: -1;
}

.cta-button:hover::before {
  left: 0;
}

.cta-button:hover {
  box-shadow: 0 0 30px rgba(157, 0, 255, 0.7);
  transform: translateY(-5px);
}

/* Responsive layout */
@media (max-width: 900px) {
  .glitch-text {
    font-size: 40px;
  }

  .gallery-item {
    flex: 0 0 calc(33.333% - 15px);
    /* 3 items wide */
  }
}

@media (max-width: 600px) {
  .glitch-text {
    font-size: 30px;
  }

  .gallery-item {
    flex: 0 0 calc(50% - 15px);
    /* 2 items wide */
  }
}

@media (max-width: 400px) {
  .gallery-item {
    flex: 0 0 calc(100% - 15px);
    /* 1 item wide */
  }
}
