body, html {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #fff;
  text-align: center;
  background-color: #fafafa;
}

.container {
  margin-top: 50px;
  display: flex;
  flex-direction: row;
  height: calc(100vh - 50px); 
}

.input-area {
  width: 20%;
  padding: 20px;
  background-color: transparent;
}

.input-area textarea {
  width: 100%;
  height: 85%;
  padding: 10px;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
  resize: none;
}

.input-area textarea:focus {
  outline: none;
}

#result::-webkit-scrollbar,
.input-area textarea::-webkit-scrollbar {
  width: 8px;
}

#result::-webkit-scrollbar-track,
.input-area textarea::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#result::-webkit-scrollbar-thumb,
.input-area textarea::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

#result::-webkit-scrollbar-thumb:hover,
.input-area textarea::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

.input-area #name-count {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
  display: flex;
  justify-content: right;
}

.display-area {
  width: 80%;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background-color: transparent;
}

#result {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  margin-bottom: 80px;
  font-size: 1.1rem;
}

.picked-student {
  margin-top: 20px;
  margin-bottom: 12px;
}

.controls {
  position: absolute;
  bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 25px;
  padding: 15px;
  background-color: #fafafa;
}

#pick-student {
  padding: 15px;
  font-size: 1.1rem;
  border: none;
  background-color: #ADCBFD;
  color: #000;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s ease, color 0.3s ease;
}

#pick-student:hover {
  background-color: #84A9E8;
}

#reset {
  background-color: transparent;
  border: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: 0.3s ease, color 0.3s ease;
}

#reset .material-icons {
  color: #000;
  font-size: 2.2rem;
}

#reset .material-icons:hover {
  color: #FF5757;
}

#undo {
  background-color: transparent;
  border: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: 0.3s ease, color 0.3s ease;
  display: flex; /* Ensure the button can center its content */
  align-items: center; /* Vertically center the icon */
  justify-content: center; /* Horizontally center the icon */
}

#undo .material-icons {
  color: #000;
  font-size: 2.2rem;
  line-height: 1; /* Ensures the icon height doesn't affect positioning */
}

#undo .material-icons:hover {
  color: #FF5757;
}


/* Media Query for screens smaller than 800px */
@media (max-width: 800px) {
  .container {
      flex-direction: column;
  }

  .input-area,
  .display-area {
      width: 90%;
  }

  .input-area textarea {
    min-height: 200px;
    resize: vertical;
}

  .controls {
      position: fixed;
      bottom: 0;
      width: 90%;
      justify-content: space-around;
      padding: 10px;
  }

  .input-area {
      padding-bottom: 80px; 
  }

  .display-area {
      padding-bottom: 80px; 
  }
}
