/* css/pages/game-aivi.css */
/* =========================================
   AI.VI CUSTOM REDESIGN
   Brutalist / Cyberpunk / Dystopian
   ========================================= */

/* Scoping everything to .aivi-page to not leak styles */
.aivi-page {
  --aivi-bg: var(--bg-tertiary);
  --aivi-text: var(--text-secondary);
  --aivi-neon: #7543a5;
  --aivi-neon-dim: rgba(154, 22, 255, 0.2);
  --aivi-panel: #111111;
  --aivi-border: #333333;
  --aivi-font: 'Rajdhani', sans-serif;

  font-family: var(--aivi-font);
  background-color: var(--aivi-bg);
  color: var(--aivi-text);
  line-height: 1.6;
}

.aivi-body {
  background-color: var(--bg-tertiary) !important;
}

/* Custom Cursor Overrides for AI.VI */
.aivi-body .custom-cursor {
  background-color: var(--aivi-neon);
  border-radius: 0;
  width: 6px;
  height: 6px;
}

.aivi-body .custom-cursor-outline {
  border-color: var(--aivi-neon);
  border-radius: 0;
  width: 30px;
  height: 30px;
  clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
}

.aivi-body.cursor-hover .custom-cursor {
  background-color: #000;
  width: 6px;
  height: 6px;
}

.aivi-body.cursor-hover .custom-cursor-outline {
  border: 2px solid var(--aivi-neon);
  background-color: rgba(154, 22, 255, 0.5);
  transform: translate(-50%, -50%) rotate(45deg);
  width: 32px;
  height: 32px;
}

/* Base resets inside the page */
.aivi-page h1,
.aivi-page h2,
.aivi-page h3,
.aivi-page p {
  font-family: var(--aivi-font);
}

.aivi-page h2::after {
  content: none;
  display: none;
}

.aivi-page .text-center {
  text-align: center;
}

/* Hero Section */
.aivi-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #000;
}

.aivi-hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.18);
  object-fit: cover;
  z-index: 1;
  opacity: 0.8;
  filter: grayscale(30%) contrast(120%);
}

.aivi-hero-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(154, 22, 255, 0),
      rgba(154, 22, 255, 0) 50%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0.2));
  background-size: 100% 4px;
  z-index: 2;
  pointer-events: none;
}

.aivi-hero-scanlines::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 30%, #000 100%);
}

.aivi-btn-back {
  position: absolute;
  top: 130px;
  left: 2rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--aivi-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--aivi-border);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.aivi-btn-back:hover {
  color: var(--aivi-neon);
  border-color: var(--aivi-neon);
  box-shadow: 0 0 10px var(--aivi-neon-dim);
}

.aivi-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding: 0 2rem;
}

#logoWrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.9));
}

#logoWrap>svg {
  width: 24rem;
  max-width: 100%;
  height: auto;
}

.aivi-glitch-title {
  display: none;
  font-size: 6rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 0;
  line-height: 1;
  position: relative;
  text-shadow: 2px 2px 0 var(--aivi-neon), -2px -2px 0 #000000;
}

.aivi-tagline {
  font-size: 1.5rem;
  color: var(--aivi-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 1.5rem 0;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--aivi-neon);
}

.aivi-platforms {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.aivi-platforms-hero {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 5;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1rem;
  border-left: 2px solid var(--aivi-neon);
  backdrop-filter: blur(4px);
}

.aivi-platforms svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  color: var(--aivi-text);
  opacity: 0.8;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.aivi-platforms svg:hover {
  opacity: 1;
  color: var(--aivi-neon);
}

/* Custom Buttons */
.aivi-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--aivi-neon);
  color: #fff !important;
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 1rem 2rem;
  text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.aivi-btn-primary span {
  color: #fff !important;
}

.aivi-btn-primary svg,
.aivi-btn-primary svg path {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.aivi-btn-primary:hover {
  background: #fff;
  color: #000 !important;
  box-shadow: 0 0 15px var(--aivi-neon);
}

.aivi-btn-primary:hover span {
  color: #000 !important;
}

.aivi-hero-steam-btn {
  position: absolute;
  bottom: 25vh;
  z-index: 4;
}

.aivi-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: transparent;
  color: var(--aivi-neon);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 1rem 2rem;
  text-decoration: none;
  border: 2px solid var(--aivi-neon);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: all 0.3s ease;
}

.aivi-btn-secondary svg,
.aivi-btn-secondary svg path {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.aivi-btn-secondary:hover {
  background: var(--aivi-neon-dim);
  box-shadow: inset 0 0 10px var(--aivi-neon);
}

/* Container */
.aivi-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* HUD Box (About Section) */
.aivi-about {
  padding: 6rem 0;
}

.aivi-hud-box {
  position: relative;
  background: var(--aivi-panel);
  padding: 4rem;
  text-align: center;
  border: 1px solid var(--aivi-border);
}

.hud-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--aivi-neon);
}

.hud-corner.top-left {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.hud-corner.top-right {
  top: -2px;
  right: -2px;
  border-left: none;
  border-bottom: none;
}

.hud-corner.bottom-left {
  bottom: -2px;
  left: -2px;
  border-right: none;
  border-top: none;
}

.hud-corner.bottom-right {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.aivi-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 2px;
  margin: 0 0 2rem 0;
}

.aivi-section-title::before {
  content: "> ";
  color: var(--aivi-neon);
}

.aivi-about-desc {
  font-size: 1.3rem;
  color: var(--aivi-text);
  max-width: 800px;
  margin: 0 auto;
}

/* Features Grid */
.aivi-features {
  padding: 4rem 0 8rem 0;
}

.aivi-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.aivi-feature-card {
  background: var(--aivi-panel);
  padding: 2.5rem 2rem;
  border: 1px solid var(--aivi-border);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.aivi-feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--aivi-neon);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

.aivi-feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--aivi-neon);
}

.aivi-feature-card:hover::before {
  transform: scaleY(1);
}

.aivi-feature-card h3 {
  color: #fff;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.aivi-feature-card p {
  color: var(--aivi-text);
  font-size: 1.1rem;
  margin: 0;
}

/* Community Section */
.aivi-community {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: #020202;
  border-top: 1px solid var(--aivi-border);
  display: flex;
  justify-content: center;
}

.aivi-community-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 6rem 2rem;
  width: 100%;
  max-width: 1200px;
}

.aivi-comm-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 3rem;
  background: var(--aivi-panel);
  border: 1px solid var(--aivi-border);
  position: relative;
  overflow: hidden;
}

.aivi-comm-card::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--aivi-neon-dim) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.aivi-comm-card:hover::after {
  opacity: 1;
}

.aivi-comm-card h3 {
  font-size: 2rem;
  margin: 0;
  color: #fff;
  text-transform: uppercase;
}

.aivi-comm-card p {
  color: var(--aivi-text);
  margin: 0;
  flex-grow: 1;
  font-size: 1.1rem;
}

/* Custom game tags inside HUD box */
.aivi-game-tags {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  margin-top: -0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.aivi-platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

/* Scroll down button copy styled for AIVI */
.aivi-page .scroll-down-container {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.aivi-page .scroll-down-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  animation: aivi-bounce 2s infinite;
  padding: 10px;
}

.aivi-page .scroll-down-btn svg {
  width: 35px;
  height: 35px;
  transition: filter 0.2s ease;
}

.aivi-page .scroll-down-btn svg path {
  fill: var(--aivi-neon);
}

.aivi-page .scroll-down-btn:hover svg {
  filter: drop-shadow(0 0 8px var(--aivi-neon));
}

@keyframes aivi-bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* Features & Gallery Layout */
.aivi-features {
  margin-top: 4rem;
  width: 100%;
}

.aivi-gallery {
  margin-top: 4rem;
  margin-bottom: 6rem;
  width: 100%;
}

.aivi-features-content {
  min-height: 50px; /* Empty for now */
}

/* Gallery Grid */
.aivi-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
}

@media (min-width: 768px) {
  .aivi-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.aivi-gallery-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--aivi-border);
  cursor: pointer;
  background-color: #000;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.aivi-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.aivi-gallery-item:hover {
  border-color: var(--aivi-neon);
  box-shadow: 0 0 15px var(--aivi-neon-dim);
}

/* Lightbox Modal */
.aivi-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.aivi-lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.aivi-lightbox-content {
  max-width: 85%;
  max-height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.aivi-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
  border: 2px solid var(--aivi-border);
}

.aivi-lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 1010;
}

.aivi-lightbox-close:hover {
  color: var(--aivi-neon);
}

.aivi-lightbox-prev,
.aivi-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--aivi-border);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1010;
}

.aivi-lightbox-prev:hover,
.aivi-lightbox-next:hover {
  border-color: var(--aivi-neon);
  color: var(--aivi-neon);
  box-shadow: 0 0 10px var(--aivi-neon-dim);
}

.aivi-lightbox-prev {
  left: 2rem;
}

.aivi-lightbox-next {
  right: 2rem;
}

.aivi-lightbox-prev svg,
.aivi-lightbox-next svg {
  width: 24px;
  height: 24px;
}

.aivi-lightbox-counter {
  position: absolute;
  bottom: 2rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px;
  z-index: 1010;
}