* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}
body { min-height: 100vh; padding-bottom: 30px; }

.header {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: #fff;
  padding: 20px 16px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header h1 { font-size: 18px; font-weight: 600; }
.header .subtitle { font-size: 12px; opacity: 0.85; margin-top: 4px; }

.desensitize-tip {
  background: #fff8e1;
  border-left: 4px solid #ff9800;
  padding: 12px 14px;
  margin: 12px 12px 0;
  border-radius: 6px;
  font-size: 13px;
  color: #e65100;
  font-weight: 500;
}
.desensitize-tip::before { content: "⚠ "; }

.form-container {
  background: #fff;
  margin: 12px;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}
.form-label .required { color: #f44336; margin-left: 2px; }
.form-label .optional { color: #999; font-weight: 400; margin-left: 4px; font-size: 12px; }

.form-input, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: #4a90e2;
  background: #fff;
}
.form-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

/* 图片上传 */
.upload-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.upload-item {
  position: relative;
  width: calc((100% - 20px) / 3);
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
}
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .remove-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-add {
  width: calc((100% - 20px) / 3);
  aspect-ratio: 1;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  font-size: 12px;
  transition: all 0.2s;
}
.upload-add:hover { border-color: #4a90e2; color: #4a90e2; }
.upload-add .plus { font-size: 28px; line-height: 1; margin-bottom: 4px; }
.upload-add input { display: none; }

/* 提交按钮 */
.submit-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 20px 12px 0;
  padding: 14px;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
  transition: all 0.2s;
}
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 成功弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.modal-mask.show { opacity: 1; visibility: visible; }
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 30px 24px;
  text-align: center;
  width: 80%;
  max-width: 320px;
  transform: scale(0.9);
  transition: transform 0.3s;
}
.modal-mask.show .modal-box { transform: scale(1); }
.modal-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #4caf50;
  font-size: 36px;
  line-height: 60px;
  margin: 0 auto 16px;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: #666; margin-bottom: 20px; }
.modal-btn {
  display: inline-block;
  padding: 10px 30px;
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.toast.show { opacity: 1; visibility: visible; }

/* 字符计数 */
.char-count { text-align: right; font-size: 12px; color: #999; margin-top: 4px; }

@media (max-width: 360px) {
  .form-container { margin: 8px; padding: 12px; }
  .desensitize-tip { margin: 8px 8px 0; }
}
