/**
 * HuSNS - defaultpro Theme
 * 专业主题 - CSS Variables & Base Styles
 * 
 * @author 菜鸟学习
 * @version 1.3.0
 */

/* ========== CSS Variables ========== */
:root {
    /* 主题色 - 可通过配置面板自定义 */
    --primary-color: #1677ff;
    --primary-hover: #4096ff;
    --primary-light: #e6f7ff;
    
    /* 功能色 */
    --success-color: #52c41a;
    --success-bg: #ecfdf5;
    --success-border: #b7eb8f;
    
    --error-color: #ff4d4f;
    --error-bg: #fef2f2;
    --error-border: #fee2e2;
    
    --warning-color: #faad14;
    --warning-bg: #fffbe6;
    --warning-border: #ffe58f;
    
    --info-color: #1677ff;
    --info-bg: #f0f9ff;
    --info-border: #bae0ff;
    
    /* 文字颜色 */
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --text-light: #94a3b8;
    
    /* 边框颜色 */
    --border-color: #d9d9d9;
    --border-light: #e5e5e5;
    --border-lighter: #f0f0f0;
    
    /* 背景色 */
    --bg-page: #f5f7fa;
    --bg-card: #fff;
    --bg-hover: #f5f7fa;
    --bg-active: #e6f7ff;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
    
    /* 布局 */
    --header-height: 60px;
    --container-max: 1280px;
    --content-max: 1200px;
    --sidebar-left: 200px;
    --sidebar-right: 320px;
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* 移动端特定变量 */
    --mobile-primary-color: #07c160;
    --mobile-bg-page: #f5f5f5;
    --mobile-bg-card: #fff;
    --mobile-border-color: #e5e5e5;
    --mobile-text-color: #333;
    --mobile-text-secondary: #999;
}

/* ========== Base Reset ========== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

a { 
    text-decoration: none; 
    color: inherit; 
}

img { 
    max-width: 100%; 
}

button {
    font-family: inherit;
}

/* ========== Header ========== */
.header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    z-index: 99;
}

.header .container {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav a {
    color: var(--text-secondary);
    font-size: 14px;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.nav a:hover { 
    background: var(--bg-hover); 
    color: var(--primary-color); 
}

.nav a.active { 
    color: var(--primary-color); 
    font-weight: 500; 
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.notification-link { position: relative; }

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
}

.theme-toggle:hover { background: var(--bg-hover); }

/* ========== 头条/动态风格布局 ========== */

/* 顶部导航栏 */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-xl);
    gap: var(--spacing-xl);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 20px;
}

.logo-icon {
    font-size: 24px;
}

.navbar-search {
    display: flex;
    align-items: center;
    background: var(--bg-page);
    border-radius: 20px;
    padding: 0 12px;
    width: 280px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
}

.navbar-center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.navbar-center .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    transition: all var(--transition-normal);
}

.navbar-center .nav-link:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

.navbar-center .nav-link.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.navbar-center .nav-icon {
    font-size: 16px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition: background var(--transition-normal);
}

.nav-icon-btn:hover {
    background: var(--bg-page);
}

.icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    background: var(--error-color);
    color: #fff;
    font-size: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.user-menu-btn:hover {
    background: var(--bg-page);
}

.user-menu-btn .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-btn .user-name {
    font-size: 14px;
    color: var(--text-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-btn .arrow {
    font-size: 10px;
    color: var(--text-muted);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 160px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 4px;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    transition: background var(--transition-normal);
}

.dropdown-item:hover {
    background: var(--bg-page);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-lighter);
    margin: 4px 0;
}

.publish-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.publish-btn:hover {
    background: var(--primary-hover);
}

.register-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition-normal);
}

.register-btn:hover {
    background: var(--primary-hover);
}

/* 主内容包装器 */
.main-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    display: flex;
    gap: var(--spacing-lg);
}

/* ========== 左侧边栏 ========== */
.sidebar-left {
    width: 200px;
    flex-shrink: 0;
}

.side-nav {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.side-nav-item:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

.side-nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.side-nav-icon {
    font-size: 16px;
}

/* 签到组件 */
.sign-in-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    margin-top: var(--spacing-md);
}

.sign-in-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sign-in-label {
    font-size: 13px;
    opacity: 0.9;
}

.sign-in-streak {
    font-size: 14px;
    font-weight: 600;
}

.sign-in-action {
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.sign-in-action:hover {
    background: rgba(255,255,255,0.3);
}

.sign-in-action.signed {
    background: rgba(255,255,255,0.15);
    cursor: default;
}

/* 快捷入口 */
.quick-access {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-md) var(--spacing-sm);
    background: #fff;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.quick-access-item:hover {
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* ========== 中间内容区 ========== */
.main-content {
    flex: 1;
    min-width: 0;
    max-width: 680px;
}

/* 发布卡片 */
.publish-card {
    display: flex;
    gap: var(--spacing-md);
    background: #fff;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.publish-user .publish-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.publish-area {
    flex: 1;
}

.publish-input {
    width: 100%;
    border: none;
    resize: none;
    outline: none;
    font-size: 15px;
    line-height: 1.6;
    background: transparent;
    color: var(--text-primary);
}

.publish-input::placeholder {
    color: var(--text-muted);
}

.publish-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-lighter);
}

.publish-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.tool-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background var(--transition-normal);
}

.tool-btn:hover {
    background: var(--bg-page);
}

.publish-submit {
    padding: 6px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.publish-submit:hover {
    background: var(--primary-hover);
}

/* 公告栏 */
.announcement-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: linear-gradient(90deg, #fff7e6, #fff);
    border: 1px solid #ffe58f;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.announcement-icon {
    font-size: 18px;
}

.announcement-scroll {
    flex: 1;
    overflow: hidden;
}

.announcement-text {
    font-size: 13px;
    color: var(--warning-color);
}

/* ========== 帖子卡片 ========== */
.post-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
    transition: box-shadow var(--transition-normal);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-card.post-pinned {
    border: 1px solid var(--primary-light);
    background: linear-gradient(to bottom, var(--primary-light), #fff);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.post-author-avatar .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.post-author-name:hover {
    color: var(--primary-color);
}

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

.post-tags {
    display: flex;
    gap: var(--spacing-sm);
}

.tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-pinned {
    background: var(--error-color);
    color: #fff;
}

.tag-featured {
    background: var(--warning-color);
    color: #fff;
}

.post-card-content {
    margin-bottom: var(--spacing-md);
}

.post-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    word-break: break-word;
}

/* Emoji 大小限制 */
.post-text span.emoji,
.post-content span.emoji {
    font-size: 16px;
    vertical-align: middle;
}

.post-text [class*="emoji"],
.post-text [data-emoji],
.post-content [class*="emoji"],
.post-content [data-emoji] {
    font-size: 16px;
    max-height: 24px;
    vertical-align: middle;
}

/* 限制 Unicode 表情符号大小 - 使用 font-size 控制 */
.post-text,
.post-content {
    font-size: 15px;
}

/* 针对表情符号字符的特殊处理 */
.post-text,
.post-content,
.post-text * {
    font-size: 15px;
    line-height: 1.6;
}

/* 强制限制所有 emoji 字符的大小 */
.post-text,
.post-content,
.profile-info,
.comment-item {
    /* 限制字体大小 */
    font-size: 15px !important;
}

.post-images-grid {
    display: grid;
    gap: 6px;
    margin-top: var(--spacing-md);
    max-width: 100%;
}

.post-images-grid.single {
    grid-template-columns: 1fr;
    max-width: 320px;
}

.post-images-grid.multi {
    grid-template-columns: repeat(3, 1fr);
    max-height: 420px;
}

.post-image-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    max-height: 180px;
}

.post-image-item.single {
    aspect-ratio: 4/3;
    max-height: 240px;
}

.post-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.post-image-item:hover img {
    transform: scale(1.02);
}

/* 转发原始内容 */
.repost-original {
    background: var(--bg-page);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.repost-header {
    margin-bottom: var(--spacing-sm);
}

.repost-author {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.repost-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 视频 */
.post-videos {
    margin-top: var(--spacing-md);
}

.post-video-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    max-width: 400px;
    max-height: 225px;
}

.post-video-item video {
    width: 100%;
    height: 100%;
    max-height: 225px;
    display: block;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
}

.video-play-btn {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
}

.video-name-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm);
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    font-size: 13px;
}

/* 附件 */
.post-attachments {
    margin-top: var(--spacing-md);
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-page);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: background var(--transition-normal);
}

.attachment-item:hover {
    background: var(--bg-hover);
}

.attachment-icon {
    font-size: 24px;
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
}

.attachment-size {
    font-size: 12px;
    color: var(--text-muted);
}

/* 帖子操作栏 */
.post-card-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-lighter);
}

.action-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.action-item:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

.action-item.liked {
    color: var(--error-color);
}

.action-item.reposted {
    color: var(--success-color);
}

.action-item.favorited {
    color: var(--warning-color);
}

.action-icon {
    font-size: 16px;
}

.action-count {
    font-size: 13px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px var(--spacing-xl);
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-lg);
}

.empty-text {
    color: var(--text-secondary);
}

.empty-text p {
    margin-bottom: var(--spacing-sm);
}

.empty-text a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 加载更多 */
.load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    color: var(--text-muted);
    font-size: 14px;
}

.load-more.loading .loading-spinner {
    animation: spin 1s linear infinite;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
}

.load-more-end {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
    font-size: 14px;
}

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

/* ========== 右侧边栏 ========== */
.sidebar-right {
    width: 320px;
    flex-shrink: 0;
}

/* 用户信息卡 */
.user-profile-card {
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.profile-cover {
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
}

.profile-info {
    text-align: center;
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    margin-top: -30px;
}

.profile-avatar {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    margin: 0 auto;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.profile-bio {
    margin-top: var(--spacing-xs);
    font-size: 13px;
    color: var(--text-muted);
}

.profile-stats {
    display: flex;
    border-top: 1px solid var(--border-lighter);
}

.profile-stats .stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    text-decoration: none;
    transition: background var(--transition-normal);
}

.profile-stats .stat-item:hover {
    background: var(--bg-page);
}

.profile-stats .stat-num {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-stats .stat-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* 登录提示卡 */
.login-prompt-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.login-prompt-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.login-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.login-btn {
    padding: 8px 24px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
}

.register-link {
    padding: 8px 24px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

/* Widget 卡片 */
.widget-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-more {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}

.widget-more:hover {
    color: var(--primary-color);
}

.online-count-text {
    font-size: 12px;
    color: var(--success-color);
}

/* 推荐用户 */
.user-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.user-item + .user-item {
    border-top: 1px solid var(--border-lighter);
}

.user-avatar-link .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-item .user-info {
    flex: 1;
    min-width: 0;
}

.user-item .user-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-item .user-fans {
    font-size: 12px;
    color: var(--text-muted);
}

.follow-btn-widget {
    padding: 4px 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.follow-btn-widget:hover {
    background: var(--primary-hover);
}

.follow-btn-widget.following {
    background: var(--bg-page);
    color: var(--text-muted);
}

.widget-refresh {
    width: 100%;
    padding: var(--spacing-sm);
    margin-top: var(--spacing-md);
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.widget-refresh:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 热门话题 */
.topic-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.topic-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background var(--transition-normal);
}

.topic-item:hover {
    background: var(--bg-page);
}

.topic-rank {
    width: 20px;
    height: 20px;
    background: var(--bg-page);
    border-radius: 4px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.topic-rank.top-1 { background: #ff6b6b; color: #fff; }
.topic-rank.top-2 { background: #ffa502; color: #fff; }
.topic-rank.top-3 { background: #ffc107; color: #fff; }

.topic-info {
    flex: 1;
    min-width: 0;
}

.topic-name {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* 活跃用户排行 */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.rank-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.rank-num {
    width: 18px;
    height: 18px;
    background: var(--bg-page);
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.rank-num.top-1 { background: linear-gradient(135deg, #ffd700, #ffb800); color: #fff; }
.rank-num.top-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #fff; }
.rank-num.top-3 { background: linear-gradient(135deg, #cd7f32, #b06c2a); color: #fff; }

.rank-item .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-name {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    font-size: 11px;
    color: var(--text-muted);
}

/* 统计数据 */
.stats-row {
    display: flex;
    justify-content: space-around;
}

.stats-row .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-row .stat-num {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.stats-row .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 在线用户 */
.online-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.online-avatars a {
    display: block;
    transition: transform var(--transition-normal);
}

.online-avatars a:hover {
    transform: scale(1.1);
}

.online-avatars .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* 热门评论 */
.hot-comments {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.comment-item {
    display: flex;
    gap: var(--spacing-sm);
}

.comment-item .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-text {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.comment-likes {
    font-size: 11px;
    color: var(--text-muted);
}

/* 公告 */
.announcement-item {
    padding: var(--spacing-sm);
    background: var(--bg-page);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.announcement-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.announcement-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* 底部链接 */
.footer-links {
    text-align: center;
    padding: var(--spacing-lg);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 var(--spacing-sm);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    margin-top: var(--spacing-sm);
}

/* 响应式布局 - 移动端隐藏侧边栏 */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
        padding: var(--spacing-md);
    }
    
    .sidebar-left,
    .sidebar-right {
        display: none;
    }
    
    .main-content {
        max-width: 100%;
    }
}

/* ========== Side Section Group ========== */
.side-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.side-section .side-card {
    margin-bottom: 0;
}

/* ========== Left Navigation ========== */
.left-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-icon {
    font-size: 16px;
}

.nav-badge {
    margin-left: auto;
    background: var(--error-color);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.nav-section {
    margin-top: var(--spacing-sm);
}

.nav-section-title {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 14px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== Sidebar Card ========== */
.side-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.side-title {
    font-weight: bold;
    margin-bottom: var(--spacing-md);
    font-size: 15px;
    color: #1e293b;
}

.menu { list-style: none; }

.menu li {
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xs);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.menu li a { color: inherit; text-decoration: none; display: block; }
.menu li:hover { background: var(--bg-hover); }
.menu li.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

/* ========== User Card ========== */
.user-card { 
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}
.user-card .avatar {
    width: 70px;
    height: 70px;
    margin: 0 auto 10px;
    border: 3px solid #f1f5f9;
}

.user-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.user-card-bio {
    font-size: 12px;
    color: #999;
}

.user-card-stats {
    display: flex;
    justify-content: space-around;
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
    border-top: 1px solid var(--border-lighter);
}

.stat-item { text-align: center; }
.stat-value { font-size: 18px; font-weight: 700; color: #1e293b; }
.stat-label { font-size: 12px; color: #999; margin-top: var(--spacing-xs); }

/* ========== Recommend Users ========== */
.recommend-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.recommend-user .avatar { width: 36px; height: 36px; }
.recommend-user-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.follow-btn {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.follow-btn:hover { background: var(--primary-color); color: #fff; }

/* ========== Sign In Card ========== */
.sign-in-card {
    margin-top: auto;
}

.sign-in-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.sign-in-streak {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.sign-in-streak .streak-icon {
    font-size: 18px;
}

.sign-in-streak strong {
    color: var(--primary-color);
}

.sign-in-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

.btn-disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ========== Quick Links ========== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--spacing-sm);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all var(--transition-normal);
}

.quick-link-item:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.quick-link-icon {
    font-size: 20px;
}

/* ========== Site Info ========== */
/* ========== Online Users ========== */
.online-users {
    text-align: center;
}

.online-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.online-avatars a {
    display: block;
    transition: transform var(--transition-normal);
}

.online-avatars a:hover {
    transform: scale(1.1);
}

.online-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.online-count span {
    color: var(--primary-color);
    font-weight: 600;
}

/* ========== Active Users ========== */
.active-users {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.active-user-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-badge {
    width: 18px;
    height: 18px;
    background: var(--bg-hover);
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.rank-badge.top-1 {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #fff;
}

.rank-badge.top-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #fff;
}

.rank-badge.top-3 {
    background: linear-gradient(135deg, #cd7f32, #b06c2a);
    color: #fff;
}

.active-user-item .avatar {
    width: 32px;
    height: 32px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-score {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== Hot Comments ========== */
.hot-comments {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.hot-comment-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.hot-comment-item .avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-text {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========== Announcement ========== */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.announcement-item {
    padding: var(--spacing-sm);
    background: var(--bg-page);
    border-radius: var(--radius-md);
}

.announcement-content {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}

.announcement-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== Links ========== */
.links-list {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.link-item {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.link-item:hover {
    color: var(--primary-color);
}

/* ========== Stats Grid ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    text-align: center;
}

.stats-grid .stat-item {
    padding: var(--spacing-sm);
}

.stats-grid .stat-value {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
}

.stats-grid .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== Site Info ========== */
.site-info {
    padding: var(--spacing-md) var(--spacing-lg);
}

.site-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
}

.site-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-stats .stat-value {
    font-size: 20px;
}

.site-stats .stat-label {
    margin-top: 2px;
}

.stat-divider {
    color: var(--border-color);
}

/* ========== Hot Topics ========== */
.hot-topic-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-lighter);
    font-size: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.hot-topic-item:last-child { border-bottom: none; }

.hot-topic-item:hover {
    color: var(--primary-color);
}

.hot-topic-rank {
    width: 20px;
    height: 20px;
    background: #f0f0f0;
    border-radius: var(--radius-sm);
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-right: 10px;
    color: #666;
    flex-shrink: 0;
}

.hot-topic-rank.rank-1, 
.hot-topic-rank.rank-2, 
.hot-topic-rank.rank-3 {
    background: var(--primary-color);
    color: #fff;
}

.hot-topic-name { 
    flex: 1; 
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-topic-heat { 
    color: var(--text-muted); 
    font-size: 12px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ========== Publish Box ========== */
.publish-box {
    background: var(--bg-page);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.publish-input {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    resize: none;
    outline: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color var(--transition-normal);
    background: var(--bg-card);
}

.publish-input:focus {
    border-color: var(--primary-color);
}

.publish-tool {
    display: flex;
    gap: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 14px;
    align-items: center;
}

.publish-tool span { cursor: pointer; }

.anonymous-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.publish-btn {
    margin-left: auto;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 6px 16px;
    cursor: pointer;
    transition: background var(--transition-normal);
}

.publish-btn:hover { background: var(--primary-hover); }

/* ========== Home Main ========== */
.home-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-width: 0;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

/* ========== Post Card ========== */
.post {
    padding: var(--spacing-lg);
    margin: 0 calc(-1 * var(--spacing-lg));
    border-bottom: 1px solid var(--border-lighter);
    transition: background-color var(--transition-normal);
}

.post:first-child {
    padding-top: 0;
}

.post:last-child { 
    border-bottom: none; 
}

.post:hover { 
    background: var(--bg-hover); 
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.post-header .avatar { width: 42px; height: 42px; border-radius: 50%; }
.post-info { flex: 1; min-width: 0; }

.post-user { font-weight: 600; color: #1e293b; font-size: 15px; }
.post-user:hover { color: var(--primary-color); }

.post-meta { font-size: 12px; color: #999; margin-top: 2px; }
.post-time { color: #999; }
.post-ip::before { content: "·"; margin: 0 4px; }

.post-content { 
    margin-bottom: 10px; 
    line-height: 1.7; 
    color: var(--text-primary); 
    font-size: 15px;
    padding-left: 54px;
}

.post-images {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    padding-left: 54px;
}

.post-images:has(img:nth-child(1)):not(:has(img:nth-child(2))) { 
    grid-template-columns: 1fr; 
    max-width: 400px; 
}

.post-images:has(img:nth-child(2)) { grid-template-columns: repeat(2, 1fr); }
.post-images:has(img:nth-child(3)) { grid-template-columns: repeat(3, 1fr); }

.post-images img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: opacity var(--transition-normal);
}

.post-images img:hover { opacity: 0.85; }

.post-actions {
    display: flex;
    gap: 32px;
    color: #999;
    font-size: 13px;
    padding-left: 54px;
    margin-top: 10px;
    align-items: center;
    position: relative;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover { color: var(--primary-color); background: var(--bg-hover); }
.action-btn.liked { color: var(--error-color); }
.action-btn.favorited { color: #ffd700; }
.action-icon { font-size: 16px; }
.action-count { font-size: 12px; }
.more-btn { font-size: 16px; padding: 4px 8px; }

/* ========== More Menu ========== */
.action-more-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 120px;
    z-index: 100;
    margin-top: 4px;
}

.action-more-menu.show { display: block; }

.more-item {
    display: block;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    text-decoration: none;
    transition: background var(--transition-normal);
}

.more-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.more-item:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.more-item:hover { background: var(--bg-hover); }

/* ========== Tags ========== */
.pinned-tag, .featured-tag {
    display: inline-block;
    background: #ffe4e6;
    color: #f43f5e;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.featured-tag { background: #fef3c7; color: #d97706; }

/* ========== Comment Box ========== */
.comment-box {
    display: none;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-lighter);
}

.comment-box.show { display: block; }
.comment-list { margin-bottom: var(--spacing-md); }

.comment-item { 
    font-size: 14px; 
    margin-bottom: 10px; 
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    gap: 8px;
}

.comment-user { color: var(--primary-color); font-weight: 500; flex-shrink: 0; }
.comment-user:hover { text-decoration: underline; }
.comment-text { flex: 1; word-break: break-all; }
.comment-text a { color: var(--primary-color); }
.comment-reply { color: #999; font-size: 12px; margin-left: 8px; cursor: pointer; }

.comment-input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.comment-input {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 8px 14px;
    outline: none;
    font-size: 14px;
    resize: none;
    min-height: 36px;
    max-height: 100px;
    transition: border-color var(--transition-normal), min-height var(--transition-normal);
}

.comment-input:focus { 
    border-color: var(--primary-color); 
    min-height: 60px;
}

.comment-submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}

.comment-submit:hover { background: var(--primary-hover); }

/* ========== Buttons ========== */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-normal);
}

.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ========== Modals ========== */
.modal, .repost-modal {
    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: 1000;
}

.modal-content, .repost-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 90%;
    width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header, .repost-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-lighter);
}

.modal-header h3, .repost-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.modal-close, .repost-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 4px;
}

.modal form, .repost-modal form { padding: var(--spacing-xl); }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
}

/* ========== Alerts ========== */
.alert {
    background: var(--bg-card);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-md);
    font-size: 14px;
}

.alert-success { 
    color: var(--success-color); 
    border: 1px solid var(--success-border); 
    background: var(--success-bg);
}

.alert-error { 
    color: var(--error-color); 
    border: 1px solid var(--error-border);
    background: var(--error-bg);
}

/* ========== Page: Profile ========== */
.page-profile {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.page-profile .profile-header {
    background: var(--bg-card);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.page-profile .profile-avatar .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.page-profile .profile-info h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.page-profile .profile-info .bio {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 var(--spacing-md) 0;
}

.page-profile .profile-stats {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.page-profile .profile-stats span {
    color: var(--text-secondary);
    font-size: 14px;
}

.page-profile .profile-action { margin-left: auto; }

.page-profile .profile-tabs {
    background: var(--bg-card);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-xl);
    display: flex;
    gap: var(--spacing-xl);
}

.page-profile .profile-tabs .tab-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.page-profile .profile-tabs .tab-item:hover { background: var(--bg-hover); }

.page-profile .profile-tabs .tab-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.page-profile .profile-posts {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
}

.page-profile .post-item {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-lighter);
}

.page-profile .post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ========== Page: Settings ========== */
.page-settings {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.page-settings h2 {
    margin: 0 0 var(--spacing-lg) 0;
    font-size: 20px;
}

.page-settings .form-group {
    margin-bottom: var(--spacing-xl);
}

.page-settings .form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.page-settings .form-group input,
.page-settings .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.page-settings .form-group input:focus,
.page-settings .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
}

.page-settings .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.page-settings .form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.page-settings .avatar-upload {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.page-settings .settings-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-lighter);
}

.page-settings .settings-section h3 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: 16px;
}

/* ========== Page: Notification ========== */
.page-notification {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-lighter);
}

.notification-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.mark-all-read {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.mark-all-read:hover { text-decoration: underline; }

.notification-list { space-y: var(--spacing-md); }

.notification-item {
    display: flex;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
}

.notification-item:hover { background: #f8f9fa; }

.notification-item.unread {
    background: var(--info-bg);
    border-left: 3px solid var(--primary-color);
}

.notification-avatar {
    flex-shrink: 0;
    margin-right: var(--spacing-md);
}

.notification-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.system-icon {
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-right: 8px;
}

.notification-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.notification-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
}

.notification-meta .time { margin-right: var(--spacing-md); }
.notification-meta a { color: var(--primary-color); text-decoration: none; }
.notification-meta a:hover { text-decoration: underline; }

.notification-actions {
    flex-shrink: 0;
    margin-left: var(--spacing-md);
}

.btn-delete {
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-delete:hover {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-color);
}

.load-more {
    text-align: center;
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-lighter);
}

.load-more .btn {
    display: inline-block;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-normal);
}

.load-more .btn:hover { background: #e2e8f0; }

/* ========== Empty State ========== */
.empty {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
    font-size: 14px;
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    margin-top: 40px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.footer .container { max-width: var(--container-max); margin: 0 auto; }
.footer-links { margin-bottom: 10px; }
.footer-links a { color: var(--primary-color); margin: 0 8px; }

/* ========== Skeleton Loading ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

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

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

.skeleton-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

/* ========== Image Preview ========== */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.image-preview-overlay img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

/* ========== Accessibility ========== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    transition: top var(--transition-normal);
}

.skip-link:focus {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== Dark Mode ========== */
body.dark-mode { 
    background: #1a1a2e; 
    color: #e0e0e0; 
}

body.dark-mode .header, 
body.dark-mode .side-card, 
body.dark-mode .post,
body.dark-mode .modal-content, 
body.dark-mode .repost-modal-content,
body.dark-mode .mobile-footer-bar, 
body.dark-mode .publish-popup,
body.dark-mode .footer { 
    background: #16213e; 
}

body.dark-mode .logo, 
body.dark-mode .nav a:hover, 
body.dark-mode .menu li:hover,
body.dark-mode .menu li.active, 
body.dark-mode .follow-btn:hover,
body.dark-mode .comment-user { 
    color: #4096ff; 
}

body.dark-mode .nav a, 
body.dark-mode .menu li, 
body.dark-mode .post-content,
body.dark-mode .post-user, 
body.dark-mode .post-time, 
body.dark-mode .post-ip { 
    color: #e0e0e0; 
}

body.dark-mode .avatar { border-color: #2a2a4a; }

body.dark-mode .publish-input, 
body.dark-mode .comment-input { 
    background: #2a2a4a; 
    border-color: #3a3a5a;
    color: #e0e0e0;
}

body.dark-mode .admin-link { background: #2a1a1a; }

/* ========== Mobile Styles (WeChat Moments Style) ========== */
@media (max-width: 768px) {
    body { background: #f5f5f5; }
    
    .header { 
        position: sticky; 
        top: 0; 
        z-index: 100;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        box-shadow: none;
    }
    
    .nav { display: none; }
    
    .main-container { 
        max-width: 100%; 
        margin: 0; 
        padding: 0;
        display: block;
    }
    
    .home-main { 
        background: transparent;
        gap: 10px;
        padding: 10px 0 70px;
        box-shadow: none;
        border-radius: 0;
    }
    
    .sidebar-left, .sidebar-right { display: none !important; }
    
    .post {
        background: #fff;
        margin: 0 0 10px 0;
        border-radius: 0;
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .post:first-child { border-radius: 0; }
    
    .post-header {
        padding-left: 0;
        margin-bottom: 10px;
    }
    
    .post-header .avatar { width: 40px; height: 40px; }
    .post-info { margin-left: 10px; }
    .post-user { font-size: 14px; color: #576b95; }
    .post-meta { font-size: 11px; color: #999; }
    .post-time { font-size: 11px; color: #999; }
    .post-ip { display: none; }
    
    .post-content { 
        padding-left: 50px; 
        font-size: 15px;
        line-height: 1.6;
        color: #333;
        margin-bottom: 8px;
    }
    
    .post-images {
        padding-left: 50px;
        display: grid;
        gap: 4px;
    }
    
    .post-images:has(img:nth-child(1)):not(:has(img:nth-child(2))) { 
        grid-template-columns: 1fr; 
        max-width: 250px; 
    }
    
    .post-images img { aspect-ratio: 1; border-radius: 4px; }
    
    .post-actions {
        padding-left: 50px;
        gap: 40px;
        margin-top: 8px;
    }
    
    .action-btn { padding: 6px 0; font-size: 13px; }
    .action-icon { font-size: 18px; }
    
    .comment-box {
        background: #f7f7f7;
        margin: 8px 0 0 50px;
        padding: 10px 12px;
        border-radius: 4px;
        border: none;
    }
    
    .comment-box.show { display: block; }
    .comment-item { font-size: 13px; margin-bottom: 6px; }
    .comment-input-wrap { margin-top: 8px; }
    
    .comment-input { 
        border-radius: 16px; 
        background: #fff;
        border: 1px solid #e5e5e5;
    }
    
    .comment-submit { 
        border-radius: 16px;
        background: #07c160;
        color: #fff;
        border: none;
        padding: 6px 14px;
    }
    
    /* WeChat Moments Publish Zone */
    .publish-zone {
        background: #fff;
        padding: 12px 16px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .publish-zone .avatar { width: 40px; height: 40px; border-radius: 4px; }
    
    .publish-zone-input {
        flex: 1;
        background: #f5f5f5;
        border-radius: 6px;
        padding: 10px 14px;
        color: #999;
        font-size: 14px;
    }
    
    /* Mobile Bottom Navigation */
    .mobile-footer-bar {
        display: flex;
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        right: 0;
        height: 44px;
        background: #2e2e2e;
        border-top: none;
        z-index: 999;
        padding: 0;
    }
    
    .mobile-footer-bar .item {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        color: #999;
        gap: 0;
        padding-top: 0;
    }
    
    .mobile-footer-bar .item.active { color: #07c160; }
    .mobile-footer-bar .icon { font-size: 22px; margin-bottom: 0; }
    .mobile-footer-bar .item span { display: none; }
    .publish-btn-item { display: none; }
    
    /* Hide Original Publish Box on Mobile */
    .main > .publish-box,
    .publish-box-hide-mobile { display: none !important; }
    
    /* Publish Popup */
    .popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.6);
        z-index: 1000;
        display: none;
    }
    
    .publish-popup {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #f5f5f5;
        border-radius: 0;
        padding: 0;
        z-index: 1001;
        transform: translateY(100%);
        transition: transform var(--transition-slow);
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .publish-popup.show { transform: translateY(0); }
    
    .popup-header {
        background: #fff;
        padding: 12px 16px;
        border-bottom: 1px solid #e5e5e5;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .popup-title { font-size: 16px; font-weight: 600; color: #333; }
    .popup-close { font-size: 20px; color: #999; cursor: pointer; }
    .popup-close:hover { color: #666; }
    
    /* Dark Mode Mobile */
    body.dark-mode .mobile-footer-bar { background: #1a1a1a; }
    body.dark-mode .mobile-footer-bar .item { color: #888; }
    body.dark-mode .mobile-footer-bar .item.active { color: #07c160; }
    body.dark-mode .post { background: #1a1a1a; border-color: #2a2a2a; }
    body.dark-mode .post-content { color: #e0e0e0; }
    body.dark-mode .comment-box { background: #252525; }
    body.dark-mode .publish-zone { background: #1a1a1a; }
    body.dark-mode .publish-zone-input { background: #252525; color: #888; }
    body.dark-mode .popup-header { background: #1a1a1a; border-color: #2a2a2a; }
    body.dark-mode .popup-title { color: #e0e0e0; }
    body.dark-mode .publish-popup { background: #1a1a1a; }
    body.dark-mode .action-more-menu { background: #1a1a1a; border-color: #2a2a2a; }
    body.dark-mode .action-more-menu .more-item { color: #e0e0e0; }
    body.dark-mode .action-more-menu .more-item:hover { background: #252525; }

/* ========== Dark Mode Mobile Switch Overlay ========== */
body.dark-mode #mobile-switch-overlay {
    background: rgba(0,0,0,0.92);
}

body.dark-mode .mobile-switch-subtitle {
    color: #888;
}

body.dark-mode .mobile-switch-btn {
    background: #333;
    border-color: #444;
}

body.dark-mode .mobile-switch-btn:hover {
    background: #444;
}

/* ========================================
   移动端微信朋友圈风格组件（可复用）
   ======================================== */

/* 朋友圈卡片 */
.moment-card {
    background-color: var(--bg-card);
    margin: 0 0 10px 0;
    padding: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    border-bottom: 1px solid var(--border-lighter);
    transition: background var(--transition-normal);
}

.moment-card:active {
    background: var(--bg-hover);
}

/* 用户信息头部 */
.moment-header {
    display: flex;
    padding: 12px 16px 0;
    gap: 12px;
}

.moment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--border-lighter);
}

.moment-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.moment-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--link-color, #576b95);
    text-decoration: none;
    line-height: 1.4;
}

.moment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.moment-time {
    white-space: nowrap;
}

.moment-ip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.moment-ip::before {
    content: "·";
    margin: 0;
}

.moment-more {
    color: var(--text-muted);
    font-size: 20px;
    padding: 4px;
    cursor: pointer;
}

/* 徽章 */
.moment-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 500;
}

.moment-badge.pinned {
    background: var(--error-bg);
    color: var(--error-color);
}

.moment-badge.featured {
    background: var(--warning-bg);
    color: var(--warning-color);
}

/* 内容区域 */
.moment-content {
    padding: 8px 16px 12px 68px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    word-break: break-all;
    white-space: pre-wrap;
}

/* 图片网格 */
.moment-images {
    padding: 0 16px 8px 68px;
}

.moment-image-grid {
    display: grid;
    gap: 4px;
    border-radius: 4px;
    overflow: hidden;
}

.moment-image-grid.single-image {
    grid-template-columns: 1fr;
    max-width: 250px;
}

.moment-image-grid:not(.single-image) {
    grid-template-columns: repeat(3, 1fr);
}

.moment-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background-color: var(--border-lighter);
    transition: opacity var(--transition-normal);
    cursor: pointer;
}

.moment-img:active {
    opacity: 0.9;
}

/* 转发预览 */
.moment-repost {
    margin: 0 16px 8px 68px;
    padding: 10px 12px;
    background-color: var(--bg-hover);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* 底部操作栏 */
.moment-actions {
    display: flex;
    align-items: center;
    padding: 8px 16px 12px 68px;
    gap: 32px;
}

.moment-action {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 13px;
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}

.moment-action:hover {
    background: var(--bg-hover);
}

.moment-action.liked {
    color: var(--error-color);
}

.moment-action-icon {
    font-size: 18px;
}

.moment-action-count {
    font-size: 12px;
}

/* 评论区域 */
.moment-comments {
    padding: 0 16px 12px 68px;
}

.moment-like-list {
    font-size: 13px;
    color: var(--link-color, #576b95);
    margin-bottom: 6px;
    line-height: 1.5;
}

.moment-like-icon {
    color: var(--error-color);
    margin-right: 4px;
}

.moment-comment-list {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

.moment-comment-item {
    margin-bottom: 4px;
}

.moment-comment-user {
    color: var(--link-color, #576b95);
    text-decoration: none;
}

.moment-comment-text {
    color: var(--text-primary);
}

/* 下拉菜单 */
.moment-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 120px;
    overflow: hidden;
}

.moment-dropdown.show {
    display: block;
}

.moment-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-normal);
}

.moment-dropdown-item:hover {
    background: var(--bg-hover);
}

.moment-dropdown-item.danger {
    color: var(--error-color);
}

.moment-dropdown-item .item-icon {
    margin-right: 8px;
    font-size: 14px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-lighter);
    margin: 4px 0;
}

/* 位置卡片 */
.moment-location-card {
    margin: 6px 16px 6px 68px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 加载状态 */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-lighter);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.loading-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   主题自定义面板
   ======================================== */
.theme-customizer-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-normal);
}

.theme-customizer-btn:hover {
    background: var(--bg-hover);
}

.theme-customizer-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    display: none;
}

.theme-customizer-overlay.show {
    display: block;
}

.theme-customizer-panel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 1101;
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.theme-customizer-panel.show {
    display: flex;
}

/* 使用ID选择器确保定位正确 */
#themeCustomizerPanel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 9999 !important;
}

.theme-customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-lighter);
}

.theme-customizer-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.theme-customizer-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.theme-customizer-close:hover {
    color: var(--text-primary);
}

.theme-customizer-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
}

.theme-customizer-section {
    margin-bottom: var(--spacing-xl);
}

.theme-customizer-section h4 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.theme-customizer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.theme-customizer-item label {
    font-size: 14px;
    color: var(--text-primary);
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.color-picker {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker::-webkit-color-swatch {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.color-value {
    font-size: 13px;
    color: var(--text-muted);
    font-family: monospace;
    min-width: 60px;
}

.theme-customizer-presets h4 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.preset-btn {
    width: 48px;
    height: 48px;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.preset-btn:hover {
    transform: scale(1.1);
}

.preset-btn.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px currentColor;
}

.theme-customizer-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--border-lighter);
}

/* ========== 平板端适配 (768px - 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* 平板端：隐藏左侧栏，优化右侧栏 */
    .sidebar-left {
        display: none !important;
    }
    
    .sidebar-right {
        width: 240px;
        flex-shrink: 0;
    }
    
    .home-main {
        flex: 1;
        min-width: 0;
    }
    
    /* 优化右侧栏卡片在平板端的显示 */
    .side-card {
        padding: 12px;
    }
    
    .side-title {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .sidebar-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .sidebar-stat-item {
        padding: 8px 4px;
    }
    
    .sidebar-stat-value {
        font-size: 15px;
    }
    
    .sidebar-stat-label {
        font-size: 10px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .theme-customizer-panel {
        width: 95%;
        max-height: 85vh;
    }
    
    .theme-customizer-content {
        padding: var(--spacing-lg);
    }
    
    .preset-btn {
        width: 44px;
        height: 44px;
    }
}

/* Toast Message */
.toast-message,
.mobile-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 80%;
    text-align: center;
}

.toast-message.show,
.mobile-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 移动端 Toast 位置调整 */
@media (max-width: 768px) {
    .toast-message,
    .mobile-toast {
        bottom: 70px;
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ========== Desktop Only (Hide Mobile Elements) ========== */
@media (min-width: 769px) {
    .mobile-footer-bar,
    .publish-popup,
    .popup-overlay,
    .publish-zone {
        display: none !important;
    }
}

/* ========== Admin Link (Inline Style Conversion) ========== */
.admin-link {
    color: var(--error-color);
    font-size: 14px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    background: var(--error-bg);
}

/* ========== Popup Textarea Styles ========== */
.popup-textarea {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    resize: none;
    outline: none;
    font-size: 14px;
}

.popup-textarea-dark {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    resize: vertical;
    outline: none;
}

/* ========== Popup Actions Container ========== */
.popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.popup-actions-auto {
    margin-left: auto;
}

/* ========== Also Comment Label ========== */
.also-comment-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== Mobile Switch Overlay ========== */
#mobile-switch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.mobile-switch-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.mobile-switch-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.mobile-switch-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

.mobile-switch-buttons {
    display: flex;
    gap: 12px;
}

.mobile-switch-btn {
    padding: 12px 24px;
    background: #333;
    border: 1px solid #555;
    color: #fff;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.mobile-switch-btn:hover {
    background: #444;
}

.mobile-switch-btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.mobile-switch-btn-primary:hover {
    background: var(--primary-hover);
}

/* ========== 首页内联样式优化 - 已移至此 ========== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1677ff;
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}
.guest-tip {
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: #666;
}
.guest-tip a {
    color: #1677ff;
}
.alert-info {
    background: #e6f7ff;
    border: 1px solid #91caff;
    color: #1677ff;
}
.post-pinned {
    border: 2px solid #ffd700;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
    border-radius: 12px;
}
.empty-state p {
    margin-bottom: 10px;
}
.empty-state a {
    color: #1677ff;
}
.load-more {
    text-align: center;
    padding: 20px;
}
.load-more .btn {
    display: inline-block;
    background: #fff;
    color: #666;
    border: 1px solid #eee;
    padding: 10px 30px;
    border-radius: 20px;
}
.load-more .btn:hover {
    background: #1677ff;
    color: #fff;
    border-color: #1677ff;
}
.infinite-scroll-loader {
    display: none;
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}
.infinite-scroll-loader.active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.infinite-scroll-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e5e5;
    border-top-color: #1677ff;
    border-radius: 50%;
    animation: infiniteScrollSpin 0.8s linear infinite;
}
@keyframes infiniteScrollSpin {
    to { transform: rotate(360deg); }
}
.infinite-scroll-end {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}
.repost-box {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}
.post-video-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}
.post-video-item video {
    width: 100%;
    display: block;
}
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    transition: all 0.3s;
}
.post-video-item:hover .video-overlay {
    background: rgba(0,0,0,0.5);
}
.post-images-grid {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}
.post-images-grid-1 { grid-template-columns: 1fr; }
.post-images-grid-2 { grid-template-columns: repeat(2, 1fr); }
.post-images-grid-3 { grid-template-columns: repeat(2, 1fr); }
.post-images-grid-4 { grid-template-columns: repeat(2, 1fr); }
.post-images-grid-5, .post-images-grid-6, .post-images-grid-7, .post-images-grid-8, .post-images-grid-9 {
    grid-template-columns: repeat(3, 1fr);
}
.post-images-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}
.post-images-grid img:hover {
    transform: scale(1.02);
}
.post-images-grid a:first-child:nth-last-child(3) ~ a,
.post-images-grid a:first-child:nth-last-child(3) {
    grid-column: span 1;
}
.post-images-grid a:first-child:only-child img {
    max-height: 400px;
}
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.image-viewer img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}
.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}
.post-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
}
.post-content .hashtag {
    color: #1677ff;
    cursor: pointer;
}
.post-content .at-user {
    color: #1677ff;
    cursor: pointer;
}
.post-content a {
    color: #1677ff;
    text-decoration: none;
}
.post-content a:hover {
    text-decoration: underline;
}
.post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 5px 0;
}
.post-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 5px 0;
}
.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}
.post-content pre {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
}
.post-action {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #999;
    font-size: 13px;
}
.post-action .action-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    cursor: pointer;
    transition: color 0.2s;
}
.post-action .action-item:hover {
    color: #1677ff;
}
.post-action .action-item.liked {
    color: #ff4d4f;
}
.post-action .action-item.liked i {
    color: #ff4d4f;
}
.post-action .action-item i {
    font-size: 18px;
}
.post-comments {
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: 12px;
}
.comment-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}
.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}
.comment-content {
    flex: 1;
}
.comment-author {
    font-weight: 500;
    font-size: 13px;
    color: #333;
}
.comment-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-top: 2px;
}
.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.comment-action {
    font-size: 11px;
    color: #999;
    cursor: pointer;
}
.comment-action:hover {
    color: #1677ff;
}
.comment-replies {
    margin-left: 36px;
    margin-top: 8px;
}
.comment-reply {
    display: flex;
    gap: 6px;
    padding: 6px 0;
}
.reply-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
}
.reply-content {
    flex: 1;
}
.reply-author {
    font-size: 12px;
    color: #333;
}
.reply-author a {
    color: #1677ff;
}
.reply-text {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
}
.reply-meta {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    display: flex;
    gap: 8px;
}
.emoji-row {
    font-size: 20px;
    padding: 10px 0;
    cursor: pointer;
}
.emoji-btn {
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.emoji-btn:hover {
    background: #f0f0f0;
}
.emoji-btn.active {
    background: #e6f7ff;
}
.user-sidebar-list {
    padding: 0;
    margin: 0;
    list-style: none;
}
.user-sidebar-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}
.user-sidebar-list li:last-child {
    border-bottom: none;
}
.user-sidebar-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    text-decoration: none;
}
.user-sidebar-list a:hover {
    color: #1677ff;
}
.user-sidebar-list i {
    font-size: 18px;
    color: #999;
}
.topic-tag {
    display: inline-block;
    padding: 2px 10px;
    background: #f0f5ff;
    color: #1677ff;
    border-radius: 20px;
    font-size: 12px;
    margin: 2px;
    cursor: pointer;
    transition: all 0.2s;
}
.topic-tag:hover {
    background: #1677ff;
    color: #fff;
}
.sidebar-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sidebar-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1677ff;
}
.sidebar-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.sidebar-stat-item {
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}
.sidebar-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #1677ff;
}
.sidebar-stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.online-users-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.online-user-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.online-user-item:hover {
    transform: scale(1.1);
}
.sidebar-user-card {
    text-align: center;
}
.sidebar-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    cursor: pointer;
}
.sidebar-user-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}
.sidebar-user-bio {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comment-meta {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}
.links-list {
    padding: 5px 0;
}
.link-item {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #1677ff;
    border-bottom: 1px solid #f0f0f0;
}
.link-item:last-child {
    border-bottom: none;
}

/* ========== 骨架屏样式 ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
body.dark-mode .skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}
.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}
.skeleton-text {
    height: 14px;
    margin: 6px 0;
}
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.long { width: 100%; }
.skeleton-image {
    height: 180px;
    border-radius: 8px;
}
.skeleton-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
body.dark-mode .skeleton-card {
    background: #1e1e1e;
}
.skeleton-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.skeleton-list li {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
body.dark-mode .skeleton-list li {
    border-bottom-color: #333;
}
.skeleton-content {
    flex: 1;
}

/* ========== 骨架屏容器 ========== */
.skeleton-container {
    margin-bottom: 16px;
}

/* ========== 签到卡片 ========== */
.sign-in-card .sign-in-content {
    text-align: center;
}
.sign-in-streak {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    background: #f5f7fa;
    border-radius: 8px;
}
.streak-label {
    font-size: 13px;
    color: #666;
}
.streak-count {
    font-size: 18px;
    font-weight: 600;
    color: #1677ff;
}
.sign-in-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
}
.sign-in-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.sign-in-reward {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}
body.dark-mode .sign-in-streak {
    background: #2a2a2a;
}
body.dark-mode .streak-label {
    color: #999;
}

/* ========== 在线用户 ========== */
.online-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.online-avatars a {
    display: block;
    transition: transform 0.2s;
}
.online-avatars a:hover {
    transform: scale(1.1);
}
.online-avatars img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.online-count {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    text-align: center;
}
.online-count span {
    color: #1677ff;
    font-weight: 600;
}

/* ========== 通知徽章 ========== */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #ff4d4f;
    border-radius: 9px;
    margin-left: 6px;
}

/* ========== 空状态提示 ========== */
.empty-tip {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 13px;
}

/* ========== 编辑器样式 ========== */
.publish-box textarea:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}
body.dark-mode .publish-box textarea:focus {
    border-color: #4096ff;
}
