.modal-form select { appearance:none; -webkit-appearance:none; -moz-appearance:none; background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.8) 50%), linear-gradient(135deg, rgba(255,255,255,.8) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.modal-form select:focus { outline: none; }

/* 统一系统下拉菜单弹层的可见性（Safari/iOS等） */
.modal-form select option { color: #000; }
/* 模态表单样式 */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(6px);
  padding: 32px 36px;
  max-width: 820px;
  width: 94%;
  max-height: 86vh;
  overflow: hidden;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(118, 99, 76, 0.2);
  padding-bottom: 16px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgb(189 151 105);
}

.modal-header p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-size: 14px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: rgba(118, 99, 76, 0.6);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: rgb(189 151 105);
}

/* 模态表单继承原有样式但调整尺寸 */
.modal-form {
  width: 100%;
}

.modal-form .form-section {
  margin-bottom: 24px;
}

.modal-form .form-group {
  margin-bottom: 16px;
}

.modal-form textarea {
  min-height: 120px;
}

.modal-form .submit-btn { padding: 12px 24px; min-width: 128px; }

/* 底部操作区：右侧对齐，增加取消按钮 */
.modal-form .form-submit { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.modal-form .submit-btn { order: 1; }
.modal-form .cancel-btn { order: 2; }
.modal-form .submit-status { order: 3; }
.modal-form .cancel-btn { 
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.18);
  padding: 11px 22px;
  border-radius: 8px;
  cursor: pointer;
}
.modal-form .cancel-btn:hover { background: rgba(255,255,255,.06); }

/* 提交状态提示：换行至按钮下方显示，与联系页一致 */
.modal-form .submit-status { width: 100%; flex-basis: 100%; margin-top: 12px; padding: 12px; border-radius: 4px; font-size: 14px; display: none; }
.modal-form .submit-status.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
.modal-form .submit-status.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }
.modal-form .submit-status.loading { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; display: block; }

/* 表单控件统一深色 */
.modal-form .form-group label { color: rgba(255,255,255,.85); }
.modal-form .form-group input,
.modal-form .form-group select,
.modal-form .form-group textarea { background: rgba(255,255,255,.06); color: rgba(255,255,255,.95); border:1px solid rgba(255,255,255,.18); border-radius:6px; }
.modal-form .form-group input::placeholder,
.modal-form .form-group textarea::placeholder { color: rgba(255,255,255,.6); white-space: pre-line; }

/* 内容区滚动，外层不出现小滚动条 */
.modal-content { overflow: hidden; }
.modal-content .modal-form { max-height: calc(86vh - 120px); overflow-y: auto; padding-right: 6px; }

/* 自定义滚动条更柔和 */
.modal-content .modal-form::-webkit-scrollbar { width: 8px; }
.modal-content .modal-form::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }
.modal-content .modal-form::-webkit-scrollbar-track { background: transparent; }

/* 轻微摇动提示（阻止外部点击关闭时） */
@keyframes modal-shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.modal-content.shake { animation: modal-shake .32s ease; }

/* 引导容器样式 */
.consultation-prompt {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.consultation-prompt:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(189, 151, 105, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.consultation-prompt h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgb(189 151 105);
}

.consultation-prompt p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.consultation-prompt .cta-text {
  font-size: 12px;
  color: rgb(189 151 105);
  margin-top: 8px;
  font-weight: 500;
}

/* 每日一卦页面的引导容器 */
.daily-consultation-prompt {
  grid-column: 1 / -1; /* 跨越整个网格 */
  margin-bottom: 20px;
}

/* 64卦结果页面的引导容器 */
.hex-consultation-prompt {
  margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .modal-content {
    padding: 24px 20px;
    width: 95%;
    max-height: 90vh;
  }
  
  .modal-header h3 {
    font-size: 18px;
  }
  
  .consultation-prompt {
    padding: 16px;
  }
  
  .consultation-prompt h4 {
    font-size: 14px;
  }
  
  .consultation-prompt p {
    font-size: 13px;
  }
}

/* 动画效果 */
@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-overlay.show .modal-content {
  animation: fadeInModal 0.3s ease;
}
