body {
  font-family: 'Poppins';
}

.fc {
  display: flex;
}

.fr,
.fdr {
  flex-direction: row;
}

.fv,
.fdv {
  flex-direction: column;
}

.jc {
  justify-content: center;
}

.jsa {
  justify-content: space-around;
}

.jsb {
  justify-content: space-between;
}

.jse {
  justify-content: space-evenly;
}

.jfs {
  justify-content: flex-start;
}

.jfe {
  justify-content: flex-end;
}

.ac,
.aic {
  align-items: center;
}

.afs,
.aifs {
  align-items: flex-start;
}

.afe,
.aife {
  align-items: flex-end;
}

.asb {
  align-items: space-between;
}

.loaderDiv {
  width: 100%;
  height: calc(0.99*var(--screen-y));
  background-color: #fff;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  opacity: 0.85;
}

.loader {
  width: 120px;
  height: 120px;
  margin: -76px 0 0 -76px;
  border-radius: 50%;
  border-top: 16px solid #3aa9e8;
  border-right: 16px solid #FFB038;
  border-bottom: 16px solid #e05d5d;
  border-left: 16px solid rgba(128, 128, 128, 0.8);
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

.loaderDiv h5 {
  width: 100%;
  padding-right: 5%;
}

#loginRegistrationPageLoaderDiv {
  width: 100%;
  height: calc(var(--screen-y));
  background-color: #fff;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  opacity: 0.95;
}

#loginRegistrationPageLoader {
  width: 120px;
  height: 120px;
  margin: auto;
  border-radius: 50%;
  border-top: 16px solid #3aa9e8;
  border-right: 16px solid #FFB038;
  border-bottom: 16px solid #e05d5d;
  border-left: 16px solid rgba(128, 128, 128, 0.8);
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

.loaderDiv h5 {
  width: 100%;
  padding-right: 5%;
  position: absolute;
  transform: translateY(70px);
  margin-left: 50px;
  font-weight: 200;
  color: #3AA9E8;
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.tinyImage {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider_gray {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before, .slider_gray:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}


input:checked+.slider, input:checked+.slider_gray {
  background-color: gray;
}

input:focus+.slider, input:focus+.slider_gray {
  box-shadow: 0 0 1px gray;
}

input:checked+.slider:before, input:checked+.slider_gray:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round, .slider_gray.round {
  border-radius: 34px;
  background-color: white;
}

.slider.round:before {
  border-radius: 50%;
  background-color: #DFF945;
}

.slider_gray.round:before {
  border-radius: 50%;
  background-color: #DFF945;
}

.slider_gray.round {
  border-radius: 34px;
  background-color: lightgray;
}

.cursorPointer:hover {
  cursor: pointer;
}

.errorMessageMainDiv {
  width: 100%;
  height: calc(0.95*var(--screen-y) - 50px);
  padding: calc(0.4*0.95*var(--screen-y) - 50px) 0;
}

.errorMessageContentDiv {
  border: 1px solid #fff;
  border-radius: 7px;
  padding: 1rem;
}

.errorMessageButton {
  width: 100px;
  padding: 0.5rem;
  margin-top: 1rem;
}

.errorMessageButton:hover {
  cursor: pointer;
  opacity: 0.7;
}


/* width */
::-webkit-scrollbar {
  width: 6px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #fff;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #060606;
  /* border-radius: 20%; */
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #E0F945;
}

.lineThrough {
  text-decoration: line-through;
}

.separator {
  width: 2rem;
}

/* AI Level Selection Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.ai-level-modal {
  background: white;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.ai-level-modal_dark {
  background: #2d3748;
  color: white;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title-section {
  gap: 12px;
}

.bot-icon-modal {
  color: #3182ce;
}

.modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.modal-close-btn:hover {
  background-color: #f7fafc;
}

.ai-level-modal_dark .modal-close-btn:hover {
  background-color: #4a5568;
}

.modal-description {
  margin-bottom: 20px;
  color: #666;
}

.ai-level-modal_dark .modal-description {
  color: #a0aec0;
}

.ai-levels-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ai-level-option {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-level-option:hover {
  border-color: #3182ce;
  background-color: #f7fafc;
}

.ai-level-option.selected {
  border-color: #3182ce;
  background-color: #ebf8ff;
}

.ai-level-modal_dark .ai-level-option {
  border-color: #4a5568;
}

.ai-level-modal_dark .ai-level-option:hover,
.ai-level-modal_dark .ai-level-option.selected {
  border-color: #63b3ed;
  background-color: #2b6cb0;
}

.level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.level-name {
  font-weight: 600;
}

.difficulty-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.difficulty-badge.beginner {
  background-color: #c6f6d5;
  color: #22543d;
}

.difficulty-badge.intermediate {
  background-color: #fed7aa;
  color: #c05621;
}

.difficulty-badge.expert {
  background-color: #feb2b2;
  color: #c53030;
}

.level-description {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.ai-level-modal_dark .level-description {
  color: #a0aec0;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cancel-btn,
.start-competition-btn {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.cancel-btn {
  background-color: #e2e8f0;
  color: #4a5568;
}

.cancel-btn:hover {
  background-color: #cbd5e0;
}

.start-competition-btn {
  background-color: #3182ce;
  color: white;
}

.start-competition-btn:hover:not(:disabled) {
  background-color: #2c5aa0;
}

.start-competition-btn:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
}

/* Winner Celebration Modal */
.winner-modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.winner-modal_dark {
  background: #2d3748;
  color: white;
}

.winner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.winner-icon {
  margin-bottom: 16px;
}

.trophy-icon.winner {
  color: #ffd700;
}

.medal-icon.tie {
  color: #c0c0c0;
}

.star-icon.ai-win {
  color: #3182ce;
}

.winner-title {
  font-size: 32px;
  margin: 0;
  font-weight: 700;
}

.score-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.final-score {
  font-size: 24px;
  font-weight: 600;
  color: #3182ce;
}

.ai-level-info {
  font-size: 16px;
  color: #666;
}

.winner-modal_dark .ai-level-info {
  color: #a0aec0;
}

.encouragement-message {
  font-size: 18px;
  color: #4a5568;
  margin: 0;
}

.winner-modal_dark .encouragement-message {
  color: #e2e8f0;
}

.modal-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.play-again-btn,
.return-btn {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
}

.play-again-btn {
  background-color: #3182ce;
  color: white;
}

.play-again-btn:hover {
  background-color: #2c5aa0;
}

.return-btn {
  background-color: #e2e8f0;
  color: #4a5568;
}

.return-btn:hover {
  background-color: #cbd5e0;
}