/* ====================================
   萌主题 report.css — 评论举报按钮 + 二次元弹窗
   配色与主题一致：冰蓝 #5eb3d9
   ==================================== */

/* ── 评论项内的小举报按钮 ── */
.moe-comment-report-btn {
  display: inline-flex; align-items: center; gap: 3px;
  background: none; border: none; padding: 0;
  font-size: 12px; color: var(--c-text-3);
  cursor: pointer; transition: color var(--trans);
  font-family: inherit;
  line-height: 1;
}
.moe-comment-report-btn svg {
  flex-shrink: 0;
  transition: transform var(--trans);
}
.moe-comment-report-btn:hover {
  color: var(--c-danger);
}
.moe-comment-report-btn:hover svg {
  transform: rotate(-12deg) scale(1.15);
}
.moe-comment-report-btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ====================================
   弹窗（Modal）
   ==================================== */

.moe-report-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(15, 26, 36, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: moe-report-fade 0.22s ease;
}
.moe-report-modal.is-open { display: flex; }

@keyframes moe-report-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.moe-report-modal__inner {
  position: relative;
  width: 100%; max-width: 460px;
  max-height: 90vh; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
  border-radius: 20px;
  box-shadow: 0 16px 60px rgba(94, 179, 217, 0.4),
              0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(94, 179, 217, 0.25);
  display: flex; flex-direction: column;
  animation: moe-report-pop 0.32s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes moe-report-pop {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 装饰性顶部 — 雪花/星星 */
.moe-report-modal__inner::before {
  content: '❄ ❅ ❄';
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  color: rgba(94, 179, 217, 0.35);
  font-size: 12px; letter-spacing: 8px;
  pointer-events: none;
}

/* 标题 */
.moe-report-modal__head {
  padding: 28px 24px 16px;
  text-align: center;
  border-bottom: 1px dashed rgba(94, 179, 217, 0.22);
}
.moe-report-modal__title {
  font-size: 18px; font-weight: 700;
  color: var(--c-primary-h);
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
}
.moe-report-modal__title::before {
  content: '🚩';
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(224, 92, 92, 0.3));
}
.moe-report-modal__subtitle {
  font-size: 12px; color: var(--c-text-3);
  margin-top: 6px;
}

/* 关闭按钮 */
.moe-report-modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none; background: rgba(94, 179, 217, 0.1);
  color: var(--c-text-2);
  border-radius: 50%;
  font-size: 18px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans), color var(--trans), transform var(--trans);
}
.moe-report-modal__close:hover {
  background: var(--c-danger);
  color: #fff;
  transform: rotate(90deg);
}

/* 主体（可滚动） */
.moe-report-modal__body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}

/* 分类网格 — 2列 */
.moe-report-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.moe-report-cat {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  background: rgba(94, 179, 217, 0.06);
  border: 1.5px solid rgba(94, 179, 217, 0.18);
  border-radius: 12px;
  font-size: 13px; color: var(--c-text-2);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.moe-report-cat:hover {
  background: rgba(94, 179, 217, 0.13);
  border-color: var(--c-primary);
  color: var(--c-text);
  transform: translateY(-1px);
}
.moe-report-cat input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--c-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.moe-report-cat--checked {
  background: linear-gradient(180deg, rgba(94,179,217,0.18) 0%, rgba(94,179,217,0.08) 100%);
  border-color: var(--c-primary);
  color: var(--c-primary-h);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(94,179,217,0.18);
}

/* 文字说明 */
.moe-report-text-wrap {
  margin-bottom: 14px;
}
.moe-report-text-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--c-text-2);
  margin-bottom: 6px;
}
.moe-report-text-label .required {
  color: var(--c-danger); font-weight: 700;
}
.moe-report-text {
  width: 100%;
  border: 1.5px solid rgba(94, 179, 217, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px; line-height: 1.6;
  background: #f7fcff;
  color: var(--c-text);
  resize: vertical;
  min-height: 70px;
  max-height: 180px;
  font-family: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}
.moe-report-text:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(94, 179, 217, 0.18);
  background: #fff;
}
.moe-report-text-counter {
  text-align: right;
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 4px;
}

/* 内嵌验证码 */
.moe-report-captcha {
  margin-bottom: 14px;
  padding: 12px;
  border: 1.5px dashed rgba(94, 179, 217, 0.3);
  border-radius: 12px;
  background: rgba(94, 179, 217, 0.04);
}
.moe-report-captcha__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.moe-report-captcha__title {
  font-size: 12px; color: var(--c-text-2); font-weight: 600;
}
.moe-report-captcha__pass {
  font-size: 12px; color: #3aa856; font-weight: 600;
}
.moe-report-captcha__load {
  width: 100%;
  border: none; padding: 8px 0;
  background: linear-gradient(135deg, #5eb3d9 0%, #8ed3ed 100%);
  color: #fff; border-radius: 100px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 8px rgba(94, 179, 217, 0.3);
  transition: opacity 0.2s, transform 0.2s;
}
.moe-report-captcha__load:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.moe-report-captcha__load:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.moe-report-captcha__question {
  font-size: 12px; text-align: center;
  margin: 8px 0 6px;
  color: var(--c-text);
}
.moe-report-captcha__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px; margin-bottom: 8px;
}
.moe-report-captcha__options .moe-captcha-option {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(94, 179, 217, 0.2);
  border-radius: 8px;
  background: #f3faff;
  cursor: pointer; overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.moe-report-captcha__options .moe-captcha-option img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
}
.moe-report-captcha__options .moe-captcha-option:hover {
  border-color: #8ed3ed; transform: scale(1.04);
}
.moe-report-captcha__options .moe-captcha-option.selected {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(94, 179, 217, 0.3);
}
.moe-report-captcha__verify {
  width: 100%;
  border: none; padding: 7px 0;
  background: var(--c-primary);
  color: #fff; border-radius: 100px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.moe-report-captcha__verify:disabled { opacity: 0.6; cursor: not-allowed; }

/* 底部按钮 */
.moe-report-modal__foot {
  padding: 14px 22px 22px;
  display: flex; gap: 10px;
  border-top: 1px solid rgba(94, 179, 217, 0.12);
  background: rgba(94, 179, 217, 0.03);
}
.moe-report-btn {
  flex: 1;
  padding: 10px 0;
  border: none; border-radius: 100px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.moe-report-btn--cancel {
  background: rgba(94, 179, 217, 0.08);
  color: var(--c-text-2);
  border: 1.5px solid rgba(94, 179, 217, 0.18);
}
.moe-report-btn--cancel:hover {
  background: rgba(94, 179, 217, 0.15);
  color: var(--c-text);
}
.moe-report-btn--submit {
  background: linear-gradient(135deg, #5eb3d9 0%, #8ed3ed 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(94, 179, 217, 0.4);
}
.moe-report-btn--submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(94, 179, 217, 0.5);
}
.moe-report-btn--submit:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
  box-shadow: 0 2px 6px rgba(94, 179, 217, 0.2);
}

/* 错误/成功提示 */
.moe-report-msg {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}
.moe-report-msg.is-show { display: block; }
.moe-report-msg--err {
  background: rgba(224, 92, 92, 0.1);
  color: var(--c-danger);
  border: 1px solid rgba(224, 92, 92, 0.25);
}
.moe-report-msg--ok {
  background: rgba(58, 168, 130, 0.1);
  color: #3aa882;
  border: 1px solid rgba(58, 168, 130, 0.25);
}

/* 暗色适配 */
[data-theme="dark"] .moe-report-modal__inner {
  background: linear-gradient(180deg, #1a2838 0%, #16202e 100%);
  border-color: rgba(94, 179, 217, 0.22);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .moe-report-modal__title {
  color: #8ecfea;
}
[data-theme="dark"] .moe-report-modal__head {
  border-bottom-color: rgba(94, 179, 217, 0.18);
}
[data-theme="dark"] .moe-report-cat {
  background: rgba(94, 179, 217, 0.08);
  border-color: rgba(94, 179, 217, 0.22);
  color: var(--c-text-2);
}
[data-theme="dark"] .moe-report-cat:hover {
  background: rgba(94, 179, 217, 0.18);
}
[data-theme="dark"] .moe-report-cat--checked {
  background: linear-gradient(180deg, rgba(94,179,217,0.25) 0%, rgba(94,179,217,0.12) 100%);
  color: #8ecfea;
}
[data-theme="dark"] .moe-report-text {
  background: rgba(255, 255, 255, 0.03);
  color: var(--c-text);
  border-color: rgba(94, 179, 217, 0.22);
}
[data-theme="dark"] .moe-report-text:focus {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .moe-report-modal__foot {
  background: rgba(0, 0, 0, 0.15);
  border-top-color: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .moe-report-btn--cancel {
  background: rgba(255, 255, 255, 0.05);
  color: var(--c-text-2);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .moe-report-captcha__options .moe-captcha-option {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(94, 179, 217, 0.22);
}

/* 移动端 */
@media (max-width: 480px) {
  .moe-report-modal { padding: 12px; align-items: flex-end; }
  .moe-report-modal__inner {
    max-height: 80vh;
    animation: moe-report-slide 0.32s cubic-bezier(.34, 1.56, .64, 1);
  }
  @keyframes moe-report-slide {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .moe-report-cats { grid-template-columns: 1fr; }
}

/* 阻止背景滚动 */
body.moe-modal-open { overflow: hidden; }
