/* 颜色变量 */
:root{
  --primary:#16a34a; /* 绿色主色 */
  --primary-600:#059669;
  --primary-50:#ecfdf5;
  --text:#1f2937;
  --muted:#6b7280;
  --bg:#f6f8f7;
  --card:#ffffff;
  --border:#e5e7eb;
  --shadow:0 8px 24px rgba(2,8,23,.06);
  /* 导航统一间距与等宽尺寸 */
  --nav-gap:8px;
  --nav-item-width:88px;
}

/* === overrides: nav shift, footer transparent, about golden text === */
/* 导航整体显隐过渡（全端） */
.navbar{ transition: transform .25s ease, opacity .2s ease; will-change: transform; }
.navbar.nav-hide{ transform: translateY(-100%); opacity: 0; pointer-events: none; }

@media (min-width: 1024px){
  /* 保留原有水平偏移（桌面端），不参与显隐 */
  .navbar .nav-links{ transform: translateX(70px); transition: transform .25s ease; }
}
.footer{ background: transparent !important; color:#fff !important; border-top:1px solid rgba(255,255,255,0.15) !important; }
.about-section .section-title{ color:#fff !important; margin-left:calc(8px + 18px + 8px); }
.about-section p{ color:#FFD700; line-height:1.9; text-indent:2em; }

.admin-entry{color:#b91c1c;font-weight:600}
.user-dropdown .admin-entry{padding:10px 12px}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:#050a14;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,'PingFang SC','Hiragino Sans GB','Microsoft Yahei',sans-serif}
html{overflow-y:scroll;scrollbar-gutter:stable}
/* 让页面满高，页脚靠底 */
body{min-height:100vh;display:flex;flex-direction:column}
main{flex:1 0 auto}

.container{max-width:1100px;margin:0 auto;padding:0 20px}

/* 顶部导航 */
.navbar{position:sticky;top:0;z-index:30;background:transparent;border-bottom:none;color:#fff}
/* 顶部导航在深色背景下的文字颜色 */
.navbar a,.navbar .nav-links a,.navbar .site-title,.navbar .brand,.navbar .logo{color:#fff;text-decoration:none}
.navbar a:hover,.navbar .nav-links a:hover{color:rgba(255,255,255,0.9)}
.nav-content{display:flex;align-items:center;height:64px}
.logo{display:flex;align-items:center;gap:8px;font-weight:700;color:#fff}
.logo-icon{font-size:18px}
.logo-text{font-size:18px}

/* 使用“链接组紧贴头像”布局：logo 在最左；右侧整体为导航链接+头像并贴右 */
.nav-links{display:flex;gap:var(--nav-gap);white-space:nowrap}
.nav-right{display:flex;align-items:center;gap:var(--nav-gap);margin-left:auto;overflow:visible}
/* 首屏稳定：仅隐藏用户菜单，导航链接即时可见，避免功能按钮缺失与闪现 */
.user-menu{visibility:hidden}
body.auth-synced .user-menu{visibility:visible}
/* 统一右侧区域的最小高度，避免高度抖动 */
.nav-right{min-height:44px}
.nav-link{color:#374151;text-decoration:none;padding:6px 10px;border-radius:10px;width:var(--nav-item-width);text-align:center;-webkit-tap-highlight-color: transparent}
.nav-link:hover{background:var(--primary-50)}
.nav-link:active{background:var(--primary-50)}
.nav-link:focus{outline:none}
.nav-link.active{background:var(--primary-50);pointer-events:none;cursor:default}
/* 头像触发器等宽，与链接保持视觉一致 */
.user-menu-auth .user-trigger{min-width:var(--nav-item-width);display:flex;align-items:center;justify-content:center;border-radius:10px;padding:4px}
.user-menu-auth .user-trigger:focus{outline:none}
.user-menu-auth .user-trigger:hover{background:#f3f4f6}

/* 按钮 */
.btn{appearance:none;border:1px solid var(--border);background:var(--bg);color:#111827;border-radius:10px;padding:8px 14px;cursor:pointer;transition:.2s; text-decoration:none}
.btn:hover{box-shadow:var(--shadow)}
.btn-primary{background:var(--primary);border-color:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-600);border-color:var(--primary-600)}
.btn-outline{background:#fff;border-color:var(--border)}
/* 与导航链接一致的悬停背景，且无下划线 */
.btn-outline:hover{background:#f3f4f6;box-shadow:none;text-decoration:none}
.btn-block{width:100%}
/* 链接样式按钮（用于“忘记密码”等）：去除边框和背景，呈现链接风格 */
.btn-link{appearance:none;border:none;background:transparent;color:var(--muted);cursor:pointer;transition:.2s;text-decoration:none;padding:0}
.btn-link:hover{color:var(--primary);text-decoration:none}
/* 登录页内联“去注册”按钮统一为链接风格且无下划线 */
#btnRegister{color:var(--muted);text-decoration:none;font-size:14px}
#btnRegister:hover{color:var(--primary);text-decoration:none}

/* 表单（登录/注册） */
.auth-section{padding:36px 0}
.auth-section .container{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 64px - 80px)}
.form{width:100%;max-width:420px;background:var(--card);border:1px solid var(--border);border-radius:16px;padding:24px;box-shadow:var(--shadow)}
.form-title{margin:0 0 16px;text-align:center}
.form-row{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.input{height:44px;border:1px solid var(--border);border-radius:10px;padding:0 12px}
.form-actions{margin-top:8px}
/* 登录页 actions 横排布局（按钮在左，文字操作在右） */
#login-form .actions-row{display:flex;align-items:center;gap:16px}
#login-form .actions-row #btnLogin{min-width:96px}
#login-form .actions-row .actions-right{display:flex;align-items:center;gap:12px}
#login-form .actions-row .btn-as-link{appearance:none;border:none;background:transparent;color:var(--muted);padding:0;cursor:pointer}
#login-form .actions-row .btn-as-link:hover,#login-form .actions-row #btnRegister:hover{color:var(--primary)}
.form-meta{display:flex;align-items:center;justify-content:space-between;margin-top:12px;color:var(--muted);font-size:14px}
.link-primary{color:var(--primary-600);text-decoration:none}
.link-muted{color:var(--muted);text-decoration:none}

/* 登录页错误提示样式 */
#login-error.form-error{display:none;margin-bottom:10px;padding:10px 12px;border-radius:8px;background:#fdecec;color:#b42318;border:1px solid #f1a7a0;font-size:14px}
#login-error.form-error.show{display:block}

/* 英雄区 */
.hero{background:transparent;padding:84px 0 56px;position:relative;overflow:hidden}
.hero-content{max-width:720px;margin:0 auto;text-align:center;position:relative;z-index:1}
.hero-title{margin:0;font-size:40px;letter-spacing:.5px;color:#fff}
.hero-subtitle{margin:14px 0 24px;color:rgba(255,255,255,0.85)}
/* 星空画布层 */
.hero-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:0;pointer-events:none}
/* 全局背景画布：固定，覆盖全视口，置底层（但高于根背景） */
.bg-canvas{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:0;pointer-events:none}
/* 让主要内容永远在背景画布之上 */
main, footer{position:relative;z-index:1}
.search-section{margin-top:12px}
.search-bar{display:flex;gap:8px;justify-content:center;max-width:720px;margin:0 auto}
.search-input{flex:1;height:44px;border:1px solid var(--border);border-radius:12px;padding:0 14px;min-width:0}
.search-btn{height:44px;padding:0 18px;border-radius:12px;border:none;background:var(--primary);color:#fff;cursor:pointer}
.search-tips{display:none!important;margin-top:0;color:rgba(255,255,255,0.7);font-size:14px;text-align:center}

/* 最新亲人生平 */
.featured-memorials{padding:28px 0}
.section-title{font-size:18px;margin:0 0 14px;color:#fff}
.memorials-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.memorial-card{display:block;position:relative;overflow:hidden;background:var(--primary-50);border-radius:14px;border:1px solid var(--border);box-shadow:var(--shadow);text-decoration:none;color:inherit}
.memorial-card .cover{width:100%;height:160px;object-fit:cover}
.memorial-card .content{padding:12px}
.memorial-card .name{font-weight:600}
.memorial-card .period{color:var(--muted);font-size:14px;margin-top:4px}
/* 卡片副标题统一样式：单行省略，保证高度一致 */
.memorial-card .subline{color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 精选档案 */
.featured-archives{padding:4px 0 28px}
.archives-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.archive-card{display:block;background:var(--primary-50);border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:var(--shadow);text-decoration:none;color:inherit}
.archive-image{width:100%;height:150px;object-fit:cover;display:block}
.archive-info{padding:12px}
.archive-name{font-weight:600}
.archive-period{color:var(--muted);font-size:14px;margin-top:4px}

/* --- Toast 基础样式（全局） --- */
#toast-container{ position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast-container .toast{ min-width: 180px; max-width: 86vw; padding: 10px 14px; border-radius: 8px; color: #fff; font-size: 14px; line-height: 1.2; box-shadow: 0 6px 24px rgba(0,0,0,0.15); opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; background: rgba(0,0,0,.82); backdrop-filter: saturate(140%) blur(6px); }
#toast-container .toast.show{ opacity: 1; transform: translateY(0); }
#toast-container .toast.success{ background: #2e7d32; }
#toast-container .toast.error{ background: #c62828; }
#toast-container .toast.info{ background: #333a; }

/* === Dynamic Hall: 折叠/展开正文 + 互动条 + 评论区 + 视频样式 === */
.story-body{position:relative;padding-bottom:36px;transition:max-height .25s ease}
.story-body.collapsed{
  overflow:hidden;
  /* 使用遮罩渐隐，避免图片出现白光 */
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%);
}
.content-fade{position:absolute;left:0;right:0;bottom:36px;height:56px;background:transparent;display:none;pointer-events:none}
/* 回退：若浏览器不支持 mask-image，则启用轻柔的透明渐隐而非白色遮罩，避免白光 */
@supports not (mask-image: linear-gradient(180deg, rgba(0,0,0,1), rgba(0,0,0,0))) {
  .story-body.collapsed{ overflow:hidden }
  .content-fade{ background:linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 95%, rgba(255,255,255,.9) 100%); display:block }
}
.expand-toggle{position:absolute;right:10px;bottom:6px;border:1px solid var(--border);background:#fff;color:#374151;border-radius:999px;padding:4px 10px;cursor:pointer;display:none}
.expand-toggle:hover{background:#f3f4f6}

/* 视频区域：与图片一致的卡片风格 */
.story-videos{display:grid;grid-template-columns:1fr;gap:8px;margin-top:8px}
.story-videos video{width:100%;max-height:280px;border-radius:10px;border:1px solid var(--border);background:#000}

/* 互动条 */
.story-actions{display:flex;align-items:center;gap:12px;border-top:1px solid var(--border);padding-top:8px;margin-top:8px}
.story-actions button{border:1px solid var(--border);background:#fff;color:#374151;border-radius:999px;padding:6px 12px;cursor:pointer}
.story-actions button:hover{background:#f3f4f6}
.story-actions .active{background:var(--primary-50);border-color:var(--primary);color:var(--primary-600)}

/* 评论区 */
.comments-section{background:#fafafa;border:1px solid var(--border);border-radius:10px;padding:10px;margin-top:8px}
.comment-list{display:flex;flex-direction:column;gap:10px}
.comment-item{background:transparent;border:1px solid var(--border);border-radius:8px;padding:8px}
.comment-item .author{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.comment-item .author .avatar{width:24px;height:24px;border-radius:50%;object-fit:cover;border:1px solid var(--border)}
.comment-item .author .avatar.placeholder{width:24px;height:24px;border-radius:50%;background:#e5e7eb;display:inline-block}
.comment-item .author .name{font-weight:600}
.comment-item .author .time{font-size:12px;color:#6b7280}
.comment-item .content{white-space:pre-wrap;line-height:1.6}
.comment-form{display:flex;align-items:flex-start;gap:8px;margin-top:8px}
.comment-input{flex:1;min-height:36px;border:1px solid var(--border);border-radius:8px;padding:8px;background:transparent}
.comment-submit{border:1px solid var(--border);background:var(--primary);border-color:var(--primary);color:#fff;border-radius:8px;padding:8px 12px;cursor:pointer}
.comment-submit:hover{background:var(--primary-600);border-color:var(--primary-600)}

/* 神交世界（书籍目录）样式 */
.book-directory{display:flex;gap:8px;flex-wrap:wrap}
.book-dir-btn{padding:6px 12px;border:1px solid var(--border);border-radius:999px;background:#fff;color:#374151;cursor:pointer}
.book-dir-btn:hover{background:#f3f4f6}
.book-dir-btn.active{background:var(--primary-50);border-color:var(--primary);color:var(--primary-600)}
/* 书籍卡片摘要为单行省略，保证高度一致 */
.memorial-card .summary{color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}

/* 神交世界页面新增样式：顶部芯片、榜单与卡片细节 */
/* 1) 芯片条与芯片按钮 */
.chips-bar{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start;margin-top:12px}
.chip{padding:6px 12px;border:1px solid var(--border);border-radius:999px;background:#fff;color:#374151;cursor:pointer}
.chip:hover{background:#f3f4f6}
.chip.active{background:var(--primary-50);border-color:var(--primary);color:var(--primary-600)}

/* 头像下方信息（邮箱、注册时间） */
.pv-meta-under{display:flex;flex-wrap:wrap;gap:10px;color:#fff;opacity:.95;font-size:20px}
.pv-meta-under .meta-item{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.18)}

/* 2) 区块标题带操作按钮 */
.section-header.with-action{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
#expand-world-share.btn{ min-width:44px; padding:6px 10px; font-weight:600; }
.btn-small{padding:6px 10px;font-size:14px;border-radius:8px}

/* 3) 榜单卡与列表 */
.charts-section{padding:8px 0 24px}
.charts-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.chart-card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:12px;box-shadow:var(--shadow)}
.chart-title{font-weight:700;margin-bottom:8px}
.chart-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.chart-list li{display:flex;align-items:center;gap:8px;padding:8px;border-radius:10px}
.rank-num{width:24px;height:24px;border-radius:6px;background:#eef2ff;color:#111827;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.chart-list li:nth-child(-n+3) .rank-num{background:#f43f5e;color:#fff}
.rank-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rank-meta{color:var(--muted);font-size:12px}
@media (max-width: 980px){.charts-grid{grid-template-columns:1fr}}

/* 4) 让搜索页顶部沿用首页背景氛围 */
.books-hero{padding-top:56px;padding-bottom:32px}

/* 5) 卡片在神交页的结构兼容（支持封面包裹 img 的写法） */
.memorial-card .cover img{width:100%;height:160px;object-fit:cover;display:block}
.memorial-card .info{padding:12px}
.memorial-card .title{margin:0;font-size:16px}
.memorial-card .meta{color:var(--muted);font-size:14px;margin-top:4px}

/* 书籍分类样式 */
.categories-section{padding:8px 0 28px}
.categories-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.category-card{background:var(--card);border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:var(--shadow);cursor:pointer;transition:all 0.2s ease;text-decoration:none;color:inherit}
.category-card:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(2,8,23,.1)}
.category-card .thumb{width:100%;height:140px;overflow:hidden}
.category-card .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.category-card .category-info{padding:12px}
.category-card .category-name{font-weight:600;margin:0 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.category-card .category-count{color:var(--muted);font-size:14px}

/* 推荐值徽章样式 */
.rec-badge{background:#f59e0b;color:#fff;padding:2px 6px;border-radius:6px;font-size:12px;font-weight:600;margin-left:auto}
.meta-line{display:flex;align-items:center;justify-content:space-between;margin-top:4px}

/* 三项使命 */
.mission{padding:24px 0 44px}
.mission-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.mission-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:16px;box-shadow:var(--shadow)}
.mission-title{font-weight:700;margin-bottom:6px}
.mission-desc{color:var(--muted)}
@media (max-width: 980px){.mission-cards{grid-template-columns:1fr}}

/* 人物详情页 */
.person-header{padding:24px 0;background:var(--bg)}
.person-profile{display:flex;flex-direction:row;align-items:center;gap:20px;text-align:left}
.person-avatar{flex-shrink:0}
.avatar-circle{width:80px;height:80px;background:var(--primary);border-radius:50%;object-fit:cover;display:block}
.person-info{flex:1 1 auto;max-width:none;margin:0}
.person-name{margin:0 0 8px;font-size:24px;font-weight:700}
.person-period{color:var(--muted);margin-bottom:8px}
.person-quote{color:var(--primary);font-style:italic}
/* 新增：墓志铭与座右铭，两行展示 */
.person-epitaph,.person-motto{color:#fff !important;font-style:italic;line-height:1.6;margin-top:2px}
.person-epitaph{margin-top:6px}
/* 覆盖人物卡片文字为白色 */
.person-header .person-name{color:#fff !important}
.person-header .person-period{color:#fff !important}
.person-header .person-quotes .person-epitaph,
.person-header .person-quotes .person-motto{color:#fff !important}
.person-actions{display:flex;align-items:center;gap:10px} /* 展示互动条 */
.like-count{color:var(--muted);font-size:14px}
/* 互动条 */
.interaction-bar{display:flex;align-items:center;gap:10px;margin-top:8px}
.interaction-bar .count{margin-left:4px;color:var(--muted);font-size:14px}
.interaction-bar .views{color:var(--muted);font-size:14px}
/* 点赞/收藏激活态 */
.interaction-bar .btn.active{background:var(--primary-50);border-color:var(--primary);color:var(--primary-600)}

.photo-gallery{padding:24px 0}
.gallery-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;max-width:720px}
.gallery-photo{width:100%;height:200px;object-fit:cover;border-radius:12px;box-shadow:var(--shadow)}

/* 图片固定框显示样式 */
.image-frame {
  width: 100%;
  height: 200px;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 人物卡片中的文案图片固定框 */
.memorial-card .doc-image-frame {
  width: 100%;
  height: 120px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
  background: #f8f9fa;
}

.memorial-card .doc-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.biography{padding:16px 0}
.biography-content{max-width:800px;line-height:1.6}
.biography-content p{margin:0 0 16px;color:var(--text)}
/* 让姓名、相册、生平、语录、大事记、标签共用同一条左对齐线（头像80px + 间距20px = 100px，仅桌面端生效）*/
@media (min-width: 981px){
  .biography .container,
  .photo-gallery .container,
  .timeline .container,
  .wisdom-quotes .container,
  .attachments .container,
  .attachments-section .container,
  .person-tags .container{padding-left:100px}
}
.timeline{padding:24px 0}
.timeline-list{max-width:800px}
.timeline-item{display:flex;gap:12px;margin-bottom:12px;padding-bottom:0;border-bottom:none}
.timeline-year{font-weight:600;color:var(--primary);min-width:100px}
.timeline-desc{color:var(--text)}

.wisdom-quotes{padding:24px 0}
.quotes-list{max-width:800px}
/* 改成简洁文本行样式 */
.quote-item{margin:0 0 8px;padding:0;background:transparent;border:none;border-radius:0;box-shadow:none}
.quote-item p{margin:0;color:var(--text)}

.person-tags{padding:24px 0}
.tags-list{display:flex;gap:8px;flex-wrap:wrap}
.tag{display:inline-block;background:var(--primary-50);color:var(--primary-600);padding:4px 12px;border-radius:16px;font-size:14px}

/* 页脚 */
.footer{border-top:1px solid rgba(255,255,255,0.15);padding:20px 0;margin-top:20px;background:transparent;color:#fff}
.footer-content{display:flex;align-items:center;justify-content:space-between}
.footer a{color:#fff;text-decoration:none}
.footer .separator{margin:0 8px;color:rgba(255,255,255,0.4)}

/* 响应式 */
@media (max-width: 980px){
  .memorials-grid,.archives-grid{grid-template-columns:repeat(2,1fr)}
  /* .mission-cards{grid-template-columns:1fr} 已在文件前部统一定义 */
  .gallery-grid{grid-template-columns:repeat(2,1fr)}
  .person-profile{flex-direction:column;align-items:center;text-align:center}
  .gallery-grid,.biography-content,.timeline-list,.quotes-list,.person-tags .tags-list,.attachments-grid{margin-left:0}
}
@media (max-width: 640px){
  .nav-links{display:none}
  .memorials-grid,.archives-grid{grid-template-columns:1fr}
  .person-actions{justify-content:center}
  .gallery-grid{grid-template-columns:1fr}
}

/* 用户菜单下拉样式 */
.user-menu{display:flex;align-items:center;gap:8px;min-width:180px;justify-content:flex-end}
.user-menu-auth{position:relative;display:none;align-items:center}
.user-menu-auth .user-trigger{display:flex;align-items:center;gap:0;padding:0;border:none;background:transparent;cursor:pointer;user-select:none}
.user-menu-auth .user-trigger:hover{box-shadow:none}
.user-menu-auth .user-trigger .user-name{display:none}
.user-menu-auth .user-trigger .caret{display:none}
.user-menu-auth .user-dropdown{position:fixed;top:72px;right:20px;margin-top:0;background:#fff;border:1px solid var(--border);border-radius:12px;min-width:160px;box-shadow:var(--shadow);padding:8px;display:none;z-index:60;transition:none}
.user-menu-auth.open .user-dropdown{display:block}
.user-menu-auth .user-avatar{display:block;transition:none}
.user-menu-auth .user-dropdown a,.user-menu-auth .user-dropdown button{display:block;width:100%;text-align:left;padding:10px 12px;border:none;background:transparent;color:#111827;text-decoration:none;border-radius:8px;cursor:pointer;line-height:1.4}
.user-menu-auth .user-dropdown a:hover,.user-menu-auth .user-dropdown button:hover{background:#f3f4f6}
/* 新增：分割线 */
.user-menu-auth .user-dropdown .menu-divider{height:1px;background:var(--border);margin:6px 0}
/* 新增：带徽章的条目布局 */
.user-menu-auth .user-dropdown a.with-badge{display:flex;align-items:center;justify-content:space-between;gap:10px}
.user-menu-auth .user-dropdown .menu-badge{min-width:22px;padding:0 6px;height:20px;border-radius:10px;background:#16a34a;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:12px}
/* 头像菜单补充样式 */
.user-menu-auth .user-trigger .user-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;border:1px solid var(--border);background:#ffffff;display:block}
.user-menu-auth.open .user-trigger{box-shadow:none}
/* 展示/隐藏由 JS 控制，支持移出后延迟 1 秒关闭 */
/* .user-menu-auth:hover .user-dropdown{display:block} */
.user-menu-auth:hover .user-trigger{box-shadow:none}
.user-menu-guest{display:none;align-items:center;gap:8px}
/* 追加：顶部头像菜单中的“个人信息集合框”样式 */
.user-menu-auth .user-dropdown .menuitem-btn{display:block;width:100%;text-align:left;padding:8px 10px;border:none;background:transparent;color:#111827;border-radius:8px;cursor:pointer}
.user-menu-auth .user-dropdown .menuitem-btn:hover{background:#f3f4f6}
.user-menu-auth .user-dropdown .profile-quick{display:none;margin:6px 0 8px;border-top:1px dashed var(--border);padding-top:8px}
.user-menu-auth .user-dropdown .profile-quick.open{display:block}
.user-menu-auth .user-dropdown .profile-quick .quick-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.user-menu-auth .user-dropdown .profile-quick .quick-header .title{font-size:13px;color:#6b7280}
.user-menu-auth .user-dropdown .profile-quick .quick-header .quick-settings{padding:4px 8px;border-radius:6px;border:1px solid var(--border);background:#fff;color:#111827;cursor:pointer}
.user-menu-auth .user-dropdown .profile-quick .quick-header .quick-settings:hover{background:#f9fafb}
.user-menu-auth .user-dropdown .profile-quick .quick-items{display:flex;gap:8px}
.user-menu-auth .user-dropdown .profile-quick .quick-item{flex:1;display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border:1px solid var(--border);border-radius:8px;text-decoration:none;color:#111827;background:#f9fafb}
.user-menu-auth .user-dropdown .profile-quick .quick-item:hover{background:#f3f4f6}
.user-menu-auth .user-dropdown .profile-quick .quick-item .label{font-size:13px}
.user-menu-auth .user-dropdown .profile-quick .quick-item .badge{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#16a34a;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:12px}
.user-menu-auth .user-dropdown .profile-quick .quick-item .badge.muted{background:#e5e7eb;color:#6b7280}
.user-menu-auth .user-dropdown .profile-quick .quick-item.disabled{pointer-events:none;opacity:.6}

/* 我的故事页基础样式 */
.stories-section .form{background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:16px}
.stories-section .form-title{margin:0 0 12px;font-size:18px}
.stories-section .form .form-row{margin-bottom:12px}
.stories-section .form .input{width:100%;padding:10px;border:1px solid var(--border);border-radius:10px}
.stories-section .form .btn-block{width:100%}

/* 动态容器样式 */
.stories-container .empty,
.stories-container .loading{
  padding:16px;
  color:#6b7280;
}

.stories-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.story-item{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
}

.story-item .story-meta{
  font-size:12px;
  color:#6b7280;
  margin-bottom:6px;
}

.story-item .story-content{
  white-space:pre-wrap;
  line-height:1.65;
}

/* === 故事大厅（Dynamic Hall）样式 === */
/* 两栏时间线布局 */
.timeline-layout{display:flex;gap:24px;align-items:flex-start}
.timeline-main{flex:1 1 auto;min-width:0}
.right-sidebar{width:300px;flex-shrink:0;position:sticky;top:80px}

/* 侧栏卡片 */
.sidebar-card{background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:14px}
.sidebar-card h3{margin:0 0 10px;font-size:16px}
.sidebar-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.sidebar-list a{color:#374151;text-decoration:none}
.sidebar-list a:hover{text-decoration:underline}

/* 动态卡片作者信息 */
.story-author{display:flex;align-items:center;gap:10px}
.story-author .avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;border:1px solid var(--border);background:#fff}
.story-author .meta{display:flex;flex-direction:column;line-height:1.2}
.story-author .meta .name{font-weight:600;color:#111827}
.story-author .meta .name a,
a.author-link{ color:#000; text-decoration:none; }
.story-author .meta .name a:hover,
a.author-link:hover{ color:#000; text-decoration:none; }
.story-author .meta .time{font-size:12px;color:#6b7280}

/* 无限滚动哨兵 */
.scroll-sentinel{height:1px;opacity:0;margin-top:16px}

/* 小屏改为单列 */
@media (max-width: 980px){
  .timeline-layout{flex-direction:column}
  .right-sidebar{width:auto;position:static}
}

/* --- 微信朋友圈风格：故事项与图片网格 --- */
.story-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.story-menu{position:relative}
.story-more-btn{border:none;background:transparent;font-size:22px;line-height:1;padding:4px 6px;border-radius:8px;cursor:pointer;color:#6b7280}
.story-more-btn:hover{background:#f3f4f6}
.story-dropdown{position:absolute;top:100%;right:0;margin-top:6px;background:#fff;border:1px solid var(--border);border-radius:10px;min-width:140px;box-shadow:var(--shadow);padding:6px;display:none;z-index:40}
.story-menu.open .story-dropdown{display:block}
.story-dropdown button{display:block;width:100%;text-align:left;padding:8px 10px;border:none;background:transparent;color:#111827;border-radius:8px;cursor:pointer}
.story-dropdown button:hover{background:#f3f4f6}
.story-dropdown .danger{color:#dc2626}

/* 固定大小图片按钮容器，点击弹出原图 */
.story-images{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px}
.story-img-btn{display:block;border:none;padding:0;background:transparent;border-radius:8px;overflow:hidden;cursor:pointer;aspect-ratio:1/1;border:1px solid var(--border)}
.story-img-btn img{width:100%;height:100%;object-fit:cover;display:block;border:none;border-radius:0}

/* 图片预览模态框 */
.image-modal{position:fixed;inset:0;background:rgba(0,0,0,.75);display:none;align-items:center;justify-content:center;z-index:100}
.image-modal.open{display:flex}
.image-modal-inner{max-width:90vw;max-height:90vh}
.image-modal-inner img{max-width:100%;max-height:90vh;display:block;border-radius:8px}

/* 新的上传区域样式 */
.upload-drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 200px;
}

.upload-drop-zone:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.upload-drop-zone.drag-over {
  border-color: var(--primary);
  background: #f0f9ff;
  transform: scale(1.02);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.upload-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 14px;
  color: #6b7280;
}

/* 预览容器样式 */
#preview-container {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 16px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #374151;
}

.clear-all-btn {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-all-btn:hover {
  background: #fecaca;
}

/* 预览网格 */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: all 0.2s ease;
}

.preview-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.preview-item:hover .remove-btn {
  opacity: 1;
}

.preview-item .remove-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
}
.image-preview{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(80px,1fr));
  gap:8px;
  margin-top:8px;
}

.image-preview .preview-item{
  position:relative;
  background:#f9f9f9;
  border:1px solid #ddd;
  border-radius:8px;
  overflow:hidden;
}

.image-preview .preview-item img{
  width:100%;
  height:80px;
  object-fit:cover;
  display:block;
}

.image-preview .preview-item .remove-btn{
  position:absolute;
  top:4px;
  right:4px;
  background:rgba(255,255,255,0.8);
  border:none;
  border-radius:50%;
  width:20px;
  height:20px;
  cursor:pointer;
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.image-preview .preview-item .remove-btn:hover{
  background:rgba(255,255,255,1);
}
/* 个人信息页样式优化 */
.profile-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.profile-container {
  max-width: 700px;
  width: 100%;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.profile-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.15);
}

.profile-header {
  background: transparent;
  color: white;
  padding: 32px;
  text-align: center;
  position: relative;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
  display: none;
}

.profile-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.profile-content {
  padding: 40px;
}

.avatar-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding: 24px;
  background: #f8fafc;
  border-radius: 16px;
  border: 2px dashed #e2e8f0;
  transition: all 0.3s ease;
}

.avatar-section:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 4px solid white;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.avatar-preview:hover {
  transform: scale(1.05);
}

.avatar-upload-area {
  flex: 1;
}

.avatar-upload-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #667eea 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 8px;
  display: inline-block;
}

.avatar-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.avatar-hint {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 24px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row.two-cols {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row.three-cols {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
  margin-bottom: 6px;
}

.form-input {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: #9ca3af;
}

.links-section {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}

.links-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.link-item:last-child {
  margin-bottom: 0;
}

.link-remove {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.link-remove:hover {
  background: #fecaca;
  transform: scale(1.1);
}

.add-link-btn {
  background: #dbeafe;
  color: var(--primary);
  border: 2px dashed var(--primary);
  border-radius: 10px;
  padding: 12px;
  width: 100%;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.add-link-btn:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-reset {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-reset:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .profile-page {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .profile-content {
    padding: 24px;
  }
  
  .avatar-section {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .form-row.two-cols,
  .form-row.three-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-reset {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-reset:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .profile-page {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .profile-content {
    padding: 24px;
  }
  
  .avatar-section {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .form-row.two-cols,
  .form-row.three-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-reset {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-reset:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .profile-page {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .profile-content {
    padding: 24px;
  }
  
  .avatar-section {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .form-row.two-cols,
  .form-row.three-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}
/* 创建页整体置中 */
.create-section{padding:28px 0}
.create-section .container{display:flex; flex-direction:column; align-items:center}
.create-section .form{width:100%;max-width:500px}

/* 拖拽上传样式 */
.drop-zone{display:flex;align-items:center;justify-content:center;border:2px dashed #e5e7eb;background:#f9fafb;color:#6b7280;border-radius:12px;padding:14px;transition:.2s;text-align:center}
.drop-zone.small{padding:10px;border-radius:10px}
.drop-zone:hover{background:#f3f4f6}
.drop-zone.dragover{background:#eef2ff;border-color:var(--primary);color:var(--primary-600)}
/* 预览缩略图容器统一间距 */
.thumbs{display:flex;gap:8px;flex-wrap:wrap}
.archive-period{color:var(--muted);font-size:14px;margin-top:4px}

/* === Overrides: unify backgrounds and hover styles per design === */
 /* 1) 顶部导航 hover 统一为绿色 */
 .nav-link:hover,
 .nav-link:active,
 .nav-link.active{
   background: var(--primary) !important;
 }
 
 /* 让左上角 “● 亲逝留名” 作为整体悬停时也呈现绿色背景 */
 .navbar .logo{ padding: 4px 8px; border-radius: 10px; transition: background-color .2s ease; }
 .navbar .logo:hover,
 .navbar .logo:active{ background: var(--primary); }
 
 /* 2) 纪念详情页：去除白色块背景，继承首页深色星空底色 */
 .person-header{ background: transparent !important; }
 .detail-interact{ background: transparent !important; }
 .comments{ background: transparent !important; }
 .comments .input,
 .inline-comments .comment-input{ background: transparent !important; }
 .comment-avatar{ background: transparent !important; }
 
 /* 3) 纪念详情页：文字区域使用星空背景，取消浅绿色底，分别设置颜色 */
  .timeline-item .timeline-desc,
  .quote-item p{
    background: transparent !important;
    color: #e5e7eb;
    padding: 0;
    border-radius: 0;
  }
  /* 文案文字（生平描述）改为纯白，确保对比度 */
  .biography-content p{
    background: transparent !important;
    color: #ffffff !important;
    padding: 0;
    border-radius: 0;
  }
  
  /* 人物墓志铭与座右铭块：同样取消底色，保持星空背景 */
  .person-quotes .person-epitaph,
  .person-quotes .person-motto{
    background: transparent !important;
    color: #e5e7eb;
    padding: 0;
    border-radius: 0;
    display: inline-block;
  }


/* 详情页：底部互动与评论 */
 .detail-interact{background:transparent;border-top:none;margin-top:16px;padding:16px 0 24px}
.detail-interact .interaction-bar{display:flex;align-items:center;gap:10px;margin:0 0 12px;flex-wrap:wrap}
.detail-interact .interaction-bar .btn{min-width:0}
.detail-interact .interaction-bar .views{margin-left:auto;color:var(--muted);font-size:14px}
/* 仅在纪念详情页：移除评论区下方的整页横线（来源：footer 顶部边框） */
.detail-interact + .footer{ border-top:none !important; background: transparent !important; color:#fff }
.detail-interact + .footer .footer-links a{ color:#e5e7eb }

/* 评论区（两行框：上=输入+发布；下=评论列表） */
.comments{background:transparent;border:none;border-radius:0;padding:0;box-shadow:none}
.comments-title{display:none;margin:0;font-size:16px}
/* 上行输入框组合 */
.comment-compose{display:flex !important;flex-direction:row !important;align-items:center !important;gap:8px;margin-bottom:0;border:1px solid var(--border);border-radius:12px 12px 0 0;padding:10px;background:transparent}
.comment-compose .comment-input{flex:1 1 auto;min-height:44px;border:none;border-radius:10px;padding:8px 10px;background:transparent;resize:vertical;color:#fff}
.comment-compose > .btn, .comment-compose > button, .comment-compose .comment-submit{margin-left:auto !important;align-self:center !important}
.comment-composer{display:flex !important;flex-direction:row !important;align-items:center !important;gap:8px;margin-bottom:0;border:1px solid var(--border);border-radius:12px 12px 0 0;padding:10px;background:transparent}
.comment-composer .comment-input{flex:1 1 auto;min-height:44px;border:none;border-radius:10px;padding:8px 10px;background:transparent;resize:vertical;color:#fff}
.comment-composer .comment-actions{display:flex;justify-content:flex-end;align-items:center;margin-left:auto}
/* 防止.comment-form样式覆盖内联布局 */
.comment-form.comment-composer{flex-direction:row;align-items:center}
/* 进一步确保内联评论框对齐一致 */
.inline-comments .comment-form.comment-composer{flex-direction:row !important; align-items:center !important}
.inline-comments .comment-actions{display:flex; justify-content:flex-end; align-items:center !important; margin-left:auto !important}

/* 语录与附件区的正文颜色统一为白色 */
.wisdom-quotes, .wisdom-quotes .quotes-list, .wisdom-quotes .quote-item p{ color:#fff !important }
.attachments-section{ color:#fff !important }
/* 兼容：内联/详情页评论输入统一：白色文字、无边框/阴影/轮廓 */
.comments .comment-input, .comments .input, .inline-comments .comment-input { background: transparent !important; color:#fff !important; border:none !important; box-shadow:none !important; outline:none !important; }
.comments .comment-input::placeholder, .comments .input::placeholder, .inline-comments .comment-input::placeholder { color: rgba(255,255,255,.6) !important; }
.comments .comment-input:focus, .comments .input:focus, .inline-comments .comment-input:focus { outline:none !important; border:none !important; box-shadow:none !important; }
.comment-form{display:flex;flex-direction:column;gap:8px;margin-bottom:0;border:1px solid var(--border);border-radius:12px 12px 0 0;padding:10px;background:transparent}
#comment-input.input{width:100%}
.comment-actions{display:flex;justify-content:flex-end}
/* 下行评论列表框：仅保留底边（两框三横线） */
.comment-list{display:flex;flex-direction:column;gap:12px;border:1px solid var(--border);border-top:none;border-radius:0 0 12px 12px;padding:10px;margin-top:0}
.comment-list .loading,.comment-list .empty{color:#6b7280}
.comment-item{display:flex;gap:10px;padding:10px 0;border:none;background:transparent;border-radius:0}
.comment-item:first-child{border-top:none}
.comment-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;border:1px solid var(--border);background:var(--bg);flex-shrink:0}
.comment-body{flex:1}
.comment-meta{display:flex;gap:8px;align-items:center;font-size:12px;color:#6b7280;margin-bottom:4px}
.comment-author{font-weight:600;color:#ffffff !important}
.comment-time{color:#9ca3af}
.comment-content{white-space:pre-wrap;line-height:1.6;color:#ffffff !important}

/* 自动续读哨兵：占位但不打扰布局 */
.auto-read-sentinel{height:20px;opacity:0;margin-top:24px}

/* 信息流模式（推特式） */
.memorial-feed{display:flex;flex-direction:column;gap:24px; padding-bottom:120px}
.memorial-item{background:transparent;border-bottom:none}
.memorial-item .person-header{padding-top:12px}
.memorial-item .detail-interact{padding-top:8px;margin-top:8px;border-top:none}
.memorial-item .comment-composer{margin-top:8px}
.memorial-item .comment-composer .comment-input{width:100%;resize:vertical}
.memorial-feed .memorial-card{background:transparent;border:none;box-shadow:none;border-radius:0}
.memorial-feed .memorial-card .content{background: var(--card); border-radius: 12px; box-shadow: var(--shadow);}

/* 对齐调整：桌面端与“标签”同一条左对齐线 */
@media (min-width: 981px){
  .detail-interact .container{ padding-left: 100px; }
}

/* 响应式优化 */
@media (max-width: 640px){
  .detail-interact .interaction-bar{justify-content:center}
  .detail-interact .interaction-bar .views{width:100%;text-align:center;margin-left:0}
  .comments{padding:10px}
  .memorial-feed{gap:16px; padding-bottom:100px}
}

/* === Create page visual alignment with Upload Card === */
.create-section .form{max-width:720px;border:1px solid #eceaf5;box-shadow:0 10px 34px rgba(16,24,40,.08)}

/* === Modal scrollability fix === */
.modal-content{display:flex;flex-direction:column}
.modal-body{flex:1 1 auto;overflow:visible}

/* === Upload Modal (Material + Purple/Gray) Overrides === */
body{font-family:'Open Sans',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft Yahei',sans-serif}

/* Generic modal for my-world */
.modal{display:none;position:fixed;inset:0;background:linear-gradient(180deg, rgba(245,245,250,.92), rgba(240,240,248,.92));backdrop-filter:saturate(1.1) blur(2px);align-items:center;justify-content:center;z-index:100;overflow:auto}
.modal[aria-hidden="false"],.modal[style*="display: flex"]{display:flex}
.modal-dialog{width:min(720px,calc(100% - 32px))}
.modal-content{background:#fff;border:1px solid #ebeaf1;border-radius:16px;box-shadow:0 12px 36px rgba(124,77,255,.12), var(--shadow);overflow:visible}

/* Card look */
.upload-card{background:#fff;border:1px solid #eceaf5;border-radius:16px;box-shadow:0 10px 34px rgba(16,24,40,.08)}

/* Drop zone (purple glow) */
.upload-drop-zone{border:2px dashed #d5ccff;border-radius:14px;background:#f7f6fb;color:#6b7280;padding:18px;text-align:center;cursor:pointer;transition:border-color .2s, box-shadow .2s, transform .2s}
.upload-drop-zone .dz-instruction{line-height:1.6}
.upload-drop-zone:focus{outline:none;box-shadow:0 0 0 3px rgba(124,77,255,.25);border-color:#7c4dff}
.upload-drop-zone.dragover,.upload-drop-zone.drag-over{border-color:#7c4dff;box-shadow:0 0 0 4px rgba(124,77,255,.35), inset 0 0 0 1px #7c4dff;transform:translateY(-1px)}

/* Image preview & filename */
.dz-preview{margin-top:10px;display:grid;grid-template-columns:100px auto;gap:12px;align-items:center}
.dz-preview img{width:100px;height:66px;object-fit:cover;border-radius:10px;box-shadow:0 6px 18px rgba(2,8,23,.12)}
.dz-filename{margin-top:6px;color:#6b7280;font-size:12px}
/* File chip for ebook info */
.file-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--border);border-radius:999px;background:#fff;color:#374151;max-width:100%}
.file-chip .name{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-chip .size{color:var(--muted)}
.file-icon{width:18px;height:18px;display:inline-block;vertical-align:middle}

/* Progress bar */
.progress{height:8px;background:#eef0f4;border-radius:999px;overflow:hidden;margin-top:12px;display:none}
.progress .progress-bar{width:0%;height:100%;background:linear-gradient(90deg,#7c4dff,#9c8cff);transition:width .2s ease}

/* Buttons inside upload card use purple */
.upload-card .btn-primary{background:#7c4dff;border-color:#7c4dff;color:#fff}
.upload-card .btn-primary:hover{background:#5e35b1;border-color:#5e35b1}
.upload-card .btn-outline{border-color:#7c4dff;color:#7c4dff}
.upload-card .btn-outline:hover{background:rgba(124,77,255,.06)}

/* Responsive tweak */
@media (max-width:640px){
  .dz-preview{grid-template-columns:80px auto}
  .modal-dialog{width:min(92vw,720px)}
}

/* 人物详情页 */
.person-header{padding:24px 0;background:var(--bg)}
.person-profile{display:flex;flex-direction:row;align-items:center;gap:20px;text-align:left}
.person-avatar{flex-shrink:0}
.avatar-circle{width:80px;height:80px;background:var(--primary);border-radius:50%}
.person-info{flex:1 1 auto;max-width:none;margin:0}
.person-name{margin:0 0 8px;font-size:24px;font-weight:700}
.person-period{color:var(--muted);margin-bottom:8px}
.person-quote{color:var(--primary);font-style:italic}
/* 新增：墓志铭与座右铭，两行展示 */
.person-epitaph,.person-motto{color:#6b7280;font-style:italic;line-height:1.6;margin-top:2px}
.person-epitaph{margin-top:6px}
.person-actions{display:flex;align-items:center;gap:10px} /* 展示互动条 */
.like-count{color:var(--muted);font-size:14px}

.photo-gallery{padding:24px 0}
.gallery-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;max-width:800px;margin:0}
.gallery-photo{width:100%;height:200px;object-fit:cover;border-radius:12px;box-shadow:var(--shadow)}

.biography{padding:16px 0}
.biography-content{max-width:800px;line-height:1.6;margin:0}
.biography-content p{margin:0 0 16px;color:var(--text)}
/* 让姓名、相册、生平、语录、大事记、标签共用同一条左对齐线（头像80px + 间距20px = 100px，仅桌面端生效）*/
@media (min-width: 981px){
  .biography .container,
  .photo-gallery .container,
  .timeline .container,
  .wisdom-quotes .container,
  .attachments .container,
  .attachments-section .container,
  .person-tags .container{padding-left:100px}
}
.timeline{padding:24px 0}
.timeline-list{max-width:800px;margin:0}
.timeline-item{display:flex;gap:12px;margin-bottom:12px;padding-bottom:0;border-bottom:none}
.timeline-year{font-weight:600;color:var(--primary);min-width:100px}
.timeline-desc{color:var(--text)}

.wisdom-quotes{padding:24px 0}
.quotes-list{max-width:800px;margin:0}
/* 改成简洁文本行样式 */
.quote-item{margin:0 0 8px;padding:0;background:transparent;border:none;border-radius:0;box-shadow:none}
.quote-item p{margin:0;color:var(--text)}

.person-tags{padding:24px 0}
.tags-list{display:flex;gap:8px;flex-wrap:wrap}
.tag{display:inline-block;background:var(--primary-50);color:var(--primary-600);padding:4px 12px;border-radius:16px;font-size:14px}

/* 页脚 */
.footer{border-top:1px solid var(--border);padding:20px 0;margin-top:20px;background:#fff}
.footer-content{display:flex;align-items:center;justify-content:space-between}
.footer-right a{color:var(--muted);text-decoration:none}
.footer-right .separator{margin:0 8px;color:var(--border)}

/* 响应式 */
@media (max-width: 980px){
  .memorials-grid,.archives-grid{grid-template-columns:repeat(2,1fr)}
  /* .mission-cards{grid-template-columns:1fr} 已在文件前部统一定义 */
  .gallery-grid{grid-template-columns:repeat(2,1fr)}
  .person-profile{flex-direction:column;align-items:center;text-align:center}
}
@media (max-width: 640px){
  .nav-links{display:none}
  .memorials-grid,.archives-grid{grid-template-columns:1fr}
  .person-actions{justify-content:center}
  .gallery-grid{grid-template-columns:1fr}
}

/* 用户菜单下拉样式 */
.user-menu{display:flex;align-items:center;gap:8px;min-width:180px;justify-content:flex-end}
.user-menu-auth{position:relative;display:none;align-items:center}
.user-menu-auth .user-trigger{display:flex;align-items:center;gap:0;padding:0;border:none;background:transparent;cursor:pointer;user-select:none}
.user-menu-auth .user-trigger:hover{box-shadow:none}
.user-menu-auth .user-trigger .user-name{display:none}
.user-menu-auth .user-trigger .caret{display:none}
.user-menu-auth .user-dropdown{position:absolute;top:100%;right:0;margin-top:8px;background:#fff;border:1px solid var(--border);border-radius:12px;min-width:160px;box-shadow:var(--shadow);padding:8px;display:none;z-index:50}
.user-menu-auth.open .user-dropdown{display:block}
.user-menu-auth .user-dropdown a,.user-menu-auth .user-dropdown button{display:block;width:100%;text-align:left;padding:10px 12px;border:none;background:transparent;color:#111827;text-decoration:none;border-radius:8px;cursor:pointer;line-height:1.4}
.user-menu-auth .user-dropdown a:hover,.user-menu-auth .user-dropdown button:hover{background:#f3f4f6}
/* 头像菜单补充样式 */
.user-menu-auth .user-trigger .user-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;border:1px solid var(--border);background:#ffffff;display:block}
.user-menu-auth.open .user-trigger{box-shadow:none}
/* 展示/隐藏由 JS 控制，支持移出后延迟 1 秒关闭 */
/* .user-menu-auth:hover .user-dropdown{display:block} */
.user-menu-auth:hover .user-trigger{box-shadow:none}
.user-menu-guest{display:none;align-items:center;gap:8px}

/* 我的故事页基础样式 */
.stories-section .form{background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:16px}
.stories-section .form-title{margin:0 0 12px;font-size:18px}
.stories-section .form .form-row{margin-bottom:12px}
.stories-section .form .input{width:100%;padding:10px;border:1px solid var(--border);border-radius:10px}
.stories-section .form .btn-block{width:100%}

/* 动态容器样式 */
.stories-container .empty,
.stories-container .loading{
  padding:16px;
  color:#6b7280;
}

.stories-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.story-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
}

.story-item .story-meta{
  font-size:12px;
  color:#6b7280;
  margin-bottom:6px;
}

.story-item .story-content{
  white-space:pre-wrap;
  line-height:1.65;
}

/* --- 微信朋友圈风格：故事项与图片网格 --- */
.story-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.story-menu{position:relative}
.story-more-btn{border:none;background:transparent;font-size:22px;line-height:1;padding:4px 6px;border-radius:8px;cursor:pointer;color:#6b7280}
.story-more-btn:hover{background:#f3f4f6}
.story-dropdown{position:absolute;top:100%;right:0;margin-top:6px;background:#fff;border:1px solid var(--border);border-radius:10px;min-width:140px;box-shadow:var(--shadow);padding:6px;display:none;z-index:40}
.story-menu.open .story-dropdown{display:block}
.story-dropdown button{display:block;width:100%;text-align:left;padding:8px 10px;border:none;background:transparent;color:#111827;border-radius:8px;cursor:pointer}
.story-dropdown button:hover{background:#f3f4f6}
.story-dropdown .danger{color:#dc2626}

/* 固定大小图片按钮容器，点击弹出原图 */
.story-images{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px}
.story-img-btn{display:block;border:none;padding:0;background:transparent;border-radius:8px;overflow:hidden;cursor:pointer;aspect-ratio:1/1;border:1px solid var(--border)}
.story-img-btn img{width:100%;height:100%;object-fit:cover;display:block;border:none;border-radius:0}

/* 图片预览模态框 */
.image-modal{position:fixed;inset:0;background:rgba(0,0,0,.75);display:none;align-items:center;justify-content:center;z-index:100}
.image-modal.open{display:flex}
.image-modal-inner{max-width:90vw;max-height:90vh}
.image-modal-inner img{max-width:100%;max-height:90vh;display:block;border-radius:8px}

/* 新的上传区域样式 */
.upload-drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 200px;
}

.upload-drop-zone:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.upload-drop-zone.drag-over {
  border-color: var(--primary);
  background: #f0f9ff;
  transform: scale(1.02);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.upload-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 14px;
  color: #6b7280;
}

/* 预览容器样式 */
#preview-container {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 16px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #374151;
}

.clear-all-btn {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-all-btn:hover {
  background: #fecaca;
}

/* 预览网格 */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: all 0.2s ease;
}

.preview-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.preview-item:hover .remove-btn {
  opacity: 1;
}

.preview-item .remove-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
}
.image-preview{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(80px,1fr));
  gap:8px;
  margin-top:8px;
}

.image-preview .preview-item{
  position:relative;
  background:#f9f9f9;
  border:1px solid #ddd;
  border-radius:8px;
  overflow:hidden;
}

.image-preview .preview-item img{
  width:100%;
  height:80px;
  object-fit:cover;
  display:block;
}

.image-preview .preview-item .remove-btn{
  position:absolute;
  top:4px;
  right:4px;
  background:rgba(255,255,255,0.8);
  border:none;
  border-radius:50%;
  width:20px;
  height:20px;
  cursor:pointer;
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.image-preview .preview-item .remove-btn:hover{
  background:rgba(255,255,255,1);
}
/* 个人信息页样式优化 */
.profile-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.profile-container {
  max-width: 700px;
  width: 100%;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.profile-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.15);
}

.profile-header {
  background: transparent;
  color: white;
  padding: 32px;
  text-align: left;
  position: relative;
}

.profile-header::before { display:none; }

.profile-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.profile-content {
  padding: 40px;
}

.avatar-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding: 24px;
  background: #f8fafc;
  border-radius: 16px;
  border: 2px dashed #e2e8f0;
  transition: all 0.3s ease;
}

.avatar-section:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 4px solid white;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.avatar-preview:hover {
  transform: scale(1.05);
}

.avatar-upload-area {
  flex: 1;
}

.avatar-upload-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #667eea 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 8px;
  display: inline-block;
}

.avatar-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.avatar-hint {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 24px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row.two-cols {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row.three-cols {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
  margin-bottom: 6px;
}

.form-input {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: #9ca3af;
}

.links-section {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}

.links-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.link-item:last-child {
  margin-bottom: 0;
}

.link-remove {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.link-remove:hover {
  background: #fecaca;
  transform: scale(1.1);
}

.add-link-btn {
  background: #dbeafe;
  color: var(--primary);
  border: 2px dashed var(--primary);
  border-radius: 10px;
  padding: 12px;
  width: 100%;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.add-link-btn:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-reset {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-reset:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .profile-page {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .profile-content {
    padding: 24px;
  }
  
  .avatar-section {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .form-row.two-cols,
  .form-row.three-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-reset {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-reset:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .profile-page {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .profile-content {
    padding: 24px;
  }
  
  .avatar-section {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .form-row.two-cols,
  .form-row.three-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-reset {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-reset:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .profile-page {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .profile-content {
    padding: 24px;
  }
  
  .avatar-section {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .form-row.two-cols,
  .form-row.three-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}
/* 创建页整体置中 */
.create-section{padding:28px 0}
.create-section .container{display:flex; flex-direction:column; align-items:center}
.create-section .form{width:100%;max-width:500px}

/* 拖拽上传样式 */
.drop-zone{display:flex;align-items:center;justify-content:center;border:2px dashed #e5e7eb;background:#f9fafb;color:#6b7280;border-radius:12px;padding:14px;transition:.2s;text-align:center}
.drop-zone.small{padding:10px;border-radius:10px}
.drop-zone:hover{background:#f3f4f6}
.drop-zone.dragover{background:#eef2ff;border-color:var(--primary);color:var(--primary-600)}
/* 预览缩略图容器统一间距 */
.thumbs{display:flex;gap:8px;flex-wrap:wrap}
.archive-period{color:var(--muted);font-size:14px;margin-top:4px}