@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, #1b1b3a, #3a0ca3, #4361ee);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.animated-title {
  font-size: 34px;
  font-weight: 800;
  color: #4cc9f0; 
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 
    0 0 8px #4cc9f0,
    0 0 15px #4361ee,
    0 0 25px #7209b7;
  animation: floatTitle 4s ease-in-out infinite, glowPulse 2.5s ease-in-out infinite;
}

@keyframes floatTitle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow: 
      0 0 8px #4cc9f0,
      0 0 15px #4361ee,
      0 0 25px #7209b7;
  }
  50% {
    text-shadow: 
      0 0 15px #4cc9f0,
      0 0 30px #4895ef,
      0 0 45px #7209b7;
  }
}

.select-box,
.play-board,
.result-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

/* ----------------- SELECT BOX ----------------- */
.select-box {
  padding: 25px 30px 30px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.select-box.hide {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.select-box header {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.select-box .title {
  font-size: 17px;
  font-weight: 500;
  color: #ddd;
  margin: 20px 0;
}

.options {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.options button {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
  color: #fff;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

.options button:hover {
  transform: scale(0.97);
  box-shadow: 0 6px 18px rgba(76, 201, 240, 0.5);
}

/* ----------------- PLAY BOARD ----------------- */
.play-board {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  width: 330px;
  padding: 20px;
}

.play-board.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.play-board .details {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 15px;
  text-align: center;
  position: relative;
}

.play-board .details .players {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.play-board .details span {
  flex: 1;
  color: #fff;
  padding: 8px 0;
  font-size: 17px;
  z-index: 5;
  font-weight: 600;
  transition: 0.3s;
}

.details .slider {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  border-radius: 10px;
  background: linear-gradient(135deg, #7209b7, #4361ee);
  transition: all 0.3s ease;
  z-index: 1;
}

.players.active .slider {
  left: 50%;
}

.play-board .play-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.play-board section span {
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 42px;
  color: #4cc9f0;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.05), 0 2px 6px rgba(0,0,0,0.4);
}

.play-board section span:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(0.96);
}

/* ----------------- RESULT BOX ----------------- */
.result-box {
  max-width: 360px;
  width: 100%;
  padding: 25px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.result-box.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.result-box .win-text {
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.result-box .win-text p {
  font-weight: 700;
  color: #4cc9f0;
  margin: 0 5px;
}

.result-box .btn button {
  font-size: 18px;
  font-weight: 600;
  padding: 10px 25px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

.result-box .btn button:hover {
  transform: scale(0.96);
  box-shadow: 0 6px 20px rgba(76, 201, 240, 0.5);
}
