/* Settings Modal Styles */

.settings-modal-content {
  width: 400px;
  margin-top: 150px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(245, 222, 179, 0.98) 0%, rgba(222, 184, 135, 0.98) 100%);
  border-radius: 12px;
  border: 3px solid rgba(139, 90, 43, 0.9);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 90, 43, 0.3);
}

.settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(139, 90, 43, 0.4);
}

.settings-modal-title {
  margin: 0;
  font-size: 24px;
  color: #3e2723;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.settings-modal-subtitle {
  color: #3e2723;
  font-size: 18px;
}

.settings-close-button {
  background: rgba(139, 90, 43, 0.3);
  border: 2px solid rgba(139, 90, 43, 0.5);
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  color: #3e2723;
  padding: 4px 10px;
  transition: all 0.2s;
  margin-top: -30px;
}

.settings-close-button:hover:not(:disabled) {
  background: rgba(139, 90, 43, 0.4);
  border-color: rgba(139, 90, 43, 0.7);
  color: #2c1810;
}

.settings-checkbox-section {
  margin-bottom: 20px;
}

.settings-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  color: #3e2723;
  font-weight: 500;
  user-select: none;
}

.settings-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #8b5a2b;
}

.settings-checkbox-label span {
  flex: 1;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 20px;
}

.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.settings-section-label {
  font-size: 16px;
  color: #3e2723;
  font-weight: 500;
}

.settings-section-value {
  font-size: 14px;
  color: #5d4037;
  font-weight: bold;
}

.settings-slider {
  width: 100%;
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
  background: rgba(139, 90, 43, 0.3);
  outline: none;
  -webkit-appearance: none;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8b5a2b;
  cursor: pointer;
  border: 2px solid #2c1810;
  transition: background 0.2s;
}

.settings-slider::-webkit-slider-thumb:hover {
  background: #6d4621;
}

.settings-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8b5a2b;
  cursor: pointer;
  border: 2px solid #2c1810;
  transition: background 0.2s;
}

.settings-slider::-moz-range-thumb:hover {
  background: #6d4621;
}

.settings-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: #3e2723;
  border: 2px solid rgba(139, 90, 43, 0.5);
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.settings-input:focus {
  border-color: #8b5a2b;
  box-shadow: 0 0 4px rgba(139, 90, 43, 0.3);
}

.settings-input::placeholder {
  color: rgba(62, 39, 35, 0.5);
}

.settings-description {
  font-size: 12px;
  color: #5d4037;
  text-align: center;
  margin-top: 4px;
}

.settings-speed-controls {
  display: flex;
  gap: 10px;
  width: 100%;
}

.settings-speed-button {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  background: rgba(139, 90, 43, 0.3);
  color: #3e2723;
  border: 2px solid rgba(139, 90, 43, 0.5);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  text-shadow: none;
}

.settings-speed-button:hover:not(:disabled) {
  background: rgba(139, 90, 43, 0.4);
  border-color: rgba(139, 90, 43, 0.7);
}

.settings-divider {
  width: 100%;
  height: 1px;
  background: rgba(139, 90, 43, 0.4);
  margin: 20px 0;
}

.settings-debug-button {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 16px;
  background: rgba(90, 90, 139, 0.8);
  color: #fff;
  border: 2px solid rgba(60, 60, 100, 0.9);
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.settings-debug-button:hover:not(:disabled) {
  background: rgba(90, 90, 139, 1);
}

.settings-player-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.settings-player-name-display {
  font-size: 16px;
  color: #3e2723;
  font-weight: 500;
}

.settings-player-name-edit {
  padding: 4px 10px;
  font-size: 12px;
  background: rgba(139, 90, 43, 0.2);
  color: #3e2723;
  border: 1px solid rgba(139, 90, 43, 0.4);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: normal;
  width: auto;
  text-shadow: none;
}

.settings-player-name-edit:hover {
  background: rgba(139, 90, 43, 0.3);
  border-color: rgba(139, 90, 43, 0.6);
}

.settings-player-name-input {
  max-width: 200px;
  text-align: center;
}

.settings-new-game-button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background: rgba(139, 43, 43, 0.8);
  color: #fff;
  border: 2px solid rgba(90, 30, 30, 0.9);
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.settings-new-game-button:hover:not(:disabled) {
  background: rgba(139, 43, 43, 1);
}

.settings-leaderboard-button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 16px;
  background: rgba(139, 90, 43, 0.8);
  color: #fff;
  border: 2px solid rgba(100, 60, 20, 0.9);
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.settings-leaderboard-button:hover:not(:disabled) {
  background: rgba(139, 90, 43, 1);
}

.settings-version-info {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: rgba(93, 64, 55, 0.5);
  letter-spacing: 0.5px;
  user-select: none;
}

.settings-git-hash {
  user-select: all;
  cursor: text;
}

/* Confirm Modal Styles */

.confirm-modal {
  z-index: 10000010;
}

.confirm-modal-content {
  width: 400px;
  margin-top: 200px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(245, 222, 179, 0.98) 0%, rgba(222, 184, 135, 0.98) 100%);
  border-radius: 12px;
  border: 3px solid rgba(139, 90, 43, 0.9);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 90, 43, 0.3);
}

.confirm-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(139, 90, 43, 0.4);
}

.confirm-modal-title {
  margin: 0;
  font-size: 22px;
  color: #3e2723;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.confirm-modal-body {
  margin-bottom: 24px;
}

.confirm-modal-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.confirm-icon {
  image-rendering: pixelated;
}

.confirm-modal-message {
  margin: 0;
  font-size: 16px;
  color: #3e2723;
  text-align: center;
  line-height: 1.5;
}

.confirm-modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-modal-button {
  flex: 1;
  max-width: 140px;
  padding: 12px 20px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  text-shadow: none;
}

.confirm-modal-cancel {
  background: rgba(139, 90, 43, 0.25);
  color: #3e2723;
  border: 2px solid rgba(139, 90, 43, 0.5);
}

.confirm-modal-cancel:hover:not(:disabled) {
  background: rgba(139, 90, 43, 0.35);
  border-color: rgba(139, 90, 43, 0.7);
}

.confirm-modal-confirm {
  background: rgba(76, 139, 76, 0.85);
  color: #fff;
  border: 2px solid rgba(50, 100, 50, 0.9);
}

.confirm-modal-confirm:hover:not(:disabled) {
  background: rgba(76, 139, 76, 1);
}

.confirm-modal-confirm.danger {
  background: rgba(139, 76, 76, 0.85);
  border: 2px solid rgba(100, 50, 50, 0.9);
}

.confirm-modal-confirm.danger:hover:not(:disabled) {
  background: rgba(139, 76, 76, 1);
}