/* Pet Selection Modal Styles */
.pet-selection-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1100;
  display: none;
  justify-content: center;
  align-items: center;
}

.pet-selection-modal.active {
  display: flex;
}

.pet-selection-modal .modal-content {
  background: #1a1a1a;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pet-selection-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #1a1a1a;
}

.pet-selection-modal .modal-header h3 {
  color: #ffffff;
  margin: 0;
  font-size: 18px;
}

.pet-selection-modal .close-modal {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.pet-selection-modal .close-modal:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.pet-selection-steps {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.pet-step {
  display: none;
}

.pet-step.active {
  display: block;
}

.pet-step h4 {
  color: #ffffff;
  margin: 0 0 16px 0;
  font-size: 16px;
  text-align: center;
}

.pet-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.pet-type-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.pet-type-box:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: #ffffff;
}

.pet-type-box.selected {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.pet-image-container {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.pet-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pet-name {
  color: #ffffff;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pet-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.pet-preview img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 12px;
}

.pet-preview h5 {
  color: #ffffff;
  margin: 0;
  font-size: 18px;
}

.pet-customization {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.customization-group {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.customization-group label {
  display: block;
  color: #ffffff;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

/* Updated age input styles */
.age-input-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.age-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.age-slider-container input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  outline: none;
}

.age-slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #000000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.age-text-input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.age-text-input input {
  width: 50px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  padding: 8px 4px;
  text-align: right;
}

.age-text-input .age-unit {
  color: #ffffff;
  font-size: 14px;
  margin-left: 4px;
}

/* Weight input styles */
.weight-input-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weight-control-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weight-control-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  outline: none;
}

.weight-control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #000000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.weight-text-input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.weight-text-input input {
  width: 60px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  padding: 8px 4px;
  text-align: right;
}

.weight-text-input .weight-unit {
  color: #ffffff;
  font-size: 14px;
  margin-left: 4px;
}

/* Simplified mutation styles */
.mutation-checkbox {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mutation-checkbox:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.mutation-checkbox input {
  margin-right: 8px;
}

.mutation-checkbox label {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #1a1a1a;
}

.back-btn, .next-btn, .add-btn {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.next-btn {
  background: #333333;
  color: #ffffff;
  border: 1px solid #ffffff;
  margin-left: auto;
  display: block;
}

.next-btn:hover {
  background: #555555;
}

.add-btn {
  background: #333333;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.add-btn:hover {
  background: #555555;
}

/* Pet Item in Preview */
.selected-item.pet-item {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.selected-item.pet-item .item-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: auto;
  text-align: center;
}

.selected-item.pet-item .item-name {
  font-size: 0.8rem;
  text-align: center;
  color: #ffffff;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 25px;
}

.selected-item.pet-item .item-age {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2px;
}



.selected-item.pet-item .item-weight {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2px;
}

.pet-age, .pet-weight {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.pet-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  text-align: center;
  width: 100%;
}

.pet-age {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.pet-mutations {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0;
}

.mutation-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.pet-weight {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* Add Pet Button */
.add-pet-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-pet-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.selection-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

/* Trade Item Pet Display */
.trade-item.pet-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.trade-item .pet-details {
  padding: 8px;
  font-size: 12px;
  text-align: center;
}
.trade-item .pet-name {
  font-weight: 500;
  font-size: 14px;
  text-align: center;
}

.trade-item .pet-age,
.trade-item .pet-weight {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  text-align: center;
}