/* ==========================================================================
   Hopzz 主样式表
   调性：彩色色纸质感 · 莫兰迪低饱和 · 落叶般轻柔的微动效
   ========================================================================== */

/* ---------- 字体引入 ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ---------- CSS 变量：色彩系统 ---------- */
:root {
    /* 背景底色：白中透蓝冷调 */
    --bg-base: #F0F2F5;

    /* 莫兰迪色块（低饱和度，半透明使用） */
    --color-mist-blue: #A8B8C8;      /* 雾灰蓝 */
    --color-bean-pink: #D4A5A5;      /* 豆沙粉 */
    --color-sage-green: #A8B5A0;     /* 灰绿 */
    --color-lotus-purple: #9B8AA4;   /* 藕荷紫 */
    --color-cream-yellow: #E8D5A0;   /* 奶黄 */

    /* 色块半透明变体（用于背景装饰） */
    --blob-mist-blue: rgba(168, 184, 200, 0.45);
    --blob-bean-pink: rgba(212, 165, 165, 0.40);
    --blob-sage-green: rgba(168, 181, 160, 0.40);
    --blob-lotus-purple: rgba(155, 138, 164, 0.40);
    --blob-cream-yellow: rgba(232, 213, 160, 0.40);

    /* 文字 */
    --text-primary: #2C2C2C;
    --text-secondary: #5A6470;
    --text-muted: #9CA3AF;
    --text-on-accent: #FFFFFF;

    /* 线条与描边 */
    --border-soft: rgba(44, 44, 44, 0.08);
    --border-glass: rgba(255, 255, 255, 0.3);

    /* 毛玻璃卡片 */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-strong: rgba(255, 255, 255, 0.75);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --glass-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.10);

    /* 主题强调色（雾灰蓝） */
    --accent: var(--color-mist-blue);
    --accent-deep: #8FA5B8;
    --accent-soft: rgba(168, 184, 200, 0.15);

    /* 状态色 */
    --like-color: #E8838A;
    --indicator-red: #D9534F;
    --indicator-yellow: #E8B339;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* 缓动函数：舒缓自然 */
    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-gentle: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* 动效时长 */
    --duration-fast: 200ms;
    --duration-base: 300ms;
    --duration-slow: 500ms;

    /* 布局尺寸 */
    --navbar-height: 64px;
    --sidebar-width: 260px;
    --content-max-width: 640px;
    --layout-gap: 24px;
}

/* ---------- 全局重置 ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-base);
    min-height: 100vh;
    overflow-x: hidden;
    /* 极淡噪点纹理：色纸质感 */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-soft);
}

a:hover {
    color: var(--accent-deep);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ---------- 背景装饰：莫兰迪色块 ---------- */
.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.color-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    will-change: transform;
}

.blob-1 {
    width: 420px;
    height: 420px;
    background: var(--blob-mist-blue);
    top: -80px;
    left: -60px;
}

.blob-2 {
    width: 380px;
    height: 380px;
    background: var(--blob-bean-pink);
    top: 40%;
    right: -100px;
}

.blob-3 {
    width: 460px;
    height: 460px;
    background: var(--blob-cream-yellow);
    bottom: -120px;
    left: 30%;
}

/* ==========================================================================
   顶部导航栏
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--navbar-height);
    padding: 0 28px;
    margin: 16px 24px 0;
    border-radius: var(--radius-lg);
}

.navbar-left,
.navbar-center,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.navbar-center {
    flex: 1;
    justify-content: center;
    max-width: 480px;
}

.navbar-right {
    flex-shrink: 0;
}

/* PC端隐藏移动端专属元素 */
.mobile-only {
    display: none !important;
}

.nav-icon-btn.category-toggle,
.nav-avatar-btn,
.mobile-search-toggle,
.mobile-search-bar {
    display: none !important;
}

.navbar-right .avatar-link {
    display: inline-block;
}

.logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--color-mist-blue), var(--color-lotus-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- 搜索框 ---------- */
.search-form {
    width: 100%;
    position: relative;
}

.search-form::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 44px;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    outline: none;
    transition: background var(--duration-base) var(--ease-soft),
                box-shadow var(--duration-base) var(--ease-soft);
}

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

.search-input:focus {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: transform var(--duration-base) var(--ease-soft);
}

.avatar-link:hover .nav-avatar {
    transform: scale(1.06);
}

.nav-link {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   按钮系统
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
    /* 微立体：顶部高光 + 底部投影 */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform var(--duration-base) var(--ease-soft),
                box-shadow var(--duration-base) var(--ease-soft),
                background var(--duration-base) var(--ease-soft);
    white-space: nowrap;
    user-select: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 6px 16px rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.9);
}

.btn:active {
    transform: translateY(0);
    /* 按下凹陷反馈 */
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04);
    background: rgba(255, 255, 255, 0.6);
}

/* 发布按钮：主题渐变 */
.btn-publish {
    color: var(--text-on-accent);
    background: linear-gradient(135deg, var(--color-mist-blue), var(--accent-deep));
    border: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 2px 8px rgba(143, 165, 184, 0.35);
}

.btn-publish:hover {
    background: linear-gradient(135deg, var(--accent-deep), var(--color-mist-blue));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 6px 18px rgba(143, 165, 184, 0.45);
}

.btn-publish:active {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 1px 2px rgba(143, 165, 184, 0.2);
}

.btn-full {
    width: 100%;
    padding: 12px 22px;
}

/* ==========================================================================
   主布局
   ========================================================================== */
.layout {
    display: flex;
    gap: var(--layout-gap);
    max-width: 1080px;
    margin: 24px auto 0;
    padding: 0 24px;
    align-items: flex-start;
}

/* ---------- 左侧栏 ---------- */
.sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + 32px);
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 24px 20px;
    border-radius: var(--radius-lg);
}

.sidebar-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 16px;
}

.sidebar-profile-guest {
    /* 游客模式样式 */
}

.sidebar-guest-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: rgba(168, 184, 200, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--text-muted);
}

.sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-name {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.sidebar-username {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sidebar-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.sidebar-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform var(--duration-fast) var(--ease-soft);
}

.stat:hover {
    transform: translateY(-2px);
}

.stat-num {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Noto Serif SC', serif;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 侧边栏导航 */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    transition: background var(--duration-base) var(--ease-soft),
                color var(--duration-base) var(--ease-soft),
                padding-left var(--duration-base) var(--ease-soft);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    padding-left: 20px;
}

.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-weight: 500;
}

.nav-item-secondary {
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 16px;
}

.nav-item-secondary:hover {
    color: var(--text-secondary);
    padding-left: 16px;
}

/* ==========================================================================
   中间动态流
   ========================================================================== */
.main-content {
    flex: 1;
    min-width: 0;
    max-width: var(--content-max-width);
}

/* ---------- 动态卡片 ---------- */
.post-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 20px 22px;
    margin-bottom: 18px;
    transition: transform var(--duration-slow) var(--ease-soft),
                box-shadow var(--duration-slow) var(--ease-soft);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-hover);
}

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

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

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

.post-nickname {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    line-height: 1.4;
}

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

.post-category-tag {
    color: var(--accent-deep);
    background: var(--accent-soft);
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
}

.post-content {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 14px;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 信息流卡片截断 */
.post-body--feed .post-content {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(15px * 1.75 * 3); /* 3行高度 */
    margin-bottom: 8px;
}
.post-body--feed .post-images {
    max-height: 180px;
    overflow: hidden;
}
.post-body--feed .post-images.count-1 .post-image {
    max-height: 180px;
    object-fit: cover;
}

/* 九宫格配图 */
.post-images {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-images.count-1 { grid-template-columns: 1fr; max-width: 70%; }
.post-images.count-2 { grid-template-columns: repeat(2, 1fr); }
.post-images.count-3 { grid-template-columns: repeat(3, 1fr); }
.post-images.count-4 { grid-template-columns: repeat(2, 1fr); }
.post-images.count-5,
.post-images.count-6 { grid-template-columns: repeat(3, 1fr); }
.post-images.count-7,
.post-images.count-8,
.post-images.count-9 { grid-template-columns: repeat(3, 1fr); }

.post-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform var(--duration-slow) var(--ease-soft),
                opacity var(--duration-base) var(--ease-soft);
}

.post-images.count-1 .post-image {
    aspect-ratio: auto;
    max-height: 420px;
    border-radius: var(--radius-md);
}

.post-image:hover {
    transform: scale(1.02);
    opacity: 0.92;
}

/* 操作栏 */
.post-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

.post-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    transition: background var(--duration-base) var(--ease-soft),
                color var(--duration-base) var(--ease-soft);
}

.post-action:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.post-action.liked {
    color: var(--like-color);
}

.post-action-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.post-action-count {
    font-variant-numeric: tabular-nums;
}

/* 点赞心形图标 */
.icon-heart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.post-action.liked .icon-heart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E8838A' stroke='%23E8838A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}

.icon-comment {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ---------- 关注按钮 ---------- */
.btn-follow {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-on-accent);
    background: linear-gradient(135deg, var(--color-mist-blue), var(--accent-deep));
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(143, 165, 184, 0.25);
    transition: transform var(--duration-base) var(--ease-soft),
                box-shadow var(--duration-base) var(--ease-soft),
                background var(--duration-base) var(--ease-soft);
}

.btn-follow:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(143, 165, 184, 0.35);
}

.btn-follow.following {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   评论区域
   ========================================================================== */
.comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}

.comments-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.comment {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

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

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}

.comment-nickname {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.comment-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
}

.comment-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.comment-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    outline: none;
    resize: none;
    min-height: 40px;
    line-height: 1.5;
    transition: border-color var(--duration-base) var(--ease-soft),
                box-shadow var(--duration-base) var(--ease-soft);
}

.comment-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   发布动态表单
   ========================================================================== */
.post-form {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    margin-bottom: 18px;
}

.post-form-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.post-form textarea {
    width: 100%;
    min-height: 140px;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    line-height: 1.7;
    transition: border-color var(--duration-base) var(--ease-soft),
                box-shadow var(--duration-base) var(--ease-soft);
}

.post-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgba(255, 255, 255, 0.85);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--duration-base) var(--ease-soft),
                box-shadow var(--duration-base) var(--ease-soft);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgba(255, 255, 255, 0.85);
}

.form-error {
    display: none;
    color: var(--indicator-red);
    font-size: 12px;
    margin-top: 4px;
}

.form-error.show {
    display: block;
}

/* ---------- 图片上传预览 ---------- */
.image-upload-area {
    border: 2px dashed var(--border-soft);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color var(--duration-base) var(--ease-soft),
                background var(--duration-base) var(--ease-soft);
}

.image-upload-area:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.03);
}

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

.image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration-fast) var(--ease-soft);
}

.image-remove:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   公告：右下角 Banner（默认展开，透明背景+白字，无动画）
   ========================================================================== */
.announce-corner {
    position: fixed;
    right: 24px;
    bottom: 260px;
    z-index: 90;
    width: 320px;
    max-height: 400px;
    overflow: hidden;
    padding: 0;
    border-radius: var(--radius-md);
    border-left: 4px solid rgba(255, 255, 255, 0.8);
    /* 黄色透明背景（默认） */
    background: rgba(232, 179, 57, 0.55);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.announce-corner.color-red {
    background: rgba(217, 83, 79, 0.55);
    border-left-color: rgba(255, 255, 255, 0.8);
}

.announce-corner.color-yellow {
    background: rgba(232, 179, 57, 0.55);
    border-left-color: rgba(255, 255, 255, 0.8);
}

.announce-corner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    white-space: nowrap;
}

.announce-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.color-red .announce-indicator {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.announce-corner-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.announce-close {
    margin-left: auto;
    width: 24px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-soft);
}

.announce-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.announce-corner-body {
    padding: 0 16px 14px;
    font-size: 13px;
    color: #fff;
    line-height: 1.6;
    white-space: normal;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   公告：居中弹窗
   ========================================================================== */
.announce-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(44, 44, 44, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    animation: overlay-fade-in var(--duration-slow) var(--ease-soft) forwards;
}

@keyframes overlay-fade-in {
    to { opacity: 1; }
}

.announce-popup {
    width: 100%;
    max-width: 440px;
    padding: 32px 28px 24px;
    border-radius: var(--radius-xl);
    text-align: center;
    transform: scale(0.92);
    opacity: 0;
    animation: popup-scale-in var(--duration-slow) var(--ease-soft) 80ms forwards;
}

@keyframes popup-scale-in {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.announce-popup-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.announce-popup-content {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: left;
    max-height: 50vh;
    overflow-y: auto;
}

/* ==========================================================================
   分页
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 32px 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    box-shadow: var(--glass-shadow);
    transition: transform var(--duration-base) var(--ease-soft),
                background var(--duration-base) var(--ease-soft),
                color var(--duration-base) var(--ease-soft);
}

.page-link:hover {
    transform: translateY(-2px);
    background: var(--glass-bg-strong);
    color: var(--accent-deep);
}

.page-info {
    font-size: 14px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    padding: 0 8px;
}

/* ==========================================================================
   底部 Tab（仅手机端，默认隐藏）
   ========================================================================== */
.bottom-tab {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 56px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-glass);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    transition: color var(--duration-base) var(--ease-soft);
}

.tab-item.active,
.tab-item:active {
    color: var(--accent-deep);
}

.tab-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* ==========================================================================
   页脚
   ========================================================================== */
.footer {
    margin-top: 48px;
    padding: 28px 24px 36px;
    text-align: center;
}

.footer-content {
    max-width: 640px;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-family: 'Noto Serif SC', serif;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color var(--duration-fast) var(--ease-soft);
}

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

/* ==========================================================================
   RSS 订阅弹窗
   ========================================================================== */
.rss-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rss-modal {
    width: 100%;
    max-width: 460px;
    padding: 28px;
    animation: rssModalIn 0.3s var(--ease-soft);
}

@keyframes rssModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rss-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rss-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.rss-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color var(--duration-fast);
}

.rss-modal-close:hover {
    color: var(--text-primary);
}

.rss-modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.6;
}

.rss-link-row {
    display: flex;
    gap: 8px;
}

.rss-link-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
}

.rss-copy-btn {
    white-space: nowrap;
    padding: 10px 18px;
    font-size: 14px;
}

/* ==========================================================================
   侧边栏分隔线
   ========================================================================== */
.sidebar-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 8px 0;
}

/* ==========================================================================
   通用工具类
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

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

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
}

/* ==========================================================================
   下拉刷新指示器
   ========================================================================== */
.pull-refresh {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    z-index: 95;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--duration-slow) var(--ease-soft),
                opacity var(--duration-base) var(--ease-soft);
    opacity: 0;
    pointer-events: none;
}

.pull-refresh.visible {
    opacity: 1;
}

.pull-refresh.refreshing {
    transform: translateX(-50%) translateY(80px);
}

.pull-refresh-icon {
    width: 22px;
    height: 22px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    transition: transform var(--duration-base) var(--ease-soft);
}

.pull-refresh.refreshing .pull-refresh-icon {
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   通知提示
   ========================================================================== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 300;
    padding: 12px 24px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    box-shadow: var(--glass-shadow-hover);
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--duration-slow) var(--ease-soft),
                opacity var(--duration-slow) var(--ease-soft);
}

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

/* ==========================================================================
   滚动条美化
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 184, 200, 0.4);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 184, 200, 0.6);
}

/* 选中文字颜色 */
::selection {
    background: var(--accent-soft);
    color: var(--text-primary);
}

/* ==========================================================================
   富文本正文展示：代码块、链接、图片
   ========================================================================== */
.post-content pre,
.feed-card-content pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 14px 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}
.post-content code,
.feed-card-content code {
    background: rgba(90, 122, 154, 0.1);
    color: #5a7a9a;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}
.post-content pre code,
.feed-card-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
}
.post-content a,
.feed-card-content a {
    color: #5a7a9a;
    text-decoration: underline;
    word-break: break-all;
}
.post-content a:hover,
.feed-card-content a:hover {
    color: #3d5a7a;
}
.post-content img,
.feed-card-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 4px 0;
}
.post-content strong,
.feed-card-content strong,
.post-content b,
.feed-card-content b {
    font-weight: 700;
}
.post-content em,
.feed-card-content em,
.post-content i,
.feed-card-content i {
    font-style: italic;
}

/* 风险提示弹窗 */
.risk-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s;
}
.risk-modal-overlay.show {
    opacity: 1;
}
.risk-modal {
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.2s;
}
.risk-modal-overlay.show .risk-modal {
    transform: scale(1);
}
.risk-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
    font-weight: 700;
}
.risk-modal-title {
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 8px;
    color: #2c2c2c;
}
.risk-modal-desc {
    font-size: 13px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin: 0 0 16px;
}
.risk-modal-url {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: monospace;
    font-size: 12px;
    color: #333;
    word-break: break-all;
    max-height: 80px;
    overflow: auto;
    margin-bottom: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.risk-modal-actions {
    display: flex;
    gap: 10px;
}
.risk-modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
    font-family: inherit;
}
.risk-modal-btn:hover {
    opacity: 0.85;
}
.risk-modal-btn-cancel {
    background: #f0f0f0;
    color: #666;
}
.risk-modal-btn-confirm {
    background: #e67e22;
    color: #fff;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
