* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1e1e2f, #282a36, #3a3f5c);
  animation: gradientFlow 10s ease infinite;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.game-container {
background: linear-gradient(to right, #000924, #424242);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  text-align: center;
  height: 500px;
  max-width: 700px;
  width: 100%;
}

h1 {
  
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-shadow: 0 0 10px #4c64fc;
}

.choices {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.choice-button {
  flex: 1;
  margin: 0 0.5rem;
  padding: 1.2rem;
background: linear-gradient(to right, #ff416c, #ff4b2b);
  color: #f8fafc;
  font-size: 3rem;
  border: none;
  border-radius: 60%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.choice-button:hover {
background: linear-gradient(to right, #b61d41, #ff3f1d);
  transform: scale(1.05);
  box-shadow: 0 0 10px #b5b71d;
}

.scoreboard {
    color: #a1a1aa;
    min-height: 270px;
    text-align: center;
    justify-content: center;
}

.thinking-container {
  display: inline-flex;
  align-items: center; /* aligns loader vertically with the text */
  gap: 10px; /* space between text and loader */
  justify-content: center;
  margin-top: 10px;
}

#thinking-message,
#loader {
  display: none;
  margin: 10px auto;
  text-align: center;
  font-size: 25px;
  color: #fff;
  font-weight: 400;
}

.loader {
  border: 4px solid #e5e7eb;
  border-top: 4px solid #1db7ff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  
}


 
#user-move, #computer-move {
    font-size: 25px;
}


.result-message {
  font-size: 30px;
  margin-top: 1rem;
  transition: all 0.4s ease;
  color: #fff;
}

.result-message.green {
  text-shadow: 0 0 10px #22c55e;
}

.result-message.red {
  text-shadow: 0 0 10px #ef4444;
}

.result-message.yellow {
  text-shadow: 0 0 10px #eab308;
}




#score {
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #f8fafc;
    padding: 10px 2px;
    font-weight: 700;
    border-radius: 10px ;
    transform: translateY(2rem);
}



#reset-btn {
  background-color: #dc2626;
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  
}

#reset-btn:hover {
  background-color: #b91c1c;
  box-shadow: 0 0 10px #b5b71d;
  transform: scale(1.05);
}

.hidden {
  display: none;
}

/* Modal Styles */
.modal {
    /* display: none; */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;

}

.modal-content {
    background: linear-gradient(135deg, #1b1f33 0%, #414043 100%);
    margin: 15% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.modal-button {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-button {
    background: linear-gradient(145deg, #ff4757, #c44569);
    color: white;
}

.cancel-button {
    background: linear-gradient(145deg, #57606f, #3d4454);
    color: white;
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
      }
    
    .choice-button {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
    
    .choices {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
  .game-container {
    padding: 1rem;
    margin: 1rem;
    width: 85%;
  }

  .choice-button {
    font-size: 2rem;
    padding: 0.8rem 1rem;
    width: 80%;
  }

  #user-move, #computer-move {
    font-size: 1.2rem;
  }

  .result-message {
    font-size: 1.7rem;
  }

  #thinking-message{
    font-size: 1.2rem;
  }

  #loader {
    width: 14px;
    height: 14px;
    border-width: 2px;
  }

  #score {
    font-size: 1rem;
  }
}