@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 {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dark-gradient: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  --neon-blue: #00d4ff;
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --dark-bg: #0a0e27;
  --card-bg: rgba(15, 23, 42, 0.8);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border-color: rgba(168, 85, 247, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-gradient);
  z-index: -2;
}

.animated-bg {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  opacity: 0.1;
  background: 
    radial-gradient(circle at 20% 50%, var(--neon-blue) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, var(--neon-purple) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, var(--neon-pink) 0%, transparent 50%);
  animation: bgAnimation 20s ease infinite;
}

@keyframes bgAnimation {
  0%, 100% { transform: rotate(0deg) scale(1); }
  33% { transform: rotate(120deg) scale(1.1); }
  66% { transform: rotate(240deg) scale(0.9); }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section Separators */
section {
  position: relative;
  isolation: isolate; /* Create new stacking context */
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 14, 39, 0.98);
  box-shadow: 0 10px 40px rgba(168, 85, 247, 0.2);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  animation: logoPulse 2s ease infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.5); }
  50% { box-shadow: 0 0 30px rgba(168, 85, 247, 0.8); }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--neon-purple);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--neon-purple);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.token-display {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--neon-purple);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 80px;
  background: url('../images/hero-bg-v2.png') center/cover no-repeat fixed;
  background-attachment: fixed;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 39, 0.85) 0%,
    rgba(10, 14, 39, 0.75) 50%,
    rgba(10, 14, 39, 0.85) 100%
  );
}

.hero-content {
  text-align: center;
  z-index: 1;
  position: relative;
  animation: fadeInUp 1s ease;
  background: radial-gradient(
    ellipse at center,
    rgba(15, 23, 42, 0.6) 0%,
    transparent 70%
  );
  padding: 3rem;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-family: 'Orbitron', monospace;
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  animation: glow 2s ease infinite;
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.3));
}

@keyframes glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.hero .subtitle {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
  color: #e2e8f0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-secondary {
  background: transparent;
  color: var(--neon-purple);
  padding: 0.75rem 2rem;
  border: 2px solid var(--neon-purple);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--neon-purple);
  color: white;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

/* Games Section */
.games-section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
  background: var(--dark-bg);
}

.section-title {
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(10px);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3);
  border-color: var(--neon-purple);
}

.game-card:hover::before {
  opacity: 0.1;
}

.game-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-image {
  transform: scale(1.1);
}

.game-info {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.game-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

.play-btn {
  background: var(--primary-gradient);
  color: white;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.play-btn:hover {
  box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
  transform: scale(1.05);
}

/* Features Section */
.features-section {
  padding: 6rem 0;
  background: rgba(15, 23, 42, 0.9);
  position: relative;
  z-index: 1;
}

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

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--neon-purple);
  box-shadow: 0 15px 30px rgba(168, 85, 247, 0.2);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: float 3s ease infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.feature-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.feature-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

/* Footer */
.footer {
  background: rgba(10, 14, 39, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-section p,
.footer-section ul {
  color: var(--text-secondary);
  line-height: 1.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--neon-purple);
  text-shadow: 0 0 5px rgba(168, 85, 247, 0.5);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  color: var(--text-secondary);
}

.age-badge {
  display: inline-block;
  background: var(--danger);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-weight: 600;
  margin-right: 1rem;
}

/* Game Modal */
.game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 39, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  position: relative;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--danger);
}

.modal-body {
  flex: 1;
  padding: 1rem;
  overflow: hidden;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.contact--box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    background-attachment: scroll; /* Disable fixed background on mobile */
    min-height: 80vh;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: rgba(10, 14, 39, 0.98);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .nav-cta {
    flex-direction: row;
    gap: 1rem;
    padding: 2rem 1rem;
    position: absolute;
    bottom: -90vh;
    width: 100%;
    justify-content: center;
    background: rgba(15, 23, 42, 1);
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    border-radius: 25px;
    flex-wrap: wrap;
  }

  .nav-cta.fixed {
    position: fixed;
    top: 100px; /* высота хедера */
    left: 50%;
    transform: translateX(-50%);
    bottom: auto;
    z-index: 1001;
  }

  .contact--box {
    grid-template-columns: 1fr;
  }
}