/* 引入绝美法式连笔字体 */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Noto+Serif+SC:wght@500;700&display=swap');

/* 强制覆盖星汇主背景为手账网格 */
#starhub {
    background-color: var(--sh-bg) !important;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(184, 148, 125, 0.12) 0%, transparent 60%),
        linear-gradient(rgba(184, 148, 125, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 148, 125, 0.08) 1px, transparent 1px) !important;
    background-size: 100% 100%, 24px 24px, 24px 24px !important;
}

/* 登录视图全屏背景 */
#view-login-starhub {
    background-color: var(--sh-bg) !important;
    background-image: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10 !important;
}

/* =========================================
   星汇 (Starhub) - 奶白榛果茶棕风格
   True Elegance Design System
   ========================================= */

/* 1. CSS 变量系统 - 双色主题支持 */
:root {
    /* --sh- 前缀变量（日间模式） */
    --sh-bg: #FCFAF8;
    --sh-text-main: #4A3F38;
    --sh-text-sub: #8C7D73;
    --sh-text-muted: #C9BFB8;
    --sh-accent-hazel: #B8947D;
    --sh-accent-light: #F5EBE4;
    --sh-danger: #D97777;
    --sh-glass-bg: rgba(255, 255, 255, 0.85);
    --sh-glass-border: rgba(255, 255, 255, 1);
    --sh-glass-shadow: 0 8px 24px rgba(184, 148, 125, 0.08);

    /* 兼容旧变量名 */
    --starhub-bg-body: var(--sh-bg);
    --starhub-text-main: var(--sh-text-main);
    --starhub-text-sub: var(--sh-text-sub);
    --starhub-text-muted: var(--sh-text-muted);
    --starhub-accent-hazel: var(--sh-accent-hazel);
    --starhub-accent-light: var(--sh-accent-light);
    --starhub-danger: var(--sh-danger);
    --starhub-glass-bg: var(--sh-glass-bg);
    --starhub-glass-border: var(--sh-glass-border);
    --starhub-glass-shadow: var(--sh-glass-shadow);

    /* 字体定义 */
    --starhub-font-script: 'Great Vibes', cursive;
    --starhub-font-serif: 'Noto Serif SC', serif;
    --starhub-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 夜间模式变量覆盖 */
body.dark-mode {
    --sh-bg: #1E1A18;
    --sh-text-main: #E8E0D9;
    --sh-text-sub: #A89D96;
    --sh-text-muted: #6A5F56;
    --sh-accent-hazel: #D4A373;
    --sh-accent-light: #2A2220;
    --sh-danger: #E88888;
    --sh-glass-bg: rgba(43, 36, 32, 0.85);
    --sh-glass-border: rgba(255, 255, 255, 0.05);
    --sh-glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 2. 基础容器 & 手账网格背景 */
#starhub {
    background-color: var(--starhub-bg-body);
    /* 手账网格纹理 */
    background-image:
        radial-gradient(circle at 50% 0%, rgba(184, 148, 125, 0.12) 0%, transparent 60%),
        linear-gradient(rgba(184, 148, 125, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 148, 125, 0.08) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px, 24px 24px;
}

/* 3. 骨架类名重写 */
#starhub .glass {
    background: var(--starhub-glass-bg);
    border: 1px solid var(--starhub-glass-border);
    border-radius: 20px;
    box-shadow: var(--starhub-glass-shadow);
    position: relative;
    z-index: 1;
}

/* 4. 按钮系统 */
#starhub .btn-login-refined {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    background: var(--starhub-text-main);
    color: #FFF;
    font-family: var(--starhub-font-serif);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(184, 148, 125, 0.2);
    transition: 0.2s;
    border: none;
    margin-top: 8px;
}

#starhub .btn-login-refined:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* 5. 输入框系统 */
#starhub .input-glass {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 16px;
    background: #FFF;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--starhub-text-main);
    font-size: 15px;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(184, 148, 125, 0.05);
}

#starhub .input-glass:focus {
    border-color: var(--starhub-accent-hazel);
    box-shadow: 0 0 0 3px var(--starhub-accent-light);
}

#starhub .input-glass::placeholder {
    color: var(--starhub-text-muted);
}

/* 6. 标签系统 */
#starhub .chip-group {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

#starhub .chip-group::-webkit-scrollbar {
    display: none;
}

#starhub .chip {
    padding: 8px 24px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #FFF;
    color: var(--starhub-text-sub);
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(184, 148, 125, 0.05);
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    pointer-events: auto;
}

#starhub .chip.active {
    background: var(--starhub-text-main);
    color: #FFF;
}

#starhub .chip-spacer {
    flex-shrink: 0;
    width: 40px;
    display: inline-block;
}

/* 空状态 */
#starhub .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--starhub-text-muted);
}

#starhub .empty-state i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
    color: var(--starhub-text-muted);
}

#starhub .empty-state i.star-gold {
    color: #ffd700;
}

#starhub .empty-state p {
    font-size: 14px;
    color: var(--starhub-text-sub);
}

#starhub .empty-state .id-tag {
    font-size: 12px;
    margin-top: 5px;
}

/* 通知项 */
#starhub .notif-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.95);
    border-left: 4px solid transparent;
}

#starhub .notif-item.unread {
    border-left-color: var(--starhub-danger);
}

#starhub .notif-item:hover {
    background: #FFF;
    box-shadow: var(--starhub-glass-shadow);
}

#starhub .notif-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#starhub .notif-content {
    flex: 1;
    min-width: 0;
}

#starhub .notif-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

#starhub .notif-name {
    font-weight: bold;
    color: var(--starhub-text-main);
    font-size: 14px;
}

#starhub .notif-badge {
    padding: 2px 8px;
    color: white;
    font-size: 11px;
    border-radius: 10px;
    font-weight: bold;
}

#starhub .notif-badge.badge-digital {
    background: rgba(147, 51, 234, 0.8);
}

#starhub .notif-badge.badge-real {
    background: rgba(102, 126, 234, 0.8);
}

#starhub .notif-time {
    color: var(--starhub-text-muted);
    font-size: 12px;
}

#starhub .notif-text {
    color: var(--starhub-text-sub);
    font-size: 13px;
}

#starhub .notif-dot {
    width: 8px;
    height: 8px;
    background: var(--starhub-danger);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 8px;
    box-shadow: 0 0 8px rgba(255, 154, 158, 0.6);
}

/* AI回复气泡 */
#starhub .ai-reply-bubble {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#starhub .ai-reply-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

#starhub .ai-reply-content {
    flex: 1;
    padding: 10px;
    border-radius: 0 15px 15px 15px;
    font-size: 13px;
    background: var(--starhub-accent-light);
    color: var(--starhub-text-main);
}

#starhub .ai-reply-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 12px;
}

/* 角色列表项 */
#starhub .persona-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(184, 148, 125, 0.15);
}

#starhub .persona-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 148, 125, 0.2);
}

#starhub .persona-item .id-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid rgba(184, 148, 125, 0.3);
    box-shadow: 0 2px 8px rgba(184, 148, 125, 0.15);
}

#starhub .persona-item .id-left {
    flex: 1;
    text-align: left;
}

#starhub .persona-item .id-name {
    color: var(--starhub-text-main);
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
}

#starhub .persona-item .id-tag {
    color: var(--starhub-text-muted);
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

#starhub .persona-item .capsule {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(184, 148, 125, 0.15) 0%, rgba(184, 148, 125, 0.1) 100%);
    border-radius: 12px;
    color: var(--starhub-accent-hazel);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(184, 148, 125, 0.3);
}

#starhub .persona-item .ri-arrow-right-s-line {
    color: var(--starhub-accent-hazel);
    font-size: 24px;
}

/* 登录页包装器 */
#starhub .login-wrapper {
    text-align: center;
    margin-bottom: 24px;
}

/* 登录页头像样式 */
#starhub .login-wrapper .id-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 头像外框容器 */
#starhub .login-wrapper .avatar-container {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(184, 148, 125, 0.3);
    box-shadow: 0 4px 16px rgba(184, 148, 125, 0.2);
}

/* 登录页名字样式 */
#starhub .login-wrapper .id-name {
    color: var(--starhub-text-main);
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 18px;
}

/* 登录页标签胶囊 */
#starhub .login-wrapper .capsule {
    display: inline-block;
    margin-top: 8px;
}

/* 身份选择器单选按钮样式 */
#starhub .identity-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--starhub-accent-hazel);
}

/* 7. 视图容器 */
#starhub .view-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    z-index: 10;
    background: transparent;
}

/* 8. 导航栏 */
#starhub .nav-header {
    height: 88px;
    padding: max(36px, env(safe-area-inset-top)) 20px 10px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* 导航栏花体字标题 */
#starhub .nav-header .title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--starhub-font-script);
    font-size: 32px;
    font-weight: 400;
    color: var(--starhub-text-main);
}

/* 返回按钮 */
#starhub .back-btn {
    margin-right: 10px;
    width: 32px;
    height: 32px;
}

/* 用户头像圆形 */
#starhub .user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #666;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* 用户名标题 */
#starhub .user-name-header {
    font-size: 15px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

/* 通知铃铛 */
#starhub .notif-bell {
    position: relative;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.9);
}

#starhub .notif-bell i {
    color: var(--starhub-text-main) !important;
    font-size: 20px;
}

/* 通知红点 */
#starhub .notif-red-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ff7675;
    border-radius: 50%;
    display: none;
    box-shadow: 0 0 6px rgba(255, 118, 117, 0.8);
}

/* 设置按钮 */
#starhub .settings-btn {
    background: rgba(255, 255, 255, 0.9);
}

#starhub .settings-btn i {
    color: var(--starhub-text-main) !important;
    font-size: 20px;
}

/* 导航栏头像 */
#starhub .nav-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
}

/* 侧边栏菜单固定定位 */
#starhub .side-menu-fixed {
    position: fixed;
    top: 90px;
    left: 20px;
    width: 200px;
    display: none;
    border-radius: 12px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* 侧边栏菜单 */
#starhub .select-options {
    position: absolute;
    top: 50px;
    left: 0;
    width: 200px;
    display: none;
    border-radius: 12px;
    z-index: 500;
    background: #FFF;
    box-shadow: var(--starhub-glass-shadow);
    overflow: hidden;
}

#starhub .select-option {
    cursor: pointer;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--starhub-text-main);
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

#starhub .select-option:hover {
    background: var(--starhub-accent-light);
}

#starhub .select-option i {
    font-size: 18px;
    color: var(--starhub-accent-hazel);
}

/* 标签滚动容器 */
#starhub .chips-scroll-container {
    padding: 8px 16px 10px 16px;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    scroll-behavior: smooth;
    pointer-events: auto;
    cursor: grab;
    position: relative;
    width: 100%;
}

#starhub .chips-scroll-container::-webkit-scrollbar {
    display: none;
}

/* 主内容区域 */
#starhub .content-area-main {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 100px;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

/* FAB发帖按钮 */
#starhub .fab-post-btn {
    position: absolute;
    bottom: 30px;
    right: 25px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--starhub-accent-hazel), var(--starhub-danger));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 25px rgba(184, 148, 125, 0.3);
    z-index: 90;
    cursor: pointer;
    transition: transform 0.2s;
}

#starhub .fab-post-btn:active {
    transform: scale(0.95);
}

/* 详情页 */
#view-detail-starhub {
    display: none;
    z-index: 100 !important;
    flex-direction: column !important;
    background: var(--starhub-bg-body) !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    animation: none !important;
}

#view-detail-starhub .nav-header {
    background: rgba(252, 250, 248, 0.95) !important;
}

#view-detail-starhub .nav-header .title,
#view-detail-starhub .detail-page-title {
    font-family: var(--starhub-font-script) !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    color: var(--starhub-text-main) !important;
}

#view-detail-starhub .detail-content-area {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px !important;
    background: var(--starhub-bg-body) !important;
}

#view-detail-starhub .floating-bottom-bar {
    background: #FFF !important;
    border: 1px solid #EEE !important;
}

/* 编辑页 */
#starhub .view-editor {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: var(--sh-bg);
}

#starhub .editor-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--sh-bg);
}

#starhub .editor-backdrop {
    display: none;
}

#starhub .editor-nav {
    position: relative;
    z-index: 10;
    background: var(--sh-bg);
    border: none;
}

#starhub .editor-cancel-btn {
    font-size: 15px;
    color: var(--sh-text-main);
    opacity: 0.9;
    cursor: pointer;
}

#starhub .editor-page-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--sh-text-main);
}

#starhub .editor-publish-btn {
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    background: var(--sh-text-main);
    color: var(--sh-bg);
    border-radius: 100px;
}

#starhub .editor-content-wrapper {
    padding: 24px 20px;
    position: relative;
    z-index: 10;
    flex: 1;
    overflow-y: auto;
    background: var(--sh-bg);
}

#starhub .editor-title-input {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--starhub-font-serif);
    background: transparent;
    padding: 0 0 16px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--sh-grid-color);
    margin-bottom: 20px;
    box-shadow: none;
    color: var(--sh-text-main);
}

#starhub .editor-title-input::placeholder {
    color: var(--sh-text-muted);
}

#starhub .editor-textarea {
    height: 220px;
    resize: none;
    margin-top: 16px;
    background: var(--sh-bg);
    line-height: 1.7;
    border-radius: 16px;
    border: 1px solid transparent;
    box-shadow: none;
    color: var(--sh-text-main);
}

#starhub .editor-textarea::placeholder {
    color: var(--sh-text-muted);
}

/* 编辑器身份选择 */
#starhub .editor-identity-selector {
    margin-top: 10px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#starhub .editor-identity-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
}

#starhub .editor-identity-option:last-child {
    border-bottom: none;
}

#starhub .editor-identity-option.active {
    background: rgba(255, 255, 255, 0.15);
}

#starhub .editor-identity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

#starhub .editor-identity-avatar.digital {
    border-color: rgba(147, 51, 234, 0.4);
}

#starhub .editor-identity-info {
    flex: 1;
}

#starhub .editor-identity-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

#starhub .editor-identity-name.digital {
    color: rgba(255, 255, 255, 0.6);
}

#starhub .editor-identity-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

#starhub .editor-identity-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
}

#starhub .editor-identity-check.active {
    display: flex;
    background: var(--starhub-accent-hazel);
}

#starhub .editor-identity-check i {
    font-size: 12px;
    color: #fff;
}

/* 8. 滚动内容区 */
#starhub .scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 120px;
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#starhub .scroll-content::-webkit-scrollbar {
    display: none;
}

/* 9. 帖子卡片 */
#starhub .post-card {
    padding: 24px 20px;
    margin-bottom: 24px;
    background: #FFF;
    border: none;
    box-shadow: 0 12px 32px rgba(184, 148, 125, 0.08);
    border-radius: 24px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#starhub .post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(184, 148, 125, 0.12);
}

#starhub .heat-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
    line-height: 1.6;
}

#starhub .heat-tag.heat-爆 {
    background: #ff4757;
}

#starhub .heat-tag.heat-热 {
    background: #ff6b6b;
}

#starhub .heat-tag.heat-沸 {
    background: #e056a0;
}

#starhub .heat-tag.heat-新 {
    background: #3b82f6;
}

#starhub .heat-tag.heat-荐 {
    background: var(--starhub-accent-hazel);
}

#starhub .post-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--starhub-text-main);
    margin-bottom: 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#starhub .post-preview {
    font-size: 13px;
    color: #6b5b5e;
    line-height: 1.7;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
}

#starhub .post-images {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

#starhub .post-images.grid-1 {
    grid-template-columns: 1fr;
}

#starhub .post-images.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

#starhub .post-images.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

#starhub .post-image-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f0eaf5;
}

#starhub .post-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#starhub .image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #c4b5d0;
    font-size: 20px;
}

#starhub .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#starhub .post-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

#starhub .author-avatar-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#starhub .author-name-small {
    font-size: 10px;
    font-weight: 600;
    color: var(--starhub-text-main);
}

#starhub .post-time-small {
    font-size: 10px;
    color: #b0a3a8;
}

#starhub .post-stats-small {
    display: flex;
    gap: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #b0a3a8;
}

#starhub .post-stats-small i {
    font-size: 12px;
    margin-right: 1px;
    vertical-align: middle;
}

/* 主页帖子卡片标签 */
#starhub .post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

#starhub .post-card-tag {
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(184, 148, 125, 0.08);
    border-radius: 10px;
    color: var(--starhub-accent-hazel);
    font-weight: 600;
}

#starhub .post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

#starhub .post-header-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

#starhub .post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    border: 1px solid #EEE;
}

#starhub .post-meta .author {
    font-family: var(--starhub-font-serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--starhub-text-main);
}

#starhub .post-meta .time {
    font-size: 11px;
    color: var(--starhub-text-sub);
    margin-top: 2px;
}

#starhub .post-content {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
    color: var(--starhub-text-main);
    text-align: justify;
}

#starhub .post-actions {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--starhub-text-sub);
    font-weight: 600;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

/* 10. 详情页专用 */
#starhub .detail-post-card {
    background: #FFF;
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: var(--starhub-glass-shadow);
    margin-bottom: 40px;
    border: 1px solid var(--starhub-glass-border);
}

#starhub .detail-title {
    font-family: var(--starhub-font-serif);
    font-size: 20px;
    font-weight: 800;
    color: var(--starhub-text-main);
    margin-bottom: 20px;
    line-height: 1.4;
}

#starhub .follow-btn {
    background: var(--starhub-text-main);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(74, 63, 56, 0.3);
    cursor: pointer;
    transition: 0.2s;
}

#starhub .follow-btn:active {
    transform: scale(0.95);
}

/* 帖子标签 */
#starhub .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

#starhub .post-tag {
    font-size: 11px;
    padding: 3px 10px;
    background: rgba(184, 148, 125, 0.1);
    border-radius: 12px;
    color: var(--starhub-accent-hazel);
    font-weight: 600;
}

/* 帖子详情互动数据栏 */
#starhub .detail-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(184, 148, 125, 0.2);
    font-size: 13px;
    color: var(--starhub-text-sub);
    font-weight: 600;
}

#starhub .detail-stat-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}

#starhub .detail-stat-item:active {
    transform: scale(0.95);
}

#starhub .detail-stat-item i {
    font-size: 18px;
    color: var(--starhub-text-sub);
}

#starhub .detail-stat-item.liked i {
    color: #ff9a9e;
}

#starhub .detail-stat-item.favorited i {
    color: #ffd700;
}

/* 帖子详情玻璃面板 */
#starhub .detail-glass-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(184, 148, 125, 0.05);
    margin-bottom: 12px;
    width: 100%;
}

#starhub .comments-panel {
    min-height: 400px;
}

#starhub .cs-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--starhub-text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#starhub .cs-title-bar {
    display: block;
    width: 4px;
    height: 14px;
    background: var(--starhub-accent-hazel);
    border-radius: 2px;
}

/* 帖子详情作者行 */
#starhub .detail-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(184, 148, 125, 0.3);
}

#starhub .d-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #fff;
}

#starhub .d-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#starhub .d-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

#starhub .d-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--starhub-text-main);
}

#starhub .d-time {
    font-size: 11px;
    color: var(--starhub-text-sub);
    font-weight: 500;
}

/* 帖子详情文本 */
#starhub .detail-text {
    font-size: 15px;
    color: var(--starhub-text-main);
    line-height: 1.8;
}

#starhub .detail-text p {
    margin-bottom: 15px;
}

#starhub .post-tags .chip {
    font-size: 11px;
    padding: 3px 10px;
}

#starhub .digital-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    padding: 2px 7px;
    background: rgba(184, 148, 125, 0.12);
    border-radius: 10px;
    color: var(--starhub-accent-hazel);
    font-weight: 700;
    cursor: pointer;
    margin-left: 6px;
    border: 1px solid rgba(184, 148, 125, 0.2);
}

#starhub .digital-badge-small {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 8px;
    gap: 2px;
    vertical-align: middle;
    margin-left: 4px;
}

#starhub .digital-badge-icon {
    width: 12px;
    height: 12px;
    vertical-align: middle;
    filter: invert(60%) sepia(20%) saturate(400%) hue-rotate(10deg);
}

#starhub .digital-badge-small .digital-badge-icon {
    width: 11px;
    height: 11px;
}

#starhub .comments-section-title {
    font-family: var(--starhub-font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--starhub-text-main);
    margin-bottom: 20px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#starhub .comments-section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 16px;
    background: var(--starhub-accent-hazel);
    border-radius: 2px;
}

#starhub .comment-item {
    display: flex;
    gap: 12px;
}

#starhub .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    border: 1px solid #EEE;
}

#starhub .comment-body {
    flex: 1;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#starhub .comment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--starhub-text-sub);
    margin-bottom: 6px;
}

#starhub .comment-name .c-time {
    font-weight: 500;
    color: #9e8c91;
    font-size: 10px;
    margin-left: 8px;
}

#starhub .comment-reply-to {
    font-size: 11px;
    color: var(--starhub-accent-hazel);
    margin-bottom: 4px;
}

#starhub .comment-text {
    font-size: 15px;
    color: var(--starhub-text-main);
    line-height: 1.6;
    word-break: break-word;
}

#starhub .comment-actions {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 16px;
}

#starhub .c-reply-btn {
    font-size: 11px;
    color: var(--starhub-accent-hazel);
    cursor: pointer;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#starhub .c-delete-btn {
    font-size: 11px;
    color: #ff4757;
    cursor: pointer;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#starhub .author-badge {
    background: linear-gradient(135deg, var(--starhub-accent-hazel), var(--starhub-danger));
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    margin-left: 6px;
}

#starhub .loading-state {
    text-align: center;
    color: var(--starhub-accent-hazel);
    padding: 30px 0;
}

#starhub .spin-icon {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#starhub .loading-text {
    margin-top: 8px;
    font-size: 13px;
}

#starhub .c-like {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #9e8c91;
    font-size: 11px;
    font-weight: 600;
    gap: 2px;
    cursor: pointer;
}

#starhub .c-like i {
    font-size: 16px;
}

#starhub .load-more-container {
    text-align: center;
    margin-top: 20px;
}

/* 11. 悬浮输入框 */
#starhub .floating-bottom-bar {
    position: absolute;
    bottom: max(30px, env(safe-area-inset-bottom));
    left: 20px;
    right: 20px;
    background: #FFF;
    border-radius: 100px;
    padding: 8px 8px 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 16px 40px rgba(184, 148, 125, 0.25);
    border: 1px solid #EEE;
}

#starhub .floating-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--starhub-text-main);
    outline: none;
}

#starhub .btn-send-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--starhub-text-main);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 16px rgba(74, 63, 56, 0.2);
}

#starhub .btn-send-icon:active {
    transform: scale(0.9);
    background: var(--starhub-accent-hazel);
}

/* 12. 发帖悬浮按钮 */
#starhub .glass-btn.fab {
    position: absolute;
    bottom: 40px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--starhub-text-main);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 16px 32px rgba(74, 63, 56, 0.3);
    z-index: 90;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}

/* 13. 身份选择器 */
#starhub .identity-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 12px;
}

#starhub .identity-option.active {
    background: #FFF;
    border-color: var(--starhub-accent-hazel);
    box-shadow: var(--starhub-glass-shadow);
}

#starhub .identity-option:hover:not(.active) {
    background: rgba(255, 255, 255, 0.85);
}

#starhub .id-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

#starhub .id-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 1px solid #EEE;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

#starhub .id-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--starhub-text-main);
    margin-bottom: 4px;
}

#starhub .id-tag {
    font-size: 11px;
    color: var(--starhub-text-sub);
}

#starhub .identity-option.active .id-tag {
    color: var(--starhub-accent-hazel);
}

#starhub .id-check {
    font-size: 20px;
    color: var(--starhub-accent-hazel);
    display: none;
}

#starhub .identity-option.active .id-check {
    display: block;
}

/* 登录页专用样式 */
#starhub .view-login {
    display: flex;
    align-items: center;
    justify-content: center;
}

#starhub .login-card {
    padding: 35px;
    border-radius: 24px;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
}

#starhub .login-icon {
    font-size: 72px;
    background: linear-gradient(135deg, var(--starhub-accent-hazel) 0%, var(--starhub-accent-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(184, 148, 125, 0.3));
}

#starhub .login-title {
    color: var(--starhub-text-main);
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 800;
}

#starhub .login-subtitle {
    color: var(--starhub-text-muted);
    font-size: 15px;
    margin-bottom: 35px;
    font-weight: 500;
}

#starhub .persona-list-scroll {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#starhub .persona-list-scroll::-webkit-scrollbar {
    display: none;
}

#starhub .identity-selector-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    text-align: left;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 16px;
    border: 1px solid rgba(184, 148, 125, 0.2);
    box-shadow: 0 8px 32px rgba(184, 148, 125, 0.15);
}

#starhub .btn-back-home {
    width: 100%;
    padding: 14px;
    background: var(--sh-bg);
    border: 2px solid rgba(184, 148, 125, 0.3);
    border-radius: 16px;
    color: var(--sh-accent-hazel);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

#starhub .btn-back-home:hover {
    background: var(--sh-accent-light);
    border-color: var(--sh-accent-hazel);
}

/* 14. 弹窗系统 */
#starhub .modal-mask {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(74, 63, 56, 0.4);
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

#starhub .modal-mask.active {
    opacity: 1;
}

#starhub .modal-body {
    width: 100%;
    max-height: 90vh;
    background: #FFF;
    border-radius: 24px 24px 0 0;
    padding: 24px 24px max(24px, env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

#starhub .modal-mask.active .modal-body {
    transform: translateY(0);
}

#starhub .modal-handle {
    width: 40px;
    height: 4px;
    background: #E0E0E0;
    border-radius: 4px;
    margin: 0 auto 20px;
}

/* 设置弹窗 */
#starhub .modal-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: auto;
}

#starhub .settings-content {
    max-width: 380px;
    width: 88%;
    padding: 25px;
    border-radius: 24px;
    background: var(--sh-bg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    pointer-events: auto;
}

#starhub .settings-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    pointer-events: auto;
}

#starhub .settings-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

#starhub .settings-close-btn i {
    font-size: 20px;
    color: var(--starhub-text-main);
    pointer-events: none;
}

#starhub .settings-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--starhub-text-main);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1px;
}

#starhub .settings-section {
    margin-bottom: 20px;
}

#starhub .settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#starhub .settings-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--starhub-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

#starhub .settings-number-badge {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--starhub-accent-hazel) 0%, var(--starhub-accent-light) 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
}

#starhub .settings-toggle-all {
    font-size: 12px;
    color: var(--starhub-accent-hazel);
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(184, 148, 125, 0.1);
    transition: all 0.2s;
}

#starhub .settings-toggle-all:hover {
    background: rgba(184, 148, 125, 0.2);
}

#starhub .settings-toggle-all i {
    margin-right: 4px;
}

#starhub .settings-char-container {
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(184, 148, 125, 0.06) 0%, rgba(251, 194, 235, 0.06) 100%);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.03);
}

#starhub .settings-hint {
    font-size: 11px;
    color: var(--starhub-text-muted);
    margin-top: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

#starhub .settings-hint i {
    font-size: 12px;
}

#starhub .settings-select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--starhub-glass-border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--starhub-text-main);
    background: var(--starhub-glass-bg);
    outline: none;
    cursor: pointer;
    font-weight: 500;
    pointer-events: auto;
}

#starhub .settings-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--starhub-glass-border);
    border-radius: 12px;
    font-size: 13px;
    color: var(--starhub-text-main);
    background: var(--starhub-glass-bg);
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    font-weight: 500;
    pointer-events: auto;
}

#starhub .settings-input-number {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--starhub-glass-border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--starhub-text-main);
    background: var(--starhub-glass-bg);
    outline: none;
    box-sizing: border-box;
    font-weight: 600;
    pointer-events: auto;
}

#starhub .settings-submit-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: none;
    color: white;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--starhub-accent-hazel) 0%, var(--starhub-accent-light) 100%);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(184, 148, 125, 0.4);
    pointer-events: auto;
}

#starhub .settings-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 148, 125, 0.5);
}

#starhub .settings-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(184, 148, 125, 0.4);
}

/* Action Sheet 样式 */
#starhub .modal-action-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 9999;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s;
}

#starhub .action-sheet-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 16px 30px;
    pointer-events: none;
}

#starhub .action-sheet {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 40px rgba(184, 148, 125, 0.2);
    pointer-events: auto;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#starhub .action-sheet.cancel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 40px rgba(184, 148, 125, 0.2);
    pointer-events: auto;
}

#starhub .as-item {
    padding: 18px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--starhub-text-main);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: 0.2s;
}

#starhub .as-item:last-child {
    border-bottom: none;
}

#starhub .as-item:hover {
    background: var(--starhub-accent-light);
}

#starhub .as-item.danger {
    color: var(--starhub-danger);
}

/* 通知中心弹窗 */
#starhub .modal-notif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: auto;
}

#starhub .notif-content {
    height: auto;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    max-width: 380px;
    width: 88%;
    padding: 25px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.95);
    pointer-events: auto;
}

#starhub .notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

#starhub .notif-title {
    text-align: center;
    margin: 0;
    color: var(--starhub-text-main);
    font-size: 20px;
    flex: 1;
    font-weight: 900;
    letter-spacing: 1px;
}

#starhub .notif-close {
    cursor: pointer;
    color: var(--starhub-text-muted);
    font-size: 24px;
    padding: 5px;
    transition: all 0.3s;
}

#starhub .notif-close:hover {
    color: var(--starhub-text-main);
}

#starhub .notif-list {
    flex: 0 1 auto !important;
    overflow-y: auto;
    padding: 0 !important;
    padding-right: 5px;
    margin: 0 -5px;
}

#starhub .notif-mark-read-btn {
    margin-top: 15px;
    padding: 14px;
    border: 2px solid rgba(184, 148, 125, 0.3);
    border-radius: 16px;
    color: var(--starhub-accent-hazel);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(184, 148, 125, 0.1);
    pointer-events: auto;
}

#starhub .notif-mark-read-btn:hover {
    background: rgba(184, 148, 125, 0.2);
    transform: translateY(-2px);
}

#starhub .notif-mark-read-btn:active {
    background: rgba(184, 148, 125, 0.1);
    transform: translateY(0);
}

/* 帖子详情子窗口 */
#starhub .sub-window {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--sh-bg);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(184, 148, 125, 0.12) 0%, transparent 60%),
        linear-gradient(rgba(184, 148, 125, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 148, 125, 0.08) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px, 24px 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
}

#starhub .sub-window-nav {
    height: 90px;
    padding: 40px 20px 10px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    backdrop-filter: none;
}

#starhub .sub-window-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border-radius: 12px;
    transition: 0.2s;
    color: var(--sh-text-main);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 8px 32px rgba(184, 148, 125, 0.15);
}

#starhub .sub-window-title {
    font-size: 32px;
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    color: var(--sh-text-main);
}

#starhub .sub-window-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0 100px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#starhub .detail-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    padding: 12px 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 -5px 20px rgba(184, 148, 125, 0.1);
}

#starhub .detail-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02), 0 2px 8px rgba(184, 148, 125, 0.1);
}

#starhub .detail-input-wrap i {
    color: var(--starhub-text-sub);
    font-size: 16px;
    margin-right: 6px;
}

#starhub .detail-input-wrap .emoji-btn {
    font-size: 20px;
    color: var(--starhub-accent-hazel);
    cursor: pointer;
    margin-left: 8px;
    transition: 0.2s;
}

#starhub .detail-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--starhub-text-main);
}

#starhub .detail-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

#starhub .detail-send-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--starhub-accent-hazel) 0%, var(--starhub-accent-light) 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(184, 148, 125, 0.3);
    transition: all 0.2s;
}

#starhub .detail-send-btn:hover {
    transform: scale(1.05);
}

#starhub .detail-send-btn:active {
    transform: scale(0.95);
}

#starhub .detail-share-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 18px;
    background: rgba(184, 148, 125, 0.12);
    color: var(--starhub-accent-hazel);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#starhub .detail-share-btn:hover {
    background: rgba(184, 148, 125, 0.22);
}

#starhub .detail-share-btn:active {
    background: rgba(184, 148, 125, 0.12);
}

/* 按钮变体 */
#starhub .btn-secondary {
    background: var(--starhub-text-muted) !important;
    color: var(--starhub-text-sub) !important;
}

/* ID标签居中 */
#starhub .id-tag {
    text-align: center;
    margin-bottom: 16px;
}

/* 表情回退样式 */
#starhub .emoji-fallback {
    font-size: 1.2em;
}

/* 自定义贴纸样式 */
#starhub .custom-sticker {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    border-radius: 8px;
    vertical-align: middle;
    margin: 2px 0;
    object-fit: contain;
}

#starhub .custom-sticker.sticker-error {
    opacity: 0.7;
}

/* 15. 胶囊多选 */
#starhub .capsule-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

#starhub .capsule {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #FFF;
    color: var(--starhub-text-sub);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

#starhub .capsule.active {
    background: var(--starhub-text-main);
    color: #FFFFFF;
    border-color: var(--starhub-text-main);
    box-shadow: 0 4px 12px rgba(184, 148, 125, 0.15);
}

#starhub .capsule i {
    display: none;
    font-size: 14px;
    color: var(--starhub-accent-hazel);
}

#starhub .capsule.active i {
    display: inline-block;
}

/* 收藏夹弹窗 */
#starhub .favorites-modal-body {
    max-width: 380px;
    width: 88%;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--sh-bg);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: none !important;
}

#starhub .favorites-list-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#starhub .favorites-scroll {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

#starhub .favorite-item {
    padding: 16px;
    background: #FFF;
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    border: 1px solid var(--sh-glass-border);
    box-shadow: 0 4px 12px rgba(184, 148, 125, 0.08);
    transition: 0.2s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

#starhub .favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 148, 125, 0.15);
}

#starhub .favorite-item .post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

#starhub .favorite-content {
    flex: 1;
    min-width: 0;
}

#starhub .favorite-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--starhub-text-main);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#starhub .favorite-author {
    font-size: 12px;
    color: var(--starhub-text-sub);
    margin-bottom: 4px;
}

#starhub .favorite-preview {
    font-size: 12px;
    color: #9e8c91;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#starhub .favorite-item .ri-arrow-right-s-line {
    color: var(--starhub-accent-hazel);
    font-size: 20px;
    flex-shrink: 0;
}

/* 帖子菜单弹窗 */
#starhub .post-menu-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 16px 30px;
    pointer-events: none;
}

#starhub .post-menu-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 40px rgba(184, 148, 125, 0.2);
    pointer-events: auto;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#starhub .post-menu-item {
    padding: 16px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--starhub-text-main);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    cursor: pointer;
    transition: 0.2s;
}

#starhub .post-menu-item:hover {
    background: var(--starhub-accent-light);
}

#starhub .post-menu-item:last-child {
    border-bottom: none;
}

#starhub .post-menu-item.danger {
    color: var(--starhub-danger);
}

#starhub .post-menu-cancel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.9);
    pointer-events: auto;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#starhub .post-menu-cancel-btn {
    padding: 14px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--starhub-text-sub);
    cursor: pointer;
}

/* 评论样式增强 */
/* 评论区：独立气泡卡片设计，彻底解决黏连 */
#starhub #comments-container-starhub {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 4px;
}

#starhub .comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

#starhub .comment-avatar,
#starhub .c-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    border: 2px solid #FFF;
    box-shadow: 0 2px 8px rgba(184, 148, 125, 0.15);
    flex-shrink: 0;
}

/* 评论气泡本体 */
#starhub .comment-body,
#starhub .c-content-wrap {
    flex: 1;
    background: #FFF;
    padding: 16px;
    border-radius: 4px 20px 20px 20px; /* 对话气泡形状 */
    box-shadow: 0 4px 16px rgba(184, 148, 125, 0.08); /* 独立阴影，绝不黏连 */
    border: 1px solid var(--starhub-glass-border);
}

#starhub .comment-name,
#starhub .c-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--starhub-text-main);
    margin-bottom: 6px;
}

#starhub .comment-text,
#starhub .c-text {
    font-size: 15px;
    color: var(--starhub-text-main);
    line-height: 1.6;
    text-align: justify;
}

#starhub .comment-time,
#starhub .c-time {
    font-size: 11px;
    color: var(--starhub-text-sub);
    margin-top: 10px;
}

#starhub .c-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}

#starhub .c-reply-btn {
    font-size: 11px;
    color: var(--starhub-accent-hazel);
    cursor: pointer;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#starhub .c-reply-btn:hover {
    opacity: 1;
}

#starhub .c-delete-btn {
    font-size: 11px;
    color: var(--starhub-danger);
    cursor: pointer;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#starhub .c-delete-btn:hover {
    opacity: 1;
}

/* 表情面板 */
#starhub .emoji-panel {
    position: absolute;
    bottom: 90px;
    left: 20px;
    right: 20px;
    border-radius: 24px;
    background: #FFF;
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--starhub-glass-shadow);
    transform: translateY(20px);
    transition: 0.3s;
    z-index: 50;
    border: 1px solid #EEE;
}

#starhub .emoji-panel.active {
    display: flex;
    transform: translateY(0);
}

#starhub .emoji-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--starhub-text-main);
    margin-bottom: 10px;
}

#starhub .emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

#starhub .emoji-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--starhub-text-muted);
    padding: 20px;
}

#starhub .emoji-item {
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    background: rgba(184, 148, 125, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    user-select: none;
    font-size: 24px;
}

#starhub .emoji-item:hover {
    background: rgba(184, 148, 125, 0.15);
    transform: scale(1.1);
}

#starhub .emoji-sticker {
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    background: rgba(184, 148, 125, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

#starhub .emoji-sticker:hover {
    background: rgba(184, 148, 125, 0.2);
    transform: scale(1.05);
}

#starhub .emoji-sticker img {
    width: 28px;
    height: 28px;
}

/* 转发弹窗 */
#starhub .forward-modal-content {
    width: 85%;
    max-height: 70%;
    background: #FFFFFF;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 20px 60px rgba(184,148,125,0.25);
    overflow: hidden;
    animation: popUp 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

#starhub .forward-modal-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#starhub .forward-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--starhub-text-main);
}

#starhub .forward-modal-close {
    font-size: 22px;
    color: var(--starhub-text-sub);
    cursor: pointer;
}

#starhub .forward-list {
    max-height: 350px;
    overflow-y: auto;
}

#starhub .forward-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: 0.15s;
}

#starhub .forward-item:hover {
    background: rgba(184,148,125,0.08);
}

#starhub .forward-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-right: 12px;
}

#starhub .forward-item-info {
    flex: 1;
}

#starhub .forward-item-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--starhub-text-main);
}

#starhub .forward-item-type {
    font-size: 11px;
    color: var(--starhub-text-sub);
}

#starhub .forward-item-icon {
    color: var(--starhub-accent-hazel);
    font-size: 18px;
}

#starhub .forward-empty {
    text-align: center;
    padding: 40px;
    color: var(--starhub-text-muted);
}

/* 身份揭露弹窗 */
#starhub .reveal-modal-content {
    text-align: center;
    padding: 30px 24px;
}

#starhub .reveal-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

#starhub .reveal-title {
    font-size: 13px;
    color: var(--starhub-accent-hazel);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

#starhub .reveal-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(184,148,125,0.3);
    margin: 0 auto 12px;
    display: block;
}

#starhub .reveal-name {
    font-size: 20px;
    font-weight: 900;
    color: var(--starhub-text-main);
    margin-bottom: 6px;
}

#starhub .reveal-desc {
    font-size: 12px;
    color: var(--starhub-text-sub);
}

/* 催更弹窗 */
#starhub .remind-modal-content {
    width: 100%;
    background: #FFFFFF;
    border-radius: 24px 24px 0 0;
    border-top: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 -10px 40px rgba(184,148,125,0.2);
    padding-bottom: env(safe-area-inset-bottom,16px);
    animation: slideUp 0.3s cubic-bezier(0.2,0.8,0.2,1);
}

#starhub .remind-modal-header {
    padding: 18px 20px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#starhub .remind-modal-title-wrap {
    flex: 1;
}

#starhub .remind-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--starhub-text-main);
}

#starhub .remind-modal-subtitle {
    font-size: 11px;
    color: var(--starhub-text-sub);
    margin-top: 2px;
}

#starhub .remind-section {
    padding: 14px 20px 8px;
}

#starhub .remind-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--starhub-text-sub);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

#starhub .remind-char-list {
    background: rgba(255,255,255,0.8);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.9);
    overflow: hidden;
    max-height: 180px;
    overflow-y: auto;
}

#starhub .remind-char-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: 0.15s;
}

#starhub .remind-char-item:hover {
    background: rgba(184,148,125,0.05);
}

#starhub .remind-char-item.active {
    background: rgba(184,148,125,0.08);
}

#starhub .remind-char-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

#starhub .remind-char-info {
    flex: 1;
}

#starhub .remind-char-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--starhub-text-main);
}

#starhub .remind-char-role {
    font-size: 11px;
    color: var(--starhub-text-sub);
}

#starhub .remind-char-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d0c4c8;
    flex-shrink: 0;
}

#starhub .remind-char-item.active .remind-char-check {
    background: linear-gradient(135deg,#B8947D,#F5EBE4);
    border-color: var(--starhub-accent-hazel);
    display: flex;
    align-items: center;
    justify-content: center;
}

#starhub .remind-char-check-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

#starhub .remind-author-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    background: rgba(184,148,125,0.08);
}

#starhub .remind-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg,#B8947D,#F5EBE4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

#starhub .remind-textarea {
    width: 100%;
    height: 72px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(184,148,125,0.2);
    background: rgba(255,255,255,0.8);
    font-size: 13px;
    color: var(--starhub-text-main);
    resize: none;
    outline: none;
    line-height: 1.6;
    box-sizing: border-box;
    font-family: inherit;
}

#starhub .remind-submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg,var(--starhub-danger),var(--starhub-accent-hazel));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(184,148,125,0.35);
}

/* 编辑弹窗 */
#starhub .edit-modal-content {
    width: 85%;
    background: #FFFFFF;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 20px 60px rgba(184,148,125,0.25);
    padding: 24px;
    animation: popUp 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

#starhub .edit-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--starhub-text-main);
    margin-bottom: 15px;
}

#starhub .edit-input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.7);
    font-size: 15px;
    font-weight: 700;
    color: var(--starhub-text-main);
    outline: none;
    box-sizing: border-box;
}

#starhub .edit-textarea {
    width: 100%;
    height: 160px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.7);
    font-size: 14px;
    color: var(--starhub-text-main);
    outline: none;
    resize: none;
    line-height: 1.6;
    box-sizing: border-box;
}

#starhub .edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#starhub .edit-cancel-btn {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    border: none;
    background: rgba(0,0,0,0.05);
    color: var(--starhub-text-sub);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

#starhub .edit-save-btn {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg,var(--starhub-danger),var(--starhub-accent-hazel));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(184,148,125,0.3);
}

/* AI生成器角色选择 */
#starhub .ai-char-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(184,148,125,0.1);
    transition: all 0.15s;
}

#starhub .ai-char-item:hover {
    background: rgba(184,148,125,0.05);
}

#starhub .ai-char-item[data-selected="true"] {
    background: rgba(184,148,125,0.08);
}

#starhub .ai-char-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--starhub-accent-hazel);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex-shrink: 0;
}

#starhub .ai-char-item[data-selected="true"] .ai-char-checkbox {
    background: linear-gradient(135deg, var(--starhub-accent-hazel) 0%, var(--starhub-accent-light) 100%);
}

#starhub .ai-char-checkbox i {
    color: #fff;
    font-size: 12px;
    display: none;
}

#starhub .ai-char-item[data-selected="true"] .ai-char-checkbox i {
    display: block;
}

#starhub .ai-char-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

#starhub .ai-char-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--starhub-text-main);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#starhub .ai-char-badge {
    font-size: 10px;
    color: var(--starhub-accent-hazel);
    background: rgba(184,148,125,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

#starhub .ai-char-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: #9b8fa3;
}

#starhub .ai-char-empty i {
    font-size: 24px;
    display: block;
    margin-bottom: 6px;
    opacity: 0.5;
}

/* 热搜卡片 */
#starhub .hot-search {
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 15px rgba(184,148,125,0.1);
    cursor: pointer;
}

#starhub .hot-search-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--starhub-accent-hazel);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
    border-bottom: 1px dashed rgba(184,148,125,0.4);
    outline: none;
}

#starhub .hot-search-refresh {
    color: var(--starhub-danger);
    font-size: 16px;
    cursor: pointer;
    transition: 0.5s;
}

#starhub .hot-search-refresh:hover {
    transform: rotate(180deg);
}

/* 动画 */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 评论高亮动画 */
#starhub .comment-highlight {
    padding: 8px;
    border-radius: 8px;
    background-color: rgba(184, 148, 125, 0.2);
    transition: background-color 2.5s ease-out;
}

#starhub .comment-highlight-fade {
    background-color: transparent;
}

/* 收藏/点赞按钮动画 */
#starhub .btn-favorited {
    color: #ffd700 !important;
}

#starhub .btn-liked {
    color: var(--starhub-danger) !important;
}

#starhub .btn-scale-animation {
    transform: scale(1.3);
    transition: transform 0.2s;
}

/* Hover 效果类 */
#starhub .hover-opacity {
    opacity: 0.7;
    transition: opacity 0.2s;
}

#starhub .hover-opacity:hover {
    opacity: 1;
}

#starhub .hover-bg-hazel {
    transition: background 0.2s, transform 0.2s;
}

#starhub .hover-bg-hazel:hover {
    background: rgba(184, 148, 125, 0.2);
    transform: scale(1.15);
}

#starhub .hover-bg-light {
    transition: background 0.2s;
}

#starhub .hover-bg-light:hover {
    background: rgba(184, 148, 125, 0.2);
}

/* 身份揭露高亮 */
#starhub .identity-revealed-highlight {
    background: linear-gradient(135deg, rgba(184, 148, 125, 0.25), rgba(245, 235, 228, 0.25));
    border: 1px solid rgba(184, 148, 125, 0.5);
}

/* 工具类 */
#starhub .spin-icon {
    animation: spin 1s linear infinite;
    margin-right: 6px;
}

/* 按钮加载/禁用状态 */
#starhub .btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 转发弹窗遮罩 */
#starhub .starhub-forward-mask {
    position: absolute;
    inset: 0;
    z-index: 600;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

#starhub .starhub-forward-mask.active {
    opacity: 1;
}

/* 转发列表项 hover */
#starhub .forward-item:active {
    background: rgba(184, 148, 125, 0.08);
}

/* 身份揭露高亮样式 */
#starhub .identity-revealed {
    background: linear-gradient(135deg, rgba(184, 148, 125, 0.25), rgba(245, 235, 228, 0.25));
    border: 1px solid rgba(184, 148, 125, 0.5);
    padding: 2px 8px;
    cursor: default;
}

/* 身份揭露弹窗 */
#starhub .reveal-modal-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) scale(0.8);
    z-index: 99999;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s;
    opacity: 0;
    pointer-events: none;
}

#starhub .reveal-modal-popup.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* 催更面板角色项 hover */
#starhub .remind-char-item:active {
    background: rgba(184, 148, 125, 0.1);
}

#starhub .remind-author-item:active {
    background: rgba(184, 148, 125, 0.15);
}

/* 催更面板遮罩 */
#starhub .starhub-remind-mask {
    position: absolute;
    inset: 0;
    z-index: 600;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

#starhub .starhub-remind-mask.active {
    opacity: 1;
}

/* 编辑帖子遮罩 */
#starhub .starhub-edit-mask {
    position: absolute;
    inset: 0;
    z-index: 600;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

#starhub .starhub-edit-mask.active {
    opacity: 1;
}

/* 导航栏头像透明背景 */
#starhub .user-avatar-circle.transparent {
    background: transparent;
    background-image: none;
}

/* 通知弹窗淡入淡出 */
#starhub .modal-notif {
    opacity: 0;
    transition: opacity 0.3s;
}

#starhub .modal-notif.active {
    opacity: 1;
}

/* 角色选择项选中状态 */
#starhub .ai-char-item.selected {
    background: rgba(184, 148, 125, 0.08);
}

#starhub .ai-char-item.selected .ai-char-checkbox {
    background: linear-gradient(135deg, var(--starhub-accent-hazel) 0%, var(--starhub-accent-light) 100%);
}

/* 身份选择行状态 */
#starhub .identity-row.disabled {
    opacity: 0.4;
    pointer-events: none;
}

#starhub .identity-row.selected-real {
    background: rgba(255, 255, 255, 0.2);
}

#starhub .identity-row.selected-digital {
    background: rgba(255, 255, 255, 0.08);
}

/* 详情菜单淡入淡出 */
#starhub .modal-action-sheet {
    opacity: 0;
    transition: opacity 0.3s;
}

#starhub .modal-action-sheet.active {
    opacity: 1;
}

/* 刷新图标旋转动画 */
#starhub .icon-rotate {
    transform: rotate(360deg);
    transition: transform 0.5s;
}

/* 编辑器身份名称颜色状态 */
#starhub .editor-identity-name.selected {
    color: #fff;
}

#starhub .editor-identity-name.unselected {
    color: rgba(255, 255, 255, 0.5);
}

/* 拖拽光标状态 */
#starhub .cursor-grabbing {
    cursor: grabbing;
}

#starhub .cursor-grab {
    cursor: grab;
}

/* 强制横向滚动容器样式 */
#starhub .force-horizontal-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
    position: relative !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scroll-behavior: smooth !important;
    touch-action: pan-x !important;
    cursor: grab !important;
}

#starhub .force-horizontal-scroll.with-padding {
    padding: 10px 20px 12px 20px !important;
}

#starhub .force-horizontal-scroll.with-gap {
    gap: 10px !important;
}

#starhub .force-horizontal-scroll > * {
    flex-shrink: 0;
}

#starhub .force-horizontal-scroll > .chip {
    pointer-events: auto;
}

/* 市集卡片 */
#starhub .market-card {
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(184, 148, 125, 0.08);
}

#starhub .market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(184, 148, 125, 0.15);
}

#starhub .market-card-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

#starhub .market-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
}

#starhub .market-info {
    flex: 1;
}

#starhub .market-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--starhub-text-main);
}

#starhub .market-sector {
    font-size: 12px;
    opacity: 0.7;
    color: var(--starhub-text-sub);
}

#starhub .market-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    opacity: 0.8;
    color: var(--starhub-text-sub);
}

/* 夜间模式适配 */
body.dark-mode #starhub,
body.night #starhub {
    --starhub-bg-body: #1a1614;
    --starhub-text-main: #e8e0d8;
    --starhub-text-sub: #a89888;
    --starhub-text-muted: #6a5f56;
    --starhub-accent-hazel: #c5a080;
    --starhub-accent-light: #2a2220;
    --starhub-danger: #e88888;

    --starhub-glass-bg: rgba(30, 26, 24, 0.85);
    --starhub-glass-border: rgba(60, 52, 48, 1);
    --starhub-glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);

    background-color: var(--starhub-bg-body);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(197, 160, 128, 0.05) 0%, transparent 60%),
        linear-gradient(rgba(197, 160, 128, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 160, 128, 0.02) 1px, transparent 1px);
}

body.dark-mode #starhub .glass,
body.night #starhub .glass {
    background: rgba(30, 26, 24, 0.6);
    border-color: rgba(60, 52, 48, 0.8);
}

body.dark-mode #starhub .input-glass,
body.night #starhub .input-glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--starhub-text-main);
}

body.dark-mode #starhub .chip,
body.night #starhub .chip {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode #starhub .post-card,
body.night #starhub .post-card {
    background: rgba(30, 26, 24, 0.8);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode #starhub .nav-header,
body.night #starhub .nav-header {
    background: rgba(26, 22, 20, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode #starhub .floating-bottom-bar,
body.night #starhub .floating-bottom-bar {
    background: rgba(30, 26, 24, 0.95);
    border-color: rgba(60, 52, 48, 0.8);
}

body.dark-mode #starhub .modal-body,
body.night #starhub .modal-body {
    background: #1a1614;
}

/* === 核爆清理：强制重置所有卡死的组件约束 === */
#view-login-starhub {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    background-color: var(--sh-bg) !important;
    background-image: none !important;
}

/* 强制剥除主页和滚动容器的渐变污染 */
#starhub .view-container:not(#view-login-starhub),
#starhub .scroll-content,
#view-home-starhub {
    background: transparent !important;
}

/* 恢复手账网格全屏底色 */
#starhub {
    background-color: var(--sh-bg) !important;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(184, 148, 125, 0.12) 0%, transparent 60%),
        linear-gradient(rgba(184, 148, 125, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 148, 125, 0.08) 1px, transparent 1px) !important;
    background-size: 100% 100%, 24px 24px, 24px 24px !important;
}

/* 强制穿透所有弹窗的 active 选中状态，确保白字可见 */
#starhub .chip.active,
#starhub .chip.active *,
#starhub .capsule.active,
#starhub .capsule.active *,
#starhub .target-option.active,
#starhub .target-option.active * {
    color: #FFFFFF !important;
}

/* 强制所有弹窗内的文本自动换行，防止溢出 */
#starhub .modal-body,
#starhub .modal-body *,
#starhub .modal-settings,
#starhub .modal-settings *,
#starhub .settings-content,
#starhub .settings-content *,
#starhub .modal-notif,
#starhub .modal-notif *,
#starhub .notif-content,
#starhub .notif-content *,
#starhub .action-sheet,
#starhub .action-sheet *,
#starhub .forward-modal-content,
#starhub .forward-modal-content *,
#starhub .reveal-modal-content,
#starhub .reveal-modal-content *,
#starhub .remind-modal-content,
#starhub .remind-modal-content *,
#starhub .edit-modal-content,
#starhub .edit-modal-content *,
#starhub .favorites-modal-body,
#starhub .favorites-modal-body * {
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}
