/* 移除手机点击蓝框和电脑端聚焦轮廓 */
.filter-item,
.card,
.detail-link,
.detail-link-item,
.filter-more-btn,
.swiper-arrow,
.lightbox-close,
.modal-close,
.about-link,
.author-info,
button,
[onclick] {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* 也可直接全局重置，但稳妥起见保留上面的针对性选择器 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #faf7f2;
  color: #4a4a4a;
  padding-bottom: 20px;
}
/* 卡片点击缩放反馈 */
.card:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* 筛选标签点击有轻微下沉效果 */
.filter-item {
  display: inline-block;
  padding: 6px 16px;
  margin-right: 10px;
  background: #f0edf4;
  color: #5e5e5e;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.filter-item:active {
  transform: scale(0.94);          /* 轻微缩小，像被轻压 */
  background: #e8e0f0;            /* 轻按变色 */
  opacity: 1;                     /* 不需要透明 */
}

.filter-item.active {
  background: #ff8da1;
  color: #fff;
  box-shadow: 0 4px 10px rgba(255,141,161,0.3);
}

/* 详情页链接点击 */
.detail-link:active {
  opacity: 0.7;
}
/* ========== 标题区域 ========== */
.slogan {
  background: #fff;box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  padding: 20px 20px 10px;
  margin-bottom: 10px;
  position: relative;
  min-height: 150px;          /* 给电脑端绝对定位预留空间 */
}

/* 主标题：图 + 宣传语，居中 */
.slogan-main {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-right: 130px;        /* 右侧留空，避免被作者信息遮挡 */
  margin-bottom: 0;
}

.slogan-img {
  height: 80px;
  width: auto;
  margin-right: 12px;
}

.slogan-main span {
  font-size: 22px;
  font-weight: bold;
  color: #333;
}

/* 右下角信息容器（电脑端绝对定位，手机端恢复文档流） */
.slogan-meta {
  position: absolute;
  right: 20px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;                   /* 控制作者行、关于链接、简介之间的间距 */
}

.author-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #eee;
}

.author-name {
  color: #333;
  font-size: 13px;
}

.about-link {
  color: #576b95;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
  font-size: 13px;
}

.author-signature {
  font-size: 13px;
  color: #999;
  text-align: right;
  margin: 0;                  /* 取消默认外边距 */
}

/* ========== 手机端适配 ========== */
@media (max-width: 640px) {
  .slogan {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: auto;         /* 取消最小高度 */
  }

  .slogan-main {
    flex-direction: column;
    padding-right: 0;
    margin-bottom: 15px;
  }

  .slogan-img {
    height: 60px;
    margin-right: 0;
    margin-bottom: 8px;
  }

  .slogan-main span {
    font-size: 20px;
  }

  /* 取消绝对定位，恢复文档流 */
  .slogan-meta {
    position: static;
    align-items: center;      /* 手机端居中 */
    gap: 6px;
  }

  .author-info {
    justify-content: center;
  }

  .author-signature {
    text-align: center;
  }
}

/* ========== 筛选区域 ========== */
.filter-area {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border-radius: 0 0 20px 20px;
  padding: 15px;
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.filter-label {
  font-size: 16px;
  color: #666;
  width: 50px;
  flex-shrink: 0;
}

.filter-scroll {
  /* 原有样式保持不变 */
  overflow-x: auto;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE 10+ */
  flex: 1;
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.filter-scroll::-webkit-scrollbar {
  display: none;                  /* Chrome/Safari */
}
.filter-item {
  display: inline-block;
  padding: 6px 16px;
  margin-right: 10px;
  background: #f0edf4;   /* 淡紫灰 */
  color: #5e5e5e;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.filter-item.active {
  background: #ff8da1;   /* 樱花粉 */
  color: #fff;
  box-shadow: 0 4px 10px rgba(255,141,161,0.3);
}

/* ========== 卡片网格（响应式） ========== */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 0 15px;
}

.card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  cursor: pointer;
}

.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee;border-radius: 16px 16px 0 0;
}

.card-info {
  padding: 8px 10px;
}

.card-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
}

.empty {
  text-align: center;
  color: #999;
  margin-top: 60px;
  display: none;
}

/* ========== 详情页样式 ========== */
.detail-container {
  background: #fff;
  min-height: 100vh;
}

.swiper-container {
  position: relative;
}

.swiper-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}

.detail-info {
  padding: 20px;
}

.detail-title {
  font-size: 22px;
  margin-bottom: 15px;
}

.detail-desc {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.detail-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.detail-link, .detail-link-item {
  font-size: 14px;
  color: #576b95;
  word-break: break-all;
  cursor: pointer;
  margin-bottom: 8px;
}

.copy-tip {
  color: #aaa;
  margin-left: 6px;
}

.not-found {
  text-align: center;
  margin-top: 150px;
  font-size: 18px;
  color: #999;
}

/* ========== 弹窗样式 ========== */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  width: 85%;
  max-width: 400px;
  padding: 30px 20px;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  color: #999;
  cursor: pointer;
}

.modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
}

.modal-intro {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin-top: 10px;
}
/* ========== 轮播箭头 ========== */
.swiper-outer {
  position: relative;
  overflow: hidden;       /* 隐藏溢出，便于箭头定位 */
}

.swiper-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  color: #555;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.2s, box-shadow 0.2s;
  z-index: 10;
  display: none;          /* 默认隐藏，电脑端再显示 */
}

.swiper-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.swiper-arrow-left {
  left: 10px;
}

.swiper-arrow-right {
  right: 10px;
}
/* 灯箱箭头定位调整 */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;        /* 比 close 按钮低，但高于图片 */
  width: 44px;
  height: 44px;
  font-size: 26px;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
}
.lightbox-arrow:hover {
  background: rgba(255,255,255,0.4);
}
.lightbox-arrow-left {
  left: 15px;
}
.lightbox-arrow-right {
  right: 15px;
}
/* 电脑端（屏幕宽度 > 768px）显示箭头 */
@media (min-width: 769px) {
  .swiper-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
@media (min-width: 769px) {
  .lightbox-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
/* 手机端继续隐藏箭头，保留滑动 */
//youyalunbo
.swiper-container {
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}
.swiper-image {
  border-radius: 0 0 20px 20px;
}
.detail-title {
  color: #333;
}
.detail-meta span {
  background: #f5f0ff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
}
//quanjudanru,buzhidaoyoumeiyouyong
body {
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

//kapian
.card-form-tag {
  background: #f5f0ff;
  color: #7c6ba0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
//formbiaoqia
.detail-form-tag {
  background: #ffecd2;
  color: #b85c3a;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  border: 1px solid #ffe0c0;
}
.detail-form-wrapper {
  background: none !important;
  padding: 0 !important;
}

/* 覆盖角色行的垂直对齐 */
#characterFilterRow {
  align-items: flex-start !important;
}

/* 角色滚动容器：横向滑动 + 隐藏滚动条 */
.char-scroll {
  position: relative;
  display: flex;
  align-items: center;
  overflow-x: auto;            /* 改为 auto，允许滑动 */
  overflow-y: visible;
  white-space: nowrap;
  scrollbar-width: none;        /* Firefox 隐藏滚动条 */
  -ms-overflow-style: none;
}
.char-scroll::-webkit-scrollbar {
  display: none;                /* Chrome/Safari 隐藏滚动条 */
}

/* 未展开时强制不换行（滑动模式） */
.char-scroll.nowrap {
  flex-wrap: nowrap;
}
/* 展开时换行 */
.char-scroll.wrap {
  flex-wrap: wrap;
  white-space: normal;
}

/* 角色标签增加下边距，换行不拥挤 */
.char-tag {
  margin-bottom: 8px;
}

/* “更多”按钮悬浮在右侧，滑动时跟着视口 */
.filter-more-btn {
  flex-shrink: 0;
  position: sticky;
  right: 0;
  z-index: 5;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  color: #576b95;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  margin-left: 4px;
  box-shadow: -4px 0 8px rgba(255,255,255,0.9);
  /* 新增这一行，强制顶部对齐 */
  align-self: flex-start;
  
  /* 移除手机点击蓝框和电脑聚焦轮廓 */
  -webkit-tap-highlight-color: transparent;
  outline: none;
  
  /* 添加点击/触摸时的轻微缩放反馈（手感轻巧） */
  transition: transform 0.1s ease;
}



/* 展开时按钮切换为绝对定位，悬浮在右上角 */

.filter-more-btn-absolute {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  z-index: 6;
  /* 保留其他外观 */
}

/* 展开时为标签容器留出右侧空白，避免被按钮遮挡 */
.char-scroll.wrap-expanded {
  padding-right: 80px;          /* 根据按钮实际宽度调整 */
}
