/* 模态框整体样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
   overflow: hidden;
       backdrop-filter: blur(6px);
}

.modal.active {
  display: flex;
}

/* 模态框内容外层容器 */
.modal-content-wrapper {
position: relative;
    width: 100%;
    max-width: 800px;
    min-height: 200px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
    margin-top: 3rem;
    background-color: rgb(255 255 255 / 44%);
    -webkit-border-radius: 21px;
}

/* 模态框头部 */
.modal-header {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

/* 关闭按钮 */
.modal-close-btn {
background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: white;
}

.modal-close-btn:hover {
  color: #34495e;
  background-color: #e8e8e8;
}

/* 模态框主体内容容器 */
#modal-content {

  padding: 24px;

}

/* 模态框卡片信息 */
.modal-item {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8.5px);
    -webkit-backdrop-filter: blur(8.5px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
    -webkit-border-radius: 21px;
    color: rgba(255, 255, 255, 0.898);
}

.modal-item-id {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  z-index: 10;
}

.modal-item-top {
  display: flex;
  align-items: flex-start;
  padding: 24px;
}

.modal-item-image {
  flex: 0 0 30%;
  max-width: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-right: 24px;
}

.modal-item-image .modal-image {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.modal-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

}

.modal-item-info .modal-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #212529;
  text-align: center;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #6c757d;
  font-size: 0.9rem;
  
}

.user-avatar-m {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 8px;
  background-color: #f0f0f0;
}

.item-tags-m {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  justify-content: center;
}

.tag-badge {
  padding: 4px 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-size: 1.0rem;
  color: #495057;
}

.modal-item-bottom {
padding: 24px;
    border-top: 1px solid #f0f0f0;
    line-height: 1.6;
    color: #332727;
    backdrop-filter: blur(8.5px);
    background-color: rgb(123 195 188 / 43%);
}



/* 评论表单 */
.comment-form {
  margin-bottom: 24px;
}

.comment-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
  min-height: 80px;
  background-color: #fff;
}

.comment-submit-btn {
  display: block;
  margin-top: 12px;
  padding: 10px 24px;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: fit-content;
}

.comment-submit-btn:hover {
  background-color: #0056b3;
}


.comment-loading {
  padding: 24px;
  text-align: center;
  color: #6c757d;
}



.comment-header {
    margin-bottom: 6px;
    font-size: 1.2rem;
    color: #000000;
    display: flex;
    align-items: center;
}

.comment-author {
  font-weight: 500;
  color: #212529;
}

.comment-time {
    font-size: 0.9rem;
    margin-left: 10px;
}

.comment-content {
  line-height: 1.5;
  color: #000000;
}

.empty-comment {
  padding: 24px;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}


/* assets/css/modal.css */
.modal-comment-list {
  padding: 20px;
  border-top: 1px solid #e5e7eb; /* 分隔线 */
}

.inline-comment-form {
  /* 表单样式 */
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}





/* 响应式适配 */
@media (max-width: 768px) {
  .modal-content-wrapper {
    max-width: 90%;
    border-radius: 8px;
  }

  .modal-item-top {
    flex-direction: column;
    align-items: center;
    padding: 16px;
  }

  .modal-item-image {
    max-width: 100%;
    padding-right: 0;
    margin-bottom: 16px;
  }

  .modal-item-info {
    padding-left: 0;
  }
}


/* assets/css/modal.css */
.modal-comment-container {
    margin-top: 20px;
}

.comment-item {
      margin-bottom: 15px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    border: 0px solid rgba(255, 255, 255, 0.18);
    -webkit-box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
    -webkit-border-radius: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.reply-depth-1 { margin-left: 30px; }
.reply-depth-2 { margin-left: 60px; }
.reply-depth-3 { margin-left: 90px; }
.reply-depth-4 { margin-left: 120px; }
.reply-depth-5 { margin-left: 150px; }
.reply-depth-6+ { margin-left: 180px; }



.reply-form {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    border-radius: 15px;
}

img.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: #f0f0f0;
}



.modal-description {
    font-size: 16px;
}

/* 图片放大查看器样式 */
.image-zoom-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000; /* 确保在最顶层 */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-zoom-container.zoom-hidden {
    opacity: 0;
    visibility: hidden;
}

.image-zoom-container:not(.zoom-hidden) {
    opacity: 1;
    visibility: visible;
}

.image-zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-zoom-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.zoom-transition {
    transition: all 0.3s ease;
}

.image-zoom-container:not(.zoom-hidden) .image-zoom-content {
    transform: scale(1);
}

.image-zoom-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.image-zoom-container:not(.zoom-hidden) .image-zoom-image {
    transform: scale(1);
}

.image-zoom-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease;
}

.image-zoom-close:hover {
    transform: scale(1.1);
    color: #ddd;
}

/* 让模态框中的图片显示为可点击状态 */
.modal-item-image {
    cursor: zoom-in;
}

/* 模态框样式（确保图片查看器可以在其上方） */
#item-modal {
    z-index: 100; /* 调整为适当的值，低于图片查看器 */
}



/* 回复按钮 */
/* From www.lingdaima.com */
.reply-btn,.huifu-btn {
 padding: 0.9em 2em;
 font-size: 12px;
 text-transform: uppercase;
 letter-spacing: 2.5px;
 font-weight: 500;
 color: #000;
 background-color: #fff;
 border: none;
 border-radius: 45px;
 -webkit-box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
 box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
 -webkit-transition: all 0.3s ease 0s;
 transition: all 0.3s ease 0s;
 cursor: pointer;
 outline: none;
 margin-top: 1rem;
}

.reply-btn:hover {
 background-color: #2EE59D;
 -webkit-box-shadow: 0px 15px 20px rgba(46, 229, 157, 0.4);
 box-shadow: 0px 15px 20px rgba(46, 229, 157, 0.4);
 color: #fff;
 -webkit-transform: translateY(-7px);
 -ms-transform: translateY(-7px);
 transform: translateY(-7px);
}

.reply-btn:active {
 -webkit-transform: translateY(-1px);
     -ms-transform: translateY(-1px);
         transform: translateY(-1px);
}

/* 隐藏滚动条 */
.modal-content-wrapper::-webkit-scrollbar {
    display: none;
}


