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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
  cursor: none;
}

/* Custom Cursor */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: rgba(139, 69, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
}

.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  background: rgba(255, 20, 147, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
}

/* Animated Background */
.bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 20s infinite ease-in-out;
  opacity: 0.7;
}

.orb:nth-child(1) {
  width: 300px;
  height: 300px;
  background: linear-gradient(45deg, #8b45ff, #ff6b6b);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: linear-gradient(-45deg, #4ecdc4, #44a08d);
  top: 60%;
  right: 10%;
  animation-delay: -7s;
}

.orb:nth-child(3) {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  bottom: 20%;
  left: 30%;
  animation-delay: -14s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) rotate(120deg);
  }
  66% {
    transform: translateY(20px) rotate(240deg);
  }
}

/* Header */
header {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(
    circle at center,
    rgba(139, 69, 255, 0.1) 0%,
    transparent 70%
  );
}

.hero-title {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 900;
  background: linear-gradient(45deg, #8b45ff, #ff6b6b, #4ecdc4, #ffd700);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease-in-out infinite;
  margin-bottom: 1rem;
  letter-spacing: -2px;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  opacity: 0.8;
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease 0.5s both;
}

.play-button {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  background: linear-gradient(45deg, #8b45ff, #ff6b6b);
  border: none;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease 1s both;
}

.play-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.play-button:hover::before {
  left: 100%;
}

.play-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(139, 69, 255, 0.4);
}

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

/* Games Grid */
.games-section {
  padding: 5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 3rem;
  background: linear-gradient(45deg, #fff, #8b45ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  perspective: 1000px;
}

.game-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(139, 69, 255, 0.1),
    rgba(255, 107, 107, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 20px;
}

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

.game-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 20px 40px rgba(139, 69, 255, 0.3);
}

.game-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
  animation: bounce 2s infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.game-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.game-description {
  opacity: 0.7;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.play-game-btn {
  padding: 0.8rem 2rem;
  background: transparent;
  border: 2px solid #8b45ff;
  border-radius: 25px;
  color: #8b45ff;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.play-game-btn:hover {
  background: #8b45ff;
  color: white;
  transform: scale(1.05);
}

/* Floating Elements */
.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  opacity: 0.1;
  animation: floatShape 15s linear infinite;
}

.shape-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(45deg, #8b45ff, #ff6b6b);
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 17px solid #4ecdc4;
}

.shape-square {
  width: 15px;
  height: 15px;
  background: linear-gradient(45deg, #ffd700, #ff8c00);
  transform: rotate(45deg);
}

@keyframes floatShape {
  from {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.1;
  }
  90% {
    opacity: 0.1;
  }
  to {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #8b45ff, #ff6b6b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-title {
    font-size: 4rem;
  }

  .games-section {
    padding: 3rem 1rem;
  }
}

/* ensure header is positioned (you already have this, but safe to keep) */
header { position: relative; }

/* centered inside the header */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  margin: 0 auto;        /* center horizontally */
  width: max-content;    /* shrink to arrow width */
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border-right: 3px solid rgba(255,255,255,0.6);
  border-bottom: 3px solid rgba(255,255,255,0.6);
  transform: rotate(45deg);
  display: block;
}

/* Prevent horizontal scrolling */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Initial hidden state */
body {
  opacity: 0;
}

/* When page is loaded */
body.page-loaded {
  animation: fadeInUp 1s ease forwards;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px); /* only vertical movement */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
