/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap');

:root {
  --bg-color: #000000;
  --text-color: #ffffff;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-x: hidden;
}

/* Header / Pufferfish Section */
header {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
}

.logo-container {
  flex: 0 0 auto;
  z-index: 2;
}

.logo {
  max-width: 100%;
  height: auto;
  max-height: 40vh;
  /* Reduced from 50vh */
  transform-origin: center;
  transform: scale(1);
  animation: logo-pop 0.5s ease-out forwards;
}

.tagline {
  font-size: 2.2rem;
  font-weight: 700;
  position: absolute;
  bottom: 20vh;
  /* Moved up slightly */
  width: 100%;
  text-align: center;
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 40px;
  right: 60px;
  /* Default Desktop Position */
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-list {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
  transition: transform 0.1s, opacity 0.1s;
  text-transform: uppercase;
  display: inline-block;

  /* Adjusted Shadow: Black color, slightly raised (4px offset) */
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000,
    -2px 0 0 #000,
    2px 0 0 #000,
    0 -2px 0 #000,
    0 2px 0 #000,
    -2px 4px 0 #000,
    2px 4px 0 #000,
    0 4px 0 #000;
}

.nav-link:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .main-nav {
    top: 20px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    /* Distinct centering logic */
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-list {
    gap: 12px;
    /* Reduced further to prevent overflow */
    padding: 0 10px;
  }

  .nav-link {
    font-size: 0.85rem;
    /* Slightly smaller for mobile Fit */
    letter-spacing: 0.5px;
  }

  .logo {
    max-height: 40vh;
    /* Exactly 75% of new desktop height (40vh) */
    max-width: 85%;
  }

  .tagline {
    font-size: 1.4rem;
    position: absolute;
    bottom: 28vh;
    /* Moved up slightly */
    width: 100%;
    text-align: center;
  }
}

/* Games Section */
.games-section {
  padding: 80px 20px;
  width: 100%;
  max-width: 1400px;
  margin-bottom: 40px;
  /* Reduced from 60px as we now have two sections */
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 60px;
  /* text-transform: uppercase; Removed */
  letter-spacing: 2px;
}

.games-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: max-content;
}

.cover-wrapper {
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, z-index 0s linear 0.1s;
  z-index: 1;
  overflow: hidden;
  /* Added to support video crop and maintain card shape */
  border-radius: 4px;
}

.game-cover {
  display: block;
  max-width: 100%;
  height: auto;
  transform: scale(0.98);
  /* 2% smaller to prevent bleed behind the 1.02 scaled video */
  transform-origin: center;
  border-radius: 4px;
}

.game-video {
  display: block;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  transition: opacity 0.2s ease;
  pointer-events: none;
  transform: scale(1.02);
  /* Crop 1px edges to fix background leak */
}

/* Desktop Hover Effect */
@media (min-width: 769px) {
  .cover-wrapper:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease, z-index 0s;
  }

  .cover-wrapper:hover .game-video {
    opacity: 1;
  }
}

/* Mobile Active State */
/* Explicitly defined for when JS adds the class */
.cover-wrapper.mobile-active {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cover-wrapper.mobile-active .game-video {
  opacity: 1;
}


.platforms {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  width: 100%;
}

.platform-icon {
  width: auto;
  height: auto;
  transform: scale(0.8);
  transform-origin: center;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.platform-icon:hover {
  transform: scale(0.9);
}

/* Contact Section & Footer */
footer {
  padding: 80px 20px 40px;
  margin-top: auto;
  width: 100%;
  background: linear-gradient(to top, #000 0%, #111 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 60px;
}

.contact-icon-link {
  text-decoration: none;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
}

.contact-icon-link:hover {
  transform: scale(1.1);
}

.contact-img {
  width: auto;
  height: 48px;
}

.copyright {
  color: #888;
  font-size: 0.9rem;
  margin-top: 20px;
}

@keyframes logo-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}