.overlay {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;

  display: flex;
  align-items: start;
  justify-content: center;

  width: 100%;
  height: 100%;
  padding-top: 10px;
  padding-bottom: 10px;

  background-color: gainsboro;
}

.overlay-body {
  overflow-y: auto;

  width: 350px;
  height: 100%;
  padding: 0 6px;
}

#info-body {
  font-size: 20px;
}

.info-section {
  margin-top: 8px;
  padding-bottom: 8px;

  border-bottom: 2px solid gray;
}

.info-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

#stat-body {
  position: relative;

  display: flex;
  align-items: center;
  flex-direction: column;

  background-color: gainsboro;
}

#statistics-title {
  margin-bottom: 24px;
}

#statistics {
  display: flex;
  justify-content: space-evenly;

  width: 100%;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  #statistics {
    margin-bottom: 20px;
  }
}

.statistic {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.stat {
  font-size: 66px;
}

.descriptor {
  font-size: 22px;
}

.graph {
  display: flex;
  flex-direction: column;

  width: 100%;
  margin-top: 16px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .graph {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

.graph-label {
  margin-right: 6px;
}

.graphElem {
  font-size: 24px;

  display: flex;
  align-items: center;
  -webkit-justify-content: flex-end;
  justify-content: end;

  padding-right: 4px;

  color: white;
  background-color: rgb(227, 42, 54);
}

.graph-row {
  display: flex;
  align-items: center;

  height: 26px;
  margin-bottom: 15px;
}

@media (max-width: 600px) {
  .graph-row {
    height: 22px;
    margin-bottom: 10px;
  }
}

.hard-mode-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

@media (max-width: 600px) {
  .hard-mode-container {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
  }
}

.hard-mode-container:has(input:checked) {
  border-color: rgb(227, 42, 54);
  background: linear-gradient(135deg, #fff5f5 0%, #ffecec 100%);
  box-shadow: 0 2px 12px rgba(227, 42, 54, 0.15);
}

.hard-mode-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hard-mode-label {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.hard-mode-description {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

@media (max-width: 600px) {
  .hard-mode-label {
    font-size: 22px;
  }
  
  .hard-mode-description {
    font-size: 18px;
  }
}

.hard-mode-warning-toast {
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  font-size: 20px;
  color: white;
  border-radius: 8px;
  background-color: rgb(0, 0, 0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: center;
}

@media (max-width: 600px) {
  .hard-mode-warning-toast {
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 16px;
  }
}

.hard-mode-warning-toast.hide {
  display: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .toggle-switch {
    width: 50px;
    height: 28px;
  }
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s ease;
  border-radius: 30px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, rgb(227, 42, 54) 0%, rgb(200, 35, 45) 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

@media (max-width: 600px) {
  .toggle-slider:before {
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
  }
  
  .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
  }
}

.toggle-slider:hover {
  background-color: #bbb;
}

.toggle-switch input:checked + .toggle-slider:hover {
  background: linear-gradient(135deg, rgb(200, 35, 45) 0%, rgb(180, 30, 40) 100%);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.popup-overlay.show {
  display: flex;
}

.popup-content {
  background-color: white;
  border-radius: 12px;
  padding: 25px;
  max-width: 85%;
  width: 350px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 16px 0;
  color: #333;
}

.popup-text {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px 0;
  color: #555;
}

.popup-button {
  background-color: rgb(227, 42, 54);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: normal;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
}

.popup-button:hover {
  background-color: rgb(200, 35, 45);
  transform: scale(1.05);
}

.popup-button:active {
  transform: scale(0.95);
}

@media (max-width: 600px) {
  .popup-content {
    padding: 25px 20px;
    max-width: 95%;
    border-radius: 10px;
  }

  .popup-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .popup-text {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .popup-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .popup-content {
    padding: 20px 15px;
  }

  .popup-title {
    font-size: 20px;
  }

  .popup-text {
    font-size: 15px;
  }
}
