/* ============================================================
   欢迎回家 · 深空霓虹（Deep Space Neon）主题
   2026-09 重设计：深空背景 + 霓虹光效 + 玻璃拟态
   保留全部原有 class 名，页面无需修改即可整体换装
   ============================================================ */

:root {
    --bg-deep: #050810;
    --bg-panel: rgba(15, 23, 42, 0.72);
    --bg-card: rgba(255, 255, 255, 0.045);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-neon: rgba(34, 211, 238, 0.22);
    --border-soft: rgba(148, 163, 184, 0.14);
    --neon-cyan: #22d3ee;
    --neon-blue: #38bdf8;
    --neon-violet: #a855f7;
    --neon-magenta: #e879f9;
    --neon-gold: #fbbf24;
    --neon-green: #34d399;
    --neon-red: #fb7185;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-dim: #64748b;
    --glow-cyan: 0 0 18px rgba(34, 211, 238, 0.35);
    --glow-violet: 0 0 18px rgba(168, 85, 247, 0.35);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 深空星场 + 极光渐变背景 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(56, 189, 248, 0.14), transparent),
        radial-gradient(ellipse 60% 45% at 85% 10%, rgba(168, 85, 247, 0.12), transparent),
        radial-gradient(ellipse 50% 40% at 50% 110%, rgba(34, 211, 238, 0.08), transparent),
        linear-gradient(180deg, #050810 0%, #0a1128 55%, #0d1230 100%);
}

/* 星点层 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.75), transparent),
        radial-gradient(1px 1px at 32% 62%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 55% 8%, rgba(186,230,253,0.8), transparent),
        radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.45), transparent),
        radial-gradient(1.5px 1.5px at 88% 74%, rgba(216,180,254,0.7), transparent),
        radial-gradient(1px 1px at 8% 84%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 42% 32%, rgba(165,243,252,0.6), transparent),
        radial-gradient(1.5px 1.5px at 76% 90%, rgba(255,255,255,0.5), transparent);
    animation: starTwinkle 6s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    from { opacity: 0.55; }
    to   { opacity: 1; }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* 选中文字霓虹色 */
::selection { background: rgba(34, 211, 238, 0.35); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a1128; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #155e75, #6d28d9); border-radius: 6px; }

/* ===== 头部：悬浮玻璃导航 ===== */
.site-header {
    background: rgba(8, 13, 30, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-neon);
    box-shadow: 0 4px 30px rgba(34, 211, 238, 0.08);
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: 1px; }

.logo-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.8));
}

.logo-text {
    background: linear-gradient(90deg, #22d3ee, #a855f7, #e879f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.main-nav { display: flex; gap: 4px; }

.main-nav a {
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all 0.25s;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--neon-cyan);
    background: rgba(34, 211, 238, 0.08);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.main-nav a.active {
    color: #04121a;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    box-shadow: var(--glow-cyan);
    font-weight: 600;
}

.header-right { display: flex; align-items: center; gap: 12px; }
.user-info { font-size: 14px; }

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #22d3ee, #818cf8);
    color: #04121a;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}

.btn-primary:hover { box-shadow: 0 0 24px rgba(34, 211, 238, 0.6); transform: translateY(-1px); }

.btn-outline {
    background: rgba(34, 211, 238, 0.06);
    color: var(--neon-cyan);
    border: 1px solid rgba(34, 211, 238, 0.45);
}

.btn-outline:hover { background: rgba(34, 211, 238, 0.16); box-shadow: var(--glow-cyan); }

/* ===== 主内容区 ===== */
.site-main { min-height: calc(100vh - 64px - 60px); padding: 34px 0; }

/* ===== 页面标题 ===== */
.page-header { margin-bottom: 26px; }

.page-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 0 0 22px rgba(34, 211, 238, 0.35);
}

.page-subtitle { color: var(--text-secondary); font-size: 14px; letter-spacing: 0.5px; }

/* ===== 空间切换：霓虹胶囊 ===== */
.space-tabs { display: flex; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }

.space-tab {
    padding: 10px 20px;
    border-radius: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    backdrop-filter: blur(8px);
}

.space-tab:hover { border-color: var(--neon-violet); color: var(--neon-magenta); box-shadow: var(--glow-violet); }

.space-tab.active {
    background: linear-gradient(135deg, rgba(34,211,238,0.9), rgba(168,85,247,0.9));
    color: #050810;
    font-weight: 700;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* ===== 统计卡片：玻璃拟态 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 34px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 26px 24px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-neon);
    box-shadow: var(--glow-cyan);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon {
    font-size: 36px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.6));
}

.stat-number {
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(135deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-label { color: var(--text-secondary); font-size: 13px; letter-spacing: 1px; }

/* ===== 照片墙 ===== */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

.photo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    cursor: pointer;
}

.photo-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-neon);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), var(--glow-cyan);
}

.photo-thumb { width: 100%; height: 200px; object-fit: cover; background: #0b1226; }

.photo-info { padding: 12px 16px; }

.photo-desc {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-meta { font-size: 12px; color: var(--text-dim); display: flex; justify-content: space-between; }

/* ===== 视频网格 ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), var(--glow-violet);
}

.video-thumb { position: relative; width: 100%; height: 160px; object-fit: cover; background: #0b1226; }

.video-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(5, 8, 16, 0.65);
    border: 1px solid var(--border-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-size: 20px;
    box-shadow: var(--glow-cyan);
    backdrop-filter: blur(6px);
}

.video-info { padding: 14px 16px; }

.video-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-meta { font-size: 12px; color: var(--text-dim); }

/* ===== 日记列表 ===== */
.diary-list { display: flex; flex-direction: column; gap: 16px; }

.diary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 14px;
    padding: 20px 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.diary-card:hover {
    transform: translateX(6px);
    background: var(--bg-card-hover);
    border-left-color: var(--neon-magenta);
    box-shadow: var(--glow-violet);
}

.diary-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.diary-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }

.diary-date { font-size: 13px; color: var(--text-dim); }

.diary-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.diary-footer { margin-top: 12px; display: flex; gap: 16px; font-size: 12px; color: var(--text-dim); }

.diary-cover { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.diary-card-body { flex: 1; }
.diary-meta { display: flex; gap: 12px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--text-dim); }

/* ===== 日记详情 ===== */
.diary-detail {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 40px;
    backdrop-filter: blur(14px);
}

.diary-detail-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-shadow: 0 0 18px rgba(34, 211, 238, 0.3);
}

.diary-detail-meta {
    display: flex;
    gap: 20px;
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
}

.diary-detail-content { font-size: 16px; line-height: 1.9; color: #cbd5e1; }
.diary-detail-content p { margin-bottom: 16px; }

.back-btn, .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--neon-cyan);
    font-size: 14px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover, .back-link:hover { text-shadow: 0 0 12px rgba(34, 211, 238, 0.8); }

.diary-detail-cover { width: 100%; max-height: 400px; object-fit: cover; border-radius: 12px; margin-bottom: 24px; border: 1px solid var(--border-soft); }
.diary-images { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-soft); }
.diary-images h3 { margin-bottom: 16px; font-size: 18px; }

/* ===== 登录页 ===== */
.login-wrapper { max-width: 420px; margin: 60px auto; position: relative; z-index: 1; }

.login-card {
    background: rgba(13, 20, 40, 0.82);
    border: 1px solid var(--border-neon);
    border-radius: 22px;
    padding: 44px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.12), 0 24px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
}

.login-logo {
    text-align: center;
    font-size: 56px;
    filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.7));
}

.login-title {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 32px; letter-spacing: 1px; }

.login-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-dim); }
.login-footer a { color: var(--neon-cyan); }

/* ===== 表单 ===== */
.form-group { margin-bottom: 20px; }

.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); letter-spacing: 1px; }

.form-input, .search-input, .search-type {
    width: 100%;
    padding: 12px 16px;
    background: rgba(2, 6, 18, 0.6);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s;
    font-family: inherit;
}

.form-input::placeholder, .search-input::placeholder { color: #475569; }

.form-input:focus, .search-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15), var(--glow-cyan);
}

select.form-input, .search-type { cursor: pointer; }
select.form-input option, .search-type option { background: #0d1428; color: var(--text-primary); }

.form-btn, .search-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
}

.form-btn:hover, .search-btn:hover { box-shadow: 0 0 28px rgba(99, 102, 241, 0.65); transform: translateY(-1px); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

textarea.form-input { resize: vertical; min-height: 100px; }

/* ===== 消息提示 ===== */
.error-msg {
    background: rgba(251, 113, 133, 0.1);
    border: 1px solid rgba(251, 113, 133, 0.4);
    color: var(--neon-red);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.success-msg {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: var(--neon-green);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.success-msg a { color: var(--neon-green); text-decoration: underline; font-weight: 600; }

.flash-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.flash-success { background: rgba(52, 211, 153, 0.1); color: var(--neon-green); border: 1px solid rgba(52, 211, 153, 0.4); }
.flash-error { background: rgba(251, 113, 133, 0.1); color: var(--neon-red); border: 1px solid rgba(251, 113, 133, 0.4); }

/* ===== 底部 ===== */
.site-footer {
    background: rgba(5, 8, 16, 0.9);
    border-top: 1px solid var(--border-soft);
    color: var(--text-dim);
    text-align: center;
    padding: 22px 0;
    font-size: 13px;
    letter-spacing: 1px;
}

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-icon { font-size: 64px; margin-bottom: 16px; filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.4)); }
.empty-text { font-size: 16px; }

/* ===== 用户信息 ===== */
.user-info { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    border: 1px solid var(--border-neon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.user-name { font-weight: 500; }

.role-badge { font-size: 11px; padding: 2px 10px; border-radius: 10px; font-weight: 700; letter-spacing: 1px; }
.role-admin { background: rgba(251, 191, 36, 0.15); color: var(--neon-gold); border: 1px solid rgba(251, 191, 36, 0.5); }
.role-core { background: rgba(52, 211, 153, 0.12); color: var(--neon-green); border: 1px solid rgba(52, 211, 153, 0.4); }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }

.page-btn {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s;
}

.page-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: var(--glow-cyan); }

.page-btn.active {
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--glow-cyan);
}

/* ===== 标签 ===== */
.tag-private, .tag-family { font-size: 11px; padding: 2px 10px; border-radius: 8px; font-weight: 600; letter-spacing: 0.5px; }
.tag-private { background: rgba(251, 113, 133, 0.14); color: var(--neon-red); border: 1px solid rgba(251, 113, 133, 0.4); }
.tag-family { background: rgba(56, 189, 248, 0.12); color: var(--neon-blue); border: 1px solid rgba(56, 189, 248, 0.4); }

/* ===== 视频播放按钮 ===== */
.video-thumb-wrap { position: relative; }
.video-thumb-placeholder {
    width: 100%; height: 160px;
    background: #0b1226;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
}

.video-play-btn {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 56px; height: 56px;
    background: rgba(5, 8, 16, 0.65);
    border: 1px solid var(--border-neon);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--neon-cyan);
    font-size: 22px;
    padding-left: 4px;
    box-shadow: var(--glow-cyan);
    backdrop-filter: blur(6px);
}

/* ===== 个人中心 ===== */
.profile-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 32px;
    backdrop-filter: blur(14px);
}

.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    border: 2px solid var(--border-neon);
    box-shadow: var(--glow-cyan);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 800;
}

.profile-info { flex: 1; }
.profile-name { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.profile-username { color: var(--text-dim); font-size: 14px; margin-bottom: 8px; }

.profile-signature {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 24px;
    padding-left: 12px;
    border-left: 3px solid var(--neon-violet);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.profile-stat { text-align: center; }

.profile-stat-num {
    font-size: 28px; font-weight: 800;
    background: linear-gradient(135deg, #22d3ee, #a855f7);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.profile-stat-label { font-size: 13px; color: var(--text-dim); }

.profile-meta { margin-bottom: 24px; }
.meta-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.08); font-size: 14px; }
.meta-label { color: var(--text-dim); }
.meta-value { color: var(--text-primary); font-weight: 500; }
.profile-actions { display: flex; gap: 12px; }

/* ===== 搜索 ===== */
.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
}

.search-box form { display: flex; gap: 12px; align-items: center; }
.search-input { flex: 1; }
.search-type { width: auto; }
.search-btn { width: auto; padding: 12px 28px; letter-spacing: 1px; }

/* ===== 精选 ===== */
.featured-card { position: relative; }

.featured-badge {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.9));
    color: #1a1205;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
}

/* ===== 已删除内容 ===== */
.deleted-card { border: 2px dashed rgba(251, 113, 133, 0.35); }

/* ===== 上传页面 ===== */
.upload-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 32px;
    backdrop-filter: blur(14px);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== 卡片操作按钮 ===== */
.card-actions {
    display: flex; gap: 8px;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    flex-wrap: wrap;
}

.action-btn {
    padding: 5px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s;
    color: var(--text-secondary);
}

.action-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: var(--glow-cyan); }
.action-delete:hover { border-color: var(--neon-red); color: var(--neon-red); background: rgba(251, 113, 133, 0.1); box-shadow: 0 0 14px rgba(251, 113, 133, 0.3); }

/* ===== 收藏徽章 ===== */
.photo-card-img, .video-thumb-wrap { position: relative; }

.fav-badge {
    position: absolute; top: 10px; right: 10px;
    font-size: 20px; z-index: 5;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
}

/* ===== 成员列表 ===== */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.member-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 26px 24px;
    backdrop-filter: blur(10px);
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.member-card:hover { transform: translateY(-5px); border-color: var(--border-neon); box-shadow: var(--glow-cyan); }

.member-avatar-lg {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    border: 2px solid var(--border-neon);
    box-shadow: var(--glow-cyan);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 800;
    margin: 0 auto 16px;
}

.member-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.member-username { color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }

.member-stats {
    display: flex; justify-content: center; gap: 20px;
    margin-top: 16px; padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.member-stat-num { font-size: 20px; font-weight: 800; color: var(--neon-cyan); }
.member-stat-label { font-size: 12px; color: var(--text-dim); }

/* ===== 时间线：能量轨迹 ===== */
.timeline { position: relative; padding-left: 30px; }

.timeline::before {
    content: '';
    position: absolute; left: 10px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #22d3ee, #a855f7, #e879f9);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.timeline-item:hover { border-color: var(--border-neon); box-shadow: var(--glow-cyan); }

.timeline-item::before {
    content: '';
    position: absolute; left: -25px; top: 20px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #22d3ee;
    border: 3px solid #0a1128;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.9);
}

.timeline-date { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }

.timeline-type { display: inline-block; padding: 2px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; margin-bottom: 8px; letter-spacing: 1px; }
.timeline-type-photo { background: rgba(56, 189, 248, 0.12); color: var(--neon-blue); border: 1px solid rgba(56, 189, 248, 0.35); }
.timeline-type-video { background: rgba(168, 85, 247, 0.14); color: var(--neon-magenta); border: 1px solid rgba(168, 85, 247, 0.4); }
.timeline-type-diary { background: rgba(251, 191, 36, 0.12); color: var(--neon-gold); border: 1px solid rgba(251, 191, 36, 0.35); }

.timeline-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.timeline-media { margin-top: 10px; max-width: 200px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-soft); }
.timeline-media img { width: 100%; height: 120px; object-fit: cover; }

/* ===== 内联样式表格的统一深色化（兼容 admin/secret 等页的内联样式表） ===== */
table { color: var(--text-primary) !important; }
table thead tr { background: rgba(34, 211, 238, 0.08) !important; }
table th { color: var(--text-secondary) !important; border-color: rgba(148, 163, 184, 0.15) !important; }
table td { border-color: rgba(148, 163, 184, 0.1) !important; color: var(--text-primary); }
div[style*="background:white"], div[style*="background: white"] {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(10px);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    /* 移动端导航不再隐藏，改为横向滑动，避免手机端无导航可用 */
    .main-nav {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        display: flex;
        gap: 4px;
        padding: 8px 12px;
        background: rgba(8, 13, 30, 0.92);
        backdrop-filter: blur(18px);
        border-top: 1px solid var(--border-neon);
        overflow-x: auto;
        z-index: 200;
        -webkit-overflow-scrolling: touch;
    }
    .main-nav a { font-size: 13px; padding: 8px 12px; flex-shrink: 0; }
    .site-main { padding-bottom: 80px; }
    .header-inner { height: 56px; }
    .logo-text { font-size: 16px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .photo-thumb { height: 140px; }
    .diary-detail { padding: 24px 20px; }
    .diary-detail-title { font-size: 22px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .user-name, .role-badge { display: none; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
    .profile-card { padding: 20px; }
    .search-box form { flex-direction: column; }
    .search-input, .search-type, .search-btn { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .upload-card { padding: 20px; }
    .login-card { padding: 32px 24px; }
}

/* ===== 注册页容器（与登录页一致） ===== */
.login-container { max-width: 460px; margin: 48px auto; position: relative; z-index: 1; }

/* ===== 家庭切换器移动端适配 ===== */
@media (max-width: 768px) {
    .family-switcher { display: none !important; }
}
