/**
 * 表白墙首页样式 - 毛玻璃重构版
 * 版本: v1.12.0 UI重构 + 音乐按钮顶部居中
 */
/* ========== 防黑屏闪烁：html 纯色背景兜底 ========== */
html {
    background: #f5f7ff;
    -webkit-text-size-adjust: 100%;
}
/* ========== CSS变量 ========== */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --bg: #f0f4ff;
    --text: #1a1a2e;
    --card-bg: rgba(255,255,255,0.78);
    --card-shadow: 0 8px 32px rgba(0,0,0,0.06);
    --radius: 20px;
    --radius-sm: 14px;
    --bg-close-btn: rgba(0,0,0,0.05);
    --bg-close-btn-hover: rgba(0,0,0,0.1);
    --announcement-text-color: #666;
    --ad-popup-text-color: #666;
}
/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    /* 底部留白：导航栏高度(约60px) + 发布按钮空间 + safe-area */
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}
/* ========== 头部 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding: 12px 20px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
}
.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.header-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 在线人数标签 */
.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #4caf50;
    width: fit-content;
}
.online-dot {
    width: 7px;
    height: 7px;
    background: #4caf50;
    border-radius: 50%;
    position: relative;
    animation: onlinePulse 2s ease-in-out infinite;
}
.online-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: rgba(76, 175, 80, 0.3);
    border-radius: 50%;
    animation: onlineRipple 2s ease-out infinite;
}
@keyframes onlinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes onlineRipple {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}
.search-box {
    position: relative;
    width: 100px;
    min-width: 0;
    flex-shrink: 1;
}
.search-input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border: 1.5px solid rgba(0,0,0,0.06);
    border-radius: 30px;
    background: rgba(255,255,255,0.9);
    font-size: 13px;
    transition: all 0.3s ease;
    color: var(--text);
}
.search-input::placeholder {
    color: #aaa;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.12);
    background: #fff;
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}
.header-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--primary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.header-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.header-avatar-mini:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb),0.4);
}
/* ========== Tab 切换栏 ========== */
.tab-bar {
    max-width: 600px;
    margin: 12px auto 0;
    padding: 0 16px;
}
.tab-bar {
    display: flex;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 4px;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.2);
}
.tab-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    background: transparent;
    color: var(--text);
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab-btn i {
    margin-right: 6px;
}
.tab-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    opacity: 1;
}
.tab-btn:hover:not(.active) {
    opacity: 0.9;
}
/* ========== 主内容 ========== */
.main-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 16px calc(90px + env(safe-area-inset-bottom, 0px));
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
/* ========== 帖子卡片 ========== */
.post-card {
    background: var(--card-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    content-visibility: auto;
    contain-intrinsic-size: 200px;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.post-card:active {
    transform: scale(0.98);
}
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-right: 12px;
    flex-shrink: 0;
}
.post-user-info {
    flex: 1;
    min-width: 0;
}
.post-nickname {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.post-time {
    font-size: 12px;
    color: #999;
    margin-top: 1px;
}
.post-topic-wrap {
    margin-bottom: 8px;
}
.post-topic {
    display: inline-block;
    background: rgba(var(--primary-rgb),0.08);
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 12px;
    color: var(--primary);
}
.post-topic i {
    margin-right: 3px;
    font-size: 10px;
}
.post-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 12px;
    word-break: break-word;
    white-space: pre-line;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.media-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f0edf5;
}
.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-item video {
    background: #111;
}
.media-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: 28px;
}
.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 22px;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.04);
}
.action-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.action-group.left {
    gap: 6px;
}
.action-group.right {
    gap: 2px;
}
.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 10px;
    border-radius: 30px;
    background: transparent;
    border: none;
}
.action-btn:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb),0.06);
}
.action-btn i {
    font-size: 16px;
}
.action-btn span {
    font-size: 12px;
    font-weight: 500;
}
.action-btn.liked {
    color: var(--heart-color, #ec407a);
}
.action-btn.liked:hover {
    color: var(--heart-color, #ec407a);
    background: rgba(var(--heart-rgb, 236, 64, 122), 0.08);
}
.action-btn.favorited {
    color: #ffa726;
}
.action-btn.favorited:hover {
    color: #ffa726;
    background: rgba(255,167,38,0.08);
}
.action-btn.share-btn,
.action-btn.report-btn {
    padding: 4px 8px;
}
.action-btn.share-btn:hover,
.action-btn.report-btn:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb),0.06);
}
.comments-preview {
    border-top: 1px solid rgba(0,0,0,0.04);
    padding-top: 10px;
    margin-top: 10px;
}
.comment-preview-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 6px;
    margin-bottom: 2px;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.comment-preview-item:hover {
    background: rgba(var(--primary-rgb),0.04);
}
.comment-preview-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.06);
}
.comment-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-preview-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}
.comment-preview-nickname {
    font-weight: 600;
    font-size: 12px;
    color: var(--text);
}
.comment-preview-nickname::after {
    content: ':';
    color: #ccc;
}
.comment-preview-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.view-more-wrapper {
    text-align: center;
    padding: 4px 0;
}
.view-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    padding: 3px 14px;
    border-radius: 30px;
    background: rgba(var(--primary-rgb),0.05);
    transition: all 0.3s ease;
}
.view-more:hover {
    background: rgba(var(--primary-rgb),0.12);
    transform: translateY(-1px);
}
.view-more i {
    font-size: 11px;
}
/* ========== 底部导航 ========== */
.bottom-nav {
    /* 强制固定定位，避免被 JS 清空内联样式或祖先 transform 降级为 static 后随内容下沉 */
    position: fixed !important;
    /* 关键：脱离文档流后必须显式声明视口锚点，否则在部分 WebView 中会回退到"跟随文档流" */
    top: auto !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px;
    right: 12px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0,0,0,0.06);
    border-radius: 28px;
    padding: 6px 16px calc(env(safe-area-inset-bottom, 0px) + 6px);
    z-index: 1000;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 28px rgba(0,0,0,0.12);
    /* 不要 contain: layout paint —— 它在 Android WebView 上会让 fixed 失效 */
    -webkit-overflow-scrolling: touch;
    /* 动画只改变透明度，且不保留 final 状态的 transform，防止生成 containing block */
    animation: navSlideUp 0.3s ease-out both;
    /* 强制独立合成层，规避移动端滚动时 fixed 被重新定位 */
    transform: none;
    will-change: opacity;
}

/* 隐藏底部导航栏（个人中心、发帖等新页面使用） */
.hide-bottom-nav .bottom-nav {
    display: none !important;
}
.hide-bottom-nav .fab-publish,
.hide-bottom-nav .fab-btn {
    display: none !important;
}

/* 有全屏遮罩层打开时隐藏底部导航与发布按钮
   （弹窗、视频/图片查看器、登录注册等，由 main.js 统一切换 body 上的这个 class）
   用 opacity/visibility 过渡而非 display，避免出现瞬间闪烁；
   pointer-events:none 确保不可点击，避免误导用户。 */
body.chrome-hidden .bottom-nav,
body.chrome-hidden .fab-publish,
body.chrome-hidden .fab-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

/* 【v1.13.2】弹窗层必须高于底部导航。
   main.js 会把 .bottom-nav 的内联 z-index 写到 99999、FAB 写到 99998，
   而部分弹窗（如 .auth-modal）CSS 里只有 2000 —— 结果导航栏浮在登录弹窗之上，
   遮挡弹窗底部按钮并可能被误点。此处统一抬升各弹窗层级。
   注意：仅用 CSS 兜底，不依赖 JS 是否执行。 */
.publish-modal,
.comment-modal,
.report-modal,
.media-modal,
.appeal-modal,
.auth-modal {
    z-index: 100000 !important;
}
/* 弹窗前若另有独立遮罩层，同样抬升 */
.modal-overlay,
.publish-overlay,
[class*="modal"] > [class*="overlay"] {
    z-index: 100050 !important;
}
.nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #999;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 12px;
    border-radius: 30px;
    -webkit-tap-highlight-color: transparent;
}
.nav-item:active {
    transform: scale(0.92);
}
.nav-item:hover,
.nav-item.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}
.nav-item i {
    font-size: 20px;
}
/* 底部导航中间凸起发布按钮 */
.nav-publish-item {
    position: relative;
    padding: 0;
    background: transparent !important;
}
.nav-publish-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
    margin-top: -20px;
    transition: all 0.2s ease;
}
.nav-publish-item:active .nav-publish-btn {
    transform: scale(0.9);
}
.nav-publish-item:hover {
    background: transparent !important;
}
/* ========== 浮动发布按钮（启用，替代底部导航中间按钮） ========== */
.fab-publish {
    display: flex;
    position: fixed;
    right: 18px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 6px 24px rgba(var(--primary-rgb),0.45);
    transition: all 0.3s ease;
    animation: fabIn 0.5s ease;
    -webkit-tap-highlight-color: transparent;
}
.fab-publish:hover {
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 8px 32px rgba(var(--primary-rgb),0.55);
}
.fab-publish:active {
    transform: scale(0.95) rotate(90deg);
}
.fab-publish i {
    font-size: 24px;
}
@keyframes fabIn {
    from { opacity: 0; transform: scale(0) rotate(-90deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}
/* ========== 音乐控制 - 头部内 ========== */
.music-control {
    position: relative;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(var(--primary-rgb),0.35);
    transition: all 0.3s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 18px rgba(var(--primary-rgb),0.5);
}
.music-control.playing {
    animation: musicPulse 1s ease infinite;
}
@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.music-control.external-music {
    width: auto;
    height: 32px;
    padding: 0 12px;
    border-radius: 18px;
    gap: 5px;
}
.music-control i {
    font-size: 15px;
}
.music-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: #e53935;
    border-radius: 8px;
    font-size: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid var(--bg-color, #fff);
}
.music-control.music-error {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}
.music-control.music-error:hover {
    transform: none;
}
.music-control.music-error::after {
    content: '×';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #e53935;
    border-radius: 50%;
    font-size: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.music-type-indicator {
    font-size: 11px;
    font-weight: 500;
}
/* ========== 弹窗 ========== */
.publish-modal,
.comment-modal,
.report-modal,
.media-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 28, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    align-items: flex-end;
    justify-content: center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
/* 登录/注册弹窗：居中显示 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 28, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    padding: 16px;
    box-sizing: border-box;
}
/* 媒体预览弹窗例外：居中显示，黑色背景 */
.media-modal {
    align-items: center;
    background: rgba(0,0,0,0.92);
    backdrop-filter: none;
}
.media-modal-content {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}
.publish-modal.active,
.auth-modal.active,
.comment-modal.active,
.report-modal.active,
.media-modal.active {
    display: flex;
}
.publish-content,
.report-content,
.comment-content {
    position: relative;
    z-index: 10;
    background: #f7f8fc;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px 28px 0 0;
    padding: 0 0 calc(env(safe-area-inset-bottom, 0) + 16px);
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 -12px 50px rgba(0,0,0,0.22);
    animation: drawerUp 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}
/* 登录/注册弹窗内容：居中圆角 */
.auth-content {
    position: relative;
    z-index: 10;
    background: #fff;
    border-radius: 20px;
    padding: 0;
    width: 100%;
    max-width: 400px;
    max-height: min(88vh, 720px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: modalPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
    box-sizing: border-box;
    outline: none;
}
.auth-content:focus {
    outline: none;
}
@keyframes modalPop {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes drawerUp {
    from { transform: translateY(100%); opacity: 0.4; }
    to { transform: translateY(0); opacity: 1; }
}
.comment-content::before,
.report-content::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(0,0,0,0.12);
    border-radius: 2px;
    margin: 10px auto 0;
}
.auth-header,
.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04), rgba(var(--secondary-rgb), 0.04));
    flex-shrink: 0;
}
.auth-title,
.report-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-title i { color: var(--primary); }
.report-title i { color: #ef5350; }
.auth-close,
.report-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.25s;
    font-size: 15px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.auth-close:hover,
.report-close:hover {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    transform: rotate(90deg);
}
.auth-close:active,
.report-close:active {
    transform: rotate(90deg) scale(0.9);
}
/* PC 端隐藏返回箭头，手机端显示 */
.auth-back {
    display: none;
}
.auth-content > form,
.report-content > form {
    padding: 0 20px 24px;
}
.auth-content .form-group:last-of-type {
    margin-bottom: 18px;
}
/* 表单输入 - 统一主题色焦点 */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 13px 16px;
    background: #fff;
    border: 1.5px solid #e8eaf3;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    color: var(--text);
    box-sizing: border-box;
    font-family: inherit;
    -webkit-text-size-adjust: 100%;
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
    background: #fff;
}
.form-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.6;
}
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a4d65;
    margin-bottom: 7px;
}
.btn-primary,
.publish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    box-shadow: 0 6px 18px rgba(var(--primary-rgb),0.32);
}
.btn-primary:hover,
.publish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(var(--primary-rgb),0.42);
}
.btn-primary:active,
.publish-btn:active {
    transform: scale(0.97);
}
.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #8c8fa4;
}
.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ========== 第三方登录按钮 ========== */
.oauth-login-section {
    margin-top: 18px;
}
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 14px;
    color: #b0b3c0;
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,0.08);
}
.auth-divider span { padding: 0 12px; }
.oauth-btn-group {
    display: flex;
    justify-content: center;
    gap: 14px;
}
.oauth-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.04);
    color: var(--oauth-color, #666);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(0,0,0,0.06);
}
.oauth-btn:hover {
    background: var(--oauth-color, #666);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--oauth-color, #666) 35%, transparent);
}
.oauth-btn:active { transform: scale(0.92); }
.qq-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.qq-input-group .form-input { flex: 1; }
.avatar-preview {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e8eaf3;
}
/* ========== 评论弹窗 - 全新设计 ========== */
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), rgba(var(--secondary-rgb), 0.06));
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
}
.comment-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.comment-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
}
.comment-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.comment-header-text .comment-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}
.comment-count-badge {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    background: rgba(var(--primary-rgb), 0.1);
    padding: 2px 8px;
    border-radius: 8px;
    display: inline-block;
    width: fit-content;
}
.comment-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.25s;
    font-size: 14px;
    flex-shrink: 0;
}
.comment-close:hover {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    transform: rotate(90deg);
}

/* 评论列表 */
.comment-list {
    max-height: 48vh;
    overflow-y: auto;
    padding: 12px 16px;
    -webkit-overflow-scrolling: touch;
}
.comment-list::-webkit-scrollbar { width: 4px; }
.comment-list::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb), 0.2); border-radius: 2px; }

/* 单条评论项 */
.comment-list-item {
    display: flex;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 14px;
    margin-bottom: 6px;
    transition: background 0.2s;
    position: relative;
}
.comment-list-item:hover {
    background: rgba(var(--primary-rgb), 0.03);
}
.comment-list-item.pinned-comment {
    background: linear-gradient(135deg, rgba(255,152,0,0.06), rgba(255,152,0,0.02));
    border-left: 3px solid #ff9800;
    padding-left: 14px;
}
.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(var(--primary-rgb), 0.1);
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.comment-time {
    font-size: 11px;
    color: #b0b3c6;
    margin-left: auto;
}
.comment-pinned-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #ff9800;
    background: rgba(255,152,0,0.12);
    padding: 2px 6px;
    border-radius: 5px;
}
.comment-reply-to {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(var(--primary-rgb), 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    width: fit-content;
}
.comment-text {
    font-size: 14px;
    color: #3a3d55;
    line-height: 1.65;
    word-break: break-word;
}
.comment-actions {
    display: flex;
    gap: 14px;
    margin-top: 6px;
}
.comment-reply-btn {
    font-size: 12px;
    color: #8c8fa4;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    cursor: pointer;
}
.comment-reply-btn:hover {
    color: var(--primary);
}
.comment-reply-btn i {
    font-size: 11px;
}

/* 加载与空状态 */
.loading-comments, .no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #b0b3c6;
    font-size: 14px;
}
.loading-comments i, .no-comments i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    color: rgba(var(--primary-rgb), 0.3);
}
.no-comments i {
    color: rgba(var(--primary-rgb), 0.25);
}

/* 展开按钮 */
.comment-expand-area {
    text-align: center;
    padding: 12px 0 6px;
}
.comment-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 20px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.comment-expand-btn:hover {
    background: rgba(var(--primary-rgb), 0.12);
    transform: translateY(-1px);
}
.comment-expand-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 回复提示条 */
.comment-reply-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--secondary-rgb), 0.08));
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 8px;
}
.comment-reply-hint i {
    color: var(--primary);
}
.comment-reply-hint a {
    color: #ef5350;
    margin-left: auto;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

/* 输入区 */
.comment-input-area {
    padding: 12px 16px calc(env(safe-area-inset-bottom, 0) + 12px);
    border-top: 1px solid rgba(var(--primary-rgb), 0.08);
    background: #fff;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
}
.comment-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.comment-input {
    flex: 1;
    min-height: 46px;
    max-height: 120px;
    padding: 12px 16px;
    background: #f4f5fa;
    border: 1.5px solid #e8eaf3;
    border-radius: 16px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    transition: all 0.2s ease;
}
.comment-input::placeholder {
    color: #b0b3c6;
}
.comment-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}
.comment-submit {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.45);
}
.comment-submit:active { transform: scale(0.92); }
.comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.comment-char-count {
    font-size: 11px;
    color: #b0b3c6;
    text-align: right;
    margin-top: 6px;
    padding-right: 4px;
}
/* 表情选择器 */
.emoji-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.emoji-toggle-btn {
    width: 46px;
    height: 46px;
    border: 1.5px solid #e8eaf3;
    border-radius: 14px;
    background: #f4f5fa;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.emoji-toggle-btn:hover {
    background: #fff;
    border-color: var(--primary);
}
.emoji-toggle-btn.active {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
}
.emoji-panel {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 240px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}
.emoji-panel.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.emoji-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f2f7;
}
.emoji-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.emoji-panel-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.emoji-panel-close:hover {
    color: #333;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 8px;
    max-height: 180px;
    overflow-y: auto;
}
.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}
.emoji-item:hover {
    background: #f0f2f7;
}
.report-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.reason-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid #e8eaf3;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #4a4d65;
}
.reason-item:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb),0.06);
}
.reason-item input { display: none; }
.reason-item input:checked + span {
    color: var(--primary);
    font-weight: 600;
}
.reason-item:has(input:checked) {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb),0.1);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.1);
}
/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 16px;
}
.empty-text {
    color: #999;
    font-size: 16px;
}
/* ========== 通用动画 ========== */
.fade-in {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ========== 广告 ========== */
.ad-scroll {
    background: linear-gradient(135deg, #ffa726, #ef5350);
    padding: 8px 0;
    overflow: hidden;
}
.ad-scroll-content {
    display: inline-block;
    animation: scroll 15s linear infinite;
    white-space: nowrap;
    color: #fff;
    font-size: 14px;
}
.ad-media {
    height: 24px;
    display: inline;
    vertical-align: middle;
    margin-right: 8px;
}
.ad-scroll-content video.ad-media {
    height: 44px;
    width: auto;
    display: inline-block;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
}
@keyframes scroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}
/* ========== 弹窗共用基础 ========== */
.ad-popup-modal,
.announcement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 32, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2400;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: overlayFade 0.25s ease;
}
.announcement-modal.active {
    display: flex;
}
@keyframes overlayFade {
    from { background: rgba(18, 18, 32, 0); }
    to { background: rgba(18, 18, 32, 0.55); }
}
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.9) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes iconPop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    60% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ========== 弹窗内容卡片（共用） ========== */
.ad-popup-content,
.announcement-content {
    position: relative;
    background: #fff;
    border-radius: 26px;
    padding: 0 0 calc(env(safe-area-inset-bottom, 0) + 18px);
    width: 100%;
    max-width: 420px;
    max-height: 84vh;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    animation: modalPopIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);
    display: flex;
    flex-direction: column;
}
/* ========== 头部（共用） ========== */
.ad-popup-header,
.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px 16px;
    position: relative;
    flex-shrink: 0;
}
.ad-popup-header h3,
.announcement-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    line-height: 1.3;
}
.ad-popup-header h3 i,
.announcement-header h3 i {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
    animation: iconPop 0.5s 0.1s both cubic-bezier(0.2, 1.4, 0.4, 1);
}
.ad-popup-header h3 i {
    background: linear-gradient(135deg, #ffa726, #f57c00);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.35);
}
.announcement-header h3 i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
}

/* ========== 关闭按钮（共用） ========== */
.ad-popup-close,
.announcement-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.25s ease;
    font-size: 14px;
    flex-shrink: 0;
}
.ad-popup-close:hover,
.announcement-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #555;
    transform: rotate(90deg);
}

/* ========== 广告弹窗内容 ========== */
.ad-popup-body {
    padding: 0 22px 18px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.ad-popup-media {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 14px;
    background: #f5f5f7;
}
.ad-popup-body video.ad-popup-media {
    object-fit: contain;
    background: #000;
}
.ad-popup-text {
    color: #4a4d65;
    line-height: 1.8;
    font-size: 14px;
    white-space: pre-line;
    background: linear-gradient(135deg, #fff8f0, #fff3e0);
    padding: 16px 18px;
    border-radius: 14px;
    border-left: 4px solid #ff9800;
    word-break: break-word;
}

/* ========== 公告弹窗内容 ========== */
.announcement-body {
    color: var(--text);
    line-height: 1.8;
    padding: 4px 22px 18px;
    font-size: 14.5px;
    text-align: left;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    word-break: break-word;
    white-space: pre-line;
}
.announcement-list {
    position: relative;
}
.announcement-item {
    display: none;
    background: linear-gradient(135deg, #f7f9ff 0%, #eef2ff 100%);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid #eef0f7;
    position: relative;
    overflow: hidden;
}
.announcement-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.announcement-item.active {
    display: block;
    animation: fadeInUp 0.35s ease;
}
.announcement-item-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.12);
    display: flex;
    align-items: center;
    gap: 8px;
}
.announcement-item-title i { color: var(--primary); font-size: 14px; }
.announcement-item-body {
    line-height: 1.8;
    color: #4a4d65;
    text-align: left;
    white-space: pre-line;
    word-break: break-word;
    font-size: 14px;
}

/* ========== 导航点 ========== */
.announcement-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    margin-bottom: 2px;
    flex-shrink: 0;
}
.announcement-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.14);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}
.announcement-dot:hover {
    background: rgba(var(--primary-rgb), 0.4);
}
.announcement-dot.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    width: 26px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.4);
}

/* ========== 底部确认按钮（共用） ========== */
.ad-popup-content > .btn-primary,
.announcement-content > .publish-btn {
    margin: 0 22px 0;
    width: calc(100% - 44px);
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.ad-popup-content > .btn-primary {
    background: linear-gradient(135deg, #ffa726, #f57c00);
    box-shadow: 0 8px 22px rgba(255, 152, 0, 0.35);
}
.ad-popup-content > .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(255, 152, 0, 0.42);
}
.ad-popup-content > .btn-primary:active {
    transform: translateY(0) scale(0.99);
}
.announcement-content > .publish-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.35);
}
.announcement-content > .publish-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.42);
}
.announcement-content > .publish-btn:active {
    transform: translateY(0) scale(0.99);
}
/* ========== Toast 提示 ========== */
.toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
}
.toast-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 14px;
    background: rgba(30, 30, 45, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border-radius: 14px;
    font-size: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    pointer-events: auto;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.toast-item.hide {
    animation: toastOut 0.3s ease forwards;
}
.toast-item i {
    font-size: 18px;
    flex-shrink: 0;
}
.toast-item.toast-info i { color: var(--primary, #667eea); }
.toast-item.toast-success i { color: #4caf50; }
.toast-item.toast-warning i { color: #ff9800; }
.toast-item.toast-error i { color: #ef5350; }
.toast-item.toast-music i { color: #ffa726; }
.toast-item .toast-text {
    line-height: 1.4;
    word-break: break-word;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-8px) scale(0.96); }
}

/* ========== Dialog 确认弹窗 ========== */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 28, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalOverlayIn 0.25s ease;
    box-sizing: border-box;
}
.dialog-overlay.hide {
    animation: toastOut 0.25s ease forwards;
}
.dialog-box {
    background: #fff;
    border-radius: 22px;
    width: 100%;
    max-width: 340px;
    padding: 28px 24px 22px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.28);
    animation: modalCardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dialog-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb),0.35);
}
.dialog-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.dialog-message {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 22px;
}
.dialog-actions {
    display: flex;
    gap: 12px;
}
.dialog-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.dialog-btn.dialog-cancel {
    background: #f3f4f8;
    color: #666;
}
.dialog-btn.dialog-cancel:hover {
    background: #e8eaf0;
}
.dialog-btn.dialog-ok {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.35);
}
.dialog-btn.dialog-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.45);
}
.dialog-btn:active {
    transform: scale(0.97);
}

/* ========== 封禁相关 ========== */
.post-banned-notice {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fff5f5, #ffebee);
    border-radius: 12px;
    margin: 10px;
}
.banned-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ef5350, #c62828);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #fff;
    font-size: 22px;
}
.banned-text {
    color: #c62828;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}
.banned-reason-text {
    color: #999;
    font-size: 13px;
    margin-bottom: 16px;
}
.appeal-btn {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(66,165,245,0.3);
}
.appeal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66,165,245,0.4);
}
.user-ban-modal,
.ban-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s;
    box-sizing: border-box;
}
.ban-card {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    padding: 0 0 16px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    animation: banSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
}
@keyframes banSlideUp {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.ban-card::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    margin: 12px auto 0;
}
.ban-icon-wrapper {
    padding: 16px 20px 0;
    text-align: center;
}
.ban-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ef5350, #c62828);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    animation: pulse 2s infinite;
    box-shadow: 0 10px 30px rgba(239,83,80,0.3);
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.ban-title {
    text-align: center;
    color: #c62828;
    font-size: 18px;
    font-weight: 700;
    margin: 14px 20px 6px;
}
.ban-subtitle {
    text-align: center;
    color: #8c8fa4;
    font-size: 13px;
    margin: 0 20px 18px;
    line-height: 1.6;
}
.ban-restrictions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 20px 16px;
}
.ban-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #f5d8d8;
    border-radius: 12px;
    color: #c62828;
    font-size: 12px;
}
.ban-tag i { font-size: 11px; }
.ban-info {
    background: #f8f9ff;
    border-radius: 14px;
    padding: 12px 16px;
    margin: 0 20px 18px;
    border: 1px solid #eef0f7;
    text-align: left;
}
.ban-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f1f7;
}
.ban-info-row:last-child { border-bottom: none; }
.ban-label {
    font-size: 12px;
    color: #8c8fa4;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.ban-value {
    font-size: 13px;
    color: var(--text);
    text-align: right;
    word-break: break-word;
    font-weight: 500;
}
.ban-value.empty {
    color: #bbb;
    font-style: italic;
}
.ban-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ban-btn:hover {
    transform: translateY(-1px);
}
.ban-btn:active { transform: scale(0.97); }
.ban-btn-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.35);
    margin-left: 8px;
}
.ban-btn-primary:hover {
    box-shadow: 0 8px 24px rgba(var(--primary-rgb),0.45);
}
.ban-btn-secondary {
    flex: 1;
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    box-shadow: none;
}
.ban-btn-secondary:hover {
    background: #f0f3ff;
}
.ban-actions {
    display: flex;
    margin: 0 20px;
    gap: 12px;
}

/* ========== 申诉弹窗 ========== */
.appeal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 28, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalOverlayIn 0.3s ease;
    box-sizing: border-box;
}
.appeal-modal.active {
    display: flex;
}
@keyframes modalOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.appeal-content {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.28);
    animation: modalCardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}
@keyframes modalCardIn {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.appeal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f1f7;
    position: relative;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.04), rgba(var(--secondary-rgb),0.04));
}
.appeal-header::after {
    content: '';
    position: absolute;
    left: 24px;
    bottom: -1px;
    width: 28px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}
.appeal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.appeal-title i { color: var(--primary); }
.appeal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: all 0.25s;
    border: none;
    font-size: 16px;
}
.appeal-close:hover {
    background: rgba(var(--primary-rgb),0.12);
    color: var(--primary);
    transform: rotate(90deg);
}
.appeal-content form {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.appeal-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.appeal-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 5px;
}
.appeal-form-group label::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
}
.appeal-select,
.appeal-input,
.appeal-textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid #e8eaf3;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text);
    background: #f8f9ff;
    transition: all 0.25s ease;
    font-family: inherit;
    box-sizing: border-box;
}
.appeal-select:focus,
.appeal-input:focus,
.appeal-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.12);
}
.appeal-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}
.appeal-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.appeal-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 6px;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.35);
}
.appeal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(var(--primary-rgb),0.45);
}
.appeal-submit:active {
    transform: scale(0.98);
}
/* ========== 等级徽章 ========== */
.level-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.6;
    vertical-align: middle;
    margin-left: 4px;
    white-space: nowrap;
}
.level-badge.level-1 { background: #999999; color: #fff; }
.level-badge.level-2 { background: #4caf50; color: #fff; }
.level-badge.level-3 { background: #2196f3; color: #fff; }
.level-badge.level-4 { background: #9c27b0; color: #fff; }
.level-badge.level-5 { background: linear-gradient(135deg, #ff9800, #f44336); color: #fff; }
/* ========== 用户标签 ========== */
.user-tag {
    display: inline-block;
    vertical-align: middle;
    transition: all 0.2s ease;
}
.user-tag:hover {
    transform: scale(1.05);
}
.admin-badge {
    background: linear-gradient(135deg, #ff9800, #ffa726);
    color: #fff;
    font-size: 10px;
    padding: 1px 10px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 500;
}

/* 【v1.13.6】帖子上的 VIP 专属标识（列表 + 详情通用） */
.vip-post-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    font-size: 10px;
    padding: 1px 9px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 600;
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(255, 152, 0, 0.35);
}

.vip-post-badge i {
    font-size: 9px;
}
.post-qq-badge {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    font-size: 10px;
    padding: 1px 10px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.post-qq-badge i {
    font-size: 11px;
}
/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header-title { font-size: 18px; }
    .search-box { width: 100px; }
    .search-input { font-size: 12px; padding: 6px 10px 6px 30px; }
    .post-card { padding: 14px; }
    .post-avatar { width: 38px; height: 38px; }
    .post-content { font-size: 14px; }
    .post-actions { gap: 8px; }
    .action-btn { font-size: 12px; padding: 2px 6px; }
    .fab-publish { width: 48px; height: 48px; bottom: 80px; right: 16px; }
    .fab-publish i { font-size: 22px; }
    .tab-btn { font-size: 13px; padding: 8px 0; }
    .bottom-nav { padding: 6px 12px calc(env(safe-area-inset-bottom, 0px) + 6px); }
    .nav-item { font-size: 10px; padding: 2px 10px; }
    .nav-item i { font-size: 18px; }
    .music-control {
        top: 12px;
        width: 34px;
        height: 34px;
    }
    .music-control i {
        font-size: 15px;
    }

    /* 平板端 auth 弹窗 */
    .auth-modal { padding: 20px; }
    .auth-content { max-width: 380px; }
}
/* ========== 响应式：移动端优化 ========== */
@media (max-width: 480px) {
    .header { padding: 8px 12px; }
    .header-content { gap: 8px; }
    .header-left { gap: 0; }
    .header-title { 
        font-size: 16px; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    .online-badge {
        font-size: 10px;
        padding: 2px 8px;
        gap: 4px;
    }
    .online-dot { width: 6px; height: 6px; }
    .online-dot::after { width: 12px; height: 12px; }
    .header-actions { gap: 8px; flex: 1; justify-content: flex-end; }
    .search-box { 
        flex: 1; 
        min-width: 0;
        max-width: 100%;
    }
    .search-input { 
        font-size: 12px; 
        padding: 6px 10px 6px 32px; 
    }
    .search-icon { left: 10px; font-size: 12px; }
    .header-avatar-mini { width: 30px; height: 30px; }
    .post-card { padding: 12px 14px; border-radius: 16px; }
    .post-avatar { width: 32px; height: 32px; margin-right: 8px; }
    .post-nickname { font-size: 14px; }
    .post-content { font-size: 13px; }
    .media-grid { gap: 4px; }
    .tab-btn { font-size: 12px; padding: 6px 0; }
    .bottom-nav { padding: 6px 12px calc(env(safe-area-inset-bottom, 0px) + 6px); }
    .nav-item { font-size: 10px; padding: 2px 10px; }
    .nav-item i { font-size: 18px; }
    .action-btn { font-size: 11px; padding: 2px 4px; }
    .action-btn i { font-size: 14px; }
    .action-group.left { gap: 2px; }
    .comment-preview-avatar { width: 18px; height: 18px; }
    .comment-preview-nickname { font-size: 11px; }
    .comment-preview-text { font-size: 12px; }
    .publish-content,
    .report-content {
        padding: 16px;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    /* 手机端 auth 弹窗 */
    .auth-modal { padding: 0; align-items: stretch; }
    .auth-content {
        border-radius: 18px 18px 0 0;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        min-height: 100vh;
        min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        animation: drawerUp 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
    }
    .auth-header {
        padding: 16px 18px 12px;
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
        position: relative;
    }
    .auth-title { font-size: 16px; margin: 0 auto; }

    /* 手机端：显示左返回箭头，隐藏右 × 关闭 */
    .auth-back {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        border-radius: 50%;
        color: #555;
        font-size: 20px;
        cursor: pointer;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.2s;
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
    }
    .auth-back:active {
        background: rgba(0,0,0,0.06);
        transform: translateY(-50%) scale(0.92);
    }
    .auth-close { display: none; }
    .auth-content > form {
        padding: 4px 18px calc(env(safe-area-inset-bottom, 0) + 24px);
    }
    .auth-content .form-group { margin-bottom: 14px; }
    .auth-content .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }
    .auth-content .publish-btn {
        width: 100%;
        padding: 15px;
        font-size: 15px;
        margin-top: 6px;
    }
    .auth-switch {
        margin-top: 18px;
        font-size: 14px;
    }
    .avatar-preview { width: 40px; height: 40px; }

    .comment-content {
        padding: 16px;
        max-height: 70vh;
    }
    .music-control {
        top: 10px;
        width: 30px;
        height: 30px;
    }
    .music-control i {
        font-size: 13px;
    }
    .music-control.external-music {
        padding: 0 10px;
        border-radius: 16px;
    }
    .music-type-indicator {
        font-size: 10px;
    }

    /* 封禁弹窗移动端优化 */
    .ban-overlay { padding: 0; }
    .ban-card {
        border-radius: 20px;
        padding: 0 0 calc(env(safe-area-inset-bottom, 0) + 12px);
        max-height: 92vh;
    }
    .ban-card::before { width: 30px; height: 3px; margin: 8px auto 0; }
    .ban-icon-wrapper { padding: 16px 16px 0; }
    .ban-icon { width: 56px; height: 56px; font-size: 24px; border-radius: 16px; }
    .ban-title { font-size: 17px; margin: 12px 16px 4px; }
    .ban-subtitle { font-size: 12px; margin: 0 16px 14px; }
    .ban-restrictions { padding: 0 16px 12px; gap: 6px; }
    .ban-tag { font-size: 11px; padding: 4px 8px; }
    .ban-info { padding: 10px 14px; margin: 0 16px 14px; border-radius: 12px; }
    .ban-info-row { padding: 6px 0; gap: 8px; }
    .ban-label { font-size: 11px; }
    .ban-value { font-size: 12px; text-align: left; max-width: 60%; }
    .ban-btn { 
        margin: 0 16px; 
        width: calc(100% - 32px); 
        padding: 12px; 
        font-size: 14px;
    }
    .ban-actions {
        margin: 0 16px;
        gap: 10px;
    }
    .ban-actions .ban-btn {
        margin: 0;
        width: auto;
        flex: 1;
        padding: 12px 8px;
        font-size: 13px;
    }
    .ban-actions .ban-btn-primary {
        margin-left: 0;
    }
    
    /* 申诉弹窗移动端优化 */
    .appeal-content {
        border-radius: 20px;
        max-height: 92vh;
    }
    .appeal-header {
        padding: 16px 18px;
    }
    .appeal-content form {
        padding: 16px 18px 20px;
        gap: 12px;
    }
    .appeal-select,
    .appeal-input,
    .appeal-textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
    .appeal-textarea {
        min-height: 100px;
    }
    .appeal-submit {
        padding: 12px;
        font-size: 14px;
    }

/* ========== 投票功能样式 ========== */
.poll-block { margin-top: 4px; }
.poll-ic { background: linear-gradient(135deg, #ff9a56, #ff6b6b) !important; }
#pollOptionsGroup { padding: 0; }
.poll-options-list { display: flex; flex-direction: column; gap: 8px; }
.poll-option-row {
    display: flex; align-items: center; gap: 8px;
    background: rgba(var(--primary-rgb),0.06);
    border: 1.5px solid rgba(var(--primary-rgb),0.15);
    border-radius: 12px; padding: 8px 12px;
    transition: all 0.2s;
}
.poll-option-row:focus-within {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb),0.1);
}
.poll-option-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.poll-option-input {
    flex: 1; border: none; background: transparent;
    font-size: 14px; color: var(--text); outline: none;
    min-width: 0;
}
.poll-option-input::placeholder { color: #bbb; }
.poll-option-del {
    width: 24px; height: 24px; border: none; background: transparent;
    color: #ccc; cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.poll-option-del:hover { color: #ff6b6b; background: rgba(255,107,107,0.1); }
.poll-add-row { margin-top: 10px; }
.poll-add-btn {
    width: 100%; padding: 10px; border: 2px dashed rgba(var(--primary-rgb),0.3);
    background: transparent; border-radius: 12px; color: var(--primary);
    font-size: 13px; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.poll-add-btn:hover {
    border-color: var(--primary); background: rgba(var(--primary-rgb),0.05);
}
.poll-advanced {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex; flex-direction: column; gap: 10px;
}
.poll-advanced-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.poll-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #666; cursor: pointer;
}
.poll-label input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--primary);
}
.poll-max-wrap {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #666;
}
.poll-max-wrap select {
    padding: 4px 8px; border: 1px solid #ddd; border-radius: 8px;
    background: #fff; font-size: 13px; outline: none;
}
.poll-deadline-input {
    padding: 6px 10px; border: 1px solid #ddd; border-radius: 8px;
    font-size: 13px; background: #fff; outline: none; color: #666;
}
.poll-deadline-input:focus { border-color: var(--primary); }

/* 投票结果展示样式 */
.poll-container {
    margin-top: 12px; padding: 14px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.06), rgba(var(--secondary-rgb),0.04));
    border-radius: 14px; border: 1px solid rgba(var(--primary-rgb),0.1);
}
.poll-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; color: var(--primary);
    margin-bottom: 12px;
}
.poll-header i { font-size: 14px; }
.poll-ended-tag {
    margin-left: auto; font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 10px;
    background: rgba(255,107,107,0.1); color: #ff6b6b;
}
.poll-total {
    margin-left: auto; font-size: 12px; font-weight: 500;
    color: #888; font-weight: normal;
}
.poll-total::before { content: ''; margin-left: 0; }
.poll-header .poll-total { margin-left: auto; }
.poll-header > span:nth-child(3) { margin-left: auto; }
.poll-options { display: flex; flex-direction: column; gap: 8px; }

/* 可投票选项 */
.poll-option-row-vote {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #fff;
    border: 1.5px solid rgba(0,0,0,0.08); border-radius: 12px;
    cursor: pointer; transition: all 0.2s;
}
.poll-option-row-vote:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb),0.04);
}
.poll-option-row-vote.poll-active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb),0.08);
}
.poll-option-radio {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #ddd; flex-shrink: 0;
    transition: all 0.2s; position: relative;
}
.poll-option-row-vote.poll-active .poll-option-radio {
    border-color: var(--primary);
}
.poll-option-row-vote.poll-active .poll-option-radio::after {
    content: ''; position: absolute; inset: 3px;
    border-radius: 50%; background: var(--primary);
}
.poll-option-text {
    flex: 1; font-size: 14px; color: var(--text);
}

/* 投票结果行 */
.poll-result-row {
    position: relative; padding: 10px 14px;
    background: rgba(255,255,255,0.7); border-radius: 12px;
    overflow: hidden; transition: all 0.2s;
    display: flex; align-items: center; gap: 10px;
}
.poll-result-row.poll-selected {
    background: linear-gradient(90deg, rgba(var(--primary-rgb),0.15), rgba(var(--primary-rgb),0.05));
    border: 1px solid rgba(var(--primary-rgb),0.3);
}
.poll-bar {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.15; border-radius: 12px; transition: width 0.4s ease;
    z-index: 0;
}
.poll-result-row.poll-selected .poll-bar {
    opacity: 0.25;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.poll-option-label {
    flex: 1; position: relative; z-index: 1;
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; color: var(--text);
    min-width: 0;
}
.poll-check { color: var(--primary); font-size: 14px; }
.poll-text {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.poll-percent {
    position: relative; z-index: 1; flex-shrink: 0;
    font-size: 13px; font-weight: 600; color: var(--primary);
}

.poll-footer {
    display: flex; align-items: center; gap: 12px;
    margin-top: 12px;
}
.poll-vote-btn {
    padding: 9px 20px; border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border-radius: 24px; font-size: 13px;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; gap: 6px;
    font-weight: 500;
}
.poll-vote-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--primary-rgb),0.3); }
.poll-vote-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.poll-hint { font-size: 12px; color: #999; }
.poll-voted-hint {
    margin-top: 10px; padding: 8px 12px;
    background: rgba(var(--primary-rgb),0.08); border-radius: 10px;
    font-size: 12px; color: var(--primary);
    display: flex; align-items: center; gap: 6px;
}

/* 帖子卡片中的投票 */
.post-card .poll-container {
    margin-top: 10px; padding: 12px;
    font-size: 13px;
}
.post-card .poll-option-text,
.post-card .poll-text { font-size: 13px; }
.post-card .poll-percent { font-size: 12px; }
.post-card .poll-vote-btn { padding: 7px 16px; font-size: 12px; }

/* 详情页投票更大 */
.detail-container .poll-container {
    margin: 16px 0; padding: 18px;
}
.detail-container .poll-option-text,
.detail-container .poll-text { font-size: 15px; }
.detail-container .poll-percent { font-size: 14px; }
.detail-container .poll-vote-btn { padding: 10px 24px; font-size: 14px; }

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb),0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb),0.5);
}

/* ========== 过渡动画系统 ========== */

/* 页面加载动画 - 不使用 opacity:0 避免黑屏闪烁
   【重要】此动画曾用 transform 位移，配合 fill-mode:both 会在动画结束后
   把 transform 永久留在 body 上（计算值 matrix(1,0,0,1,0,0) 而非 none），
   导致 body 成为 fixed 元素的 containing block —— 底部导航会跟着文档流
   一起滚动（帖子越多越明显）。因此改为纯 opacity 动画，彻底不碰 transform。 */
@keyframes pageLoadIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.page-load {
    /* 禁止使用 transform 类动画，避免污染 body 的 transform 属性 */
    animation: pageLoadIn 0.3s ease-out both;
    /* 双保险：即使将来有人改回 transform 动画，也强制 body 不生成 containing block */
    transform: none !important;
}

/* 内容卡片渐入动画（错峰） */
@keyframes cardSlideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes cardFadeIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes cardSlideLeft {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes cardSlideRight {
    0% { opacity: 0; transform: translateX(30px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* 帖子卡片加载动画 */
.post-card {
    animation: cardSlideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* 帖子卡片错峰加载延迟 */
.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.10s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.20s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.30s; }
.post-card:nth-child(7) { animation-delay: 0.35s; }
.post-card:nth-child(8) { animation-delay: 0.40s; }

/* Tab切换动画 */
@keyframes tabSlideIn {
    0% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes tabSlideOut {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-20px); }
}

.tab-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    animation: tabSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* 头部元素加载动画 */
@keyframes headerSlideDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.header {
    animation: headerSlideDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    /* 顶部栏固定：滚动时始终吸顶，与底部栏同时可见 */
    position: sticky;
    top: 0;
    z-index: 900;
}

/* Tab栏加载动画 */
.tab-bar {
    animation: headerSlideDown 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

/* 底部导航加载动画 - 使用 opacity 替代 transform，避免残留 transform 破坏 fixed 定位 */
@keyframes navSlideUp {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.bottom-nav {
    animation: navSlideUp 0.3s ease-out 0.1s both;
}

/* 发布按钮加载动画 */
@keyframes fabPulse {
    0% { opacity: 0; transform: scale(0); }
    60% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}

.fab-publish {
    animation: fabPulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* 按钮涟漪效果 */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn-ripple:active::after {
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    0% { transform: scale(0, 0); opacity: 0.5; }
    100% { transform: scale(25, 25); opacity: 0; }
}

/* 涟漪点击效果（JS生成） */
.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 弹窗过渡动画增强 */
@keyframes modalSlideUp {
    0% { opacity: 0; transform: translateY(40px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* 输入框聚焦过渡 */
.input-animate {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.input-animate:focus {
    animation: inputPulse 0.3s ease;
}

@keyframes inputPulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0.1); }
    100% { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12); }
}

/* 图片加载淡入 */
@keyframes imageFadeIn {
    0% { opacity: 0; filter: blur(8px); }
    100% { opacity: 1; filter: blur(0); }
}

img {
    animation: imageFadeIn 0.4s ease;
}

/* 列表项进入动画 */
@keyframes listItemIn {
    0% { opacity: 0; transform: translateX(-15px); }
    100% { opacity: 1; transform: translateX(0); }
}

.comment-list-item {
    animation: listItemIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* 评论列表错峰 */
.comment-list-item:nth-child(1) { animation-delay: 0.02s; }
.comment-list-item:nth-child(2) { animation-delay: 0.06s; }
.comment-list-item:nth-child(3) { animation-delay: 0.10s; }
.comment-list-item:nth-child(4) { animation-delay: 0.14s; }
.comment-list-item:nth-child(5) { animation-delay: 0.18s; }

/* 加载指示器旋转 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spin {
    animation: spin 0.8s linear infinite;
}

/* 下拉刷新动画 */
@keyframes refreshSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.swipe-refresh-icon.spinning {
    animation: refreshSpin 0.8s linear infinite;
}

/* 卡片悬浮效果增强 */
.post-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 按钮按下弹性效果 */
.btn-bounce {
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-bounce:active {
    transform: scale(0.94);
}

/* 渐变文字动画 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

/* 点赞/收藏按钮状态切换 */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.action-btn.liked i,
.action-btn.favorited i {
    animation: heartBeat 0.5s ease;
}

/* 新消息提示动画 */
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* 骨架屏加载动画 */
@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.04) 25%, 
        rgba(0,0,0,0.08) 50%, 
        rgba(0,0,0,0.04) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* 内容切换平滑过渡 */
.content-swap {
    animation: contentSwap 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes contentSwap {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 全局过渡效果 */
* {
    -webkit-tap-highlight-color: transparent;
}

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


/* ========== 性能优化 ========== */

/* 页面加载淡入动画 - 让跳转更流畅 */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
body {
    animation: pageFadeIn 0.15s ease-out;
}

/* 帖子列表容器 - 虚拟化渲染 */
.posts-container {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* 底部导航栏 - 固定定位优化 */
.bottom-nav {
    contain: none !important;
}

/* 头部区域 - 限制重绘范围 */
header {
    contain: layout paint;
}

/* 弹窗 - 硬件加速 */
.modal, .auth-modal, .publish-sheet {
    will-change: transform, opacity;
}

/* 在线状态点 - 减少动画频率 */
.online-dot {
    animation-duration: 3s;
}

/* 滚动区域优化 */
main {
    contain: none !important;
}

/* 移动端 - 大幅减少backdrop-filter开销 */
@media (max-width: 768px) {
    .post-card,
    .header-bar,
    .bottom-nav .nav-content {
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }
}

/* respect 用户偏好：减少动画 */
@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;
    }
}
