/* modals.css */

/* ✅ 通用气泡提示样式（顶部居中，固定宽240px） */
.toast {
  position: fixed;
  top: 72px;                  /* ✅ 顶部一些（可微调） */
  left: 50%;
  transform: translateX(-50%); /* ✅ 不再垂直居中 */
  width: 240px;               /* ✅ 固定宽度 */
  max-width: calc(100vw - 40px);
  padding: 12px 14px;
  text-align: center;

  background-color: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9300; /* 高于确认弹窗 */
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* 通用模态弹窗样式 */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);

  /* ✅ 不再依赖 display:none */
  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity var(--ui-anim-duration) ease, visibility var(--ui-anim-duration) ease;
}

.modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.modal.is-open.show {
  opacity: 1;
}

.modal-content {
  width: 90%;
  max-width: 400px;
  background-color: #2d3246;
  border-radius: 12px;
  padding: 30px 20px;
  position: relative;
  z-index: 9001;
  pointer-events: auto;

  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform var(--ui-anim-duration) ease, opacity var(--ui-anim-duration) ease;
}

.modal.is-open.show .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: transparent;
  color: #f0e6d2;
  border: none;
  font-size: 20px;
  cursor: pointer;
  z-index: 9999;
  pointer-events: auto;
}

.modal-title {
  text-align: center;
  color: #f0e6d2;
  font-size: 16px;
  margin-bottom: 20px;
}

/* 确认弹窗样式 */
.confirm-text {
  text-align: center;
  color: #f5f5f5;
  font-size: 14px;
  margin-bottom: 30px;
}

.modal-btn-group {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.modal-btn {
  padding: 8px 24px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
}

.modal-btn.cancel {
  background-color: #4a5068;
  color: #f0e6d2;
  border: none;
}

.modal-btn.confirm {
  background-color: #6b7294;
  color: #ffffff;
  border: none;
}

/* 回忆过去弹窗样式 */
.recall-wrapper {
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

.recall-slider {
  display: flex;
  transition: transform 0.3s ease;
}

.recall-item {
  width: 100%;
  flex-shrink: 0;
  padding: 10px 0;
}

.private-wish{
  text-align: center;
  padding: 20px 0;
  /* 关键：占满当前心愿卡的可用高度，并做垂直居中 */
  min-height: 320px;          /* 兜底高度：不够高时也能看出居中效果，可按需调整 */
  display: flex;
  flex-direction: column;
  justify-content: center;    /* 垂直居中 */
  align-items: center;        /* 水平居中 */
}

.lock-icon {
  width: 160px;
  height: 160px;
  margin-bottom: 10px;
}

.countdown {
  font-size: 16px;
  color: #f0e6d2;
  margin: 10px 0;
}

.switch-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(45, 50, 70, 0.8);
  color: #f0e6d2;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

.switch-btn.left { left: -18px; }
.switch-btn.right { right: -18px; }

/* 写心愿弹窗样式 */
.write-content {
  max-height: 80vh;
  overflow-y: auto;
}

.form-item { margin-bottom: 20px; }

.form-item label {
  display: block;
  font-size: 14px;
  color: #f0e6d2;
  margin-bottom: 8px;
}

.form-item textarea, .form-item input {
  width: 100%;
  padding: 10px;
  background-color: #4a5068;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  resize: none;
}

.form-item textarea::placeholder, .form-item input::placeholder { color: #999; }

.radio-group {
  display: flex;
  gap: 20px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  padding: 12px 0;
  background-color: #6b7294;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
}

/* 孔明灯遮罩样式 */
.kongming-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9400;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--ui-anim-duration) ease, visibility var(--ui-anim-duration) ease;
}

.kongming-mask.is-open {
  visibility: visible;
  pointer-events: auto;
}

.kongming-mask.is-open.show {
  opacity: 1;
}

/* 孔明灯遮罩样式 */
.kongming-mask{
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9400;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--ui-anim-duration) ease, visibility var(--ui-anim-duration) ease;
}

.kongming-mask.is-open{
  visibility: visible;
  pointer-events: auto;
}

.kongming-mask.is-open.show{
  opacity: 1;
}

/* ✅ 全屏展示：不拉伸，等比裁切（cover） */
.kongming-mask img{
  width: 100vw;
  height: 100vh;
  object-fit: cover;      /* 不变形，铺满屏幕，可能会裁切 */
  object-position: center;
  display: block;
}

/* 弹窗层级 */
.write-modal { z-index: 9100; }
.recall-modal { z-index: 9100; }

.confirm-modal { z-index: 9200; }
.confirm-modal .modal-content { z-index: 9201; }

/* =========================
   回忆过去：评论输入框样式
   ========================= */

.comment-form{
  margin-top: 12px;
  border-radius: 10px;
}

.comment-input{
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;

  background: rgba(74, 80, 104, 0.65);
  color: #ffffff;
  border: 1px solid rgba(240, 230, 210, 0.18);
  border-radius: 8px;

  font-size: 14px;
  line-height: 1.5;
  resize: none;
}

.comment-input::placeholder{
  color: rgba(255, 255, 255, 0.55);
}

.submit-comment-btn{
  margin-top: 10px;
  width: 100%;
  padding: 10px 0;

  background: rgba(107, 114, 148, 0.95);
  color: #ffffff;
  border: 1px solid rgba(240, 230, 210, 0.22);
  border-radius: 8px;

  font-size: 14px;
  cursor: pointer;
}

.submit-comment-btn:active{
  transform: scale(0.99);
  opacity: 0.95;
}
.private-wish-tip{
padding: 20px;
    line-height: 1.4;
}
/* 是否公开：胶囊按钮风格 */
.radio-group.radio-pill{
  display: flex;
  gap: 12px;
}

/* 隐藏原生radio */
.radio-group.radio-pill .radio-item input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* label本身做点击容器 */
.radio-group.radio-pill .radio-item{
  position: relative;
  margin: 0;
}

/* 可视化按钮 */
.radio-group.radio-pill .radio-ui{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 16px;
  min-width: 96px;

  border-radius: 999px;
  background: rgba(74, 80, 104, 0.55);
  border: 1px solid rgba(240, 230, 210, 0.22);

  color: rgba(240, 230, 210, 0.9);
  font-size: 14px;

  cursor: pointer;
  user-select: none;

  transition: background var(--ui-anim-duration) ease,
              border-color var(--ui-anim-duration) ease,
              transform var(--ui-anim-duration) ease;
}

/* 选中态高亮 */
.radio-group.radio-pill .radio-item input:checked + .radio-ui{
  background: rgba(240, 230, 210, 0.12);
  border-color: rgba(240, 230, 210, 0.75);
  color: #fff;
  transform: scale(1.02);
}

/* 按压反馈 */
.radio-group.radio-pill .radio-ui:active{
  transform: scale(0.98);
}

/* 回忆过去：暂无数据居中 */
.recall-empty{
  min-height: 200px;          /* 你也可以改成 260/300，看你弹窗高度 */
  display: flex;
  align-items: center;        /* 垂直居中 */
  justify-content: center;    /* 水平居中 */
  text-align: center;
  color: #999;
  font-size: 14px;
}