/* 基础样式 */
.pet-publish-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Arial', sans-serif;
  color: #333;
}

.publish-header {
  text-align: center;
  margin-bottom: 30px;
}

.publish-header h1 {
  font-size: 28px;
  color: #ff6b6b;
  margin-bottom: 10px;
}

.publish-header p {
  color: #666;
  font-size: 16px;
}

/* 表单部分 */
.publish-form {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.form-section {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.form-section legend {
  padding: 0 10px;
  font-weight: bold;
  color: #ff6b6b;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.required {
  color: #ff6b6b;
}

.hint {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

input[type="text"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  transition: border 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #ff6b6b;
  outline: none;
}

textarea {
  resize: vertical;
}

/* 单选和复选框样式 */
.radio-group,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s;
}

.radio-option:hover,
.checkbox-option:hover {
  background: #fff5f5;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  margin-right: 8px;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  border-radius: 4px;
}

.radio-option input[type="radio"]:checked {
  border-color: #ff6b6b;
}

.radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: #ff6b6b;
  border-radius: 50%;
}

.checkbox-option input[type="checkbox"]:checked {
  border-color: #ff6b6b;
  background: #ff6b6b;
}

.check-icon {
  color: white;
  font-size: 12px;
  position: absolute;
  top: 1px;
  left: 3px;
}

.radio-icon {
  margin-right: 5px;
  font-size: 16px;
}

/* 年龄输入组合 */
.age-input {
  display: flex;
}

.age-input input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.age-input select {
  width: auto;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* 地区选择器 */
.location-selector {
  display: flex;
  gap: 10px;
}

.location-selector select {
  flex: 1;
}

/* 图片上传区域 */
.image-upload-area {
  margin-top: 10px;
}

.upload-box {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 15px;
}

.upload-box:hover {
  border-color: #ff6b6b;
  background: #fff5f5;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.upload-icon {
  font-size: 40px;
  color: #ff6b6b;
  margin-bottom: 10px;
}

.preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.image-preview {
  position: relative;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-image {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.upload-hint {
  font-size: 13px;
  color: #999;
  margin-top: 5px;
}

/* 提交按钮 */
.form-submit {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.preview-btn,
.submit-btn {
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.preview-btn {
  background: white;
  border: 1px solid #ff6b6b;
  color: #ff6b6b;
}

.preview-btn:hover {
  background: #fff5f5;
}

.submit-btn {
  background: #ff6b6b;
  border: 1px solid #ff6b6b;
  color: white;
}

.submit-btn:hover {
  background: #ff5252;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .location-selector {
    flex-direction: column;
  }
  
  .publish-form {
    padding: 20px 15px;
  }
  
  .form-submit {
    flex-direction: column;
    gap: 10px;
  }
  
  .preview-btn,
  .submit-btn {
    width: 100%;
  }
}

