@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Poppins:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(ellipse at center, #0d0d0d, #1a1a1a);
  color: #ffffff;
  overflow-x: hidden;
}

h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff80;
}

.game-container {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  margin: 80px auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 0 30px #00f0ff60;
  box-sizing: border-box;
}

#question {
  font-size: 1.3rem;
  margin: 20px auto;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 0 5px #00f0ff70;
}

input, button {
  padding: 14px 22px;
  margin: 10px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

input {
  width: 60%;
  max-width: 100%;
  background: #ffffff15;
  color: white;
  border: 1px solid #00f0ff55;
  transition: 0.3s ease-in-out;
}

input::placeholder {
  color: #bbb;
}

input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 5px #00f0ff80;
}

button {
  background: #00f0ff;
  color: black;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  box-shadow: 0 0 8px #00f0ff80;
}

button:hover {
  background: #00c8cc;
  box-shadow: 0 0 12px #00f0ffcc;
}

.reset-btn {
  background-color: #ff2e63;
  color: white;
  margin-top: 10px;
  font-weight: 600;
  transition: 0.3s ease;
  box-shadow: 0 0 10px #ff2e6388;
}

.reset-btn:hover {
  background-color: #e60045;
  box-shadow: 0 0 15px #ff2e63cc;
}

.info {
  margin-top: 20px;
  font-size: 1rem;
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 5px #00f0ff60;
}

/* Floating Background Cards */
.floating-cards {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://www.transparenttextures.com/patterns/connected.png');
  background-repeat: repeat;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

/* Rotating Cube */
.cube {
  position: absolute;
  right: 10%;
  top: 20%;
  width: 60px;
  height: 60px;
  transform-style: preserve-3d;
  animation: rotateCube 8s infinite linear;
  z-index: 0;
}

.cube::before,
.cube::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  background: #00f0ff55;
  border: 1px solid #00f0ff;
  transform: rotateX(90deg);
}

@keyframes rotateCube {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Orbiting Spheres */
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  transform: translate(-50%, -50%);
  animation: orbitCenter 20s linear infinite;
  z-index: 0;
}

.sphere {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #00f0ff;
  border-radius: 50%;
  animation: orbitSphere 4s linear infinite;
}

.sphere:nth-child(2) {
  animation-delay: 1.3s;
  left: 50px;
  top: 0;
}

.sphere:nth-child(3) {
  animation-delay: 2.6s;
  left: 100px;
  top: 0;
}

@keyframes orbitCenter {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbitSphere {
  0% { transform: rotate(0deg) translateX(75px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(75px) rotate(-360deg); }
}

/* 🔁 Responsive for Mobile */
@media (max-width: 768px) {
  .game-container {
    margin: 40px 10px;
    padding: 1.5rem;
  }

  input {
    width: 100%;
    margin-bottom: 10px;
    font-size: 0.95rem;
    padding: 12px 18px;
  }

  button {
    width: 100%;
    margin: 8px 0;
  }

  h1 {
    font-size: 1.8rem;
  }

  #question {
    font-size: 1.1rem;
  }

  .info {
    font-size: 0.95rem;
  }

  .cube,
  .orbit {
    display: none; /* Hide 3D visuals on mobile */
  }
}
