/* ========== YukiHub Community ========== */
/* 复用官网 CSS 变量 + 暗色主题 */

:root {
    --bg-deep: #070710;
    --bg-primary: #0c0c1d;
    --bg-secondary: #111128;
    --bg-card: #181835;
    --bg-card-hover: #1e1e42;
    --bg-surface: #1a1a38;
    --border-subtle: #252545;
    --border-card: #2a2a50;
    --accent: #b388ff;
    --accent-soft: #c5a3ff;
    --accent-glow: rgba(179, 136, 255, 0.25);
    --pink: #f48fb1;
    --gold: #ffcc80;
    --blue: #64b5f6;
    --green: #81c784;
    --red: #ef5350;
    --text-primary: #e8e8f2;
    --text-secondary: #b0b0c8;
    --text-muted: #787898;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 60px rgba(179,136,255,0.12);
    --transition-fast: 0.18s ease;
    --transition-normal: 0.3s ease;
    --font-sans: 'Inter','PingFang SC','Noto Sans SC','Microsoft YaHei',system-ui,sans-serif;
    --font-mono: 'JetBrains Mono','Fira Code','Consolas',monospace;
    --max-width: 1200px;
    --sidebar-width: 280px;
}

* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior:smooth; -webkit-font-smoothing:antialiased; }

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 背景装饰 */
.bg-ambient { position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.bg-orb { position:absolute; border-radius:50%; filter:blur(120px); opacity:0.15; animation:orbFloat 18s ease-in-out infinite; }
.bg-orb-1 { width:500px; height:500px; background:var(--accent); top:-100px; left:-100px; }
.bg-orb-2 { width:400px; height:400px; background:var(--pink); bottom:-80px; right:-80px; animation-delay:-9s; }
@keyframes orbFloat { 0%,100%{transform:translate(0,0);} 50%{transform:translate(30px,-30px);} }

/* 导航栏 */
.comm-nav {
    position: sticky; top:0; z-index:100;
    background: rgba(12,12,29,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 16px;
}
.comm-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.comm-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex; align-items: center; gap: 6px;
    flex-shrink: 0;
}
.comm-logo svg { width: 24px; height: 24px; }
.comm-nav-links { display:flex; gap:4px; flex:1; }
.comm-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition-fast);
    cursor: pointer;
}
.comm-nav-link:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.comm-nav-link.active { color: var(--accent); background: var(--accent-glow); }
.comm-nav-right { position: relative; display:flex; align-items:center; gap:8px; flex-shrink: 0; }
.nav-me-avatar { cursor: pointer; display: flex; align-items: center; }
/* 只给头像本体描边。:not(.avatar-frame-overlay) 是必须的——头像框也是 <img>，
   否则框素材会被套上一圈紫色方边框 */
.nav-me-avatar img:not(.avatar-frame-overlay), .nav-me-avatar .online-avatar, .nav-me-avatar .comment-avatar-placeholder { border: 2px solid var(--accent); }

/* 搜索框 */
.comm-nav-search { position: relative; flex: 1; max-width: 420px; }
.search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; color: var(--text-muted); pointer-events: none;
}
.comm-search-input {
    width: 100%; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: 22px; padding: 8px 16px 8px 34px; color: var(--text-primary);
    font-size: 0.82rem; font-family: var(--font-sans); transition: var(--transition-fast);
}
.comm-search-input:focus { outline: none; border-color: var(--accent); background: var(--bg-card-hover); box-shadow: 0 0 0 3px var(--accent-glow); }
.comm-search-input::placeholder { color: var(--text-muted); }
.comm-search-results {
    position: absolute; top: 46px; left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border-card);
    border-radius: var(--radius-md); box-shadow: var(--shadow-card);
    max-height: 400px; overflow-y: auto; z-index: 150;
}
.comm-search-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    cursor: pointer; transition: var(--transition-fast); border-bottom: 1px solid var(--border-subtle);
}
.comm-search-item:last-child { border-bottom: none; }
.comm-search-item:hover { background: var(--bg-card-hover); }
.comm-search-section { font-size: 0.7rem; color: var(--text-muted); padding: 8px 14px 4px; font-weight: 600; text-transform: uppercase; }
.comm-search-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* ===== 底部导航栏 ===== */
.comm-tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
    display: flex;
    background: rgba(12,12,29,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
}
.comm-tab {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px;
    padding: 4px 0 2px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast), background var(--transition-fast);
    min-height: 52px;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.comm-tab:hover { color: var(--text-secondary); }
.comm-tab:active { background: var(--accent-glow); }
.comm-tab svg { width: 22px; height: 22px; display: block; }
.comm-tab span { font-size: 0.66rem; font-weight: 500; line-height: 1.2; }
.comm-tab.active { color: var(--accent); }
.comm-tab.active svg { filter: drop-shadow(0 0 6px var(--accent-glow)); }

/* 中间发帖按钮（凸起） */
.comm-tab-center { position: relative; }
.tab-post-btn {
    width: 46px; height: 46px;
    margin-top: -24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #7c4dff);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(124, 77, 255, 0.45), 0 0 0 4px var(--bg-deep);
    transition: transform var(--transition-fast);
}
.tab-post-btn svg { width: 24px; height: 24px; }
.comm-tab-center:active .tab-post-btn { transform: scale(0.92); }
.comm-tab-center.active { color: var(--accent); }
.comm-tab-center.active .tab-post-btn { box-shadow: 0 6px 16px rgba(124,77,255,0.6), 0 0 0 4px var(--bg-deep), 0 0 20px var(--accent-glow); }

/* 关注按钮 */
.follow-btn {
    padding: 6px 16px; border-radius: 20px; border: 1px solid var(--accent);
    background: transparent; color: var(--accent); font-size: 0.8rem;
    cursor: pointer; transition: var(--transition-fast); font-family: var(--font-sans);
}
.follow-btn:hover { background: var(--accent); color: #0a0a18; }
.follow-btn.following { background: var(--bg-card-hover); border-color: var(--border-card); color: var(--text-secondary); }
.follow-btn.following:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* 个人资料三点菜单按钮 */
.profile-menu-btn {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.35); cursor: pointer;
    transition: var(--transition-fast);
}
.profile-menu-btn:hover { background: rgba(0,0,0,0.55); }
.profile-menu-btn svg { width: 18px; height: 18px; color: #fff; }

/* 三点菜单弹层 */
.profile-menu-pop {
    position: absolute; z-index: 1000;
    min-width: 132px; padding: 6px;
    background: var(--bg-card); border: 1px solid var(--border-card);
    border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.profile-menu-item {
    padding: 9px 14px; border-radius: 8px; font-size: 0.85rem;
    color: var(--text-secondary); cursor: pointer; transition: var(--transition-fast);
    white-space: nowrap;
}
.profile-menu-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.profile-menu-item[data-act="logout"]:hover { background: var(--red); color: #fff; }

/* 通知铃铛 */
.notif-bell { position: relative; cursor: pointer; padding: 6px; display: flex; align-items: center; }
.notif-bell svg { width: 22px; height: 22px; color: var(--text-secondary); }
.notif-bell:hover svg { color: var(--accent); }
.notif-badge {
    position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px;
    border-radius: 10px; background: var(--red); color: #fff;
    font-size: 0.6rem; display: flex; align-items: center; justify-content: center;
    font-weight: 700; padding: 0 3px;
}
.notif-dropdown {
    position: absolute; top: 48px; right: -8px; width: 340px; max-height: 70vh; overflow-y: auto;
    background: var(--bg-card); border: 1px solid var(--border-card);
    border-radius: var(--radius-md); box-shadow: var(--shadow-card); z-index: 150;
}
@media (max-width: 600px) {
    .notif-dropdown { position: fixed; top: 56px; left: 8px; right: 8px; width: auto; }
}
/* 消息中心分类 tab */
.notif-tabs {
    display: flex; gap: 4px; padding: 10px 10px 8px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky; top: 0; background: var(--bg-card); z-index: 2;
    overflow-x: auto; scrollbar-width: none;
}
.notif-tabs::-webkit-scrollbar { display: none; }
.notif-tab {
    padding: 5px 12px; border-radius: 16px; white-space: nowrap;
    font-size: 0.75rem; color: var(--text-secondary); cursor: pointer;
    transition: var(--transition-fast); border: 1px solid transparent;
}
.notif-tab:hover { color: var(--text-primary); }
.notif-tab.active { background: var(--accent); color: #0a0a18; font-weight: 600; }
.notif-tab .nt-badge {
    display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
    border-radius: 8px; background: var(--red); color: #fff; font-size: 0.6rem;
    text-align: center; padding: 0 4px; margin-left: 4px; vertical-align: middle;
}
.notif-tab.active .nt-badge { background: rgba(10,10,24,0.75); }
/* 「全部已读」固定在 tab 行最右侧，消息再多也一点就到 */
.notif-markall-top {
    margin-left: auto; align-self: center; flex-shrink: 0;
    font-size: 0.72rem; color: var(--accent); cursor: pointer;
    padding: 4px 8px; border-radius: 12px; white-space: nowrap;
}
.notif-markall-top:hover { background: rgba(255,255,255,0.05); }
.notif-dropdown-item {
    padding: 12px 14px; border-bottom: 1px solid var(--border-subtle);
    cursor: pointer; transition: var(--transition-fast);
    display: flex; gap: 10px; align-items: flex-start;
}
.notif-dropdown-item:hover { background: var(--bg-card-hover); }
.notif-dropdown-item.unread { background: var(--accent-glow); }
.notif-dropdown-item .notif-icon {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; background: var(--bg-surface);
}
.notif-dropdown-item .notif-body { flex: 1; min-width: 0; }
.notif-dropdown-item .notif-text { font-size: 0.8rem; color: var(--text-secondary); }
.notif-dropdown-item .notif-text b { color: var(--text-primary); font-weight: 600; }
.notif-dropdown-item .notif-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.notif-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); font-size: 0.8rem; }
.comm-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-sans);
}
.comm-btn:hover { border-color: var(--accent); color: var(--accent); }
.comm-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #0a0a18;
    font-weight: 600;
}
.comm-btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #0a0a18; }

/* 主布局 */
.comm-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px calc(96px + env(safe-area-inset-bottom));
    display: flex;
    gap: 24px;
    position: relative;
    z-index: 1;
}
.comm-content { flex: 1; min-width: 0; }
.comm-sidebar { width: var(--sidebar-width); flex-shrink: 0; }
.comm-sidebar-inner { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }

/* 卡片基础 */
.comm-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-fast);
}
.comm-card:hover { border-color: var(--border-card); }

/* 帖子卡片 */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: var(--transition-fast);
    cursor: pointer;
}
.post-card:hover { background: var(--bg-card-hover); border-color: var(--border-card); transform: translateY(-1px); }

.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-surface);
    object-fit: cover;
    flex-shrink: 0;
}
.post-avatar-placeholder {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--pink));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; font-weight: 600; color: #fff;
    flex-shrink: 0;
}
.post-author-info { flex: 1; min-width: 0; }
.post-author-name { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); }
.post-time { font-size: 0.75rem; color: var(--text-muted); }
.post-category-tag {
    font-size: 0.7rem; padding: 2px 8px; border-radius: 4px;
    background: var(--accent-glow); color: var(--accent-soft);
    flex-shrink: 0;
}
.post-pin-badge {
    font-size: 0.7rem; padding: 2px 8px; border-radius: 4px;
    background: rgba(255,204,128,0.15); color: var(--gold);
}

.post-title {
    font-size: 1.05rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 6px; line-height: 1.4;
}
.post-summary {
    font-size: 0.875rem; color: var(--text-secondary);
    line-height: 1.6; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-images {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    margin-bottom: 10px;
}
.post-images img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    cursor: zoom-in;
}
.post-images.one img { aspect-ratio: 16/9; max-height: 280px; }
.post-images.two { grid-template-columns: repeat(2, 1fr); }
.post-images.two img { aspect-ratio: 4/3; }
.post-images.four { grid-template-columns: repeat(2, 1fr); }

.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.post-tag {
    font-size: 0.72rem; padding: 2px 8px; border-radius: 4px;
    background: var(--bg-surface); color: var(--text-muted);
}
.post-footer { display: flex; gap: 16px; color: var(--text-muted); font-size: 0.8rem; }
.post-footer-item { display: flex; align-items: center; gap: 4px; }
.post-footer-item svg { width: 14px; height: 14px; }

/* 分类标签栏 */
.category-bar {
    display: flex; gap: 8px; margin-bottom: 16px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-tab {
    padding: 6px 14px; border-radius: 20px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    color: var(--text-secondary); font-size: 0.8rem;
    cursor: pointer; transition: var(--transition-fast);
    white-space: nowrap;
}
.category-tab:hover { color: var(--text-primary); }
.category-tab.active { background: var(--accent); border-color: var(--accent); color: #0a0a18; font-weight: 500; }

/* 加载更多 */
.load-more {
    text-align: center; padding: 20px;
    color: var(--text-muted); font-size: 0.85rem;
}
.load-more-btn {
    display: inline-block; padding: 8px 24px;
    border-radius: var(--radius-sm); border: 1px solid var(--border-card);
    background: var(--bg-card); color: var(--text-secondary);
    cursor: pointer; transition: var(--transition-fast); font-size: 0.85rem;
}
.load-more-btn:hover { color: var(--accent); border-color: var(--accent); }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 0.85rem; }

/* 侧边栏卡片 */
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
}
.sidebar-title {
    font-size: 0.875rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}

/* 在线用户列表 */
.online-list { display: flex; flex-direction: column; gap: 8px; }
.online-item { display: flex; align-items: center; gap: 10px; cursor: pointer; transition: var(--transition-fast); padding: 4px 6px; border-radius: var(--radius-sm); }
.online-item:hover { background: var(--bg-card-hover); }
.online-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--bg-surface); object-fit: cover; position: relative;
}
.online-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); }
.online-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.online-dot.away { background: var(--gold); }
.online-dot.busy { background: var(--red); }
.online-dot.offline { background: var(--text-muted); opacity: 0.7; }
.online-name { font-size: 0.8rem; color: var(--text-primary); }
.online-activity { font-size: 0.72rem; color: var(--text-muted); }

/* 游戏排行 */
.game-rank-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.game-rank-item:last-child { border-bottom: none; }
.game-rank-num { font-size: 0.875rem; font-weight: 700; color: var(--text-muted); width: 20px; }
.game-rank-info { flex: 1; min-width: 0; }
.game-rank-title { font-size: 0.8rem; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-rank-meta { font-size: 0.7rem; color: var(--text-muted); }

/* 帖子详情页 */
.post-detail { margin-bottom: 24px; }
.post-detail-content {
    font-size: 0.9rem; line-height: 1.8; color: var(--text-primary);
    word-wrap: break-word; overflow-wrap: break-word;
}
.post-detail-content h1 { font-size: 1.4rem; margin: 16px 0 8px; }
.post-detail-content h2 { font-size: 1.2rem; margin: 14px 0 6px; }
.post-detail-content h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.post-detail-content p { margin-bottom: 10px; }
.post-detail-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; }
.post-detail-content code {
    font-family: var(--font-mono); font-size: 0.85em;
    background: var(--bg-surface); padding: 2px 6px; border-radius: 4px;
    color: var(--accent-soft);
}
.post-detail-content pre {
    background: var(--bg-deep); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); padding: 12px; overflow-x: auto;
    margin: 10px 0;
}
.post-detail-content pre code { background: none; padding: 0; }
.post-detail-content blockquote {
    border-left: 3px solid var(--accent); padding-left: 12px;
    color: var(--text-secondary); margin: 10px 0;
}
.post-detail-content ul, .post-detail-content ol { padding-left: 20px; margin-bottom: 10px; }
.post-detail-content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.post-detail-content th, .post-detail-content td { border: 1px solid var(--border-subtle); padding: 6px 10px; }
.post-detail-content th { background: var(--bg-surface); }

/* 评论区 */
.comments-section { margin-top: 32px; }
.comments-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.comments-title { font-size: 1rem; font-weight: 600; }
.comments-total { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
/* 发言顺序切换（默认正序 / 倒序） */
.comments-order { display: flex; gap: 4px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 2px; }
.comments-order-btn { font-size: 0.75rem; color: var(--text-muted); cursor: pointer; padding: 4px 10px; border-radius: calc(var(--radius-sm) - 2px); transition: var(--transition-fast); user-select: none; }
.comments-order-btn:hover { color: var(--text-primary); }
.comments-order-btn.active { background: var(--accent); color: #0a0a18; font-weight: 500; }
/* 全部楼层加载完毕的收尾提示 */
.comments-end { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding: 14px 0; }
.comment-item { display: flex; gap: 10px; margin-bottom: 16px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-surface); object-fit: cover; flex-shrink: 0; }
.comment-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--pink)); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; color: #fff; flex-shrink: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-name { font-size: 0.8rem; font-weight: 500; color: var(--text-primary); }
.comment-time { font-size: 0.72rem; color: var(--text-muted); }
/* 贴吧式楼层号，靠右显示 */
.comment-floor { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }
/* 楼中楼互相回复时显示「回复 XX」 */
.comment-reply-to { font-size: 0.7rem; color: var(--text-muted); }
.comment-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.comment-actions { display: flex; gap: 12px; margin-top: 4px; }
.comment-action { font-size: 0.75rem; color: var(--text-muted); cursor: pointer; transition: var(--transition-fast); }
.comment-action:hover { color: var(--accent); }

/* 楼中楼 */
.reply-list { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--border-subtle); }
.reply-item { display: flex; gap: 8px; margin-bottom: 8px; }
.reply-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-surface); object-fit: cover; flex-shrink: 0; }
/* 层内回复展开 / 续加载 */
.reply-more-btn { font-size: 0.75rem; color: var(--accent); cursor: pointer; margin-top: 6px; padding-left: 12px; user-select: none; }
.reply-more-btn:hover { text-decoration: underline; }

/* 评论输入框 */
.comment-input-area { display: flex; gap: 8px; margin-bottom: 20px; }
.comment-input {
    flex: 1; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); padding: 10px 12px;
    color: var(--text-primary); font-size: 0.875rem; font-family: var(--font-sans);
    resize: vertical; min-height: 42px;
}
.comment-input:focus { outline: none; border-color: var(--accent); }
.comment-input::placeholder { color: var(--text-muted); }

/* 游戏图鉴 */
/* 未登录时的游戏库门禁卡（封面可能 NSFW，仅登录可见） */
.game-gate {
    text-align: center; padding: 56px 24px; color: var(--text-muted);
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.game-gate-icon { font-size: 2rem; margin-bottom: 12px; opacity: 0.8; }
.game-gate h3 { font-size: 1rem; color: var(--text-primary); margin-bottom: 6px; }
.game-gate p { font-size: 0.85rem; margin-bottom: 18px; line-height: 1.6; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.game-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: 16px; text-align: center;
    transition: var(--transition-fast); cursor: pointer;
}
.game-card:hover { background: var(--bg-card-hover); border-color: var(--accent); transform: translateY(-2px); }
.game-icon { font-size: 2.5rem; margin-bottom: 8px; }
.game-name { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.game-card-rating { font-size: 0.78rem; color: var(--gold); font-weight: 600; margin-bottom: 3px; }
.game-card-rating-count { font-size: 0.68rem; color: var(--text-muted); font-weight: 400; }
.game-meta { font-size: 0.72rem; color: var(--text-muted); }

/* 游戏封面 */
.game-cover {
    width: 100%; aspect-ratio: 3/4; border-radius: var(--radius-sm);
    overflow: hidden; margin-bottom: 8px; background: var(--bg-card-hover);
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-cover-fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: var(--text-muted);
}

/* 游戏详情页 */
.game-detail-header {
    display: flex; gap: 16px; padding: 16px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); margin-bottom: 16px;
}
.game-detail-cover {
    width: 120px; flex-shrink: 0; aspect-ratio: 3/4;
    border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-card-hover);
}
.game-detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-detail-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.game-detail-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.game-detail-stats { font-size: 0.82rem; color: var(--text-secondary); }
.game-source-badge {
    display: inline-block; font-size: 0.62rem; font-weight: 600;
    padding: 1px 6px; border-radius: 4px; vertical-align: middle;
    background: var(--accent); color: #fff; margin-left: 6px;
}
.game-player-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer;
    transition: var(--transition-fast);
}
.game-player-item:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.game-player-name { flex: 1; min-width: 0; font-size: 0.85rem; color: var(--text-primary); }
.game-player-time { font-size: 0.75rem; color: var(--text-muted); }

/* ===== 游戏评分 / 评价 ===== */
/* 星星基础 */
.gr-star, .gr-pick-star {
    color: var(--border-subtle); font-size: 1rem; letter-spacing: 1px;
    position: relative; display: inline-block;
}
.gr-star.full, .gr-pick-star.full { color: var(--gold, #ffc107); }
/* 半星：用渐变裁切左半 */
.gr-star.half, .gr-pick-star.half {
    background: linear-gradient(90deg, var(--gold, #ffc107) 50%, var(--border-subtle) 50%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gr-stars-inline { letter-spacing: 0; white-space: nowrap; }

/* 详情页头部评分行 */
.game-detail-rating-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.game-rating-score { font-size: 1.3rem; font-weight: 700; color: var(--gold, #ffc107); }
.game-rating-stars { font-size: 0.95rem; white-space: nowrap; }
.game-rating-count { font-size: 0.75rem; color: var(--text-muted); }

/* 评分总览面板（平均分 + 分布） */
.gr-panel {
    display: flex; gap: 14px; padding: 12px 14px; align-items: center;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); margin-bottom: 12px;
}
.gr-panel-left {
    flex-shrink: 0; width: 84px; text-align: center;
    display: flex; flex-direction: column; gap: 2px; justify-content: center;
}
.gr-avg { font-size: 1.6rem; font-weight: 700; color: var(--gold, #ffc107); line-height: 1.1; }
.gr-avg-stars { font-size: 0.72rem; white-space: nowrap; }
.gr-avg-count { font-size: 0.66rem; color: var(--text-muted); white-space: nowrap; }
.gr-panel-right { flex: 1; min-width: 0; }

/* 分布柱状图（10→1 横向，纵向柱子，柱顶标人数） */
.gr-hist { display: flex; align-items: flex-end; gap: 3px; height: 66px; }
.gr-hist-col {
    flex: 1; min-width: 0; height: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.gr-hist-num {
    font-size: 0.58rem; line-height: 1; flex-shrink: 0;
    color: var(--text-secondary); height: 8px;
}
.gr-hist-num.gr-hist-zero { color: transparent; }
.gr-hist-track {
    flex: 1; width: 100%; min-height: 0;
    display: flex; align-items: flex-end; justify-content: center;
}
.gr-hist-bar {
    width: 100%; max-width: 14px; min-height: 2px; border-radius: 2px 2px 0 0;
    background: var(--gold, #ffc107); opacity: 0.85;
}
.gr-hist-bar.gr-hist-empty { height: 2px !important; background: var(--bg-card-hover); opacity: 1; }
.gr-hist-tick { font-size: 0.6rem; color: var(--text-muted); line-height: 1; flex-shrink: 0; }

/* 我的评价 / 评分入口 */
.gr-my-action { margin-bottom: 12px; }
.gr-rate-btn {
    text-align: center; padding: 12px; cursor: pointer;
    background: var(--accent); color: #fff; font-size: 0.88rem; font-weight: 500;
    border-radius: var(--radius-sm); transition: var(--transition-fast);
}
.gr-rate-btn:hover { filter: brightness(1.1); }
.gr-login-hint {
    text-align: center; padding: 12px; font-size: 0.82rem; color: var(--text-muted);
    background: var(--bg-card); border: 1px dashed var(--border-subtle); border-radius: var(--radius-sm);
}
.gr-my-card {
    padding: 12px 14px; background: var(--bg-card);
    border: 1px solid var(--accent); border-radius: var(--radius-sm);
}
.gr-my-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gr-my-label { font-size: 0.78rem; color: var(--text-secondary); }
.gr-my-score { font-size: 0.78rem; color: var(--gold, #ffc107); font-weight: 600; }
.gr-my-edit, .gr-my-del {
    margin-left: auto; font-size: 0.75rem; color: var(--text-muted); cursor: pointer;
}
.gr-my-del { margin-left: 0; }
.gr-my-edit:hover { color: var(--accent); }
.gr-my-del:hover { color: var(--red); }
.gr-my-content { margin-top: 8px; font-size: 0.85rem; color: var(--text-primary); line-height: 1.6; white-space: pre-wrap; }

/* 评价列表 */
.gr-list-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gr-sort { display: flex; gap: 4px; margin-left: auto; }
.gr-sort-item {
    font-size: 0.75rem; padding: 3px 10px; border-radius: 12px; cursor: pointer;
    color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border-subtle);
}
.gr-sort-item.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.gr-item {
    padding: 12px 14px; margin-bottom: 8px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.gr-item-head { display: flex; align-items: center; gap: 10px; }
.gr-item-author { flex: 1; min-width: 0; }
.gr-item-name { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; }
.gr-item-name:hover { color: var(--accent); }
.gr-item-time { font-size: 0.7rem; color: var(--text-muted); }
.gr-item-rating { text-align: right; flex-shrink: 0; }
.gr-item-score { display: block; font-size: 0.72rem; color: var(--gold, #ffc107); font-weight: 600; }
.gr-item-content {
    margin-top: 8px; font-size: 0.85rem; color: var(--text-primary);
    line-height: 1.6; white-space: pre-wrap;
}
/* 剧透遮罩 */
.gr-item-content.gr-spoiler {
    color: transparent; background: var(--border-subtle);
    border-radius: 4px; cursor: pointer; user-select: none;
}
.gr-item-content.gr-spoiler::after {
    content: '⚠ 剧透内容，点击显示'; color: var(--text-muted); font-size: 0.78rem;
    position: absolute; left: 50%; transform: translateX(-50%);
}
.gr-item-content.gr-spoiler { position: relative; }
.gr-item-foot { margin-top: 8px; display: flex; gap: 12px; }
.gr-like { font-size: 0.75rem; color: var(--text-muted); cursor: pointer; user-select: none; }
.gr-like:hover { color: var(--accent); }
.gr-like.liked { color: var(--accent); font-weight: 600; }
.gr-reply-toggle { font-size: 0.75rem; color: var(--text-muted); cursor: pointer; }
.gr-reply-toggle:hover { color: var(--accent); }

/* 评价回复（楼中楼） */
.gr-replies {
    margin-top: 10px; padding: 10px 12px;
    background: var(--bg-deep); border-radius: var(--radius-sm);
}
.gr-reply-loading { font-size: 0.75rem; color: var(--text-muted); padding: 6px 0; text-align: center; }
.gr-reply-list { display: flex; flex-direction: column; gap: 10px; }
.gr-reply-item { display: flex; gap: 8px; }
.gr-reply-body { flex: 1; min-width: 0; }
.gr-reply-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gr-reply-name { font-size: 0.78rem; font-weight: 500; color: var(--text-primary); }
.gr-reply-name:hover { color: var(--accent); }
.gr-reply-to { font-size: 0.7rem; color: var(--text-muted); }
.gr-reply-time { font-size: 0.68rem; color: var(--text-muted); margin-left: auto; }
.gr-reply-content { font-size: 0.8rem; color: var(--text-primary); line-height: 1.5; margin-top: 3px; white-space: pre-wrap; }
.gr-reply-actions { display: flex; gap: 10px; margin-top: 4px; }
.gr-reply-btn, .gr-reply-del { font-size: 0.7rem; color: var(--text-muted); cursor: pointer; }
.gr-reply-btn:hover { color: var(--accent); }
.gr-reply-del:hover { color: var(--red); }
.gr-reply-form { display: flex; gap: 8px; margin-top: 10px; }
.gr-reply-input {
    flex: 1; min-width: 0; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    padding: 8px 12px; color: var(--text-primary); font-size: 0.8rem; font-family: inherit;
}
.gr-reply-input:focus { outline: none; border-color: var(--accent); }
.gr-reply-send { flex-shrink: 0; font-size: 0.78rem; padding: 6px 14px; }

/* 评分弹窗 */
.gr-modal-game { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 12px; text-align: center; }
.gr-picker { display: flex; align-items: center; gap: 4px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.gr-pick-star { font-size: 1.8rem; cursor: pointer; }
.gr-picker-text { margin-left: 8px; font-size: 0.8rem; color: var(--text-secondary); }
.gr-textarea { min-height: 90px; resize: vertical; padding: 10px 12px; line-height: 1.5; font-family: inherit; }
.gr-spoiler-check {
    display: flex; align-items: center; gap: 6px; margin: 10px 0;
    font-size: 0.8rem; color: var(--text-secondary); cursor: pointer;
}

/* (旧版资料页样式已移除) */
/* 游戏列表（个人主页） */
.game-list { display: flex; flex-direction: column; gap: 8px; }
.game-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
.game-list-title { flex: 1; font-size: 0.85rem; color: var(--text-primary); }
.game-list-time { font-size: 0.75rem; color: var(--text-muted); }

/* 游戏总览卡（小黑盒风格大数字：总时长 / 游戏数 / 帖子） */
.profile-game-overview {
    display: flex; align-items: stretch;
    background: linear-gradient(135deg, rgba(120,90,255,0.14), rgba(60,120,255,0.08));
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    padding: 18px 12px; margin-bottom: 12px;
}
.pgo-item { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.pgo-num { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.pgo-label { font-size: 0.72rem; color: var(--text-secondary); }
.pgo-divider { width: 1px; background: var(--border-subtle); margin: 4px 0; }

/* 游戏库（小黑盒风格：封面 + 名称 + 时长条） */
.hb-game-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.hb-game-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); transition: var(--transition-fast);
}
.hb-game-item:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.hb-game-cover {
    width: 54px; height: 72px; flex-shrink: 0; object-fit: cover;
    border-radius: 6px; background: var(--bg-card-hover); display: block;
}
.hb-game-cover-fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--text-muted);
}
.hb-game-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hb-game-title {
    font-size: 0.9rem; font-weight: 500; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hb-game-bar { height: 6px; border-radius: 3px; background: var(--bg-card-hover); overflow: hidden; }
.hb-game-bar-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), #7a5aff);
}
.hb-game-time { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }

/* 游戏库"显示更多" */
.hb-game-more { margin: -4px 0 16px; }
.hb-game-more-btn {
    text-align: center; padding: 10px; cursor: pointer;
    font-size: 0.82rem; color: var(--text-secondary);
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); transition: var(--transition-fast);
}
.hb-game-more-btn:hover { background: var(--bg-card-hover); color: var(--accent); border-color: var(--accent); }


/* ===== 首页在线用户条 ===== */
.home-online-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 0 10px;
    margin-bottom: 16px;
}
.home-online-header {
    display: flex; align-items: center; gap: 8px;
    padding: 0 16px 10px;
}
.home-online-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.home-online-count {
    font-size: 0.7rem; color: var(--accent-soft);
    background: var(--accent-glow); border-radius: 10px;
    padding: 2px 8px;
}
.home-online-more {
    margin-left: auto; font-size: 0.72rem; color: var(--text-muted);
    cursor: pointer; transition: var(--transition-fast);
}
.home-online-more:hover { color: var(--accent); }
.home-online-scroll {
    display: flex; gap: 14px; overflow-x: auto;
    padding: 0 16px 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.home-online-scroll::-webkit-scrollbar { display: none; }
/* 自动循环滚动时不允许手动横滑，避免与动画冲突 */
.home-online-scroll:not(.manual) { overflow: hidden; }
.home-online-scroll.manual { overflow-x: auto; }

/* 滚动轨道 */
.home-online-track { display: flex; gap: 14px; flex-shrink: 0; }
.home-online-track.auto-scroll {
    animation: onlineMarquee var(--scroll-duration, 20s) linear infinite;
    will-change: transform;
}
/* 悬停暂停，方便点击 */
.home-online-scroll:hover .home-online-track.auto-scroll { animation-play-state: paused; }
@keyframes onlineMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(var(--scroll-distance, -100%)); }
}
/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
    .home-online-track.auto-scroll { animation: none; }
    .home-online-scroll:not(.manual) { overflow-x: auto; }
}

.home-online-item {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
    gap: 6px; cursor: pointer; width: 54px;
    transition: transform var(--transition-fast);
}
.home-online-item:hover { transform: translateY(-2px); }
/* 头像 48px，光点落在头像内部右下角 */
.home-online-avatar-wrap { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.home-online-avatar-wrap .online-dot {
    position: absolute; bottom: 2px; right: 2px;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--bg-card);
    box-sizing: content-box;
}
.home-online-name {
    font-size: 0.68rem; color: var(--text-secondary);
    max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-align: center;
}
.home-online-empty { padding: 6px 16px 2px; font-size: 0.78rem; color: var(--text-muted); }

/* ===== 好友页 ===== */
.friends-page { display: flex; flex-direction: column; gap: 12px; }
.friends-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.friends-header h2 { font-size: 1.05rem; color: var(--text-primary); }
.friends-header .friends-count { font-size: 0.75rem; color: var(--text-muted); }
.friend-requests-banner {
    padding: 10px 16px; background: var(--accent-glow);
    border: 1px solid var(--accent); border-radius: var(--radius-sm);
    font-size: 0.8rem; color: var(--accent-soft); cursor: pointer;
}
.friend-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    cursor: pointer; transition: var(--transition-fast);
}
.friend-card:hover { background: var(--bg-card-hover); border-color: var(--border-card); }
.friend-avatar { position: relative; flex-shrink: 0; width: 44px; height: 44px; }
.friend-avatar .online-dot {
    position: absolute; bottom: -1px; right: -1px;
    width: 13px; height: 13px; border-radius: 50%;
    border: 2.5px solid var(--bg-card);
    background: var(--text-muted);
}
.friend-avatar .online-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.friend-avatar .online-dot.away { background: var(--gold); }
.friend-avatar .online-dot.busy { background: var(--red); }
.friend-avatar .online-dot.offline { background: var(--text-muted); opacity: 0.7; }
.friend-info { flex: 1; min-width: 0; }
.friend-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.friend-sig { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-activity { font-size: 0.7rem; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.friend-unread {
    background: var(--red); color: #fff; font-size: 0.65rem;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
    flex-shrink: 0;
}

/* ===== 个人资料页（小黑盒风格） ===== */
.profile-header {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden;
    position: relative;
}
.profile-banner {
    height: 98px;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(100, 180, 255, 0.25), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(180, 130, 255, 0.35), transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(200, 60, 120, 0.15), transparent 50%),
        linear-gradient(135deg, #0d1b3e 0%, #1a2d5e 30%, #3a2a6e 70%, #1a1540 100%);
    position: relative;
}
.profile-banner::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(179,136,255,0.35), transparent 60%);
}
.profile-body {
    padding: 0 20px 18px;
    display: flex; flex-direction: column; align-items: center;
    margin-top: -38px; position: relative;
}


.profile-avatar-wrap { position: relative; width: 76px; height: 76px; flex-shrink: 0; z-index: 1; margin: 0 auto 4px; }
.profile-avatar, .profile-avatar-placeholder {
    width: 76px; height: 76px; border-radius: 50%;
    object-fit: cover; border: 4px solid var(--bg-card);
    background: var(--bg-surface);
}
.profile-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--pink));
}
/* 头像右下角状态点（唯一的状态指示） */
.profile-avatar-dot {
    position: absolute; bottom: 2px; right: 2px;
    width: 15px; height: 15px; border-radius: 50%;
    border: 3px solid var(--bg-card);
    background: var(--text-muted);
    /* 必须高于头像框（z-index 1）：戴框后状态点不能被装饰盖住 */
    z-index: 2;
}
.profile-avatar-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.profile-avatar-dot.away { background: var(--gold); }
.profile-avatar-dot.busy { background: var(--red); }
.profile-avatar-dot.offline { background: var(--text-muted); opacity: 0.7; }
.profile-info { padding-top: 10px; text-align: center; }
.profile-name-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.profile-name { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
/* 名字居中，等级徽章绝对定位挂在右侧，不参与居中计算 */
.profile-name-center { position: relative; display: inline-block; }
.profile-name-badge {
    position: absolute; left: calc(100% + 8px); top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-fast);
}
.profile-name-badge:hover { filter: brightness(1.25); }
.profile-name-badge:active { transform: translateY(-50%) scale(0.94); }
.profile-name-badge .level-badge { margin-left: 0; }
/* 关注按钮行（名字/签名下方，居中） */
.profile-follow-row { margin-top: 10px; }
.profile-follow-row .follow-btn { padding: 7px 28px; }
.profile-sig { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.profile-playing {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 6px;
    font-size: 0.78rem; color: var(--green);
    font-weight: 500;
}
.profile-playing .pp-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--green);
    box-shadow: 0 0 5px var(--green);
}
.profile-playing .pp-dot.away { background: var(--gold); box-shadow: 0 0 5px var(--gold); }
.profile-playing .pp-dot.busy { background: var(--red); box-shadow: 0 0 5px var(--red); }
.profile-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.profile-stats {
    display: flex; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    margin-bottom: 16px; overflow: hidden;
}
.profile-stat {
    flex: 1; text-align: center; padding: 14px 4px;
    transition: var(--transition-fast); cursor: pointer;
}
.profile-stat:hover { background: var(--bg-card-hover); }
.profile-stat-num { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.profile-stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.profile-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.95rem; font-weight: 600; color: var(--text-primary);
    margin: 20px 0 12px;
}
.profile-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

/* 编辑器 */
.editor-area {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: 20px;
}
.editor-title-input {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border-subtle);
    padding: 8px 0; font-size: 1.1rem; font-weight: 600; color: var(--text-primary);
    font-family: var(--font-sans); margin-bottom: 16px;
}
.editor-title-input:focus { outline: none; border-bottom-color: var(--accent); }
.editor-title-input::placeholder { color: var(--text-muted); }
.editor-content-input {
    width: 100%; min-height: 300px; background: var(--bg-deep);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    padding: 14px; font-size: 0.9rem; color: var(--text-primary);
    font-family: var(--font-mono); line-height: 1.6; resize: vertical;
}
.editor-content-input:focus { outline: none; border-color: var(--accent); }
.editor-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.editor-tool {
    padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-subtle);
    background: var(--bg-surface); color: var(--text-secondary); font-size: 0.8rem;
    cursor: pointer; transition: var(--transition-fast);
}
.editor-tool:hover { color: var(--accent); border-color: var(--accent); }
.editor-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.editor-image-preview { position: relative; width: 80px; height: 80px; }
.editor-image-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); }
.editor-image-remove {
    position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
    border-radius: 50%; background: var(--red); color: #fff; border: none;
    font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.editor-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }

/* 按钮组 */
.category-select { display: flex; gap: 8px; margin-bottom: 12px; }
.tag-input-area { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag-input-area input {
    flex: 1; min-width: 120px; background: var(--bg-deep); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); padding: 6px 10px; color: var(--text-primary);
    font-size: 0.8rem; font-family: var(--font-sans);
}

/* 加载动画 */
.loading-spinner { text-align: center; padding: 40px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border-subtle); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.85rem; color: var(--text-muted); }

/* 用户名片 */
.user-mini { display: flex; align-items: center; gap: 8px; }
.user-mini-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-surface); object-fit: cover; }
.user-mini-avatar-placeholder { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--pink)); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 600; color: #fff; }
.user-mini-name { font-size: 0.8rem; color: var(--text-primary); }

/* 移动端适配 */
@media (max-width: 900px) {
    .comm-sidebar { display: none; }
    .comm-main { padding: 16px 12px calc(92px + env(safe-area-inset-bottom)); }
    .post-images { grid-template-columns: repeat(3, 1fr); }
    .profile-header { flex-direction: column; text-align: center; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 600px) {
    .comm-nav-inner { gap: 8px; }
    .comm-logo { font-size: 1rem; }
    .comm-logo svg { width: 20px; height: 20px; }
    .comm-nav-search { max-width: none; }
    .post-card { padding: 12px 14px; }
    .post-images { grid-template-columns: repeat(2, 1fr); }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
    .games-grid .game-card { padding: 12px 8px; }
    .comm-tab span { font-size: 0.64rem; }
    .post-detail { padding: 16px !important; }
    .profile-header { padding: 20px 16px; }
    .profile-stats { gap: 14px; flex-wrap: wrap; justify-content: center; }
    .comm-main { padding-left: 10px; padding-right: 10px; }
}

/* Toast 提示 */
.toast {
    position: fixed; bottom: calc(88px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    background: var(--bg-surface); border: 1px solid var(--border-card);
    border-radius: var(--radius-sm); padding: 10px 20px;
    color: var(--text-primary); font-size: 0.85rem; z-index: 5000;
    box-shadow: var(--shadow-card);
    animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 图片放大查看器 */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0, 0, 0, 0.88);
    display: flex; align-items: center; justify-content: center;
    cursor: zoom-out; animation: fadeIn 0.2s ease;
}
.lightbox-img {
    max-width: 92vw; max-height: 88vh;
    border-radius: 6px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    object-fit: contain; user-select: none;
}
.lightbox-close {
    position: absolute; top: 16px; right: 20px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.12); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; transition: var(--transition-fast);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 登录弹窗 */
.auth-modal {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.auth-modal-inner {
    background: var(--bg-card); border: 1px solid var(--border-card);
    border-radius: var(--radius-lg); padding: 32px; width: 360px; max-width: 90%;
}
.auth-modal h2 { font-size: 1.2rem; margin-bottom: 16px; }
.auth-title { font-size: 1.15rem; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; text-align: center; }
.auth-modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.auth-modal-actions .comm-btn { flex: 1; justify-content: center; text-align: center; }
.auth-input {
    width: 100%; background: var(--bg-deep); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text-primary);
    font-size: 0.875rem; font-family: var(--font-sans); margin-bottom: 12px;
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin: 12px 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: var(--border-subtle); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* 第三方快捷登录按钮（鲲站 / Hikarinagi） */
.kun-login-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 16px; border-radius: 10px;
    background: #151D35; border: 1px solid #2A4060;
    color: #EAF7FF; font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: var(--transition-fast);
    font-family: var(--font-sans);
}
.kun-login-btn:hover { background: #1D2A48; border-color: #4A6090; color: #fff; }
.kun-login-btn span { flex-shrink: 0; }
.kun-login-icon { flex-shrink: 0; width: 22px; height: 22px; display: inline-block; vertical-align: middle; margin-bottom: -1px; }

/* ==================== 等级 / 经验 / 签到 ==================== */

/* 等级徽章（每5级一档颜色） */
.level-badge {
    display: inline-block; vertical-align: middle;
    margin-left: 4px; padding: 1px 7px;
    border-radius: 20px;
    font-size: 0.68rem; font-weight: 700;
    line-height: 1.6;
    border: 1px solid transparent;
    user-select: none;
}
.level-badge.lv-gray   { color: #b9bcc7; background: rgba(150,155,170,0.14); border-color: rgba(150,155,170,0.4); }
.level-badge.lv-green  { color: #7ee2a0; background: rgba(70,200,130,0.12); border-color: rgba(70,200,130,0.45); }
.level-badge.lv-blue   { color: #7db8ff; background: rgba(80,140,255,0.12); border-color: rgba(80,140,255,0.45); }
.level-badge.lv-purple { color: #c9a0ff; background: rgba(170,110,255,0.13); border-color: rgba(170,110,255,0.45); }
.level-badge.lv-orange { color: #ffb37a; background: rgba(255,150,70,0.12); border-color: rgba(255,150,70,0.45); }
.level-badge.lv-red    { color: #ff9090; background: rgba(255,90,90,0.12); border-color: rgba(255,90,90,0.45); }
.level-badge.lv-gold   { color: #ffd27a; background: linear-gradient(135deg, rgba(255,190,80,0.16), rgba(255,150,50,0.10)); border-color: rgba(255,185,80,0.55); }

/* 经验进度条 */
.exp-bar-wrap { width: 100%; }
.exp-bar {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px; overflow: hidden;
}
.exp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--pink));
    border-radius: 10px;
    transition: width 0.5s ease;
}
.exp-bar-text {
    margin-top: 3px;
    font-size: 0.7rem; color: var(--text-muted);
    font-family: var(--font-mono);
}

/* 等级徽章点击 → 经验详情浮层 */
.level-popover {
    position: fixed; z-index: 1300;
    width: 220px;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card), 0 6px 30px rgba(0,0,0,0.5);
    animation: lvpIn 0.16s ease;
}
@keyframes lvpIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lvp-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 8px;
}
.lvp-head .level-badge { margin-left: 0; font-size: 0.72rem; }
.lvp-next { font-size: 0.68rem; color: var(--text-secondary); }
.lvp-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 6px;
    font-size: 0.66rem; color: var(--text-muted);
    font-family: var(--font-mono);
}

/* 右上角个人信息面板 */
.me-panel {
    position: fixed; z-index: 1200;
    width: 268px;
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card), 0 8px 40px rgba(0,0,0,0.5);
    padding: 12px;
    animation: mePanelIn 0.16s ease;
}
@keyframes mePanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.me-panel-head {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 2px 10px;
    cursor: pointer; border-radius: 10px;
}
.me-panel-head:hover { background: rgba(255,255,255,0.03); }
.me-panel-avatar { flex-shrink: 0; }
.me-panel-name {
    font-size: 0.95rem; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center;
}
.me-panel-uid { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.me-panel-exp { padding: 8px 2px; border-top: 1px solid var(--border-subtle); cursor: pointer; border-radius: 8px; }
.me-panel-exp:hover { background: rgba(255,255,255,0.03); }
.me-panel-exp-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.me-panel-exp-row .moe-arrow { flex-shrink: 0; }
.me-panel-exp-sub { font-size: 0.7rem; color: var(--text-muted); }
.me-panel-checkin { padding: 8px 0; }
.me-checkin-btn {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--accent);
    background: linear-gradient(135deg, rgba(179,136,255,0.18), rgba(244,143,177,0.14));
    color: var(--accent-soft);
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-sans);
}
.me-checkin-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(179,136,255,0.30), rgba(244,143,177,0.22));
    color: #fff;
    box-shadow: 0 0 16px var(--accent-glow);
}
.me-checkin-btn.checked {
    border-color: var(--green);
    background: rgba(70,200,130,0.12);
    color: var(--green);
    cursor: default;
    opacity: 0.85;
}
.me-panel-actions {
    display: flex; gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}
.me-panel-action {
    flex: 1;
    padding: 7px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.76rem;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-sans);
}
.me-panel-action:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

/* 升级动画横幅 */
.levelup-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    animation: levelupFadeIn 0.3s ease;
}
.levelup-overlay.fadeout { opacity: 0; transition: opacity 0.5s ease; }
@keyframes levelupFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.levelup-box {
    text-align: center;
    padding: 36px 56px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 80px var(--accent-glow);
    animation: levelupPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes levelupPop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.levelup-title { font-size: 1.4rem; font-weight: 800; color: var(--gold); margin-bottom: 18px; }
.levelup-levels { display: flex; align-items: center; justify-content: center; gap: 14px; }
.levelup-old, .levelup-new { font-size: 1.6rem; font-weight: 900; }
.levelup-arrow { font-size: 1.4rem; color: var(--text-muted); }

/* ==================== 萌萌点 ==================== */

/* 个人面板：萌萌点余额行 */
.me-panel-moe {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 2px;
    border-top: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: var(--transition-fast);
}
.me-panel-moe:hover { background: rgba(255,255,255,0.03); }
.me-panel-moe .moe-icon { font-size: 0.95rem; }
.me-panel-moe .moe-label { font-size: 0.8rem; color: var(--text-secondary); }
.me-panel-moe .moe-value {
    margin-left: auto;
    font-size: 0.92rem; font-weight: 700; color: var(--gold);
    font-family: var(--font-mono);
    transition: transform 0.3s ease;
}
.me-panel-moe .moe-arrow { color: var(--text-muted); font-size: 0.9rem; }
/* 余额变动跳动动画 */
.moe-value.moe-bump { animation: moeBump 0.6s ease; }
@keyframes moeBump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.35); color: #fff; }
    100% { transform: scale(1); }
}

/* 萌萌点弹窗（商店 / 流水共用） */
.moe-modal {
    position: fixed; inset: 0; z-index: 1400;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    padding: 20px;
    animation: moeModalIn 0.2s ease;
}
@keyframes moeModalIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.moe-modal-inner {
    width: 100%; max-width: 420px;
    max-height: 80vh; overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card), 0 10px 50px rgba(0,0,0,0.6);
    padding: 18px;
    animation: moeModalPop 0.24s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes moeModalPop {
    from { transform: scale(0.94) translateY(10px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
.moe-modal-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
}
.moe-modal-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.moe-modal-balance {
    margin-left: auto;
    font-size: 0.78rem; color: var(--text-muted);
}
.moe-modal-balance b { color: var(--gold); font-family: var(--font-mono); font-size: 0.9rem; }
.moe-modal-close {
    width: 26px; height: 26px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; cursor: pointer;
    color: var(--text-muted); font-size: 0.85rem;
    transition: var(--transition-fast);
}
.moe-modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.moe-modal-hint {
    font-size: 0.72rem; color: var(--text-muted);
    margin-bottom: 14px;
}
.moe-loading {
    grid-column: 1 / -1;
    padding: 24px 0; text-align: center;
    font-size: 0.82rem; color: var(--text-muted);
}

/* ==================== 每日任务 ==================== */

/* 个人面板入口行：有可领奖励时数值旁挂红点 */
.me-panel-moe .moe-value.has-claimable {
    position: relative;
    color: var(--accent-soft);
}
.me-panel-moe .moe-value.has-claimable::after {
    content: '';
    position: absolute; top: -2px; right: -8px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 6px rgba(255,107,107,0.8);
    animation: taskDotPulse 1.6s ease-in-out infinite;
}
@keyframes taskDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
}

/* tab 切换（同层切换，不叠第二个弹窗） */
.task-tabs {
    display: flex; gap: 6px;
    margin: 10px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}
.task-tab {
    flex: 1;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem; font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition-fast);
}
.task-tab:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.task-tab.active {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--accent-soft);
}

/* 连签进度 */
.task-streak {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
}
.task-streak-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 8px;
}
.task-streak-head b { color: var(--gold); font-family: var(--font-mono); font-size: 0.95rem; }
.task-streak-hint { font-size: 0.7rem; color: var(--text-muted); }
.task-streak-dots { display: flex; align-items: center; gap: 6px; }
.streak-dot {
    flex: 1; height: 5px;
    border-radius: 3px;
    background: var(--border-subtle);
    transition: var(--transition-fast);
}
.streak-dot.done { background: var(--accent); }
.streak-dot.today {
    background: var(--gold);
    box-shadow: 0 0 8px rgba(255,204,128,0.6);
}

/* 任务项 */
.task-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    transition: var(--transition-fast);
}
.task-item.claimable {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(179,136,255,0.10), rgba(244,143,177,0.06));
}
.task-item.claimed { opacity: 0.55; }
.task-item.bonus {
    margin-top: 12px;
    border-style: dashed;
    border-color: var(--gold);
    background: rgba(255,204,128,0.05);
}
.task-item-main { flex: 1; min-width: 0; }
.task-item-name {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 3px;
}
.task-item-moe {
    font-size: 0.72rem; font-weight: 700;
    color: var(--gold);
    font-family: var(--font-mono);
}
.task-item-exp {
    font-size: 0.68rem; color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.4;
}
.task-item-bar {
    height: 4px; border-radius: 2px;
    background: var(--border-subtle);
    overflow: hidden;
}
.task-item-bar-fill {
    height: 100%; border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    transition: width 0.35s ease;
}
.task-item.claimed .task-item-bar-fill { background: var(--green); }
.task-item-progress {
    margin-top: 3px;
    font-size: 0.66rem; color: var(--text-muted);
    font-family: var(--font-mono);
}
.task-item-action { flex-shrink: 0; }
.task-state {
    font-size: 0.72rem; color: var(--text-muted);
    white-space: nowrap;
}
.task-state.done { color: var(--green); }
.task-claim-btn {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    background: linear-gradient(135deg, rgba(179,136,255,0.28), rgba(244,143,177,0.20));
    color: #fff;
    font-size: 0.76rem; font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer; white-space: nowrap;
    transition: var(--transition-fast);
    animation: taskClaimBreathe 2.2s ease-in-out infinite;
}
.task-claim-btn:hover:not(:disabled) {
    box-shadow: 0 0 14px var(--accent-glow);
    transform: translateY(-1px);
}
.task-claim-btn:disabled {
    opacity: 0.6; cursor: default;
    animation: none;
}
@keyframes taskClaimBreathe {
    0%, 100% { box-shadow: 0 0 0 rgba(179,136,255,0); }
    50%      { box-shadow: 0 0 12px var(--accent-glow); }
}
.task-foot {
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    font-size: 0.74rem; color: var(--text-muted);
}
.task-foot b { color: var(--gold); font-family: var(--font-mono); font-size: 0.85rem; }

/* 规则页 */
.rule-sec {
    margin-bottom: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}
.rule-sec > summary {
    padding: 10px 12px;
    font-size: 0.82rem; font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    transition: var(--transition-fast);
}
.rule-sec > summary::-webkit-details-marker { display: none; }
.rule-sec > summary::before {
    content: '▸ ';
    color: var(--accent);
    display: inline-block;
    transition: transform 0.2s ease;
}
.rule-sec[open] > summary::before { content: '▾ '; }
.rule-sec > summary:hover { background: rgba(255,255,255,0.04); }
.rule-body {
    padding: 4px 12px 12px;
    border-top: 1px solid var(--border-subtle);
}
.rule-row {
    display: flex; align-items: baseline; gap: 8px;
    padding: 5px 0;
    font-size: 0.76rem;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.rule-row:last-child { border-bottom: none; }
.rule-name { flex-shrink: 0; width: 76px; color: var(--text-secondary); }
.rule-value {
    flex-shrink: 0;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.74rem;
}
.rule-limit {
    margin-left: auto;
    text-align: right;
    font-size: 0.68rem; color: var(--text-muted);
    line-height: 1.4;
}
.rule-note {
    margin-top: 8px;
    font-size: 0.7rem; color: var(--text-muted);
    line-height: 1.5;
}
.rule-note b { color: var(--accent-soft); font-family: var(--font-mono); }
.rule-badges { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.rule-badge-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.74rem;
}

/* 窄屏：任务项收窄内边距，避免按钮挤压文字 */
@media (max-width: 480px) {
    .task-item { padding: 10px; gap: 8px; }
    .task-item-name { font-size: 0.82rem; }
    .task-claim-btn { padding: 6px 10px; font-size: 0.72rem; }
    .rule-name { width: 64px; }
}

/* ==================== 兑换码 ==================== */

.redeem-form {
    display: flex; gap: 8px;
    margin-bottom: 6px;
}
.redeem-input {
    flex: 1; min-width: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;   /* 视觉上即时大写，实际归一化在服务端做 */
    transition: var(--transition-fast);
}
.redeem-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.redeem-input::placeholder {
    color: var(--text-muted);
    letter-spacing: normal;
    text-transform: none;
    font-family: var(--font-sans);
}
.redeem-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    background: linear-gradient(135deg, rgba(179,136,255,0.28), rgba(244,143,177,0.20));
    color: #fff;
    font-size: 0.85rem; font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition-fast);
}
.redeem-btn:hover:not(:disabled) {
    box-shadow: 0 0 14px var(--accent-glow);
    transform: translateY(-1px);
}
.redeem-btn:disabled { opacity: 0.6; cursor: default; }

.redeem-tip {
    font-size: 0.68rem; color: var(--text-muted);
    margin-bottom: 10px;
}

.redeem-result:empty { display: none; }
.redeem-fail {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,107,107,0.4);
    background: rgba(255,107,107,0.08);
    color: #ff9090;
    font-size: 0.82rem;
    text-align: center;
}
.redeem-ok {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(70,200,130,0.4);
    background: linear-gradient(135deg, rgba(70,200,130,0.10), rgba(129,199,132,0.06));
    text-align: center;
    animation: redeemPop 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes redeemPop {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.redeem-ok-title {
    font-size: 0.9rem; font-weight: 700;
    color: var(--green);
    margin-bottom: 4px;
}
.redeem-ok-name {
    font-size: 0.76rem; color: var(--text-secondary);
    margin-bottom: 8px;
}
.redeem-gains {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center;
}
.redeem-gain {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255,204,128,0.14);
    border: 1px solid rgba(255,204,128,0.4);
    color: var(--gold);
    font-size: 0.82rem; font-weight: 700;
    font-family: var(--font-mono);
}

/* 商店：颜色格子 */
.moe-shop-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* ==================== 头像框 ====================
 * 框是纯覆盖层：绝对定位到头像中心，不占布局空间、不吃点击。
 * 尺寸与位移由 JS 按 scale/offset 算出后写在 style 上（见 frameOverlayHtml）。
 * 注意：框会溢出父元素，接入新位置前要确认容器没有 overflow:hidden。
 */
.avatar-framed {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.avatar-frame-overlay {
    position: absolute; left: 50%; top: 50%;
    pointer-events: none;
    /* z-index 1：盖住头像，但让状态点（z-index 2）留在上层。
       状态点是功能信息，装饰不能挡功能 */
    z-index: 1;
    max-width: none;
    /* 头像框绝不描边。有些容器（如 .nav-me-avatar）会给后代 img 加 border，
       这里显式清零兜底，免得将来又冒出一圈方框 */
    border: none !important;
}
/* 商店格子里的框预览：padding 由 JS 给，撑出溢出空间免得被裁 */
.msi-frame-preview {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 6px;
}
/* 等级不足：置灰且不给手型，与 owned/equipped 区分开 */
.moe-shop-item.locked { opacity: 0.5; cursor: not-allowed; }
/* 在线状态点统一压过头像框（框是 z-index 1）。
   状态点分散在首页在线 / 好友卡 / 在线墙等处，都用 .online-dot，一条规则全覆盖 */
.online-dot { z-index: 2; }
.moe-shop-item {
    padding: 12px 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}
.moe-shop-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.moe-shop-item.equipped {
    border-color: var(--green);
    background: rgba(70,200,130,0.08);
    cursor: default;
}
.moe-shop-item.equipped:hover { transform: none; border-color: var(--green); }
.msi-preview {
    font-size: 1.35rem; font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
}
.msi-name { font-size: 0.74rem; color: var(--text-secondary); margin-bottom: 3px; }
.msi-action {
    font-size: 0.68rem; color: var(--text-muted);
    font-family: var(--font-mono);
}
.moe-shop-item.owned .msi-action { color: var(--accent-soft); }
.moe-shop-item.equipped .msi-action { color: var(--green); font-weight: 600; }

/* 流水列表 */
.moe-logs-list { display: flex; flex-direction: column; }
.moe-log-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--border-subtle);
}
.moe-log-item:last-of-type { border-bottom: none; }
.mli-info { flex: 1; min-width: 0; }
.mli-desc {
    font-size: 0.8rem; color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mli-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }
.mli-amount {
    font-size: 0.9rem; font-weight: 700;
    font-family: var(--font-mono);
    flex-shrink: 0;
}
.mli-amount.plus { color: var(--green); }
.mli-amount.minus { color: var(--red); }
.moe-logs-foot {
    padding-top: 12px; margin-top: 4px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    font-size: 0.72rem; color: var(--text-muted);
}

@media (max-width: 400px) {
    .moe-shop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== 站点页脚（备案信息） ==================== */
.site-footer {
    padding: 16px 4px 8px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    margin-top: 4px;
}
.site-footer-links {
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    font-size: 0.72rem;
    margin-bottom: 6px;
}
.site-footer-links a,
.site-footer-icp a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}
.site-footer-links a:hover,
.site-footer-icp a:hover { color: var(--accent-soft); }
.site-footer .sf-dot { color: var(--border-card); }
.site-footer-icp {
    font-size: 0.7rem;
    margin-bottom: 5px;
}
.site-footer-icp a { display: inline-flex; align-items: center; gap: 5px; }
.site-footer-icp .icp-icon { width: 13px; height: 13px; flex-shrink: 0; vertical-align: middle; }
.site-footer-copy {
    font-size: 0.66rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* 手机端：挂在正文末尾，与底部 tab 栏留出间距 */
.site-footer-mobile { margin-top: 20px; }
.site-footer-mobile .site-footer {
    padding-bottom: 4px;
    border-top-color: var(--border-subtle);
}
/* ===== 管理员货架（特惠商品） ===== */
.shop-special-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.shop-special-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border-radius: 10px;
    background: var(--bg-card, rgba(255,255,255,0.04));
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}
.shop-special-item.locked { opacity: 0.55; }
.shop-special-item .ssi-name { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); }
.shop-special-item .ssi-desc {
    font-size: 0.78rem; color: var(--text-muted); margin-top: 3px;
    white-space: pre-wrap; word-break: break-word; max-height: 60px; overflow: hidden;
}
.shop-special-item .ssi-meta {
    display: flex; gap: 10px; margin-top: 5px; font-size: 0.72rem; color: var(--text-muted);
}
.shop-special-item .ssi-side { text-align: right; flex-shrink: 0; }
.shop-special-item .ssi-price { font-family: var(--font-mono); color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.ssi-buy-btn {
    padding: 5px 14px; border-radius: 8px; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--pink));
    color: #fff; font-weight: 600; font-size: 0.78rem;
}
.ssi-buy-btn:disabled { cursor: not-allowed; background: rgba(128,128,128,0.35); opacity: 0.8; }
/* 二级弹窗（领取内容/取货记录）：必须盖在商店弹窗之上 */
.moe-modal.delivery-modal { z-index: 1600; }
.delivery-content-box { margin-top: 10px; }
.delivery-pre {
    background: rgba(0,0,0,0.25); border-radius: 8px; padding: 12px;
    font-family: var(--font-mono); font-size: 0.85rem;
    white-space: pre-wrap; word-break: break-all; max-height: 200px; overflow-y: auto;
    user-select: all;
}
