/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* --- ROOT VARIABLES --- */
:root {
  --primary: #FFD700;
  /* Gold */
  --primary-glow: #ffdb1a;
  --secondary: #9945FF;
  /* Purple */
  --dark-bg: #0a0a0a;
  --card-bg: #151515;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- GLOBAL RESET & BASE --- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- UTILITY CLASSES --- */
.section-padding {
  padding: 80px 0;
}

.glow-text {
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}


/* --- BUTTONS --- */
.btn-primary {
  background: linear-gradient(135deg, #e6c200, #ffaa00);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, #ffd700, #ffb700);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%);
}

.btn-secondary:hover {
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff6b81, #ff4757);
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.btn-external {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--primary);
  font-family: var(--font-heading);
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition);
  gap: 10px;
}

.btn-external i {
  font-size: 24px;
}

.btn-external:hover {
  background: var(--primary);
  color: #000;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.navbar.nav-hidden {
  transform: translateY(-100%);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 1px;
  color: white;
  text-decoration: none;
}

.nav-link {
  position: relative;
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  width: 30px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--primary);
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.hamburger span:nth-child(1) {
  top: 0px;
}

.hamburger span:nth-child(2) {
  top: 10px;
}

.hamburger span:nth-child(3) {
  top: 20px;
}

/* Mobile Menu */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100%;
  background: #111;
  z-index: 60;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.8);
  border-left: 1px solid rgba(255, 215, 0, 0.2);
}

.mobile-menu.active {
  right: 0;
}

/* --- HERO SECTION --- */
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(153, 69, 255, 0.3) 0%,
      rgba(255, 215, 0, 0.2) 25%,
      rgba(0, 212, 255, 0.2) 50%,
      rgba(255, 0, 255, 0.15) 75%,
      rgba(10, 10, 15, 1) 100%);
  background-size: 100% 400%;
  animation: gradientFlow 15s ease infinite;
  z-index: 0;
}

@keyframes gradientFlow {

  0%,
  100% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 0% 100%;
  }
}

/* Floating particles */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 15s infinite ease-in-out;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* --- GAME CARDS --- */
.game-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
  color: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s;
  overflow: hidden;
  padding: 6px;
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}


.game-card:hover .game-icon {
  transform: rotateY(180deg);
}

/* --- ANIMATIONS (Reveal on Scroll) --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* --- AGE MODAL (FIXED) --- */
.age-modal {
  display: flex;
  /* Flex is used to center content */
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(15px);
  align-items: center;
  justify-content: center;
}

/* FIX: If .hidden is applied, force it to hide */
.age-modal.hidden {
  display: none !important;
}

.age-modal-content {
  background: #111;
  border: 1px solid #333;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  position: relative;
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* By default, verification is shown, denied is hidden */
.age-verification {
  display: block;
}

.age-verification.hidden {
  display: none;
}

.age-denied {
  display: none;
  /* Hidden by default */
}

/* FIX: This class was missing! It shows the denied message when added by JS */
.age-denied.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* --- GAME INFO MODAL --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #1a1a1a;
  width: 90%;
  max-width: 600px;
  border-radius: 20px;
  overflow: hidden;
  transform: scale(0.9);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Modal description scroll container */
.modal-description-scroll {
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 0;
  padding-right: 10px;
}

/* Custom scrollbar for modal description */
.modal-description-scroll::-webkit-scrollbar {
  width: 6px;
}

.modal-description-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.modal-description-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.3);
  border-radius: 3px;
}

.modal-description-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.5);
}

/* Responsive adjustments for mobile */
@media (max-width: 640px) {
  .modal-content {
    max-height: 80vh;
  }

  .modal-description-scroll {
    max-height: 120px;
  }
}


/* --- ABOUT SECTION --- */
.neon-border {
  position: relative;
  transition: var(--transition);
}

.neon-border:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

/* --- FOOTER --- */
.footer-gradient {
  background: linear-gradient(to top, #050505, #0a0a0a);
}