* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  position: relative;
  color: #fff;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scrollbar on body */
}

/* Ensure vertical scrollbar for overflow at any zoom level */
body {
  min-height: 100vh; /* Full viewport height */
  display: flex; /* Ensure body can center content */
}

/* Animated Gaming Background */
#wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #1a1a2e 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Neon Light Rays */
.light-ray {
  position: absolute;
  width: 2px;
  height: 300px;
  background: linear-gradient(to bottom, transparent, rgba(79, 172, 254, 0.8), transparent);
  animation: lightRayMove 4s ease-in-out infinite;
  opacity: 0.6;
  filter: blur(2px);
}

@keyframes lightRayMove {
  0%, 100% { transform: translateY(-100%) rotate(0deg); opacity: 0; }
  50% { transform: translateY(100vh) rotate(5deg); opacity: 0.8; }
}

/* Floating Game Icons */
.game-icon {
  position: absolute;
  font-size: 50px;
  opacity: 0.3;
  animation: iconFloat 15s infinite ease-in-out;
  cursor: pointer;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 12px currentColor);
}

.game-icon:hover {
  transform: scale(1.5) rotate(360deg) !important;
  opacity: 0.8 !important;
  filter: drop-shadow(0 0 24px currentColor);
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  25% { transform: translateY(-60px) translateX(30px) rotate(90deg); }
  50% { transform: translateY(-120px) translateX(-30px) rotate(180deg); }
  75% { transform: translateY(-60px) translateX(20px) rotate(270deg); }
}

/* Pixel Blocks */
.pixel-block {
  position: absolute;
  width: 30px;
  height: 30px;
  background: linear-gradient(45deg, #ff6b6b 0%, #4ecdc4 50%, #45b7d1 100%);
  box-shadow: 0 0 20px currentColor;
  animation: blockRotate 10s infinite linear;
}

@keyframes blockRotate {
  0% { transform: rotate(0deg) translateX(0); opacity: 0.5; }
  50% { transform: rotate(180deg) translateX(50px); opacity: 1; }
  100% { transform: rotate(360deg) translateX(0); opacity: 0.5; }
}

/* Floating Particles */
.floating-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: particleFloat 10s infinite ease-in-out;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-50px) translateX(20px) scale(1.2); opacity: 1; }
}

/* Circle Wave Animation */
.Circles_Wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.Circles {
  position: relative;
  width: 100vw;
  height: 100vh;
  opacity: 0.3;
}

.Circle {
  animation: circleSpin 6s linear 0s infinite;
  left: 0;
  top: 0;
  position: absolute;
}

.Circle_Fill {
  background-color: rgba(79, 172, 254, 0.5);
  animation: circleScale 8s linear 0s infinite;
  display: block;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
}

@keyframes circleScale {
  0% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(0) scale(0.8); }
  100% { transform: translateZ(0) scale(1); }
}

@keyframes circleSpin {
  0% { transform: translateZ(0) rotate(0deg); }
  100% { transform: translateZ(0) rotate(360deg); }
}

/* Score Popup Effect */
.score-popup {
  position: absolute;
  font-size: 24px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700, 0 0 20px #ff9800;
  animation: scoreRise 3s ease-out infinite;
  pointer-events: none;
}

@keyframes scoreRise {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-200px) scale(1.5); opacity: 0; }
}

/* Center Container */
.container {
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 100;
  padding: 3vw; /* Increased for better spacing */
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
}

.container::-webkit-scrollbar {
  width: 0;
}

.container::-webkit-scrollbar-track {
  background: transparent;
}

.container::-webkit-scrollbar-thumb {
  background: transparent;
}

.container::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

/* Glass Container with Game Theme */
.glass-container {
  background: rgba(0, 0, 0, 0.3) radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 50px rgba(0, 0, 0, 0.2), 0 0 100px rgba(79, 172, 254, 0.1);
  padding: 3vw; /* Increased for better internal spacing */
  width: 100%;
  max-width: 700px; /* Increased for larger screens */
  max-height: none; /* Allow full height */
  min-height: auto; /* Remove min-height to allow shrinking */
  position: relative;
  z-index: 100;
  transform-style: preserve-3d;
  transition: all 0.4s ease;
  animation: gentleFloat 8s ease-in-out infinite;
  overflow-y: auto; /* Enable scrolling without forcing scrollbar */
  overflow-x: hidden; /* Prevent horizontal scrollbar */
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  margin: 3vw; /* Increased for better external spacing */
  display: flex; /* Use flex for internal layout */
  flex-direction: column; /* Stack children vertically */
  align-items: center; /* Center children horizontally */
  flex-shrink: 0; /* Prevent shrinking */
  justify-content: flex-start; /* Align content to top */
}

/* Ensure all children are properly spaced */
.glass-container > * {
  width: 100%; /* Ensure full width within container */
}

/* Custom Scrollbar Styling (Vertical Only) - Hidden by default */
.glass-container::-webkit-scrollbar {
  width: 0;
}

.glass-container::-webkit-scrollbar-track {
  background: transparent;
}

.glass-container::-webkit-scrollbar-thumb {
  background: transparent;
}

.glass-container::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

/* Hide scrollbar by default */
.glass-container {
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

/* Invisible vertical scrollbar for divs inside the container */
.glass-container * {
  /* overflow-y: auto; */
  scrollbar-width: none;
}

.glass-container *::-webkit-scrollbar {
  width: 0;
}

.glass-container *::-webkit-scrollbar-track {
  background: transparent;
}

.glass-container *::-webkit-scrollbar-thumb {
  background: transparent;
}

.glass-container *::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

.glass-container::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(45deg,
    rgba(31, 41, 55, 0.8),
    rgba(17, 24, 39, 0.8),
    rgba(55, 65, 81, 0.8),
    rgba(31, 41, 55, 0.8)
  );
  background-size: 300% 300%;
  border-radius: 17px;
  z-index: -1;
  animation: borderGlow 4s ease infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-container:hover::before {
  opacity: 1;
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.01); }
}

.glass-container:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 0 80px rgba(255, 255, 255, 0.2);
}

/* Player Avatar with Glow */
.player-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 0 0 30px rgba(100, 200, 255, 0.4);
  margin: 0 auto 6px;
  display: block;
  animation: avatarPulse 3s infinite ease-in-out;
  transition: all 0.3s ease;
}

.player-avatar:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(100, 200, 255, 0.6);
}

@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 0 0 30px rgba(100, 200, 255, 0.4); }
  50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(100, 200, 255, 0.7); }
}

.player-name {
  color: white !important;
  text-shadow: 0 0 10px rgba(100, 200, 255, 0.6);
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 12px;
  animation: textGlow 2s infinite ease-in-out;
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(100, 200, 255, 0.6); }
  50% { text-shadow: 0 0 20px rgba(100, 200, 255, 0.9); }
}

/* Input Wrapper */
.input-wrapper {
  position: relative;
  margin-bottom: 20px;
  width: 100%; /* Ensure full width */
}

/* Remove scrolling for input fields */
.form-control {
  overflow-y: visible;
}

.form-control {
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 30px;
  padding: 10px 40px 10px 40px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  width: 100%; /* Ensure full width within input-wrapper */
  font-size: 12px;
  color: #333;
}

.form-control:focus {
  background: rgba(255, 255, 255, 1);
  border-color: #4facfe;
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.6), 0 0 20px rgba(79, 172, 254, 0.3);
  outline: none;
  transform: scale(1.01);
}

.form-control::placeholder {
  color: rgba(51, 51, 51, 0.5);
}

.input-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #5a67d8;
  font-size: 16px;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.form-control:focus + .input-icon {
  color: #4facfe;
}

/* Validation Messages */
.validation-message {
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.validation-message.validation-error {
  color: #ff4757;
  opacity: 1;
  transform: translateY(0);
}

.validation-message.validation-success {
  color: #2ed573;
  opacity: 1;
  transform: translateY(0);
}

.status-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  transition: all 0.3s ease;
}

.status-error {
  color: #ff4757;
}

.status-success {
  color: #2ed573;
}

/* Buttons */
.btn {
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  width: 100%; /* Ensure full width for buttons */
  max-width: 200px; /* Limit max width for better layout */
  overflow-y: visible;
}

.btn-success {
  background: linear-gradient(45deg, #2ed573, #7ee8fa);
  border: none;
}

.btn-secondary {
  background: linear-gradient(45deg, #6b7280, #9ca3af);
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

/* Responsive Adjustments */
@media (min-width: 2560px) { /* For ultra-large screens like 4K LED */
  .container {
    padding: 4vw; /* Increased for better spacing */
  }

  .glass-container {
    max-width: 800px; /* Increased for visibility */
    padding: 4vw; /* Increased for internal spacing */
    min-height: 80%; /* Further increased height for very large screens */
    margin: 4vw; /* Increased for external spacing */
  }

  .player-avatar {
    width: 120px;
    height: 120px;
  }

  .player-name {
    font-size: 1.6rem;
    margin-bottom: 16px;
  }

  .btn {
    padding: 14px 35px;
    font-size: 16px;
    max-width: 250px;
  }

  .input-wrapper {
    margin-bottom: 30px;
  }

  .form-control {
    padding: 16px 65px 16px 65px;
    font-size: 16px;
  }

  .input-icon {
    font-size: 22px;
    left: 18px;
  }

  .status-indicator {
    font-size: 24px;
    right: 18px;
  }

  .validation-message {
    font-size: 0.9rem;
    bottom: -22px;
    padding: 0 12px;
  }

  .game-icon {
    font-size: 70px;
  }
}

@media (min-width: 1920px) and (max-width: 2559px) {
  .container {
    padding: 3.5vw;
  }

  .glass-container {
    max-width: 750px;
    padding: 3.5vw;
    min-height: 75%;
    margin: 3.5vw;
  }

  .player-avatar {
    width: 100px;
    height: 100px;
  }

  .player-name {
    font-size: 1.4rem;
    margin-bottom: 14px;
  }

  .btn {
    padding: 12px 30px;
    font-size: 14px;
    max-width: 225px;
  }

  .input-wrapper {
    margin-bottom: 28px;
  }

  .form-control {
    padding: 14px 60px 14px 60px;
    font-size: 14px;
  }

  .input-icon {
    font-size: 20px;
    left: 15px;
  }

  .status-indicator {
    font-size: 22px;
    right: 15px;
  }

  .validation-message {
    font-size: 0.85rem;
    bottom: -20px;
    padding: 0 10px;
  }

  .game-icon {
    font-size: 60px;
  }
}

@media (min-width: 1200px) and (max-width: 1919px) {
  .container {
    padding: 3vw;
  }

  .glass-container {
    max-width: 700px;
    padding: 3vw;
    min-height: 70%;
    margin: 3vw;
  }

  .player-avatar {
    width: 90px;
    height: 90px;
  }

  .player-name {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .btn {
    padding: 10px 25px;
    font-size: 13px;
    max-width: 200px;
  }

  .input-wrapper {
    margin-bottom: 25px;
  }

  .form-control {
    padding: 12px 50px 12px 50px;
    font-size: 13px;
  }

  .input-icon {
    font-size: 18px;
    left: 12px;
  }

  .status-indicator {
    font-size: 20px;
    right: 12px;
  }

  .validation-message {
    font-size: 0.75rem;
    bottom: -18px;
    padding: 0 8px;
  }

  .game-icon {
    font-size: 50px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    padding: 2.5vw;
  }

  .glass-container {
    max-width: 600px;
    padding: 2.5vw;
    min-height: 60%;
    margin: 2.5vw;
  }

  .player-avatar {
    width: 80px;
    height: 80px;
  }

  .player-name {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .btn {
    padding: 8px 20px;
    font-size: 12px;
    max-width: 180px;
  }

  .input-wrapper {
    margin-bottom: 22px;
  }

  .form-control {
    padding: 10px 40px 10px 40px;
    font-size: 12px;
  }

  .input-icon {
    font-size: 16px;
    left: 10px;
  }

  .status-indicator {
    font-size: 18px;
    right: 10px;
  }

  .validation-message {
    font-size: 0.7rem;
    bottom: -16px;
    padding: 0 6px;
  }

  .game-icon {
    font-size: 45px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .container {
    padding: 2vw;
  }

  .glass-container {
    max-width: 550px;
    padding: 2vw;
    min-height: 60%;
    margin: 2vw;
  }

  .player-avatar {
    width: 70px;
    height: 70px;
  }

  .player-name {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .btn {
    padding: 7px 18px;
    font-size: 11px;
    max-width: 170px;
  }

  .input-wrapper {
    margin-bottom: 20px;
  }

  .form-control {
    padding: 8px 35px 8px 35px;
    font-size: 11px;
  }

  .input-icon {
    font-size: 14px;
    left: 8px;
  }

  .status-indicator {
    font-size: 16px;
    right: 8px;
  }

  .validation-message {
    font-size: 0.65rem;
    bottom: -14px;
    padding: 0 5px;
  }

  .game-icon {
    font-size: 40px;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .container {
    padding: 1.5vw;
  }

  .glass-container {
    max-width: 70%;
    padding: 15px;
    min-height: 60%;
    margin: 1.5vw;
  }

  .player-avatar {
    width: 60px;
    height: 60px;
  }

  .player-name {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .btn {
    padding: 7px 16px;
    font-size: 11px;
    max-width: 160px;
  }

  .input-wrapper {
    margin-bottom: 18px;
  }

  .form-control {
    padding: 7px 30px 7px 30px;
    font-size: 11px;
  }

  .input-icon {
    font-size: 12px;
    left: 8px;
  }

  .status-indicator {
    font-size: 14px;
    right: 8px;
  }

  .validation-message {
    font-size: 0.6rem;
    bottom: -12px;
    padding: 0 4px;
  }

  .game-icon {
    font-size: 35px;
  }
}

@media (min-width: 360px) and (max-width: 575px) {
  .container {
    padding: 1vw;
  }

  .glass-container {
    max-width: 75%;
    padding: 12px;
    min-height: 60%;
    margin: 1vw;
  }

  .player-avatar {
    width: 50px;
    height: 50px;
  }

  .player-name {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }

  .btn {
    padding: 6px 14px;
    font-size: 10px;
    max-width: 150px;
  }

  .input-wrapper {
    margin-bottom: 16px;
  }

  .form-control {
    padding: 6px 25px 6px 25px;
    font-size: 10px;
  }

  .input-icon {
    font-size: 11px;
    left: 6px;
  }

  .status-indicator {
    font-size: 12px;
    right: 6px;
  }

  .validation-message {
    font-size: 0.55rem;
    bottom: -10px;
    padding: 0 3px;
  }

  .game-icon {
    font-size: 30px;
  }
}

@media (max-width: 359px) {
  .container {
    padding: 0.5vw;
  }

  .glass-container {
    max-width: 90%;
    padding: 12px;
    min-height: 85%;
    margin: 0.5vw;
  }

  .player-avatar {
    width: 40px;
    height: 40px;
  }

  .player-name {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }

  .btn {
    padding: 5px 12px;
    font-size: 9px;
    max-width: 140px;
  }

  .input-wrapper {
    margin-bottom: 14px;
  }

  .form-control {
    padding: 5px 20px 5px 20px;
    font-size: 9px;
  }

  .input-icon {
    font-size: 10px;
    left: 6px;
  }

  .status-indicator {
    font-size: 11px;
    right: 6px;
  }

  .validation-message {
    font-size: 0.5rem;
    bottom: -8px;
    padding: 0 2px;
  }

  .game-icon {
    font-size: 25px;
  }
}