/* ======================== 顶部加载进度条 ======================== */
#top-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #e67e22, #f39c12, #e67e22);
    background-size: 200% 100%;
    z-index: 2147483647;
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.6);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    animation: topLoadingShine 1.8s linear infinite;
    pointer-events: none;
}
#top-loading-bar.loading-done {
    animation: none;
    box-shadow: 0 0 4px rgba(230, 126, 34, 0.2);
}
#top-loading-bar.hide-bar {
    opacity: 0;
    transition: opacity 0.3s ease 0.15s, width 0.25s ease;
}

@keyframes topLoadingShine {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

body.dark-mode #top-loading-bar {
    background: linear-gradient(90deg, #f5b041, #f1c40f, #f5b041);
    background-size: 200% 100%;
    box-shadow: 0 0 10px rgba(245, 176, 65, 0.5);
}

/* ======================== 全局基础样式 ======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    background-color: #f9f3ed;
    color: #5a4a42;
    line-height: 1.6;
    font-size: 16px;
    /* 桌面端 App 化：默认禁用文本选择，营造原生应用质感 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* 更顺滑的字体渲染 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 禁用触摸长按菜单 */
    -webkit-touch-callout: none;
    /* App 化背景：柔和的渐变 */
    background-image: linear-gradient(135deg, #f9f3ed 0%, #f3ece1 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* 允许选择内容的区域（文章正文、评论、协议、输入框等） */
.post-body,
.comment-content,
.agreement-scroll,
.update-log-content,
input,
textarea,
select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ======================== 内联 SVG 图标 ======================== */
.icon {
    width: 1.15em;
    height: 1.15em;
    display: inline-block;
    vertical-align: -0.18em;
    flex-shrink: 0;
}

/* 左栏导航图标 */
.rail-icon .icon {
    width: 1.35rem;
    height: 1.35rem;
}

/* 页面标题图标 */
.page-title .icon,
.page-title.small .icon {
    width: 1.3em;
    height: 1.3em;
    vertical-align: -0.22em;
    margin-right: 0.15rem;
}

/* 联系方式图标 */
.contact-icon .icon {
    width: 1.6rem;
    height: 1.6rem;
}

/* 友链箭头 */
.friend-arrow .icon {
    width: 1rem;
    height: 1rem;
}

/* 退出登录按钮（图标 + 文字） */
.rail-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.rail-logout-btn .icon {
    width: 1rem;
    height: 1rem;
}

/* 附件下载 / 禁用图标 */
.attachment-download .icon,
.attachment-disabled .icon {
    width: 1.1rem;
    height: 1.1rem;
}

/* 公告欢迎图标 */
.notice-welcome .icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.18em;
    color: #e67e22;
}

/* post.php 深色模式按钮（图标 + 文字） */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.theme-toggle-icon .icon,
.theme-toggle-btn > .icon {
    width: 1.1rem;
    height: 1.1rem;
}

/* 图片统一限制，避免撑爆容器；并禁用拖拽 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
    user-drag: none;
}

/* 全局链接样式：彻底去掉所有默认下划线 */
a {
    text-decoration: none !important;
    transition: all 0.2s ease;
    color: #5a4a42;
    position: relative;
}

a:hover {
    color: #e67e22;
    text-decoration: none !important;
}

/* 自定义渐变下划线动画（仅 .link-underline 生效） */
a.link-underline::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #e67e22, #d35400);
    transition: width 0.3s ease;
}

a.link-underline:hover::after {
    width: 100%;
}

/* 按钮类链接：禁用所有下划线 */
a.btn-link {
    color: inherit;
}

a.btn-link:hover {
    color: inherit;
}

a.btn-link::after {
    display: none;
}

ul,
li {
    list-style: none;
}

/* ======================== 顶部横条导航（App 标题栏风格） ======================== */
.top-nav {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(230, 126, 34, 0.12);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e67e22;
    letter-spacing: 0.5px;
}

.nav-tabs {
    display: flex;
    gap: 2rem;
    flex: 1;
    margin-left: 3rem;
}

.nav-tabs a {
    color: #5a4a42;
    font-size: 1rem;
    padding: 0.3rem 0;
    position: relative;
}

.nav-tabs a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #e67e22, #d35400);
    transition: width 0.3s ease;
}

.nav-tabs a:hover::after,
.nav-tabs a.active::after {
    width: 100%;
}

.nav-tabs a:hover,
.nav-tabs a.active {
    color: #e67e22;
}

.nav-user {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-user a {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.nav-user .nav-login {
    background: #fde6d2;
    color: #d35400;
}

.nav-user .nav-login:hover {
    background: #fde6d2;
    color: #b04600;
}

.nav-user .nav-register {
    background: #e67e22;
    color: white;
}

.nav-user .nav-register:hover {
    background: #d35400;
    color: white;
}

.nav-user span {
    color: #666;
    font-size: 0.9rem;
}

/* 顶部横条右侧版本信息 */
.nav-version {
    color: #aaa;
    font-size: 0.72rem;
    margin-left: auto;
    user-select: none;
    letter-spacing: 0.3px;
    text-align: right;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.nav-version .ver-line1,
.nav-version .ver-line2 {
    white-space: nowrap;
}

.nav-version .ver-line2 {
    font-size: 0.68rem;
    opacity: 0.9;
}

body.dark-mode .nav-version {
    color: #666;
}

.nav-old-site {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #5a4a42;
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.nav-old-site:hover {
    border-color: #e67e22;
    color: #e67e22;
    text-decoration: none;
}

/* 语言切换按钮样式 */
.language-switch {
    position: relative;
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #5a4a42;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: #e67e22;
    color: #e67e22;
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    display: none;
    z-index: 100;
}

.language-menu.show {
    display: block;
}

.language-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #5a4a42;
    white-space: nowrap;
}

.language-menu a:hover {
    background: #f9f3ed;
    color: #e67e22;
}

/* ======================== 主容器布局（App 窗口化） ======================== */
.container {
    width: 100%;
    min-width: 0;
    margin: 0 auto;

    /*宽度自适应*/
    max-width: 90%;
    width: min(1400px, 92vw);

    padding: 1.5rem 1.5rem 2rem;

    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 2.2rem;

    /* App 窗口化：圆角 + 投影，让内容像浮在桌面上的窗口 */
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(90, 74, 66, 0.08);
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ======================== 应用布局：左侧导航竖条 + 右侧主内容 ======================== */
.app-layout {
    width: min(1400px, 92vw);
    max-width: 90%;
    margin: 1.5rem auto 2rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.8rem;
    align-items: start;

    /* App 窗口化 */
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(90, 74, 66, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* 左侧导航竖条 */
.app-rail {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
}

.rail-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(90, 74, 66, 0.05);
}

.rail-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    color: #5a4a42;
    font-size: 0.95rem;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
    cursor: pointer;
}

.rail-item:hover {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
    transform: translateX(3px);
}

.rail-item.active {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.rail-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.rail-label {
    font-weight: 500;
}

/* 登录状态卡片 */
.rail-user-card {
    margin-top: auto;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 10px rgba(90, 74, 66, 0.06);
    border: 1px solid rgba(230, 126, 34, 0.12);
}

.rail-user-card.logged-out {
    text-align: center;
}

.rail-login-tip {
    font-size: 0.85rem;
    color: #8a7a72;
    line-height: 1.6;
    margin: 0 0 0.8rem;
}

.rail-login-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
    border-radius: 10px;
    background: #e67e22;
    color: #fff;
    font-size: 0.9rem;
    transition: background 0.25s ease, transform 0.2s ease;
}

.rail-login-btn:hover {
    background: #d35400;
    transform: translateY(-1px);
}

.rail-user-card.logged-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e67e22;
    background: #fde6d2;
}

.rail-user-info {
    text-align: center;
    width: 100%;
}

.rail-username {
    font-weight: 600;
    color: #5a4a42;
    font-size: 0.95rem;
}

.rail-email {
    font-size: 0.75rem;
    color: #9a8a82;
    word-break: break-all;
    margin-top: 0.15rem;
}

.rail-logout-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.4rem;
    padding: 0.45rem 0;
    border-radius: 10px;
    background: #fff;
    color: #e67e22;
    border: 1.5px solid #e67e22;
    font-size: 0.85rem;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.rail-logout-btn:hover {
    background: #e67e22;
    color: #fff;
    transform: translateY(-1px);
}

/* 注册按钮：橙色描边、无填充、橙色字体 */
.rail-register-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.45rem 0;
    border-radius: 10px;
    background: transparent;
    color: #e67e22;
    border: 1.5px solid #e67e22;
    font-size: 0.82rem;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.rail-register-btn:hover {
    background: #e67e22;
    color: #fff;
    transform: translateY(-1px);
}

/* ============ 左栏通用卡片（分类/主题框架） ============ */
.rail-card {
    margin-top: 0.8rem;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(230, 126, 34, 0.15);
    box-shadow: 0 2px 12px rgba(90, 74, 66, 0.06);
    backdrop-filter: blur(14px) saturate(170%);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
}

.rail-card-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed rgba(230, 126, 34, 0.22);
}

.rail-card-icon {
    color: #e67e22;
    display: inline-flex;
    align-items: center;
}

.rail-card-icon .icon {
    width: 1.15rem;
    height: 1.15rem;
}

.rail-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #5a4a42;
}

/* ============ 分类卡片 ============ */
.rail-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.rail-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    border-radius: 9px;
    font-size: 0.85rem;
    color: #6b5b53;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rail-cat-item:hover {
    background: rgba(230, 126, 34, 0.08);
    color: #e67e22;
    transform: translateX(2px);
}

.rail-cat-item.active {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
    font-weight: 600;
}

.rail-cat-name {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.rail-cat-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: rgba(230, 126, 34, 0.45);
    display: inline-block;
}

.rail-cat-item.active .rail-cat-dot {
    background: #e67e22;
}

.rail-cat-count {
    font-size: 0.72rem;
    color: #9a8a82;
    background: rgba(90, 74, 66, 0.06);
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    min-width: 1.6rem;
    text-align: center;
}

.rail-cat-item.active .rail-cat-count {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
}

/* ============ 主题切换卡片（独立框架） ============ */
.rail-theme-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.rail-theme-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.rail-theme-icon {
    width: 1.6rem;
    height: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e67e22;
    flex-shrink: 0;
}

.rail-theme-icon .icon {
    width: 1.3rem;
    height: 1.3rem;
}

body.dark-mode .rail-theme-icon {
    color: #f5b041;
}

.rail-theme-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rail-theme-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #5a4a42;
    line-height: 1.25;
}

.rail-theme-sub {
    font-size: 0.72rem;
    color: #9a8a82;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 开关本体 */
.rail-theme-switch {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(230, 126, 34, 0.22);
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.rail-theme-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    pointer-events: none;
}

.rail-theme-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
}

/* 深色模式激活：开关点亮 */
body.is-dark-theme .rail-theme-switch {
    background: #e67e22;
}

body.is-dark-theme .rail-theme-thumb {
    transform: translateX(18px);
}

/* ============ 深色模式下卡片适配 ============ */
body.dark-mode .rail-card {
    background: rgba(45, 45, 45, 0.6);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body.dark-mode .rail-card-head {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .rail-card-title {
    color: #e8e0dc;
}

body.dark-mode .rail-cat-item {
    color: #c0b4ad;
}

body.dark-mode .rail-cat-item:hover {
    background: rgba(230, 126, 34, 0.12);
    color: #ff9d3d;
}

body.dark-mode .rail-cat-item.active {
    background: rgba(230, 126, 34, 0.22);
    color: #ff9d3d;
}

body.dark-mode .rail-cat-count {
    background: rgba(255, 255, 255, 0.06);
    color: #9a8a82;
}

body.dark-mode .rail-cat-item.active .rail-cat-count {
    background: rgba(230, 126, 34, 0.22);
    color: #ff9d3d;
}

body.dark-mode .rail-theme-title {
    color: #e8e0dc;
}

body.dark-mode .rail-theme-sub {
    color: #8a7a72;
}

body.dark-mode .rail-theme-switch {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode.is-dark-theme .rail-theme-switch {
    background: #e67e22;
}

body.dark-mode .rail-theme-thumb {
    background: #2a2a2a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ============ 旧的 rail-theme-toggle（兼容保留，不再使用） ============ */
.rail-theme-toggle {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    margin-top: 0.3rem;
    display: none;
}

/* 右侧主内容 */
.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* 通用页面卡片（更新日志 / 联系我） */
.page-card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 4px 16px rgba(90, 74, 66, 0.06);
    border: 1px solid rgba(230, 126, 34, 0.1);
}

.page-title {
    margin: 0 0 0.3rem;
    color: #5a4a42;
    font-size: 1.5rem;
}

.page-title.small {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    color: #9a8a82;
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.empty-tip {
    text-align: center;
    padding: 2rem;
    color: #9a8a82;
}

/* 更新日志时间线 */
.timeline {
    position: relative;
    padding-left: 1.2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, #e67e22, rgba(230, 126, 34, 0.1));
}

.timeline-item {
    position: relative;
    padding: 0 0 1.3rem 1rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.2rem;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e67e22;
    box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.15);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 2px 8px rgba(90, 74, 66, 0.04);
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    color: #e67e22;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.timeline-body p {
    margin: 0.15rem 0;
    color: #5a4a42;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* 联系我 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(90, 74, 66, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(230, 126, 34, 0.15);
}

.contact-icon {
    font-size: 1.6rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.8rem;
    color: #9a8a82;
}

.contact-value {
    font-size: 0.95rem;
    color: #5a4a42;
    font-weight: 500;
    word-break: break-all;
}

.contact-tip {
    margin-top: 1.2rem;
    padding: 0.8rem 1rem;
    background: rgba(230, 126, 34, 0.08);
    border-radius: 10px;
    color: #b04600;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 友情链接列表 */
.friend-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.8rem;
}

.friend-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    color: #5a4a42;
    transition: background 0.25s ease, transform 0.2s ease, color 0.25s ease;
}

.friend-link-item:hover {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
    transform: translateX(3px);
}

.friend-name {
    font-size: 0.92rem;
}

.friend-arrow {
    color: #e67e22;
    transition: transform 0.2s ease;
}

.friend-link-item:hover .friend-arrow {
    transform: translateX(4px);
}

/* 移动端：左侧竖条折叠为顶部横向栏 */
@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .app-rail {
        position: static;
        min-height: auto;
    }

    .rail-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .rail-item {
        flex: 1 1 auto;
        justify-content: center;
    }

    .rail-user-card {
        margin-top: 0.8rem;
    }
}

/* ======================== 主页全屏布局：覆盖视口、禁止整页滚动 ======================== */
html.app-home,
html.app-home body {
    height: 100vh;
    overflow: hidden;
}

html.app-home body {
    display: flex;
    flex-direction: column;
}

html.app-home .top-nav {
    flex-shrink: 0;
}

html.app-home .app-layout {
    width: 100%;
    max-width: 1280px;
    margin: 0.9rem auto;
    padding: 1rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 10px 40px rgba(90, 74, 66, 0.12);
    flex: 1;
    min-height: 0;
    grid-template-columns: 200px 1fr;
    gap: 1.2rem;
    overflow: hidden;
    /* 毛玻璃大布局 */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
}

/* 主页有右栏时使用三栏布局 */
html.app-home .app-layout:has(.app-right) {
    grid-template-columns: 200px 1fr 250px;
}

/* 深色模式：主页大布局毛玻璃 */
html.app-home body.dark-mode .app-layout,
body.dark-mode .app-layout {
    background: rgba(30, 30, 30, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

html.app-home .app-rail,
html.app-home .app-right {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(230, 126, 34, 0.3) transparent;
}

html.app-home .app-rail::-webkit-scrollbar,
html.app-home .app-right::-webkit-scrollbar,
html.app-home .post-list::-webkit-scrollbar {
    width: 6px;
}

html.app-home .app-rail::-webkit-scrollbar-thumb,
html.app-home .app-right::-webkit-scrollbar-thumb,
html.app-home .post-list::-webkit-scrollbar-thumb {
    background: rgba(230, 126, 34, 0.3);
    border-radius: 3px;
}

html.app-home .app-main {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    gap: 0.8rem;
}

/* 更新日志 / 联系我：无文章列表时主内容区内部滚动 */
html.app-home .app-main:not(:has(.post-list)) {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(230, 126, 34, 0.3) transparent;
}

html.app-home .app-main:not(:has(.post-list))::-webkit-scrollbar {
    width: 6px;
}

html.app-home .app-main:not(:has(.post-list))::-webkit-scrollbar-thumb {
    background: rgba(230, 126, 34, 0.3);
    border-radius: 3px;
}

html.app-home .search-box {
    flex-shrink: 0;
}

html.app-home .post-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.4rem 0.8rem 0.4rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(230, 126, 34, 0.3) transparent;
}

html.app-home .pagination {
    flex-shrink: 0;
}

/* 主页紧凑型文章卡片：缩小并留出空隙，防止悬停放大动画被裁切 */
html.app-home .post-card {
    padding: 0.5rem 0.8rem;
    transform-origin: center;
}

html.app-home .post-card:hover {
    transform: scale(1.02);
}

html.app-home .post-title {
    font-size: 0.98rem;
    margin: 0.15rem 0;
}

html.app-home .post-cover {
    margin: -0.5rem -0.8rem 0.4rem;
}

html.app-home .post-cover img {
    max-height: 92px;
}

html.app-home .post-meta {
    font-size: 0.78rem;
}

html.app-home .post-tags {
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

/* 右侧站长信息卡片 */
.app-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.app-right .author-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    padding: 1.1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(90, 74, 66, 0.06);
    border: 1px solid rgba(230, 126, 34, 0.1);
}

.app-right .author-card .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e67e22;
    margin-bottom: 0.5rem;
}

.app-right .author-card h3 {
    margin: 0.3rem 0;
    color: #5a4a42;
    font-size: 1rem;
}

.app-right .author-card p {
    margin: 0.15rem 0;
    color: #8a7a72;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* 右栏公告（毛玻璃） */
.app-right .notice-widget {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(230, 126, 34, 0.12);
    border-radius: 14px;
    padding: 1rem 1rem 1rem 1.1rem;
    box-shadow: 0 2px 10px rgba(90, 74, 66, 0.05);
}

.app-right .notice-widget::before {
    display: none;
}

.app-right .notice-widget h4 {
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
}

.app-right .notice-content p {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.app-right .notice-list {
    margin: 0.5rem 0;
    padding: 0.6rem 0.7rem;
    background: rgba(253, 230, 210, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(230, 126, 34, 0.15);
}

.app-right .notice-list p {
    font-size: 0.76rem;
    margin-bottom: 0.3rem;
}

.app-right .notice-tip {
    font-size: 0.74rem;
}

/* 毛玻璃通用增强：左栏导航 / 登录卡 / 站长卡 / 文章卡 */
.app-rail .rail-nav,
.app-rail .rail-user-card,
.app-right .author-card,
.page-card,
.timeline-content,
.contact-item,
.friend-link-item {
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
}

/* 主页全屏：移动端允许滚动（小屏内容无法塞下） */
@media (max-width: 768px) {
    html.app-home,
    html.app-home body {
        height: auto;
        overflow: auto;
    }

    html.app-home .app-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    html.app-home .app-rail,
    html.app-home .app-right,
    html.app-home .post-list,
    html.app-home .app-main {
        overflow: visible;
        height: auto;
    }
}

/* ======================== 左侧边栏 ======================== */
/* 修复左栏头像不居中 */

.author-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

    /* 新增：强制内容垂直排列并水平居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;

    /* 关键修复：图片块级 + 自动居中 */
    display: block;
    margin: 0 auto 1rem auto;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.author-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.author-card h3 {
    color: #e67e22;
    margin-bottom: 0.5rem;
}

.author-card p {
    font-size: 0.9rem;
    color: #666666;
}

.widget {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widget h4 {
    color: #e67e22;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #fde6d2;
    color: #d35400;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
}

/* ======================== 中间文章列表 ======================== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.post-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: all 0.3s ease;
    transform: scale(1);
    cursor: pointer;
}

.post-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.post-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.post-meta {
    font-size: 0.85rem;
    color: #999999;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-title {
    font-size: 1.25rem;
    color: #333333;
    transition: color 0.2s ease;
}

a:hover .post-title {
    color: #e67e22;
}

.post-excerpt {
    color: #666666;
    font-size: 0.9rem;
}

.post-tags {
    font-size: 0.85rem;
    color: #d35400;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 0.5rem 0.9rem;
    background: #fff;
    border: 1px solid #f0e6dc;
    border-radius: 6px;
    color: #5a4a42;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #e67e22;
    color: #fff;
    border-color: #e67e22;
}

.pagination a.active {
    background: #e67e22;
    color: #fff;
    border-color: #e67e22;
    cursor: default;
}

.pagination .ellipsis {
    border: none;
    background: transparent;
    color: #999;
}

.pagination .prev, .pagination .next {
    font-size: 0.85rem;
}

.post-card.sticky {
    position: relative;
    border: 1px solid #fde6d2;
}

.post-card.sticky::before {
    content: "置顶";
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: #e67e22;
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ======================== 右侧边栏 ======================== */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.friend-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.friend-links li a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    background-color: #fff5eb;
    border-radius: 8px;
    color: #5a4a42;
}

.friend-links li a:hover {
    background-color: #fde6d2;
    color: #d35400;
    transform: translateX(4px);
}

.email-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.6rem 0;
}

.email-link {
    color: #d35400;
    font-size: 0.95rem;
    font-weight: 500;
}

.email-link:hover {
    color: #b04600;
    text-decoration: none !important;
}

.email-tip {
    color: #666666;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* ======================== 赞助按钮&弹窗 ======================== */
.sponsor-widget {
    padding: 0.2rem;
}

.sponsor-btn {
    width: 100%;
    padding: 0.8rem 0;
    background-color: #e67e22;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sponsor-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sponsor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 1rem;
    box-sizing: border-box;
}

.sponsor-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #e67e22;
}

.sponsor-title {
    color: #e67e22;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.qr-code-container {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    flex: 0 1 auto;
    max-width: 100%;
}

.qr-label {
    color: #5a4a42;
    font-weight: 500;
    font-size: 1rem;
}

.qr-img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #fde6d2;
    box-sizing: border-box;
}

/* ======================== 鸣谢按钮 ======================== */
.thanks-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 0;
    margin-top: 0.8rem;
    background-color: #fde6d2;
    color: #d35400;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    text-decoration: none !important;
}

.thanks-btn:hover {
    background-color: #f9e0c8;
    color: #b04600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ======================== 返回顶部按钮 ======================== */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: transparent;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    overflow: hidden;
}

.back-top-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.back-to-top-btn:hover .back-top-img {
    opacity: 0.9;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* ======================== 页脚 ======================== */
.footer {
    text-align: center;
    padding: 2rem 0 3rem;
    color: #999999;
    font-size: 0.85rem;
    margin-top: 2rem;
    border-top: 1px solid #f0e6dc;
}

/* ======================== 更新日志模块 ======================== */
.update-log-container {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 5px;
}

.update-log-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-item {
    padding: 6px 0;
    border-bottom: 1px dashed #f0e6dc;
}

.log-date {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background: #e67e22;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.log-text {
    font-size: 13px;
    color: #5a4a42;
    line-height: 1.4;
    padding-left: 2px;
}

/* ======================== 自定义主题滚动条 ======================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f9f3ed;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #f3bf90;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

.update-log-container::-webkit-scrollbar {
    width: 5px;
}

/* ======================== 响应式适配 ======================== */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }

    .right-sidebar {
        display: flex !important;
    }

    .qr-img {
        max-width: 160px;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-bottom: 1rem;
    }

    .right-sidebar {
        display: flex !important;
    }

    /* 修复 hover 放大抖动 */
    .post-card:hover {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .post-cover img {
        height: 160px;
    }

    .sponsor-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        padding: 1.2rem 1rem;
    }

    .qr-code-container {
        flex-direction: column;
        gap: 1rem;
    }

    .qr-code-item {
        width: 100%;
    }

    .qr-img {
        width: min(65vw, 180px);
        max-width: 180px;
        min-width: 120px;
    }

    .sponsor-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .qr-label {
        font-size: 0.9rem;
    }

    .back-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .thanks-btn {
        padding: 0.7rem 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-tabs {
        gap: 1rem;
    }

    .nav-user {
        gap: 0.5rem;
    }

    .nav-user a {
        padding: 0.3rem 0.7rem;
        font-size: 0.8rem;
    }

    .qr-img {
        width: min(60vw, 150px);
        max-width: 150px;
    }

    .sponsor-modal-content {
        padding: 1rem 0.8rem;
    }

    .close-btn {
        top: 0.6rem;
        right: 1rem;
        font-size: 1.3rem;
    }
}

/*=================用户协议弹窗样式=================*/

.agreement-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

.agreement-content {
    position: relative;
    width: 90%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid #fde6d2;
}

.agreement-title {
    text-align: center;
    color: #e67e22;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
}

.agreement-scroll {
    max-height: 380px;
    overflow-y: auto;
    background: #fffaf5;
    border: 1px solid #f3e3d4;
    border-radius: 10px;
    padding: 1rem;
    color: #5a4a42;
    line-height: 1.8;
    font-size: 14px;
}

.agreement-scroll p {
    margin-bottom: 0.8rem;
}

.agreement-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.agreement-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 0.9rem 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.decline-btn {
    background: #fde6d2;
    color: #d35400;
}

.decline-btn:hover {
    background: #f8d7b7;
}

.accept-btn {
    background: #e67e22;
    color: white;
}

.accept-btn:hover {
    background: #d35400;
}

.accept-btn:disabled {
    background: #f3bf90;
    cursor: not-allowed;
}

/* 关闭按钮（仅手动打开时显示） */
.agreement-close-btn {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 28px;
    line-height: 1;
    color: #9a8a82;
    cursor: pointer;
    user-select: none;
    display: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.agreement-close-btn:hover {
    color: #e67e22;
    transform: scale(1.1);
}

.agreement-modal.manual-open .agreement-close-btn {
    display: block;
}

.agreement-modal.manual-open .agreement-btns {
    display: none;
}

/* 深色模式：用户协议弹窗 */
body.dark-mode .agreement-modal {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .agreement-content {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .agreement-title {
    color: #e67e22;
}

body.dark-mode .agreement-scroll {
    background: #181818;
    border-color: rgba(255, 255, 255, 0.08);
    color: #d8d8d8;
}

body.dark-mode .agreement-scroll p {
    color: #d8d8d8;
}

body.dark-mode .agreement-close-btn {
    color: #888;
}

body.dark-mode .agreement-close-btn:hover {
    color: #e67e22;
}

body.dark-mode .decline-btn {
    background: rgba(230, 126, 34, 0.18);
    color: #f0a060;
}

body.dark-mode .decline-btn:hover {
    background: rgba(230, 126, 34, 0.28);
}

@media (max-width: 768px) {
    .agreement-content {
        padding: 1.2rem;
    }

    .agreement-scroll {
        max-height: 300px;
    }

    .agreement-btns {
        flex-direction: column;
    }
}

/*=============浅色和深色模式切换按钮=============*/

.theme-toggle-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
}

/*深色模式*/

body.dark-mode {
    background: #121212;
    color: #e8e8e8;
}

body.dark-mode .post-card,
body.dark-mode .widget,
body.dark-mode .author-card,
body.dark-mode .agreement-content,
body.dark-mode .sponsor-modal-content {
    background: #1e1e1e !important;
    color: #e8e8e8 !important;
    border-color: rgba(255,255,255,0.08);
}

/* 深色模式：应用布局组件 */
body.dark-mode .app-layout,
body.dark-mode .page-card,
body.dark-mode .rail-nav,
body.dark-mode .rail-user-card,
body.dark-mode .timeline-content,
body.dark-mode .contact-item,
body.dark-mode .friend-link-item {
    background: #1e1e1e !important;
    color: #e8e8e8 !important;
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

body.dark-mode .page-title,
body.dark-mode .rail-username,
body.dark-mode .contact-value,
body.dark-mode .friend-name,
body.dark-mode .timeline-body p {
    color: #e8e8e8;
}

body.dark-mode .page-subtitle,
body.dark-mode .rail-email,
body.dark-mode .contact-label,
body.dark-mode .rail-login-tip {
    color: #999;
}

body.dark-mode .rail-item {
    color: #d8d8d8;
}

body.dark-mode .rail-item:hover {
    background: rgba(230, 126, 34, 0.18);
    color: #e67e22;
}

body.dark-mode .rail-logout-btn {
    background: #1e1e1e;
    color: #e67e22;
    border-color: #e67e22;
}

body.dark-mode .contact-tip {
    background: rgba(230, 126, 34, 0.12);
    color: #f0a060;
}

body.dark-mode .timeline::before {
    background: linear-gradient(to bottom, #e67e22, rgba(230, 126, 34, 0.1));
}

/* 深色模式：注册按钮 / 公告 / 毛玻璃卡片 */
body.dark-mode .rail-register-btn {
    background: transparent;
    color: #e67e22;
    border-color: #e67e22;
}

body.dark-mode .rail-register-btn:hover {
    background: #e67e22;
    color: #fff;
}

body.dark-mode .app-right .notice-widget {
    background: rgba(30, 30, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .app-right .notice-list {
    background: rgba(230, 126, 34, 0.1);
    border-color: rgba(230, 126, 34, 0.2);
}

body.dark-mode .app-right .notice-list p {
    color: #f0a060;
}

body.dark-mode .rail-theme-toggle {
    color: #d8d8d8;
}

body.dark-mode .rail-theme-toggle:hover {
    background: rgba(230, 126, 34, 0.18);
    color: #e67e22;
}

/* 深色模式：登录按钮 / 文章封面 / 返回顶部 */
body.dark-mode .rail-login-btn {
    background: #e67e22;
    color: #fff;
}

body.dark-mode .rail-login-btn:hover {
    background: #d35400;
    color: #fff;
}

body.dark-mode .post-cover {
    background: #111;
}

body.dark-mode .post-cover img {
    opacity: 0.92;
}

body.dark-mode .back-to-top-btn {
    background: rgba(30, 30, 30, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

body.dark-mode .back-to-top-btn img {
    filter: invert(1);
}

body.dark-mode .rail-user-card.logged-out {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .rail-avatar {
    border-color: #e67e22;
}

body.dark-mode a {
    color: #dcdcdc;
}

body.dark-mode .theme-toggle-btn {
    background: rgba(30,30,30,0.95);
    color: #ffffff;
}

body.dark-mode .footer {
    background: #181818;
    color: #d8d8d8;
}

body.dark-mode .tag {
    background: rgba(255,255,255,0.08);
    color: #f2f2f2;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode button {
    color: #ffffff;
}

/*恢复浅色模式原始配色*/


/* 深色模式：标题颜色白色（主页使用紧凑卡片，不放大字号） */
html:not(.app-home) body.dark-mode .post-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.7 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    margin: 12px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* 深色模式：置顶文章标题 */
html:not(.app-home) body.dark-mode .post-card.sticky .post-title {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
}

/* 深色模式：主页帖子标题（紧凑、白色、无阴影） */
html.app-home body.dark-mode .post-title {
    color: #f0f0f0 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    margin: 0.15rem 0 !important;
}

/* 深色模式：摘要（主页除外，主页保持紧凑） */
html:not(.app-home) body.dark-mode .post-excerpt {
    color: rgba(255,255,255,0.88) !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
}

/* 深色模式：时间 */
html:not(.app-home) body.dark-mode .post-meta {
    color: rgba(255,255,255,0.65) !important;
    font-size: 13px !important;
}

/* 深色模式：标签 */
html:not(.app-home) body.dark-mode .post-tags {
    color: #ff9d3d !important;
    font-size: 14px !important;
    font-weight: 600;
}

/* 深色模式：主页帖子摘要/时间/标签（紧凑尺寸 + 深色配色） */
html.app-home body.dark-mode .post-excerpt {
    color: rgba(255,255,255,0.85) !important;
}

html.app-home body.dark-mode .post-meta {
    color: rgba(255,255,255,0.6) !important;
}

html.app-home body.dark-mode .post-tags {
    color: #ff9d3d !important;
}

/* 深色模式：按钮保持高可读性 */
body.dark-mode .btn-link,
body.dark-mode .thanks-btn {
    background: #f6efe6 !important;
    color: #1f1f1f !important;
}

body.dark-mode .btn-link:hover,
body.dark-mode .thanks-btn:hover {
    background: #fff7ee !important;
    color: #000 !important;
}

body.dark-mode .sponsor-btn {
    background: #e67e22 !important;
    color: #ffffff !important;
}

body.dark-mode .sponsor-btn:hover {
    background: #d35400 !important;
}

/* ======================== 登录/注册页面样式 ======================== */
.auth-container {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    text-align: center;
    font-size: 1.8rem;
    color: #e67e22;
    margin-bottom: 1.5rem;
}

.auth-card .form-group {
    margin-bottom: 1.2rem;
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #5a4a42;
}

.auth-card .form-group input[type="text"],
.auth-card .form-group input[type="email"],
.auth-card .form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #f0e6dc;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #faf7f4;
}

.auth-card .form-group input:focus {
    outline: none;
    border-color: #e67e22;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.auth-card .form-help {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #999;
}

.auth-card .checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-card .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e67e22;
    cursor: pointer;
}

.auth-card .checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.auth-card .btn-block {
    width: 100%;
    padding: 0.85rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.auth-card .alert {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.auth-card .alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.auth-card .alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0e6dc;
    color: #888;
}

.auth-card .auth-footer a {
    color: #e67e22;
    font-weight: 500;
}

.auth-card .auth-footer a:hover {
    color: #d35400;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #ccc;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.85rem;
}

.auth-back-home {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #999;
    font-size: 0.9rem;
}

.auth-back-home:hover {
    color: #e67e22;
}

/* 深色模式适配 */
body.dark-mode .auth-card {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .auth-card h1 {
    color: #e67e22;
}

body.dark-mode .auth-card .form-group label {
    color: #ccc;
}

body.dark-mode .auth-card .form-group input[type="text"],
body.dark-mode .auth-card .form-group input[type="email"],
body.dark-mode .auth-card .form-group input[type="password"] {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #fff;
}

body.dark-mode .auth-card .form-group input:focus {
    border-color: #e67e22;
    background: #2a2a2a;
}

body.dark-mode .auth-card .form-help {
    color: #888;
}

body.dark-mode .auth-card .auth-footer {
    border-color: #3a3a3a;
    color: #888;
}

body.dark-mode .auth-card .auth-footer a {
    color: #e67e22;
}

body.dark-mode .auth-card .alert-error {
    background: #3a2020;
    color: #f88;
    border-color: #5a3030;
}

body.dark-mode .auth-back-home {
    color: #888;
}

body.dark-mode .auth-back-home:hover {
    color: #e67e22;
}

/* =========================
深色模式主体背景统一
========================= */

/* 深色模式主体背景统一 */
body.dark-mode {
    background: #121212 !important;
}

/* 容器区域保持统一深色 */
body.dark-mode .container {
    background: transparent;
}

/* 左下角主题切换按钮 */
body.dark-mode .theme-toggle-btn {
    background: rgba(35, 35, 35, 0.95) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

/* 鸣谢名单 / 用户协议 / 常见问题按钮 */
body.dark-mode .btn-link,
body.dark-mode .thanks-btn {
    background: #2a2a2a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

body.dark-mode .btn-link:hover,
body.dark-mode .thanks-btn:hover {
    background: #333333 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* 赞助按钮 */
body.dark-mode .sponsor-btn {
    background: #c96a12 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

body.dark-mode .sponsor-btn:hover {
    background: #b85d08 !important;
    color: #ffffff !important;
}

/* 返回主页按钮 */
body.dark-mode .back-home {
    background: #2d2d2d !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.06);
}

body.dark-mode .back-home:hover {
    background: #383838 !important;
    color: #ffffff !important;
}

/* 附件下载按钮区域 */
body.dark-mode .attachment-item {
    background: #252525 !important;
    color: #ffffff !important;
}

body.dark-mode .attachment-download {
    color: #ffffff !important;
}

body.dark-mode .attachment-download:hover {
    color: #ffb366 !important;
}

/* =========================
全站搜索框
========================= */
.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #ffffff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1 1 auto;        /* 允许扩展，但不乱缩 */
    min-width: 0;          /* 防止内容撑破或异常压缩 */
    width: 100%;

    height: 48px;
    border: 1px solid #f3d7bd;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    background: #fffaf5;
    color: #5a4a42;
    outline: none;

    box-sizing: border-box; /*避免 padding 影响宽度*/
}

.search-box input:focus {
    border-color: #e67e22;
}

/*按钮禁止压缩 */
#searchBtn {
    flex-shrink: 0;

    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: 10px;
    background: #e67e22;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

#searchBtn:hover {
    background: #d35400;
    transform: translateY(-1px);
}

/*深色模式*/
body.dark-mode .search-box {
    background: #1e1e1e;
    box-shadow: none;
}

body.dark-mode .search-box input {
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
}

body.dark-mode #searchBtn {
    background: #a85a1f;
    color: #ffffff;
}

body.dark-mode #searchBtn:hover {
    background: #8e4915;
}

@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    #searchBtn {
        width: 100%;
    }
}

/*左侧公告栏样式*/

.notice-widget {
    background: #ffffff;
    border: 1px solid #fde6d2;
    position: relative;
    overflow: hidden;
}

.notice-widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #e67e22;
    border-radius: 4px;
}

.notice-widget h4 {
    color: #e67e22;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    padding-left: 0.5rem;
}

.notice-content {
    padding-left: 0.5rem;
}

.notice-content p {
    margin-bottom: 0.6rem;
    font-size: 14px;
    line-height: 1.7;
    color: #5a4a42;
}

.notice-list {
    margin: 1rem 0;
    padding: 0.8rem;
    background: #fff8f2;
    border-radius: 10px;
    border: 1px solid #fde6d2;
}

.notice-list p {
    margin-bottom: 0.5rem;
    color: #d35400;
    font-weight: 500;
}

.notice-tip {
    font-size: 13px;
    color: #888;
    padding-top: 0.5rem;
    border-top: 1px dashed #f0e6dc;
}

/*适配深色模式*/

body.dark-mode .notice-widget {
    background: #1e1e1e !important;
    border: 1px solid rgba(255,255,255,0.08);
}

body.dark-mode .notice-widget::before {
    background: #ff9d3d;
}

body.dark-mode .notice-widget h4 {
    color: #ffb266;
}

body.dark-mode .notice-content p {
    color: #f2f2f2;
}

body.dark-mode .notice-list {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

body.dark-mode .notice-list p {
    color: #ffb266;
}

body.dark-mode .notice-tip {
    color: rgba(255,255,255,0.65);
    border-top: 1px dashed rgba(255,255,255,0.08);
}

/* 深色模式：顶部导航栏 */
body.dark-mode .top-nav {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-tabs a {
    color: #e8e8e8;
}

body.dark-mode .nav-tabs a:hover,
body.dark-mode .nav-tabs a.active {
    color: #ffb366;
}

body.dark-mode .nav-user span {
    color: #cccccc;
}

body.dark-mode .nav-user .nav-login {
    background: #2a2a2a;
    color: #ffb366;
    border: 1px solid rgba(255,255,255,0.08);
}

body.dark-mode .nav-user .nav-login:hover {
    background: #333333;
    color: #ff9d3d;
}

body.dark-mode .nav-user .nav-register {
    background: #c96a12;
    color: #ffffff;
}

body.dark-mode .nav-user .nav-register:hover {
    background: #b85d08;
}

body.dark-mode .nav-old-site {
    background: #2a2a2a;
    color: #e8e8e8;
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .nav-old-site:hover {
    border-color: #ffb366;
    color: #ffb366;
}

body.dark-mode .lang-btn {
    background: #2a2a2a;
    color: #e8e8e8;
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .lang-btn:hover {
    border-color: #ffb366;
    color: #ffb366;
}

body.dark-mode .language-menu {
    background: #2a2a2a;
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .language-menu a {
    color: #e8e8e8;
}

body.dark-mode .language-menu a:hover {
    background: #333333;
    color: #ffb366;
}

body.dark-mode .pagination a,
body.dark-mode .pagination span {
    background: #1e1e1e;
    border-color: rgba(255,255,255,0.08);
    color: #e8e8e8;
}

body.dark-mode .pagination a:hover {
    background: #c96a12;
    color: #fff;
    border-color: #c96a12;
}

body.dark-mode .pagination a.active {
    background: #c96a12;
    color: #fff;
    border-color: #c96a12;
}

body.dark-mode .pagination .ellipsis {
    background: transparent;
    color: rgba(255,255,255,0.65);
}

/*筛选动画样式  向上渐入*/

.post-card {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition: all 0.4s ease;
}

/* 隐藏状态 */
.post-card.hide {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(6px);
    pointer-events: none;
    position: absolute;
}

/* 显示动画 */
.post-card.show {
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ============================================================
   桌面端 App 化：流畅渐入动画系统
   ============================================================ */

/* ---------- 关键帧定义 ---------- */
@keyframes app-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes app-fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes app-fadeDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes app-fadeLeft {
    from { opacity: 0; transform: translateX(-32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes app-fadeRight {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes app-scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes app-popIn {
    0%   { opacity: 0; transform: scale(0.8) translateY(10px); }
    60%  { opacity: 1; transform: scale(1.03) translateY(0); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes app-blurIn {
    from { opacity: 0; filter: blur(10px); transform: translateY(12px); }
    to   { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes app-slideUp {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 通用动画工具类 ---------- */
.anim-fadeIn   { animation: app-fadeIn   0.6s ease both; }
.anim-fadeUp   { animation: app-fadeUp   0.6s ease both; }
.anim-fadeDown { animation: app-fadeDown 0.6s ease both; }
.anim-fadeLeft { animation: app-fadeLeft 0.6s ease both; }
.anim-fadeRight{ animation: app-fadeRight 0.6s ease both; }
.anim-scaleIn  { animation: app-scaleIn  0.5s ease both; }
.anim-popIn    { animation: app-popIn    0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.anim-blurIn   { animation: app-blurIn   0.7s ease both; }
.anim-slideUp  { animation: app-slideUp  0.7s ease both; }

/* ---------- 交错延迟工具类 ---------- */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.30s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.40s; }
.delay-9 { animation-delay: 0.45s; }
.delay-10 { animation-delay: 0.50s; }

/* ---------- 滚动揭示动画（IntersectionObserver 触发） ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
    will-change: opacity, transform;
}
.reveal.reveal-left  { transform: translateX(-32px); }
.reveal.reveal-right { transform: translateX(32px); }
.reveal.reveal-scale { transform: scale(0.92); }

.reveal.in-view {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    filter: blur(0);
}

/* ---------- App 化：页面加载时整体淡入 ---------- */
body {
    animation: app-fadeIn 0.4s ease;
}

/* ---------- App 化：卡片 / Widget 微交互增强 ---------- */
.author-card,
.widget,
.post-card,
.friend-links li a,
.pagination a,
.search-box {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease,
                background-color 0.3s ease,
                border-color 0.3s ease;
}

/* Widget 悬停轻微上浮 */
.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(90, 74, 66, 0.1);
}

/* 站长/管理员卡片：禁用悬停放大/上浮动画 */
.author-card:hover {
    transform: none;
    box-shadow: inherit;
}
.app-right .author-card:hover {
    box-shadow: 0 2px 10px rgba(90, 74, 66, 0.06);
}

/* 友链悬停加强 */
.friend-links li a {
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

/* 标签悬停微弹 */
.tag {
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: default;
}
.tag:hover {
    transform: scale(1.08);
    background: #fbd9b8;
}

/* 分页按钮悬停上浮 */
.pagination a {
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pagination a:hover {
    transform: translateY(-2px);
}

/* ---------- App 化：按钮按下反馈 ---------- */
button,
.sponsor-btn,
.thanks-btn,
.lang-btn,
.nav-old-site,
.nav-user a,
#searchBtn {
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
button:active,
.sponsor-btn:active,
.thanks-btn:active,
#searchBtn:active,
.nav-user a:active {
    transform: scale(0.96) !important;
}

/* ---------- App 化：聚焦时柔和光晕 ---------- */
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.18);
}

/* ---------- App 化：返回顶部 / 主题切换按钮渐入 ---------- */
.back-to-top-btn,
.theme-toggle-btn {
    animation: app-fadeIn 0.6s ease 0.3s both;
}

/* ---------- App 化：弹窗动画 ---------- */
.sponsor-modal,
.agreement-modal {
    animation: app-fadeIn 0.25s ease;
}
.sponsor-modal-content,
.agreement-content {
    animation: app-popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ---------- App 化：深色模式下窗口边框 ---------- */
body.dark-mode .container {
    background: rgba(30, 30, 30, 0.4);
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

body.dark-mode .top-nav {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
}

/* ---------- App 化：尊重「减少动态」无障碍偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

 /**  
  **************************************************************  
  *                                                            *  
  *    .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.      *  
  *    |                 ______________                 |      * 
  *    |                |              |                |      *
  *    |               |                |               |      * 
  *    |       _______|__________________|________      |      *  
  *    |                  .-"      "-.                  |      *  
  *    |                 /            \                 |      *  
  *    |     _          |              |          _     |      *  
  *    |    ( \         |,  .-.  .-.  ,|         / )    |      *  
  *    |     > "=._     | )(__/  \__)( |     _.=" <     |      *  
  *    |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |      *  
  *    |           "=._"(_     ^^     _)"_.="           |      *  
  *    |               "=\__|IIIIII|__/="               |      *  
  *    |              _.="| \IIIIII/ |"=._              |      *  
  *    |    _     _.="_.="\          /"=._"=._     _    |      *  
  *    |   ( \_.="_.="     `--------`     "=._"=._/ )   |      *  
  *    |    > _.="                            "=._ <    |      *  
  *    |   (_/                                    \_)   |      *  
  *    |                                                |      *  
  *    '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='      *  
  *                                                            *  
  *                      1,500,000,000$                        *  
  **************************************************************  
  */
/* ============ 账号管理按钮 ============ */
.rail-account-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.4rem;
    padding: 0.45rem 0;
    border-radius: 10px;
    background: #fff;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}
.rail-account-btn .icon {
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
    margin-right: 0.2rem;
}
.rail-account-btn:hover {
    background: #3b82f6;
    color: #fff;
    transform: translateY(-1px);
}
body.dark-mode .rail-account-btn {
    background: #1e1e1e;
    color: #60a5fa;
    border-color: #3b82f6;
}