/* Base Mobile Setup */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #cac1c4, #3f6d8f);
  }
 
#login-section, #user-section{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    border: #4e0ce9 1px solid;
    border-radius: 10px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
    margin: 30px;
    background: linear-gradient(to bottom, #600dcc, #790ba5, #0683dd);
}

#login-section input, #login-section button{
    padding: 10px;
    margin:5px;
    border: none;
    border-radius: 15px;
    width:80%;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
  }
#login-section button{
  background-color: #16e91d;
}

#user-section p{
    font-size: 20px;
    color: #fff;
    padding: 5px;
}
#user-section p span{
  color: #031725;
  font-weight: 900;
  text-transform: uppercase;
}
#user-section button{
    padding: 10px;
    background: linear-gradient(to left, #c01414, #7911ce, rgb(14, 173, 194));
    border: none;
    border-radius: 10px;
    box-shadow: #031725;
}

#toggle-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: sans-serif;
  font-size: 16px;
}

/* Hide default checkbox */
#toggle {
  display: none;
}

/* Style the switch */
#slider {
  position: relative;
  width: 50px;
  height: 26px;
  background-color: #ccc;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Knob */
#slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* Checked state */
#toggle:checked + #slider {
  background-color: #4caf50;
}

#toggle:checked + #slider::before {
  transform: translateX(24px);
}
#toggle-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: sans-serif;
  font-size: 16px;
  padding: 10px;
}

#toggle {
  display: none;
}

/* Toggle Switch */
#switch {
  position: relative;
  width: 50px;
  height: 26px;
  background-color: #ccc;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

#toggle:checked + #switch {
  background-color: #4caf50;
}

#toggle:checked + #switch::before {
  transform: translateX(24px);
}

/*--Score Section--*/
#score-section {
  display: flex;
  flex-direction: column;
  align-content: center;
  padding: 20px;
  margin:2vw;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  max-height: 80vh;
  overflow-y: auto;
}

/* Title */
#score-section h1 {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
}

/* Subheaders */
#score-section h2 {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 5px;
  width: 100%;
}

/* List Layout - Two Items in One Row */
#score-section ul {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center items horizontally */
  list-style: none;
  padding: 0;
  margin: 0;
}

#score-section li {
  width: 100%; /* Take full width of the parent */
  margin: 10px 0; /* Add vertical spacing between items */
  text-align: center; /* Center text inside the items */
  background: rgba(255, 255, 255, 0.15);
  padding: 15px;
  margin-bottom: 12px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.2s ease-in-out, background 0.2s ease-in-out;
  box-shadow: 0 4px 8px rgba(197, 12, 12, 0.2);
  cursor: pointer;
  position: relative;
  min-height: 50px; /* Keeps size constant */
  will-change: transform; /* Optimizes animation */
}


/* Score Styling */
#score-section span.title {
  flex-grow: 1;
  text-align: left;
}

#score-section span[id^="addition"], 
#score-section span[id^="subtraction"], 
#score-section span[id^="multiplication"], 
#score-section span[id^="lightning"], 
#score-section span[id^="table"], 
#score-section span[id^="roman"], 
#score-section span[id^="word"] {
  font-weight: 700;
  color: #ffcc00;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
}


/* Cursor Effect */
@keyframes cursorEffect {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}
/*-- Score Section (End) --*/
/*--- Leaderboard ---*/
#leaderboard-section {
  display: flex;
  flex-direction: column;
  padding: 20px;
  margin:2vw;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  max-height: 80vh;
  overflow-y: auto;
}

#leaderboard-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

#leaderboard-section button {
  background: #4CAF50;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

#leaderboard-section button:hover {
  background: #45a049;
}

#leaderboard {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#leaderboard th, #leaderboard td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

#leaderboard tbody tr:hover {
  background-color: #f9f9f9;
}
/*--- Leaderboard (End) ---*/

/*--- Popup ---*/
  .overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 90;
    display: none;
  }
  
  .popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 18px;
    border-radius: 14px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 100;
    display: none;
  }

.refresh-container {
  display: flex;
  justify-content: center;
  margin-top: 20px; /* Optional: Adjust spacing as needed */
}
