/* 重构版交互样式 */

/* 对齐原版（bootstrap line-height:inherit 的效果） */
.contact-form input[type="text"],
.contact-form textarea,
.contact-form input[type="button"],
.contact-form button,
.reply-form input[type="text"],
.reply-form textarea {
  line-height: 22px;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: #fff;
  padding: 24px;
  text-align: center;
  border-radius: 5px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  z-index: 1001;
}
.modal.modal-open { display: block; }
.modal h3 { margin: 0 0 12px; }
.modal img { max-width: 100%; height: auto; }
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.modal-close:hover { color: #333; }

#modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

/* 上传状态与进度 */
#upload-progress,
#upload-progress2 {
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

/* 拖拽高亮 */
.drag-over {
  outline: 2px dashed #6fb3e8;
  outline-offset: 6px;
  border-radius: 4px;
}
.drag-over .custom-button {
  background: #5aa7de;
  border-color: #5aa7de;
  color: #fff;
}

/* 表单聚焦反馈 */
.contact-form textarea:focus,
.contact-form input[type="text"]:focus {
  border-color: #6fb3e8;
  box-shadow: 0 0 6px rgba(111, 179, 232, 0.35);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 按钮过渡反馈 */
.but {
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.but:active {
  transform: translateY(1px);
}
.but:disabled {
  opacity: 0.6;
  cursor: default;
}

/* 复制结果按钮 */
#copyresult {
  display: none;
  margin-top: 8px;
}

/* 上传结果列表 */
.result-item {
  margin-bottom: 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.result-head p { margin: 0; }
.result-img { max-width: 300px; }
.error-msg { color: #d9534f; }
.upload-options { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.upload-options input[type="number"] { width: 64px; }
.upload-options select { min-height: 28px; }
.grid-result { overflow-x: auto; margin-top: 14px; }
.result-grid { border-collapse: collapse; font-family: monospace; }
.result-grid td { min-width: 30px; padding: 5px 8px; border: 1px solid #ddd; text-align: center; }
.result-grid td.grid-hit { background: #ffe887; color: #222; font-weight: 700; outline: 2px solid #e4ae00; }
.result-meta { color: #666; margin: 6px 0; }
