/* ======= 主题变量 / Reset ======= */
:root{
  --ink:#1e1b16; --paper:#f8f5f1; --tea:#c7b59d; --gold:#b08a49; --accent:#7e5c3a; --muted:#6b6b6b;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:ui-serif,"Songti SC","Noto Serif CJK SC",serif;
  color:var(--ink);
  background:var(--paper) url('../assets/paper-texture.png') repeat;
  line-height:1.5;
}

/* ======= 工具类 ======= */
.hidden{display:none!important}
.flex{display:flex}
.flex-1{flex:1}
.gap-8{gap:8px}
.mt-10{margin-top:10px}
.mt-15{margin-top:15px}
.w-100{width:100%}
.text-center{text-align:center}
.loading-spinner{
  display:inline-block;
  width:1em;height:1em;
  margin-right:.5em;
  border-radius:50%;
  border:.18em solid rgba(0,0,0,.15);
  border-top-color: currentColor;
  animation: spin 1s linear infinite;
  vertical-align:-0.125em;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ======= 站点头 - 紧缩版 ======= */
.site-header{
  position:sticky;top:0;z-index:10;
  background:linear-gradient(180deg,rgba(248,245,241,.95),rgba(248,245,241,.85));
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  border-bottom:1px solid rgba(0,0,0,.06);
  padding:.5rem .75rem;
  display:flex;justify-content:space-between;align-items:center
}
.brand{display:flex;align-items:center;gap:.5rem}
.brand-link{display:flex;align-items:center;gap:.5rem;text-decoration:none;color:inherit;border-radius:6px;padding:3px 6px;margin:-3px -6px;transition:.3s}
.brand-link:hover{background:rgba(138,107,61,.1);transform:translateY(-1px)}
.brand .seal{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--gold);color:#fff;font-weight:700;transition:.3s;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}
.brand-link:hover .seal{transform:scale(1.05);box-shadow:0 4px 12px rgba(138,107,61,.3)}
.brand h1{font-size:1.1rem;margin:0}
.nav{display:flex;gap:.4rem;flex-wrap:wrap}
.nav a{color:var(--ink);text-decoration:none;padding:.25rem .5rem;border-radius:.4rem;font-size:.85rem;white-space:nowrap}
.nav a:hover{background:rgba(0,0,0,.06)}

/* ======= 通用区块 - 紧缩版 ======= */
.section{padding:1.25rem .75rem;max-width:1100px;margin:0 auto}
.section-title{display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}
.section-title span{
  display:inline-block;padding:.4rem 1.25rem;border:1px solid var(--gold);border-radius:999px;color:var(--gold);
  background:linear-gradient(180deg,#fff,#f8f5f1);
  box-shadow:0 3px 8px rgba(138,107,61,.15);
  font-size:.9rem
}

/* ======= 首页：书阁 - 紧缩版 ======= */
.bookwall{
  position:relative;border:1px solid rgba(138,107,61,.15);border-radius:.8rem;padding:1.5rem .75rem;margin:1.5rem auto;
  background:var(--bookwall-bg, url('../assets/bg.jpg')) center/cover no-repeat;
  box-shadow:0 6px 20px rgba(0,0,0,.08)
}
.bookwall::before{content:'';position:absolute;inset:0;border-radius:.8rem;z-index:0;background:linear-gradient(135deg,rgba(248,245,241,.9),rgba(240,233,223,.85))}
.bookwall>*{position:relative;z-index:1}

/* ======= 书本样式 - 修复版 ======= */
.shelves{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:18px;padding:15px;max-width:1400px;margin:0 auto}

/* 书本容器 - 修复背景和头像显示 */
.book{
  position:relative;aspect-ratio:3/4;min-height:180px;border-radius:10px;overflow:hidden;cursor:pointer;
  /* 移除冲突的背景设置，使用book-cover代替 */
  border:1px solid rgba(212,181,125,.3);
  box-shadow:0 6px 20px rgba(0,0,0,.12),0 2px 6px rgba(138,107,61,.08),inset 0 1px 0 rgba(255,255,255,.8);
  transition:all .3s cubic-bezier(.175,.885,.32,1.275);
  background:#f8f5f1; /* 添加默认背景色 */
}

/* 书本封面背景 */
.book-cover {
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  z-index:1;
  opacity:0.8;
}

.book::before{content:'';position:absolute;inset:0;background:url('../assets/paper-texture.png') center/cover;mix-blend-mode:multiply;opacity:.15;pointer-events:none;z-index:2}

/* 书本头像 - 修复显示问题 - 重要修复 */
.book .avatar{
  position:absolute;right:8px;top:8px;width:55px;height:55px;border-radius:50%;
  /* 移除var(--avatar)变量，使用内联样式设置的背景图片 */
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  background-color:#ddd; /* 默认背景色 */
  border:2px solid rgba(255,255,255,.8);
  box-shadow:0 3px 8px rgba(0,0,0,.15),0 0 0 1px rgba(138,107,61,.3);pointer-events:none;z-index:3;transition:.3s
}

.book .spine{position:absolute;left:0;top:20%;bottom:20%;width:5px;display:block;background:linear-gradient(180deg,transparent,rgba(138,107,61,.6) 20%,rgba(138,107,61,.8) 50%,rgba(138,107,61,.6) 80%,transparent);border-radius:0 2px 2px 0;box-shadow:2px 0 6px rgba(0,0,0,.15)}

/* 书本标题 */
.book::after{
  content:attr(data-name);position:absolute;right:6px;bottom:8px;padding:6px 4px;writing-mode:vertical-rl;text-orientation:upright;letter-spacing:.1em;
  font:700 12px/1.3 "Noto Serif SC","Songti SC","SimSun",serif;color:#2a2111;
  background:linear-gradient(180deg,#f5e7c6,#ecd9a8);border:1px solid rgba(124,90,38,.25);border-radius:4px;
  box-shadow:0 1px 4px rgba(0,0,0,.1);max-height:calc(100% - 90px);overflow:hidden;pointer-events:none;z-index:2;transition:.3s
}

/* 书本悬停效果 - 修复版 */
.book:hover{transform:translateY(-6px) scale(1.02);box-shadow:0 15px 30px rgba(0,0,0,.2),0 6px 12px rgba(138,107,61,.12),inset 0 1px 0 rgba(255,255,255,.9)}
.book:hover::after{background:linear-gradient(180deg,#f8edd1,#f0e0b5);transform:translateX(-2px)}
.book:hover .avatar{transform:scale(1.05);box-shadow:0 4px 15px rgba(0,0,0,.25),0 0 0 2px rgba(212,181,125,.5)}

.legend{margin-top:.5rem;text-align:center;color:var(--muted);font-size:.85rem}

/* ======= 书阁滚动样式 - 紧缩版 ======= */
.bookwall-scroll-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 220px;
  margin: 0.2rem 0;
  padding: 4px 0;
}

.bookwall-scroll-wrapper {
  display: flex;
  gap: 18px;
  height: 100%;
  animation: scrollBooks 120s linear infinite;
  width: max-content;
  align-items: center;
  transition: margin-left 0.3s ease; /* 搜索时居中需要的过渡效果 */
}

.bookwall-scroll-wrapper:hover {
  animation-play-state: paused;
}

@keyframes scrollBooks {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.bookwall-scroll-wrapper .book {
  flex-shrink: 0;
  width: 120px;
  height: 160px;
  min-height: auto;
  margin: 0;
  display: flex !important;
}

/* 搜索时隐藏的书本 */
.book[style*="display: none"] {
    display: none !important;
}

/* ======= 搜索框样式 - 紧缩版 ======= */
.bookwall-search {
  max-width: 350px;
  margin: 0 auto .75rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 搜索输入框和按钮的容器 */
.search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 10px 42px 10px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: .9rem;
  transition: all 0.3s;
  box-shadow: 0 3px 8px rgba(138, 107, 61, 0.08);
}

/* 搜索框获得焦点时的样式 */
.search-input:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(138, 107, 61, 0.2);
    background: white;
    border-color: var(--accent);
}

/* 搜索按钮位置调整 */
.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-results:hover {
    color: var(--gold);
}

.search-results {
  cursor: pointer;
  transition: color 0.3s;
  text-align: center;
  width: 100%;
  margin-top: 4px;
  font-weight: 600;
  color: var(--accent);
  font-size: .85rem;
}

/* 确保高亮书本在最上层 - 修复搜索功能 */
.book.highlighted {
    transform: translateY(-8px) scale(1.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(138, 107, 61, 0.25);
    z-index: 10;
    position: relative;
}

.book.highlighted::after {
    background: linear-gradient(180deg, #f8edd1, #f0e0b5);
    color: var(--accent);
    font-weight: 800;
}

/* 重置按钮位置调整 */
.search-btn.reset-btn {
  right: 42px;
  background: #6c757d;
}

.search-btn.reset-btn:hover {
  background: #5a6268;
}


/* ======= 书籍弹窗样式优化版 ======= */

.modal[hidden] { display: none; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-card.bookviewer {
    position: relative;
    z-index: 1;
    width: min(900px, 95vw);
    height: min(600px, 85vh);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* 书籍容器 */
.book-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    perspective: 2000px;
}

/* 书籍主体 */
.book-spread {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 书籍页面通用样式 */
.book-page {
    position: relative;
    background: #fefcf6;
    border: 1px solid rgba(176, 138, 73, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

/* 左页 - 图片页面 */
.book-page.left {
    flex: 0 0 45%;
    margin-right: -1px;
    border-radius: 12px 4px 4px 12px;
    background: linear-gradient(135deg, #f9f6f0, #f1e9dc);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* 图片容器 - 优化版 */
.image-container {
    position: relative;
    width: calc(100% - 40px);
    height: 0;
    padding-bottom: 133.33%;
    margin: 20px auto;
    background: #f5f0e6;
    border: 1px solid rgba(176, 138, 73, 0.2);
    border-radius: 4px;
    box-shadow: 
        inset 0 0 8px rgba(0, 0, 0, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.image-content {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 2px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 为图片添加优雅的遮罩效果 */
.image-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        transparent 15%,
        transparent 85%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

/* 右页 - 文字页面 */
.book-page.right {
    flex: 1;
    margin-left: -1px;
    border-radius: 4px 12px 12px 4px;
    background: linear-gradient(135deg, #fbf8f2, #f3ecdf);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* 装饰性书页纹理 */
.book-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.03"><rect width="100" height="100" fill="none" stroke="%238a6b3d" stroke-width="1"/></svg>'),
        linear-gradient(90deg, transparent 98%, rgba(138, 107, 61, 0.1) 100%);
    pointer-events: none;
}

/* 添加书籍内页纹理到左页 */
.book-page.left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.02"><path d="M0 0 L100 0 L100 100 L0 100 Z" fill="none" stroke="%238a6b3d" stroke-width="0.5"/></svg>'),
        linear-gradient(45deg, transparent 49%, rgba(138, 107, 61, 0.03) 50%, transparent 51%);
    background-size: 20px 20px, 10px 10px;
    pointer-events: none;
}

/* 右页内容样式 */
.page-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(176, 138, 73, 0.2);
}

.member-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #b08a49;
    box-shadow: 0 4px 15px rgba(176, 138, 73, 0.3);
    background-size: cover;
    background-position: center;
    background-color: #f0e9df; /* 默认背景色 */
}

.member-info h2 {
    margin: 0 0 5px 0;
    font: 600 1.5rem/1.2 "Noto Serif SC", "Songti SC", serif;
    color: #2a2111;
    letter-spacing: 0.05em;
}

.member-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #b08a49, #8a6b3d);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 正文内容 */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.member-bio {
    white-space: pre-wrap;
    font: 500 0.95rem/1.7 "Noto Serif SC", "Songti SC", serif;
    color: #3a3325;
    text-align: justify;
    margin: 0;
    
    /* 添加行间距背景线 */
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 25px,
        rgba(138, 107, 61, 0.08) 25px,
        rgba(138, 107, 61, 0.08) 26px
    );
    background-size: 100% 26px;
    background-position: 0 1em;
    padding-bottom: 1em;
}

/* 翻页控制 */
.page-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.page-btn {
    padding: 10px 20px;
    border: 2px solid #b08a49;
    background: rgba(248, 245, 241, 0.9);
    color: #8a6b3d;
    border-radius: 25px;
    font: 600 0.9rem "Noto Serif SC", "Songti SC", serif;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.page-btn:hover:not(:disabled) {
    background: #b08a49;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(176, 138, 73, 0.3);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ccc;
    color: #999;
}

/* 关闭按钮 */
.close-book {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(248, 245, 241, 0.9);
    border-radius: 50%;
    font-size: 20px;
    color: #8a6b3d;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.close-book:hover {
    background: #b08a49;
    color: white;
    transform: scale(1.1);
}

/* 书脊效果 */
.book-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 12px;
    background: linear-gradient(
        90deg,
        rgba(138, 107, 61, 0.8),
        rgba(176, 138, 73, 0.9),
        rgba(138, 107, 61, 0.8)
    );
    transform: translateX(-50%);
    z-index: -1;
    border-radius: 2px;
    box-shadow: 
        inset -2px 0 4px rgba(0, 0, 0, 0.3),
        inset 2px 0 4px rgba(255, 255, 255, 0.2);
}
/* 提高弹窗层级，压过页面其它浮层 */
#memberModal { z-index: 9999; }
#memberModal .modal-card.bookviewer { z-index: 10000; }
#memberModal .modal-backdrop { z-index: 9999; }

/* 弹窗打开时，禁用宣传片提示层的点击并隐去 */
body.modal-open .section.promo .mobile-prompt-overlay{
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
/* 翻页动画 */
.book-spread.turning {
    transform: rotateY(-5deg);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === 手机端弹窗：双页上下堆叠紧缩版 === */
@media (max-width: 768px){
  #memberModal .modal-card.bookviewer{
    width: 96vw; height: 86vh;
  }
  #memberModal .book-spread{
    flex-direction: column;
    gap: 8px;
  }
  /* 图片页改成上半屏，比例 4:5，更接近竖图 */
  #memberModal .book-page.left{
    display: block;
    flex: 0 0 auto;
    height: 38vh;
    border-radius: 10px;
    padding: 0;
  }
  #memberModal .image-container{
    width: 100%;
    margin: 0;
    height: auto;
    padding-bottom: 125%; /* 4:5 竖图比例 */
    border-radius: 6px;
  }

  /* 文字页占下半屏，自带滚动 */
  #memberModal .book-page.right{
    flex: 1; min-height: 0;
    padding: 14px;
    border-radius: 10px;
    display: flex; flex-direction: column;
  }
  #memberModal .page-header{
    gap: 10px; margin: 0 0 10px; padding: 8px 0;
    border-bottom: 1px solid rgba(176,138,73,.25);
  }
  #memberModal .member-avatar{ width: 52px; height: 52px; border-width: 2px; }
  #memberModal .member-info h2{ font-size: 1.1rem; margin: 0; }
  #memberModal .page-content{
    flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch;
  }
  #memberModal .member-bio{ font-size: .92rem; line-height: 1.55; background-size: 100% 24px; }

  #memberModal .page-controls{
    position: sticky; bottom: 8px; left: auto; right: 8px;
    transform: none; gap: 8px; justify-content: flex-end;
  }
  #memberModal .page-btn{ padding: 8px 12px; font-size: .85rem; border-width: 1.5px; }
  #memberModal .close-book{ top: 8px; right: 8px; width: 36px; height: 36px; }
}

@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }
    
    .book-page.right {
        padding: 15px;
    }
    
    .image-container {
        width: calc(100% - 20px);
        margin: 10px auto;
    }
    
    .member-info h2 {
        font-size: 1.3rem;
    }
    
    .member-bio {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .page-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* 滚动条样式 */
.page-content::-webkit-scrollbar {
    width: 6px;
}

.page-content::-webkit-scrollbar-track {
    background: rgba(138, 107, 61, 0.1);
    border-radius: 3px;
}

.page-content::-webkit-scrollbar-thumb {
    background: rgba(138, 107, 61, 0.3);
    border-radius: 3px;
}

.page-content::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 107, 61, 0.5);
}



/* ======= 首页：宣传片 - 紧缩版 ======= */
.section.promo{
  background:linear-gradient(180deg,#f8f5f1,#f0e9df);border-radius:.8rem;margin:1.5rem auto;padding:1.5rem .75rem;border:1px solid rgba(138,107,61,.1)
}
.section.promo .video-wrap{
  width:100%;max-width:800px;margin:0 auto;padding:15px;background:#2a2111;border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.2);position:relative
}
.section.promo .douyin-box{width:100%;background:#000;border-radius:6px;overflow:hidden;position:relative}
.section.promo .douyin-box::before{content:"";display:block;padding-top:60%}
.section.promo .douyin-box iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.promo-nav{display:flex;justify-content:center;gap:6px;margin:15px 0 0;flex-wrap:wrap}
.promo-nav .page-btn{
  width:38px;height:38px;border:none;border-radius:50%;
  background:linear-gradient(135deg,#8a6b3d,#6d4f28);color:#f8f5f1;font:600 14px/1 ui-serif;cursor:pointer;transition:.3s;
  box-shadow:0 3px 8px rgba(138,107,61,.25);display:flex;align-items:center;justify-content:center
}
.promo-nav .page-btn.active{transform:scale(1.1);box-shadow:0 4px 15px rgba(138,107,61,.4);background:linear-gradient(135deg,#d4b57d,#b08a49)}

/* ======= 攻略卡片 - 紧缩版 ======= */
.guide-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px}
.guide-card{background:linear-gradient(180deg,#fff,#faf7f2);border:1px solid rgba(0,0,0,.06);border-radius:.8rem;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 4px 10px rgba(0,0,0,.05)}
.guide-card img{width:100%;height:120px;object-fit:cover;display:block}
.gc-body{padding:.6rem}
.gc-body h3{margin:.2rem 0 .2rem;font-size:.95rem}
.gc-body p{color:#3d3d3d;min-height:2.6em;font-size:.85rem;line-height:1.4}
.gc-body .btn{padding:.4rem .8rem;font-size:.8rem;border-radius:.4rem}

/* ======= 空状态样式 ======= */
.empty{text-align:center;color:var(--muted);padding:1.5rem;font-size:.9rem}
.empty a{color:var(--gold);text-decoration:none}
.empty a:hover{text-decoration:underline}

/* ======= 按钮系统 - 紧缩版 ======= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:6px;
  border:none;
  cursor:pointer;
  text-decoration:none;
  font-size:13px;
  transition:all 0.2s ease;
  text-align:center;
  background:#333;
  color:#fff;
}

.btn:hover{
  filter:brightness(.95);
  transform:translateY(-1px);
}

.btn.alt{
  background:var(--gold);
  color:#fff;
}

/* ======= 响应式设计 - 手机端优化 ======= */
@media (max-width:1200px){
  .shelves{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:16px}
}

@media (max-width:768px){
  /* 通用调整 */
  .section{padding:1rem .5rem}
  .section-title{margin-bottom:.6rem}
  .section-title span{font-size:.85rem;padding:.3rem 1rem}
  
  /* 头部导航 */
  .site-header{padding:.4rem .5rem}
  .brand h1{font-size:1rem}
  .brand .seal{width:28px;height:28px}
  .nav{gap:.3rem}
  .nav a{font-size:.8rem;padding:.2rem .4rem}
  
  /* 书阁调整 - 可手动修改尺寸 */
  .bookwall{padding:1rem .5rem;margin:1rem auto;border-radius:.6rem}
  .shelves{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:12px;padding:12px}
  .book{min-height:150px;border-radius:8px}
  .book .avatar{width:45px;height:45px;right:6px;top:6px} /* 头像尺寸可手动调整 */
  .book::after{font-size:10px;padding:4px 3px;right:4px;bottom:6px;max-height: calc(100% - 80px)} /* 标题尺寸可手动调整 */

  .bookwall-scroll-container{height:180px}
  .bookwall-scroll-wrapper{gap:12px;animation:scrollBooks 120s linear infinite}
  .bookwall-scroll-wrapper .book{width:100px;height:133px} /* 滚动书本尺寸可手动调整 */
  .bookwall-search{max-width:280px;margin:0 auto .5rem}
  .search-input{padding:8px 36px 8px 10px;font-size:.85rem}
  .search-btn,.search-btn.reset-btn{width:28px;height:28px} /* 搜索按钮尺寸可手动调整 */
  .search-btn.reset-btn{right:36px}
  .legend{font-size:.8rem;margin-top:.4rem}
  
  /* 宣传片调整 */
  .section.promo .douyin-box {
    position: relative;
    overflow: hidden;
     height: 33.33vh;
  }
  
  .section.promo .douyin-box::before {
    display: none;
  }
  
  .section.promo .douyin-box iframe {
    position: absolute;
    width: 100%;
    height: 300%;
    top: -83%;
    left: 1.5%;
    transform: none;
    display: none !important;
  }
  
  .section.promo .video-wrap {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }
  
  /* 隐藏视频容器的多余部分 */
  .section.promo .video-wrap {
    padding: 0; /* 移除内边距 */
    border-radius: 0; /* 可选：移除圆角 */
  }
}
  /* 攻略卡片调整 */
  .guide-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
  .guide-card img{height:100px} /* 攻略图片高度可手动调整 */
  .gc-body{padding:.5rem}
  .gc-body h3{font-size:.9rem}
  .gc-body p{font-size:.8rem;min-height:2.4em}
  
  /* 弹窗调整 */
  .modal-card{width:96vw;margin:2vh auto}
  .modal-card.bookviewer{width:98vw}
  .spread{height:min(400px,70vh)}
  .book-outer{padding:10px} /* 弹窗内边距可手动调整 */
  .book-inner{grid-template-columns:1fr 1.2fr}
  .page.right{padding:14px 18px} /* 右侧页面内边距可手动调整 */
  .meta img{width:42px;height:42px} /* 弹窗头像尺寸可手动调整 */
  #mName{font-size:16px} /* 弹窗名字尺寸可手动调整 */
  .entry{font-size:13px;line-height:1.6} /* 弹窗文本尺寸可手动调整 */
  .flip-ctrl .btn{font-size:12px;padding:.35rem .7rem} /* 翻页按钮尺寸可手动调整 */
}

@media (max-width:480px){
  .shelves{grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:10px;padding:10px}
  .book{min-height:130px}
  .book .avatar{width:38px;height:38px} /* 小屏头像尺寸可手动调整 */
  .book::after{font-size:9px;max-height:calc(100% - 80px)} /* 小屏标题尺寸可手动调整 */
  .bookwall-scroll-container{height:150px}
  .bookwall-scroll-wrapper .book{width:85px;height:113px} /* 小屏滚动书本尺寸可手动调整 */
  .guide-grid{grid-template-columns:1fr;gap:10px}
  .nav{justify-content:center}
  .book-inner{grid-template-columns:1fr}
  .page.left{display:none}
  .page.right{box-shadow:none}
  .section.promo .douyin-box {
      height: 33.33vh;
  }
  
  .section.promo .douyin-box iframe {
    height: 300%;
    top: -85%; /* 示例：向下微调1% */
    left: 2.5%; /* 示例：向右微调0.5% */
    transform: none;
  }
}
/* 宣传片模块手机提示样式 */
.section.promo .mobile-prompt-overlay {
  display: none; /* 默认隐藏 */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.section.promo .mobile-prompt-content {
  background: white;
  padding: 25px 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 280px;
  width: 100%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.section.promo .mobile-prompt-content h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.section.promo .mobile-prompt-content p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.section.promo .prompt-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.section.promo .copy-url-btn,
.section.promo .close-prompt-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.section.promo .copy-url-btn {
  background: #007AFF;
  color: white;
}

.section.promo .copy-url-btn:hover {
  background: #0056CC;
}

.section.promo .close-prompt-btn {
  background: #F2F2F7;
  color: #333;
}

.section.promo .close-prompt-btn:hover {
  background: #E5E5EA;
}

/* 确保视频容器有相对定位 */
.section.promo .douyin-box {
      min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 手机端显示提示 */
@media (max-width: 768px) {
  .section.promo .mobile-prompt-overlay {
     display: flex !important;
  }
}

/* 小屏手机调整 */
@media (max-width: 480px) {
  .section.promo .mobile-prompt-content {
    padding: 20px 15px;
    margin: 0 10px;
  }
  
  .section.promo .prompt-buttons {
    flex-direction: column;
  }
}
.mobile-prompt-overlay {
  /* 原有的样式保持不变 */
  transition: opacity 0.5s ease-in-out; /* 添加过渡效果 */
}
