/* ========================================
   SETTINGS OVERLAY
   ======================================== */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.settings-overlay.active {
  display: flex;
}

/* Disable all buttons except settings dialog when overlay is active */
.settings-overlay.active ~ .animal-btn,
.settings-overlay.active ~ .reset-btn,
.settings-overlay.active ~ .level-indicator {
  pointer-events: none;
  opacity: 0.3;
}

.settings-dialog {
  background-color: white;
  border-radius: 2vw;
  padding: 3vw;
  width: 50vw;
  max-width: 600px;
  min-width: 300px;
  box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.5);
  position: relative;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2vw;
  padding-bottom: 1vw;
  border-bottom: 2px solid #e0e0e0;
}

.settings-title {
  font-size: 2.5vw;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.settings-close {
  background: none;
  border: none;
  font-size: 3vw;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 3vw;
  height: 3vw;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.settings-close:hover {
  color: #333;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 2vw;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.8vw;
}

.settings-label {
  font-size: 1.6vw;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5vw;
}

.settings-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1vw;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 0.5vw;
}

.settings-option input[type="radio"] {
  width: 1.5vw;
  height: 1.5vw;
  min-width: 16px;
  min-height: 16px;
  cursor: pointer;
}

.settings-option label {
  font-size: 1.4vw;
  color: #555;
  cursor: pointer;
}

.settings-number {
  display: flex;
  align-items: center;
  gap: 1vw;
}

.settings-number input[type="number"] {
  width: 8vw;
  min-width: 80px;
  padding: 0.8vw;
  font-size: 1.6vw;
  border: 2px solid #ddd;
  border-radius: 0.5vw;
  outline: none;
  transition: border-color 0.2s;
}

.settings-number input[type="number"]:focus {
  border-color: #4285f4;
}

.settings-number span {
  font-size: 1.4vw;
  color: #666;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1vw;
  margin-top: 2vw;
  padding-top: 2vw;
  border-top: 2px solid #e0e0e0;
}

.settings-button {
  padding: 1vw 2vw;
  font-size: 1.6vw;
  border: none;
  border-radius: 0.5vw;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
}

.settings-button.primary {
  background-color: #4285f4;
  color: white;
}

.settings-button.primary:hover {
  background-color: #3367d6;
}

.settings-button.secondary {
  background-color: #e0e0e0;
  color: #333;
}

.settings-button.secondary:hover {
  background-color: #d0d0d0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .settings-dialog {
    width: 80vw;
    padding: 4vw;
  }

  .settings-title {
    font-size: 4vw;
  }

  .settings-label {
    font-size: 3vw;
  }

  .settings-option label {
    font-size: 2.5vw;
  }
}
