/* QQ空间风格全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
}

a {
    text-decoration: none;
    color: #36648b;
    transition: color 0.3s;
}

a:hover {
    color: var(--theme-link-hover, #ff6b6b);
}

/* 登录页面样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px 30px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #ff6b6b;
    font-size: 24px;
    margin-bottom: 10px;
}

.login-header p {
    color: #999;
    font-size: 14px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.login-hint {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
}

.login-footer p {
    color: #999;
    font-size: 12px;
}

/* 主容器 */
.wrapper {
    min-height: 100vh;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* iOS 移动端修复：background-attachment:fixed 在 iOS Safari 上渲染异常 */
@supports (-webkit-touch-callout: none) {
    .wrapper {
        background-attachment: scroll;
    }
}

/* =============================================
   情侣标题栏 couple-header-bar
   固定在 top-bar 下方（top: 50px）
   ============================================= */

/* 标题栏容器 */
.couple-header-bar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 990;
    /* 视觉内容高度 76px + 底部羽化区 28px */
    height: 104px;
    overflow: hidden;
    box-shadow: none;
    /* 底部羽化渐隐 —— 让标题栏自然融入页面 */
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 65%, transparent 100%);
}
/* 降级兼容：::after 伪元素渐变遮罩 */
.couple-header-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;
    background: linear-gradient(to bottom, transparent 0%, rgba(240,242,245,0.6) 100%);
    pointer-events: none;
    z-index: 20;
}

/* 背景层 */
.chb-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff6b9d 0%, #c850c0 40%, #4158d0 100%);
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease;
}
.chb-bg.chb-bg-custom {
    background-color: transparent;
}
/* 自定义图片时叠加暗色遮罩保证文字可读 */
.chb-bg.chb-bg-custom::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.32);
}

/* 动态光晕扫光效果（无自定义背景时） */
.chb-bg:not(.chb-bg-custom)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.08) 30%,
        rgba(255,255,255,0.18) 50%,
        rgba(255,255,255,0.08) 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: chb-shimmer 4s linear infinite;
}
@keyframes chb-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 粒子层 */
.chb-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.chb-particle {
    position: absolute;
    bottom: -10px;
    color: rgba(255,255,255,0.7);
    animation: chb-float linear infinite;
    will-change: transform, opacity;
}
@keyframes chb-float {
    0%   { transform: translateY(0) scale(0.8);  opacity: 0; }
    15%  { opacity: 1; }
    80%  { opacity: 0.6; }
    100% { transform: translateY(-110px) scale(1.1); opacity: 0; }
}

/* 内容层 */
.chb-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 28px;  /* 底部留出羽化区高度，内容自然居中于视觉高度 */
    gap: 0;
    box-sizing: border-box;
}

/* 两侧情侣区 */
.chb-person {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.chb-girl {
    justify-content: flex-end;
}

/* 头像外框 */
.chb-avatar-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid rgba(255,255,255,0.9);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.22), 0 3px 12px rgba(0,0,0,0.25);
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: chb-avatar-breathe 3s ease-in-out infinite;
}
.chb-boy .chb-avatar-wrap {
    animation-delay: 0s;
}
.chb-girl .chb-avatar-wrap {
    animation-delay: 1.5s;
}
@keyframes chb-avatar-breathe {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 0 3px rgba(255,255,255,0.22), 0 3px 12px rgba(0,0,0,0.25); }
    50%       { transform: scale(1.04); box-shadow: 0 0 0 5px rgba(255,255,255,0.32), 0 5px 18px rgba(0,0,0,0.3); }
}
.chb-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.chb-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* 昵称 & 标签 */
.chb-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.chb-info-right {
    align-items: flex-end;
}
.chb-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
    white-space: nowrap;
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chb-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
    align-self: flex-start;
}
.chb-info-right .chb-tag {
    align-self: flex-end;
}
.chb-tag-boy {
    background: rgba(100,160,255,0.55);
    border: 1px solid rgba(100,160,255,0.7);
    backdrop-filter: blur(4px);
}
.chb-tag-girl {
    background: rgba(255,130,180,0.55);
    border: 1px solid rgba(255,130,180,0.7);
    backdrop-filter: blur(4px);
}

/* 中间爱心区 */
.chb-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 0;
    min-width: 60px;
}

/* 跳动爱心 */
.chb-heart-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chb-heart-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.45);
    animation: chb-ring-pulse 2s ease-out infinite;
}
.chb-ring2 {
    animation-delay: 1s;
    border-color: rgba(255,255,255,0.25);
}
@keyframes chb-ring-pulse {
    0%   { transform: scale(0.85); opacity: 0.9; }
    100% { transform: scale(2.0);  opacity: 0; }
}
.chb-heart-icon {
    font-size: 28px;
    animation: chb-heartbeat 1.4s ease-in-out infinite;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(255,50,100,0.7));
    line-height: 1;
}
@keyframes chb-heartbeat {
    0%, 100% { transform: scale(1);    }
    14%      { transform: scale(1.2);  }
    28%      { transform: scale(1);    }
    42%      { transform: scale(1.13); }
    70%      { transform: scale(1);    }
}

/* 换背景按钮（悬停时出现） */
.chb-change-bg-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
}
.couple-header-bar:hover .chb-change-bg-btn {
    opacity: 1;
    pointer-events: auto;
}
.chb-change-bg-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-50%) scale(1.08);
}

/* ── 移动端标题栏 ── */
@media (max-width: 768px) {
    .couple-header-bar {
        height: 86px;  /* 60px内容 + 26px羽化 */
    }
    .chb-inner {
        padding: 0 12px 26px;
        gap: 0;
    }
    .chb-avatar-wrap {
        width: 44px;
        height: 44px;
        border-width: 2px;
    }
    .chb-avatar-fallback {
        font-size: 18px;
    }
    .chb-name {
        font-size: 13px;
        max-width: 60px;
    }
    .chb-tag {
        font-size: 10px;
        padding: 1px 6px;
    }
    .chb-heart-icon {
        font-size: 24px;
    }
    .chb-heart-wrap {
        width: 36px;
        height: 36px;
    }
    .chb-center {
        min-width: 50px;
    }
    /* 移动端长按显示换背景按钮 */
    .chb-change-bg-btn {
        right: 8px;
        font-size: 12px;
        padding: 3px 8px;
    }
    .couple-header-bar.touch-active .chb-change-bg-btn {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 420px) {
    .couple-header-bar {
        height: 80px;  /* 56px内容 + 24px羽化 */
    }
    .chb-inner {
        padding: 0 10px 24px;
    }
    .chb-avatar-wrap {
        width: 38px;
        height: 38px;
    }
    .chb-name {
        font-size: 12px;
        max-width: 52px;
    }
    .chb-info {
        gap: 2px;
    }
    .chb-heart-icon {
        font-size: 22px;
    }
    .chb-heart-wrap {
        width: 32px;
        height: 32px;
    }
    .chb-center {
        min-width: 44px;
    }
}


/* 顶部导航 */
.top-bar {
    background: rgba(255, 255, 255, 0.95);
    height: 50px;
    line-height: 50px;
    border-bottom: 3px solid var(--theme-topbar-border, #ff6b6b);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: border-color 0.4s;
}

.top-bar-inner {
    width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.space-logo {
    font-size: 18px;
    font-weight: bold;
    color: var(--theme-primary, #ff6b6b);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.4s;
}

.top-bar-nav {
    display: flex;
    gap: 5px;
}

.top-bar-nav a {
    padding: 0 20px;
    height: 50px;
    line-height: 50px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.top-bar-nav a:hover,
.top-bar-nav a.active {
    color: var(--theme-nav-active-color, #ff6b6b);
    background: rgba(255, 107, 107, 0.1);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 200px;
    font-size: 12px;
}

.user-actions a {
    color: #666;
    font-size: 12px;
    padding: 0 8px;
}

.user-actions a:hover {
    color: #ff6b6b;
}

/* 主内容区 */
.main-container {
    width: 1000px;
    margin: 0 auto;
    padding-top: 160px;
    padding-bottom: 40px;
    display: flex;
    gap: 15px;
}

/* 左侧边栏 */
.left-sidebar {
    width: 220px;
    flex-shrink: 0;
}

/* =============================================
   情侣信息卡片（全新设计 v4）
   - 四行清晰布局：昵称 / 日期 / 在一起 / 天数
   - 沉浸式背景 + 精致排版
   ============================================= */

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.2); }
    70% { transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 卡片外层 */
.couple-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    min-height: 300px;
}

/* 背景层：默认渐变，可被 JS 替换为图片 */
.couple-card-bg {
    position: absolute;
    inset: 0;
    background: var(--theme-couple-card-bg, linear-gradient(145deg, #ff6b6b 0%, #ff8e53 40%, #ff6b9d 100%));
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease, background 0.5s ease;
    z-index: 0;
}

/* 遮罩层 */
.couple-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.18) 50%,
        rgba(0, 0, 0, 0.62) 100%
    );
    z-index: 1;
}

/* 换背景按钮（右上角） */
.couple-card-change-bg {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 10px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.25s;
    letter-spacing: 0.5px;
}

.couple-card-change-bg:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

/* 卡片内容层 */
.couple-card-body {
    position: relative;
    z-index: 2;
    padding: 28px 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* 爱心图标 */
.couple-card-heart {
    font-size: 26px;
    animation: heartBeat 2s ease-in-out infinite;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

/* ── 第一行：情侣昵称 ── */
.couple-names {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    letter-spacing: 3px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    line-height: 1.3;
    margin-bottom: 10px;
    /* shimmer 光泽 */
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.7) 0%,
        #fff 40%,
        rgba(255,230,200,0.9) 60%,
        #fff 80%,
        rgba(255,255,255,0.7) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ── 第二行：起始日期胶囊 ── */
.love-since {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.love-since::before {
    content: '💗';
    font-size: 11px;
}

.love-since span {
    color: #fff;
    font-weight: bold;
    letter-spacing: 1.5px;
}

/* ── 第三行：在一起 ── */
.love-days-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    letter-spacing: 8px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.2);
    margin-bottom: 4px;
    text-indent: 8px; /* 补偿 letter-spacing */
}

/* ── 第四行：天数大数字 ── */
.love-days-big {
    font-size: 62px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    /* 金色渐变数字 */
    background: linear-gradient(180deg, #fff 0%, #ffe8c0 50%, #ffbe76 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.3));
    margin-bottom: 2px;
    animation: fadeSlideUp 0.6s ease;
}

/* 天 单位小字（紧贴数字右下角） */
.love-days-unit {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

/* 分割线 */
.couple-divider {
    width: 80%;
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 10px 0;
}

/* 统计区（在卡片内，白色文字） */
.couple-card .user-stats {
    width: 100%;
    border: none;
    padding: 0;
    margin-bottom: 12px;
}

.couple-card .stat-item {
    text-align: center;
}

.couple-card .stat-num {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.couple-card .stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

/* 爱情宣言 */
.love-declaration-wrap {
    width: 90%;
    max-width: 220px;
    margin: 4px auto 0;
    padding: 8px 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-align: center;
    display: none; /* 有内容时 JS 控制显示 */
}
.love-declaration-text {
    font-size: 12px;
    color: rgba(255,255,255,0.92);
    line-height: 1.6;
    letter-spacing: 0.5px;
    word-break: break-all;
    font-style: italic;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    white-space: pre-wrap;
}
.love-declaration-text::before {
    content: '" ';
    font-size: 16px;
    opacity: 0.7;
    vertical-align: -2px;
}
.love-declaration-text::after {
    content: ' "';
    font-size: 16px;
    opacity: 0.7;
    vertical-align: -2px;
}

/* 操作按钮行（在卡片内） */
.couple-card .user-actions-bar {
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0;
    gap: 10px;
}

.couple-card .action-btn {
    flex: 1;
    padding: 9px 0;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

.couple-card .action-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}

/* 旧 .user-card 保留兼容（其他页面用） */

/* =============================================
   移动端快捷导航栏（情侣卡片下方，仅手机显示）
   ============================================= */
.mobile-quick-nav {
    display: none; /* 桌面端隐藏 */
}

@media (max-width: 768px) {
    .mobile-quick-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-radius: 18px;
        padding: 8px 4px;
        margin-bottom: 14px;
        box-shadow: 0 6px 24px rgba(0,0,0,0.10), 0 1px 0 rgba(255,255,255,0.8) inset;
        border: 1px solid rgba(255,255,255,0.7);
    }

    .mqn-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 1;
        text-decoration: none;
        padding: 8px 4px 6px;
        border-radius: 12px;
        transition: transform 0.15s ease, background 0.15s ease;
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .mqn-btn:active {
        transform: scale(0.88);
    }

    /* 图标容器——带渐变背景圆圈 */
    .mqn-btn .mqn-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.15s ease;
        box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    }

    .mqn-btn svg {
        width: 20px;
        height: 20px;
        stroke: #fff;
        stroke-width: 2;
        fill: none;
        flex-shrink: 0;
    }

    .mqn-btn span {
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    /* 各按钮渐变色 */
    .mqn-btn[data-page="blog"]    .mqn-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
    .mqn-btn[data-page="album"]   .mqn-icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
    .mqn-btn[data-page="message"] .mqn-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
    .mqn-btn[data-page="events"]  .mqn-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }
    .mqn-btn[data-page="chat"]    .mqn-icon { background: linear-gradient(135deg, #fa709a, #fee140); }

    /* 文字颜色匹配图标 */
    .mqn-btn[data-page="blog"]    span { color: #764ba2; }
    .mqn-btn[data-page="album"]   span { color: #f5576c; }
    .mqn-btn[data-page="message"] span { color: #4facfe; }
    .mqn-btn[data-page="events"]  span { color: #38c172; }
    .mqn-btn[data-page="chat"]    span { color: #fa709a; }

    /* 当前激活页：图标放大+底部小点 */
    .mqn-btn.active .mqn-icon {
        transform: scale(1.12);
        box-shadow: 0 5px 16px rgba(0,0,0,0.22);
    }
    .mqn-btn.active::after {
        content: '';
        position: absolute;
        bottom: 0px;
        left: 50%;
        transform: translateX(-50%);
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: currentColor;
    }
    .mqn-btn[data-page="blog"].active::after    { background: #764ba2; }
    .mqn-btn[data-page="album"].active::after   { background: #f5576c; }
    .mqn-btn[data-page="message"].active::after { background: #4facfe; }
    .mqn-btn[data-page="events"].active::after  { background: #38c172; }
    .mqn-btn[data-page="chat"].active::after    { background: #fa709a; }

    /* chat页嵌入式导航栏特殊样式 */
    .chat-page-nav {
        border-radius: 0;
        margin-bottom: 0;
        background: rgba(255,255,255,0.75);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(240,98,146,0.12);
        border-bottom: 1px solid rgba(240,98,146,0.12);
        border-left: none;
        border-right: none;
        box-shadow: none;
        padding: 6px 4px;
        flex-shrink: 0;
    }

    /* home按钮渐变色 */
    .mqn-btn[data-page="home"] .mqn-icon { background: linear-gradient(135deg, #f7971e, #ffd200); }
    .mqn-btn[data-page="home"] span { color: #f7971e; }
    .mqn-btn[data-page="home"].active .mqn-icon { transform: scale(1.12); }
    .mqn-btn[data-page="home"].active::after { background: #f7971e; }
}




.user-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.user-cover {
    height: 120px;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    position: relative;
    transition: background 0.4s;
}

.user-cover-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-cover-btn:hover {
    background: white;
    transform: translateY(-2px);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    margin: -40px auto 10px;
    position: relative;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-name {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.user-info {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-bottom: 10px;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 18px;
    font-weight: bold;
    color: var(--theme-stat-num, #ff6b6b);
    transition: color 0.4s;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.user-actions-bar {
    display: flex;
    justify-content: space-around;
    padding: 15px;
}

.action-btn {
    padding: 8px 15px;
    background: var(--theme-publish-btn, linear-gradient(135deg, #667eea, #764ba2));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px var(--theme-publish-btn-shadow, rgba(102, 126, 234, 0.3));
}

.action-btn.secondary {
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
}

/* 背景设置卡片 */
.bg-settings {
    background: var(--theme-card-bg, rgba(255, 255, 255, 0.95));
    border-radius: 8px;
    box-shadow: var(--theme-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--theme-card-border, transparent);
    transition: background 0.4s, box-shadow 0.4s;
}

.bg-settings h3 {
    font-size: 14px;
    color: var(--theme-card-header-title, #333);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--theme-card-header-border, #eee);
    transition: color 0.4s;
}

.bg-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.bg-option {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.bg-option:hover,
.bg-option.active {
    border-color: var(--theme-primary, #ff6b6b);
    color: var(--theme-primary, #ff6b6b);
    transform: scale(1.02);
}

.bg-option .bg-preview {
    width: 100%;
    height: 60px;
    border-radius: 3px;
    margin-bottom: 5px;
}

/* 右侧内容区 */
.main-content {
    flex: 1;
}

/* 内容卡片 */
.content-card {
    background: var(--theme-card-bg, rgba(255, 255, 255, 0.96));
    border-radius: var(--theme-card-radius, 10px);
    box-shadow: var(--theme-card-shadow, 0 4px 20px rgba(102, 126, 234, 0.10));
    margin-bottom: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid var(--theme-card-border, rgba(255, 107, 107, 0.08));
    transition: background 0.4s, box-shadow 0.4s, border-color 0.4s;
    /* 防止移动端最后一行文字被 overflow:hidden 底部裁断 */
    padding-bottom: 0;
}

.card-header {
    padding: 13px 18px;
    border-bottom: 1px solid var(--theme-card-header-border, rgba(255,107,107,0.10));
    background: var(--theme-card-header-bg, linear-gradient(135deg, rgba(255,107,107,0.05), rgba(255,142,83,0.03)));
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.4s, border-color 0.4s;
}

.card-header h2 {
    font-size: 14px;
    color: var(--theme-card-header-title, #e05555);
    font-weight: bold;
    transition: color 0.4s;
}

.card-header .more-link {
    font-size: 12px;
    color: #999;
}

.card-header .more-link:hover {
    color: var(--theme-link-hover, #ff6b6b);
}

.card-body {
    padding: 18px;
}

/* 发布区域 */
.publish-box {
    padding: 18px;
    border-bottom: 1px solid var(--theme-card-header-border, rgba(255,107,107,0.10));
}

.publish-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
}

.publish-textarea:focus {
    outline: none;
    border-color: var(--theme-input-focus, #ff6b6b);
    box-shadow: 0 0 0 3px rgba(255,107,107,0.10);
}

.publish-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-btns {
    display: flex;
    gap: 10px;
}

.tool-btn {
    padding: 7px 13px;
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s;
    color: #555;
}

.tool-btn:hover {
    background: var(--theme-tool-btn-hover, rgba(255,107,107,0.08));
    border-color: var(--theme-primary, #ff6b6b);
    color: var(--theme-primary, #ff6b6b);
}

.publish-submit {
    padding: 8px 22px;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px var(--theme-publish-btn-shadow, rgba(255,107,107,0.30));
}

.publish-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px var(--theme-publish-btn-shadow, rgba(255,107,107,0.40));
}

/* 动态列表 */
.moments-list {
    padding: 0;
}

.moment-item {
    padding: 18px;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
    transition: background 0.25s;
}

.moment-item:hover {
    background: rgba(0,0,0,0.018);
}

.moment-item:last-child {
    border-bottom: none;
}

.moment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.moment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 爱心头像（替换旧的文字头像） */
.author-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.35);
    transition: background 0.4s;
}

.author-avatar-small .heart-icon {
    display: inline-block;
    animation: heartBeat 2s ease-in-out infinite;
    line-height: 1;
}

/* 评论人昵称输入框 */
.comment-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-author-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ffd0cc;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    background: #fff8f8;
    color: #333;
    transition: border-color 0.2s;
}

.comment-author-input:focus {
    border-color: var(--theme-input-focus, #ff6b6b);
    background: #fff;
}

/* 发布表单中的昵称输入行 */
.publish-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.publish-author-label {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

.publish-author-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    background: #fafafa;
    color: #333;
    transition: border-color 0.2s, background 0.2s;
}

.publish-author-input:focus {
    border-color: var(--theme-input-focus, #ff6b6b);
    background: #fff;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.author-time {
    font-size: 12px;
    color: #999;
}

.moment-content {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 14px;
}

/* 日志分类列表 */
#blog-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border: 1px solid transparent;
    line-height: 1.4;
}

.category-item:hover {
    background: var(--theme-tool-btn-hover, rgba(255, 107, 107, 0.08));
    color: var(--theme-primary, #ff6b6b);
    border-color: var(--theme-card-border, rgba(255, 107, 107, 0.15));
}

.category-item.active,
.category-item[data-active="true"] {
    background: var(--theme-tool-btn-hover, rgba(255, 107, 107, 0.10));
    color: var(--theme-primary, #ff6b6b);
    font-weight: bold;
    border-color: var(--theme-card-border, rgba(255, 107, 107, 0.20));
}

.category-item span:last-child {
    font-size: 11px;
    color: #aaa;
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* =============================================
   日志标题输入框（独立，不继承 textarea 高度）
   ============================================= */
.blog-title-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    box-sizing: border-box;
}

.blog-title-input::placeholder {
    color: #bbb;
}

.blog-title-input:focus {
    border-color: var(--theme-input-focus, #ff6b6b);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.08);
}

/* =============================================
   富文本编辑器
   ============================================= */
.rich-editor-wrap {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.rich-editor-wrap:focus-within {
    border-color: var(--theme-input-focus, #ff6b6b);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.08);
}

/* 工具栏 */
.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 7px 10px;
    background: var(--theme-card-header-bg, #fafafa);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    user-select: none;
}

/* 工具栏按钮 */
.rtb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 5px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
}

.rtb-btn:hover {
    background: var(--theme-tool-btn-hover, rgba(255, 107, 107, 0.09));
    border-color: var(--theme-card-border, rgba(255, 107, 107, 0.18));
    color: var(--theme-primary, #ff6b6b);
}

.rtb-btn.rtb-active {
    background: var(--theme-tool-btn-hover, rgba(255, 107, 107, 0.12));
    border-color: var(--theme-primary, #ff6b6b);
    color: var(--theme-primary, #ff6b6b);
    font-weight: bold;
}

.rtb-btn.rtb-btn-clear {
    color: #bbb;
    font-size: 11px;
}

.rtb-btn.rtb-btn-clear:hover {
    color: #ff4d4f;
    border-color: #ff4d4f;
    background: rgba(255, 77, 79, 0.07);
}

/* 分隔线 */
.rtb-sep {
    width: 1px;
    height: 18px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 4px;
    flex-shrink: 0;
}

/* 标签文字 */
.rtb-label {
    font-size: 11px;
    color: #999;
    margin-right: 2px;
    white-space: nowrap;
}

/* 下拉选择框 */
.rtb-select {
    height: 26px;
    padding: 0 4px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 12px;
    color: #555;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
}

.rtb-select:focus {
    border-color: var(--theme-input-focus, #ff6b6b);
}

/* 颜色选择按钮 */
.rtb-color-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s;
}

.rtb-color-btn:hover {
    border-color: var(--theme-primary, #ff6b6b);
}

.rtb-color-btn span {
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
    line-height: 1;
}

.rtb-color-btn input[type="color"] {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 6px;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.85;
}

/* 编辑区主体 */
.rich-editor-body {
    min-height: 220px;
    max-height: 480px;
    padding: 14px 16px;
    font-size: 14px;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.9;
    color: #333;
    background: #fff;
    outline: none;
    overflow-y: auto;
    word-break: break-word;
}

/* placeholder 效果 */
.rich-editor-body:empty::before {
    content: attr(data-placeholder);
    color: #bbb;
    pointer-events: none;
}

/* 编辑器内常见标签样式 */
.rich-editor-body ul,
.rich-editor-body ol {
    padding-left: 1.5em;
    margin: 4px 0;
}

.rich-editor-body li {
    margin: 2px 0;
}

.moment-photos {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.moment-photos.photos-1 {
    grid-template-columns: 1fr;
}

.moment-photos.photos-2 {
    grid-template-columns: repeat(2, 1fr);
}

.moment-photos.photos-3 {
    grid-template-columns: repeat(3, 1fr);
}

.moment-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

/* 单张图：等比完整显示，不限高度 */
.photos-1 .moment-photo {
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background: #f5f5f5;
}

.moment-photo:hover {
    transform: scale(1.02);
}

.moment-footer {
    display: flex;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.moment-action {
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.moment-action:hover,
.moment-action.active {
    color: var(--theme-primary, #ff6b6b);
}

/* 留言板样式 */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message-item {
    padding: 14px 16px;
    background: rgba(0,0,0,0.018);
    border-radius: 8px;
    border-left: 3px solid var(--theme-item-accent, #ff6b6b);
    transition: background 0.25s, border-color 0.4s;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.message-author {
    font-weight: bold;
    color: #333;
}

.message-time {
    color: #999;
    font-size: 12px;
}

.message-content {
    color: #555;
    line-height: 1.6;
}

/* 相册样式 */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.album-item {
    background: var(--theme-card-bg, white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--theme-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.album-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.album-cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.album-info {
    padding: 10px;
}

.album-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-count {
    font-size: 12px;
    color: #999;
}

/* 日志样式 */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blog-item {
    padding: 18px;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
    transition: background 0.25s;
}

.blog-item:hover {
    background: rgba(0,0,0,0.018);
}

.blog-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.25s;
}

.blog-title:hover {
    color: var(--theme-blog-title-hover, #ff6b6b);
}

.blog-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.blog-preview {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

/* 移动端优化 - 菜单按钮（汉堡图标） */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    color: #555;
    border-radius: 8px;
    transition: background 0.2s;
    /* 汉堡三条线 */
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
}

.mobile-menu-btn:active {
    background: rgba(0,0,0,0.06);
}

/* 汉堡三条线 */
.mobile-menu-btn .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #555;
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* 移动端导航菜单 - 毛玻璃 + 现代设计 */
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 999;
    padding: 8px 0 14px;
    animation: slideDown 0.22s ease;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 菜单分组标签 */
.mobile-nav-menu .menu-group-label {
    display: block;
    padding: 10px 20px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #bbb;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
}

/* 菜单分隔线 */
.mobile-nav-menu .menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 6px 16px;
}

.mobile-nav-menu a {
    display: block;
    padding: 11px 20px;
    color: #444;
    font-size: 15px;
    font-weight: 500;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.01em;
}

.mobile-nav-menu a:last-child {
    border-bottom: none;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:active {
    background: rgba(255, 107, 107, 0.07);
    color: var(--theme-nav-active-color, #ff6b6b);
}

.mobile-nav-menu a.active {
    color: var(--theme-nav-active-color, #ff6b6b);
    font-weight: 700;
}

/* 退出登录项单独颜色 */
.mobile-nav-menu a.menu-logout {
    color: #999;
    font-size: 14px;
}

.mobile-nav-menu a.menu-logout:hover,
.mobile-nav-menu a.menu-logout:active {
    color: #ff4d4f;
    background: rgba(255,77,79,0.06);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-container {
        width: 100%;
        padding: 160px 15px 15px;
    }
    
    .left-sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .top-bar {
        height: 50px;
    }
    
    .top-bar-inner {
        width: 100%;
        padding: 0 15px;
    }
    
    .top-bar-left {
        gap: 10px;
    }
    
    .space-logo {
        font-size: 16px;
    }
    
    /* 显示移动端菜单按钮 */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* 隐藏桌面导航 */
    .top-bar-nav {
        display: none;
    }
    
    .top-bar-right {
        gap: 10px;
    }
    
    /* 手机端顶部右侧：只显示退出按钮，其余按钮通过汉堡菜单访问 */
    .user-actions a:not(:last-child) {
        display: none;
    }
    
    .user-actions a {
        font-size: 14px;
    }
    
    /* 主容器调整 */
    .main-container {
        flex-direction: column;
        padding-top: 137px;
        padding-bottom: 20px;
    }
    
    .left-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* 情侣卡片移动端优化 */
    .couple-card {
        margin-bottom: 15px;
        min-height: 240px;
    }

    .love-days-big {
        font-size: 52px;
    }

    .couple-names {
        font-size: 20px;
    }

    .couple-card .stat-num {
        font-size: 18px;
    }
    
    .stat-num {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .user-actions-bar {
        padding: 12px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* 背景设置优化 */
    .bg-options {
        gap: 8px;
    }
    
    .bg-option {
        padding: 8px;
        font-size: 11px;
    }
    
    .bg-option .bg-preview {
        height: 50px;
    }
    
    /* 内容卡片优化 */
    .content-card {
        margin-bottom: 12px;
    }

    /* 防止左侧边栏卡片内粗体文字被 overflow:hidden 截断 */
    .left-sidebar .card-body {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .left-sidebar .card-body div[style*="font-weight: bold"],
    .left-sidebar .card-body div[style*="font-weight:bold"] {
        line-height: 1.5;
    }

    /* ========== 设置弹窗 768px 以下通用修复 ========== */
    /* Tab行：移动端改为横向滚动（不换行），更适合手机操作 */
    .settings-tabs {
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        flex-shrink: 0;
    }
    .settings-tabs::-webkit-scrollbar { display: none; }

    .settings-tab {
        flex: 0 0 auto;  /* 不压缩，保持各Tab原始宽度 */
        white-space: nowrap;
    }

    /* 弹窗面板：最大高度 = 视口高度，内部flex布局让内容区独立滚动 */
    .settings-panel {
        max-height: calc(100dvh - 40px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .settings-header { flex-shrink: 0; }

    /* 内容区独立滚动 */
    .settings-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
    }

    /* 弹窗顶部间距：移动端减小，让弹窗能占满更多空间 */
    .settings-overlay {
        padding-top: 20px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-header h2 {
        font-size: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* 发布区域优化 */
    .publish-box {
        padding: 15px;
    }
    
    .publish-textarea {
        min-height: 80px;
        font-size: 14px;
        padding: 12px;
    }
    
    .publish-tools {
        flex-direction: column;
        gap: 10px;
    }
    
    .tool-btns {
        width: 100%;
        justify-content: flex-start;
    }
    
    .tool-btn {
        padding: 10px 15px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .publish-submit {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    /* 动态列表优化 */
    .moment-item {
        padding: 15px;
    }
    
    .moment-header {
        margin-bottom: 8px;
    }
    
    .moment-content {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .moment-photos {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .moment-photos.photos-1 {
        grid-template-columns: 1fr;
    }
    
    .moment-photos.photos-2,
    .moment-photos.photos-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .moment-photo {
        height: 150px;
    }
    
    .photos-1 .moment-photo {
        height: auto;
        max-height: 350px;
        object-fit: contain;
    }
    
    .moment-footer {
        gap: 15px;
        padding-top: 8px;
    }
    
    .moment-action {
        font-size: 13px;
    }
    
    /* 相册网格优化 */
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .album-cover {
        height: 100px;
    }
    
    .album-info {
        padding: 8px;
    }
    
    .album-name {
        font-size: 12px;
    }
    
    .album-count {
        font-size: 11px;
    }
    
    /* 日志列表优化 */
    .blog-item {
        padding: 15px;
    }
    
    .blog-title {
        font-size: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .blog-meta {
        font-size: 11px;
    }
    
    .blog-preview {
        font-size: 13px;
    }

    /* 日志标题输入框手机端 */
    .blog-title-input {
        font-size: 16px; /* 防iOS自动缩放 */
    }

    /* 富文本编辑器工具栏手机端：可横向滚动 */
    .rich-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 8px;
        gap: 3px;
        scrollbar-width: none;
    }

    .rich-toolbar::-webkit-scrollbar {
        display: none;
    }

    .rtb-btn {
        min-width: 30px;
        height: 30px;
        flex-shrink: 0;
        font-size: 14px;
        touch-action: manipulation;
    }

    .rtb-select {
        height: 30px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .rtb-color-btn {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    .rtb-label {
        flex-shrink: 0;
    }

    .rtb-sep {
        flex-shrink: 0;
    }

    /* 富文本编辑区手机端 */
    .rich-editor-body {
        min-height: 150px;
        max-height: 350px;
        font-size: 15px; /* 防iOS缩放 */
        padding: 12px 14px;
    }
    
    /* 留言板优化 */
    .message-item {
        padding: 12px;
    }
    
    .message-content {
        font-size: 14px;
    }
    
    /* 模态框优化 */
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .close-modal {
        top: 10px;
        right: 20px;
        font-size: 36px;
    }
    
    /* 通知优化 */
    .notification {
        top: 60px;
        right: 10px;
        left: 10px;
        padding: 12px 20px;
        font-size: 14px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    .input-group input {
        padding: 14px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .login-btn {
        padding: 14px;
        font-size: 16px;
    }
    
    .top-bar {
        height: 48px;
    }
    
    .top-bar-inner {
        padding: 0 10px;
    }
    
    .space-logo {
        font-size: 14px;
    }
    
    .mobile-menu-btn {
        font-size: 20px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-top: -30px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .user-info {
        font-size: 10px;
    }
    
    .stat-num {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .publish-textarea {
        min-height: 70px;
        font-size: 14px;
        padding: 10px;
    }
    
    .tool-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .moment-photo {
        height: 120px;
    }
    
    .photos-1 .moment-photo {
        height: auto;
        max-height: 300px;
        object-fit: contain;
    }
    
    .album-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .album-cover {
        height: 150px;
    }
    
    /* 隐藏背景设置在小屏幕（已移除该模块，保留兼容） */
    .bg-settings {
        display: none;
    }

    /* 日志类别下拉框：防iOS缩放 */
    #blog-category {
        font-size: 16px;
    }

    /* 富文本工具栏：小屏更紧凑 */
    .rich-toolbar {
        padding: 5px 6px;
        gap: 2px;
    }

    .rtb-btn {
        min-width: 26px;
        height: 28px;
        font-size: 13px;
    }

    .rtb-select {
        height: 28px;
        font-size: 16px; /* 防iOS缩放 */
    }

    .rtb-label {
        font-size: 10px;
    }

    .rich-editor-body {
        min-height: 130px;
        font-size: 16px; /* 防iOS缩放 */
    }

    /* 设置弹窗：在更小屏幕(480px)进一步缩小内边距 */
    .settings-panel {
        width: 96vw;
        margin: 0 auto 20px;
    }

    .bg-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .layout-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-tab {
        font-size: 11px;
        padding: 10px 8px;
    }

    .anniversary-row {
        flex-wrap: wrap;
    }

    .anniversary-row .ann-date {
        width: 100%;
    }
}

/* 触摸优化 */
@media (hover: none) {
    .moment-action:hover,
    .moment-action.active {
        color: #ff6b6b;
    }
    
    .tool-btn:hover,
    .tool-btn:active {
        background: #e8e8e8;
    }
    
    .action-btn:active {
        transform: scale(0.98);
    }
    
    .publish-submit:active {
        transform: scale(0.98);
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 漂浮爱心 */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    animation: floatUp 8s ease-in-out infinite;
    opacity: 0.4;
    font-size: 20px;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 5px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: #ff6b6b;
}

/* 导航栏设置按钮 */
.settings-btn {
    color: var(--theme-primary, #ff6b6b) !important;
    font-weight: bold;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 4px;
    padding: 3px 10px !important;
    transition: all 0.3s;
}

.settings-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--theme-primary, #ff6b6b);
}

/* =============================================
   主页设置弹窗
   ============================================= */
.settings-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9990;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    overflow-y: auto;
}

.settings-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    width: 680px;
    max-width: 96vw;
    margin-bottom: 40px;
    animation: slideUp 0.3s ease;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 2px solid var(--theme-settings-border, #ff6b6b);
    transition: border-color 0.4s;
}

.settings-header h2 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

.settings-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.settings-close:hover { color: var(--theme-primary, #ff6b6b); }

/* 标签页 */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;   /* PC端允许换行，Tab太多时自动折到第二行 */
    gap: 0;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    border-radius: 0;
    overflow: visible; /* 换行时不能裁剪 */
}

.settings-tab {
    flex: 0 0 auto;    /* 不强制平分，按内容宽度自然排列 */
    padding: 11px 14px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.settings-tab:hover { color: var(--theme-settings-tab-active, #ff6b6b); background: rgba(255, 107, 107, 0.05); }

.settings-tab.active {
    color: var(--theme-settings-tab-active, #ff6b6b);
    border-bottom-color: var(--theme-settings-tab-active, #ff6b6b);
    background: white;
    font-weight: bold;
}

/* 内容区 */
.settings-content {
    padding: 20px 24px 24px;
}

.settings-content.hidden { display: none; }

.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
}

.settings-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 14px;
}

/* 背景选项网格 */
.bg-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bg-option-card {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.bg-option-card:hover,
.bg-option-card.active {
    border-color: var(--theme-primary, #ff6b6b);
    color: var(--theme-primary, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--theme-publish-btn-shadow, rgba(255, 107, 107, 0.2));
}

.bg-preview-big {
    width: 100%;
    height: 64px;
    border-radius: 5px;
    margin-bottom: 6px;
}

/* 入场动画 Toggle 开关样式 */
.splash-toggle-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}
.splash-toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.splash-toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: #ddd;
    transition: background 0.3s;
}
.splash-toggle-slider::before {
    content: '';
    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.2);
    transition: transform 0.3s;
}
.splash-toggle-label input:checked + .splash-toggle-slider {
    background: var(--theme-primary, #ff6b6b);
}
.splash-toggle-label input:checked + .splash-toggle-slider::before {
    transform: translateX(20px);
}









/* 背景显示模式选择 */
.bg-mode-section {
    margin: 12px 0;
    padding: 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
}

.bg-mode-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.bg-mode-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bg-mode-btn {
    padding: 7px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s;
}

.bg-mode-btn:hover {
    border-color: var(--theme-primary, #ff6b6b);
    color: var(--theme-primary, #ff6b6b);
}

.bg-mode-btn.active {
    border-color: var(--theme-primary, #ff6b6b);
    background: var(--theme-primary, #ff6b6b);
    color: white;
}

.bg-mode-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.settings-action-btn {
    padding: 9px 18px;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.settings-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--theme-publish-btn-shadow, rgba(255, 107, 107, 0.3));
}

.settings-action-btn.danger {
    background: linear-gradient(135deg, #bbb, #999);
}

.settings-action-btn.danger:hover {
    background: linear-gradient(135deg, #aaa, #888);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 布局模式选项 */
.layout-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.layout-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
}

.layout-card:hover,
.layout-card.active {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.layout-card.active { background: rgba(102, 126, 234, 0.05); }

.layout-card span {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 8px 0 2px;
}

.layout-card small {
    font-size: 11px;
    color: #999;
}

/* 布局预览缩略图 */
.layout-preview {
    width: 100%;
    height: 60px;
    background: #f0f2f5;
    border-radius: 5px;
    display: flex;
    gap: 4px;
    padding: 6px;
    overflow: hidden;
}

.lp-sidebar {
    width: 28%;
    background: #c8d6ea;
    border-radius: 3px;
}

.lp-main {
    flex: 1;
    background: #e0e8f5;
    border-radius: 3px;
}

.lp-main-wide {
    flex: 1;
    background: #e0e8f5;
    border-radius: 3px;
}

.reverse-preview { flex-direction: row-reverse; }

.compact-preview {
    flex-direction: column;
    gap: 4px;
}

.lp-top {
    width: 100%;
    height: 30%;
    background: #c8d6ea;
    border-radius: 3px;
}

.lp-bottom {
    flex: 1;
    background: #e0e8f5;
    border-radius: 3px;
}

/* 计时器 & 纪念日表单 */
.form-row {
    margin-bottom: 14px;
}

.form-row label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.form-row input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-row input:focus {
    outline: none;
    border-color: var(--theme-input-focus, #ff6b6b);
}

/* 纪念日行 */
.anniversary-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.anniversary-row .ann-date {
    width: 150px;
    flex-shrink: 0;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

.anniversary-row .ann-name {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

.anniversary-row .ann-date:focus,
.anniversary-row .ann-name:focus {
    outline: none;
    border-color: var(--theme-input-focus, #ff6b6b);
}

.ann-del-btn {
    padding: 6px 10px;
    background: #fff0f0;
    border: 1px solid #ffccc7;
    border-radius: 5px;
    color: #ff4d4f;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.ann-del-btn:hover {
    background: #ff4d4f;
    color: white;
}

/* =============================================
   布局模式 CSS 类
   ============================================= */

/* 默认布局（已有，无需新增） */
.layout-default {}

/* 宽屏布局：隐藏左侧边栏 */
.layout-wide .left-sidebar {
    display: none;
}

/* 镜像布局：侧边栏在右侧 */
.layout-reverse {
    flex-direction: row-reverse;
}

/* 紧凑布局：侧边栏在顶部（仅用户卡片紧凑化），用 flex-column */
.layout-compact {
    flex-direction: column;
}

.layout-compact .left-sidebar {
    width: 100%;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.layout-compact .left-sidebar .user-card,
.layout-compact .left-sidebar .couple-card {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
}

.layout-compact .left-sidebar .content-card {
    flex: 2;
    min-width: 220px;
    margin-bottom: 0;
}

/* =============================================
   日志详情弹窗 (showBlogDetailModal)
   ============================================= */
.blog-detail-title {
    font-size: 22px;
    color: #333;
    margin: 0;
    word-break: break-word;
    line-height: 1.4;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #999;
    font-size: 13px;
    margin-bottom: 0;   /* header 里不需要底部外边距 */
    padding-bottom: 0;  /* border 已移到 header 容器 */
    border-bottom: none;
}

/* .blog-detail-meta-avatar 现由 renderAvatarHtml 动态生成，无需固定样式 */
.blog-detail-meta-avatar {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.blog-detail-meta-author {
    font-weight: bold;
    color: #555;
}

.blog-detail-meta-dot {
    color: #ccc;
}

/* 详情弹窗：桌面端，header 有轻微阴影强调固定感 */
.blog-detail-header {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* 详情弹窗正文滚动区：自定义滚动条 */
.blog-detail-body::-webkit-scrollbar {
    width: 5px;
}
.blog-detail-body::-webkit-scrollbar-thumb {
    background: #f0c0c0;
    border-radius: 3px;
}
.blog-detail-body::-webkit-scrollbar-track {
    background: transparent;
}

/* 移动端：底部滑出，全屏高度 */
@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .blog-detail-content {
        border-radius: 16px 16px 0 0 !important;
        max-height: 94vh !important;
        width: 100% !important;
    }

    .blog-detail-header {
        padding: 16px 16px 12px !important;
        border-radius: 16px 16px 0 0 !important;
    }

    .blog-detail-body {
        padding: 14px 16px !important;
    }

    .blog-detail-title {
        font-size: 17px !important;
    }

    .blog-detail-meta {
        font-size: 11px !important;
        gap: 4px !important;
        row-gap: 4px;
    }

    .blog-detail-meta-avatar {
        /* 头像由 renderAvatarHtml 控制大小，无需额外覆盖 */
    }

    .blog-detail-meta-dot {
        display: none; /* 移动端隐藏分隔符 */
    }
}

/* =============================================
   日志独立编辑弹窗 (#blog-edit-modal)
   ============================================= */
#blog-edit-modal {
    overscroll-behavior: contain;
}

/* 弹窗内容容器在桌面端居中+圆角 */
@media (min-width: 601px) {
    #blog-edit-modal > div {
        min-height: auto !important;
        margin: 40px auto !important;
        border-radius: 14px !important;
        box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    }
}

/* 移动端：全屏弹窗，内容区铺满 */
@media (max-width: 600px) {
    #blog-edit-modal > div {
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
    }
}

/* =============================================
   列表分页控件（日志 & 留言板共用）
   ============================================= */
.list-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 0 8px;
}

.pager-btn {
    padding: 7px 18px;
    border: 1px solid #ffb3c1;
    border-radius: 20px;
    background: white;
    color: #ff6b6b;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.pager-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border-color: transparent;
}

.pager-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.pager-info {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .pager-btn { padding: 6px 14px; font-size: 12px; }
    .pager-info { font-size: 12px; }
}

/* 通知提示 */
.notification {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 13px 22px;
    background: var(--theme-notification-bg, linear-gradient(135deg, #52c41a, #73d13d));
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    font-size: 13px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =============================================
   登录页背景选项网格（设置面板内）
   ============================================= */
.login-bg-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 6px;
}

.login-bg-option {
    padding: 7px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    font-size: 11px;
    color: #666;
}

.login-bg-option:hover,
.login-bg-option.active {
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.login-bg-option.active {
    background: rgba(255, 107, 107, 0.04);
}

.login-bg-preview {
    width: 100%;
    height: 52px;
    border-radius: 5px;
    margin-bottom: 5px;
}

@media (max-width: 480px) {
    .login-bg-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================
   纪念日卡片 - 全新设计
   ============================================= */

/* 纪念日卡片 */
.anniversary-card-wrap {
    background: var(--theme-card-bg, linear-gradient(145deg, #fff5f5, #fff9ff)) !important;
    border: 1.5px solid var(--theme-card-border, rgba(255, 107, 107, 0.15)) !important;
    border-radius: 14px !important;
    overflow: hidden;
    transition: background 0.4s, border-color 0.4s;
}

.anniversary-card-wrap .card-header {
    padding: 12px 14px;
    background: var(--theme-card-header-bg, linear-gradient(135deg, rgba(255,107,107,0.06), rgba(255,142,83,0.04)));
    border-bottom: 1px solid var(--theme-card-header-border, rgba(255,107,107,0.1)) !important;
}

.anniversary-card-wrap .card-header h2 {
    font-size: 14px;
    color: var(--theme-card-header-title, #e05555);
}

.ann-add-btn {
    padding: 4px 10px;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.25s;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.ann-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px var(--theme-publish-btn-shadow, rgba(255,107,107,0.4));
}

/* ── 单条纪念日：两行卡片式布局 ── */
.ann-display-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 4px;
    border-bottom: 1px dashed rgba(255,107,107,0.12);
    transition: background 0.2s;
    border-radius: 8px;
}

.ann-display-row:last-child {
    border-bottom: none;
}

.ann-display-row:hover {
    background: rgba(255,107,107,0.04);
}

/* 第一行：名称（全宽，不截断） */
.ann-display-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.ann-display-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    flex-shrink: 0;
}

.ann-display-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    word-break: break-all;
    white-space: normal;
    flex: 1;
}

/* 第二行：日期 + 倒计时 + 操作按钮 */
.ann-display-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 12px;
    gap: 4px;
}

.ann-display-date {
    font-size: 11px;
    color: #bbb;
    flex-shrink: 0;
}

.ann-display-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* 纪念日倒计时标签 */
.ann-days {
    font-size: 11px;
    color: var(--theme-ann-days-color, #667eea);
    white-space: nowrap;
    background: var(--theme-ann-days-bg, rgba(102,126,234,0.08));
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1.6;
    transition: color 0.4s, background 0.4s;
}

.ann-days b {
    font-size: 12px;
    font-weight: 800;
    color: var(--theme-primary, #ff6b6b);
    transition: color 0.4s;
}

.ann-days.today {
    color: #fff;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    font-weight: bold;
    animation: pulse-ann 1.5s ease-in-out infinite;
}

@keyframes pulse-ann {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 操作图标按钮 */
.ann-icon-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    opacity: 0.5;
}

.ann-display-row:hover .ann-icon-btn {
    opacity: 1;
}

.ann-icon-btn:hover {
    background: #ffe6e6;
    opacity: 1;
    transform: scale(1.1);
}

.ann-icon-btn.danger:hover {
    background: #ff4d4f;
    color: white;
}

/* 内联添加/编辑表单 */
.ann-inline-form {
    background: linear-gradient(135deg, #fff8f8, #fff5fb);
    border: 1.5px dashed #ffb3b3;
    border-radius: 10px;
    padding: 12px;
    margin: 6px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInForm 0.2s ease;
}

@keyframes fadeInForm {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ann-inline-form.editing {
    background: linear-gradient(135deg, #f8f9ff, #f5f8ff);
    border-color: #b3c6ff;
}

.ann-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ann-form-input:focus {
    border-color: var(--theme-input-focus, #ff6b6b);
    box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

.ann-form-btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.ann-save-btn {
    padding: 6px 16px;
    background: var(--theme-publish-btn, linear-gradient(135deg, #ff6b6b, #ff8e53));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.ann-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--theme-publish-btn-shadow, rgba(255,107,107,0.35));
}

.ann-cancel-btn {
    padding: 6px 14px;
    background: #f0f0f0;
    color: #888;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.ann-cancel-btn:hover {
    background: #e5e5e5;
    color: #555;
}

/* 纪念日列表为空时的提示 */
.ann-empty {
    text-align: center;
    color: #ccc;
    font-size: 12px;
    padding: 18px 0 12px;
    line-height: 1.8;
}

.ann-empty::before {
    content: '📅';
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
    opacity: 0.5;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ann-display-name {
        font-size: 13px;
    }
    .ann-days {
        font-size: 10px;
    }
    .ann-icon-btn {
        opacity: 1;
    }
}

/* =============================================
   富文本编辑器（日志页专用）
   ============================================= */

/* 整体包装器 */
.rich-editor-wrap {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.rich-editor-wrap:focus-within {
    border-color: var(--theme-input-focus, #ff6b6b);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

/* 工具栏 */
.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    user-select: none;
}

/* 工具栏按钮 */
.rtb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 5px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
}

.rtb-btn:hover {
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.3);
    color: var(--theme-primary, #ff6b6b);
}

.rtb-btn.rtb-active {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.5);
    color: var(--theme-primary, #ff6b6b);
}

/* 危险按钮（清除格式） */
.rtb-btn-clear {
    color: #aaa;
}
.rtb-btn-clear:hover {
    background: rgba(255, 77, 79, 0.08);
    border-color: rgba(255, 77, 79, 0.3);
    color: #ff4d4f;
}

/* 分隔符 */
.rtb-sep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: #e0e0e0;
    margin: 0 4px;
    align-self: center;
    flex-shrink: 0;
}

/* 标签文字（字号、字体等） */
.rtb-label {
    font-size: 11px;
    color: #999;
    padding: 0 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 工具栏下拉选择框 */
.rtb-select {
    height: 26px;
    padding: 0 4px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #444;
    cursor: pointer;
    outline: none;
    max-width: 80px;
    transition: border-color 0.2s;
}

.rtb-select:hover,
.rtb-select:focus {
    border-color: var(--theme-input-focus, #ff6b6b);
}

/* 颜色选择按钮 */
.rtb-color-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    position: relative;
    transition: border-color 0.2s;
}

.rtb-color-btn:hover {
    border-color: var(--theme-primary, #ff6b6b);
}

/* 隐藏原生颜色输入框 */
.rtb-color-btn input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* 可编辑区 */
.rich-editor-body {
    min-height: 140px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    outline: none;
    word-break: break-word;
    background: #fff;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
}

/* placeholder 效果 */
.rich-editor-body:empty::before {
    content: attr(data-placeholder);
    color: #bbb;
    pointer-events: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .rich-toolbar {
        gap: 1px;
        padding: 5px 6px;
    }

    .rtb-btn {
        min-width: 26px;
        height: 24px;
        font-size: 12px;
    }

    .rtb-select {
        max-width: 64px;
        font-size: 11px;
    }

    .rtb-label {
        font-size: 10px;
    }

    .rich-editor-body {
        min-height: 100px;
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* =============================================
   加密相册封面样式
   ============================================= */

/* 相册列表网格 */
.album-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* 相册卡片通用 */
.album-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

/* 普通相册封面图 */
.album-card-cover {
    width: 100%;
    height: 130px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    overflow: hidden;
}

.album-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 相册卡片信息区 */
.album-card-info {
    padding: 10px 12px 12px;
}

.album-card-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #999;
}

/* 🔒 加密相册：整体卡片略微不同风格 */
.album-card-locked {
    border: 1.5px solid var(--theme-card-border, rgba(102, 126, 234, 0.25));
    background: var(--theme-card-bg, linear-gradient(145deg, #f8f9ff, #fff5fb));
}

.album-card-locked:hover {
    box-shadow: 0 8px 24px var(--theme-card-shadow, rgba(102, 126, 234, 0.2));
}

/* 加密相册封面 */
.album-locked-cover {
    background: var(--theme-album-lock-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%)) !important;
    position: relative;
    overflow: hidden;
    transition: background 0.4s;
}

/* 加密徽标 */
.album-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--theme-secondary, #764ba2);
    background: rgba(102,126,234,0.1);
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: 8px;
    padding: 1px 6px;
    font-weight: bold;
    letter-spacing: 0.3px;
    transition: color 0.4s;
}

/* 加密相册封面内层光晕 */
.album-locked-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
}

/* 内容居中容器 */
.album-lock-cover-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
}

/* 大锁图标 */
.album-lock-icon-big {
    font-size: 38px;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    animation: lockPulse 2.5s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.08); opacity: 0.85; }
}

/* "已加密"文字 */
.album-lock-cover-text {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.12);
    padding: 2px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* 🔒 加密徽标（相册信息区） */
.album-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #764ba2;
    background: rgba(102,126,234,0.1);
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: 8px;
    padding: 1px 6px;
    font-weight: bold;
    letter-spacing: 0.3px;
}

/* 相册封面 */
.album-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--theme-card-shadow, 0 2px 10px rgba(0,0,0,0.08));
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, background 0.4s;
    border: 1px solid var(--theme-card-border, transparent);
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

/* 相册封面图默认渐变 */
.album-card-cover {
    width: 100%;
    height: 130px;
    background: var(--theme-album-cover-bg, linear-gradient(135deg, #f5f5f5, #e8e8e8));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    overflow: hidden;
}

/* 新建相册按钮卡片 */
.album-add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 180px;
    background: #fafafa;
    border: 2px dashed #ddd;
    color: #bbb;
    font-size: 13px;
    border-radius: 12px;
    transition: all 0.25s;
}

.album-add-card:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: rgba(255,107,107,0.03);
    transform: translateY(-4px);
}

.album-add-card .add-icon {
    font-size: 28px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .album-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .album-card-cover {
        height: 100px;
    }
    .album-lock-icon-big {
        font-size: 28px;
    }
    .album-add-card {
        height: 140px;
    }
}
