/* ============================================================
   社区论坛 - 小红书风格 UI 样式表
   ============================================================ */

/* ---------- CSS 变量体系 ---------- */
:root {
    /* 主色调 - 小红书红 */
    --primary: #ff2442;
    --primary-dark: #e01a36;
    --primary-light: #ffe4e8;
    --primary-gradient: linear-gradient(135deg, #ff2442, #ff385c);
    --primary-gradient-hover: linear-gradient(135deg, #e01a36, #ff2442);

    /* 辅助色 */
    --accent: #ff9900;
    --accent-light: #fff5e5;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ff2442;
    --danger-light: #ffe4e8;
    --warning: #ff9900;
    --warning-light: #fff5e5;
    --info: #3b82f6;
    --vip-gradient: linear-gradient(135deg, #f7b733, #fc4a1a);

    /* 中性色 */
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg: #f5f5f5;
    --bg-secondary: #f9f9f9;
    --card-bg: #ffffff;
    --border: #eeeeee;
    --border-light: #f5f5f5;

    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.1);

    /* 圆角 */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space: 12px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 24px;
    --space-2xl: 32px;

    /* 过渡 */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* 底部导航高度 */
    --bottom-nav-height: 56px;
}

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

/* standalone 模式安全区适配 */
@media all and (display-mode: standalone) {
    html, body {
        overscroll-behavior: none;
        overscroll-behavior-y: contain;
    }
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--card-bg);
    min-height: 100vh;
    position: relative;
    box-shadow: var(--shadow-lg);
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0));
}

/* 无底部导航的容器 */
.container.no-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ---------- 顶部导航（通用页头） ---------- */
.header {
    position: fixed;
    top: 0;
    max-width: 480px;
    width: 100%;
    height: 52px;
    padding-top: env(safe-area-inset-top, 0);
    height: calc(52px + env(safe-area-inset-top, 0));
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    z-index: 100;
    transition: background var(--transition), border-color var(--transition);
}

/* 页面通用头部：左侧返回、中间标题、右侧操作 */
.page-header-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    color: var(--text);
    font-size: 20px;
    flex-shrink: 0;
}

.page-header-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 var(--space-sm);
}

.page-header-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

/* 个人中心右侧弹出菜单 */
.profile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 1001;
    animation: fadeIn 0.25s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.profile-menu-overlay.active {
    display: block !important;
}

.profile-menu-panel {
    position: absolute;
    right: 0;
    top: 0;
    width: 286px;
    height: 100%;
    background: var(--card-bg);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 12px);
    box-shadow: -8px 0 32px rgba(0,0,0,0.16);
    animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

/* 菜单头部用户卡片 */
.profile-menu-header {
    padding: 18px var(--space-md) 16px;
    background: linear-gradient(135deg, rgba(255,36,66,0.06) 0%, rgba(255,56,92,0.03) 100%);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.profile-menu-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.profile-menu-user {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-menu-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-name .vip-badge,
.profile-menu-name .cert-badge,
.profile-menu-name .bluev-cert {
    flex-shrink: 0;
}

.profile-menu-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.4;
}

/* 菜单分组 */
.profile-menu-body {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-menu-section {
    margin-bottom: 4px;
}

.profile-menu-section-title {
    padding: 10px 10px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    margin: 2px 0;
    text-decoration: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background var(--transition), transform var(--transition);
    opacity: 0;
    transform: translateX(12px);
    animation: menuItemIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.profile-menu-section .profile-menu-item:nth-of-type(1) { animation-delay: 0.05s; }
.profile-menu-section .profile-menu-item:nth-of-type(2) { animation-delay: 0.09s; }
.profile-menu-section .profile-menu-item:nth-of-type(3) { animation-delay: 0.13s; }
.profile-menu-section .profile-menu-item:nth-of-type(4) { animation-delay: 0.17s; }
.profile-menu-section .profile-menu-item:nth-of-type(5) { animation-delay: 0.21s; }
.profile-menu-section .profile-menu-item:nth-of-type(6) { animation-delay: 0.25s; }
.profile-menu-section .profile-menu-item:nth-of-type(7) { animation-delay: 0.29s; }
.profile-menu-section .profile-menu-item:nth-of-type(8) { animation-delay: 0.33s; }
.profile-menu-footer .profile-menu-item { animation-delay: 0.35s; }

@keyframes menuItemIn {
    to { opacity: 1; transform: translateX(0); }
}

.profile-menu-item:active {
    background: var(--bg-secondary);
    transform: scale(0.985);
}

.profile-menu-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition), background var(--transition);
}

.profile-menu-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.profile-menu-item:hover .profile-menu-icon,
.profile-menu-item:active .profile-menu-icon {
    transform: scale(1.08);
}

.profile-menu-icon.icon-edit { background: #eff6ff; color: #3b82f6; }
.profile-menu-icon.icon-checkin { background: #fef3c7; color: #d97706; }
.profile-menu-icon.icon-cert { background: #d1fae5; color: #10b981; }
.profile-menu-icon.icon-wallet { background: #fff7ed; color: #f59e0b; }
.profile-menu-icon.icon-vip { background: linear-gradient(135deg, #fff5e5, #ffecd2); color: #d97706; }
.profile-menu-icon.icon-shop { background: #fff0f2; color: #e11d48; }
.profile-menu-icon.icon-security { background: #ecfeff; color: #0891b2; }
.profile-menu-icon.icon-help { background: #f0fdf4; color: #16a34a; }
.profile-menu-icon.icon-blackroom { background: #f3f4f6; color: #6b7280; }
.profile-menu-icon.icon-logout { background: #ffe4e8; color: #ff2442; }

.profile-menu-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-arrow {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.7;
    transition: transform var(--transition), opacity var(--transition);
    flex-shrink: 0;
}

.profile-menu-item:hover .profile-menu-arrow,
.profile-menu-item:active .profile-menu-arrow {
    transform: translateX(2px);
    opacity: 1;
}

/* 退出登录 */
.profile-menu-footer {
    padding: 0 12px 12px;
    flex-shrink: 0;
}

.profile-menu-item.menu-logout {
    color: var(--danger);
    border: 1px solid var(--danger-light);
    background: linear-gradient(135deg, #fff5f7, #ffffff);
}

.profile-menu-item.menu-logout .profile-menu-arrow {
    color: var(--danger);
}

/* 减弱动效适配 */
@media (prefers-reduced-motion: reduce) {
    .profile-menu-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .profile-menu-panel {
        animation: none;
    }
    .profile-menu-overlay {
        animation: none;
    }
}

/* ---------- 首页专属头部 ---------- */
.xhs-header {
    position: fixed;
    top: 0;
    max-width: 480px;
    width: 100%;
    padding-top: env(safe-area-inset-top, 0);
    height: calc(52px + env(safe-area-inset-top, 0));
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    z-index: 100;
    gap: var(--space-sm);
}

.xhs-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.xhs-category-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0 2px;
    mask-image: linear-gradient(to right, transparent, black 4px, black calc(100% - 4px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 4px, black calc(100% - 4px), transparent);
}

.xhs-category-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    text-decoration: none;
    transition: all var(--transition);
    flex-shrink: 0;
    border: 1px solid transparent;
}

.category-chip:hover,
.category-chip.active {
    color: var(--primary);
    background: var(--primary-light);
    border-color: var(--primary-light);
    font-weight: 600;
}

.xhs-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.search-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
    font-size: 18px;
}

.search-icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.user-btn {
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border);
    display: block;
    max-width: 100%;
    max-height: 100%;
    transition: border-color var(--transition), transform var(--transition);
}

.avatar-small:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.menu-btn {
    font-size: 22px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: background var(--transition);
    color: var(--text);
}

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

.logo {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text);
}

/* ---------- 底部固定导航栏 ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    max-width: 480px;
    width: 100%;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: rgba(255,255,255,0.98);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    z-index: 99;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    position: relative;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    margin-bottom: 2px;
}

.bottom-nav-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.bottom-nav-label {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
}

.bottom-nav-post {
    position: relative;
    top: -16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255, 36, 66, 0.4);
    transition: transform var(--transition), box-shadow var(--transition);
    flex-shrink: 0;
}

.bottom-nav-post:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(255, 36, 66, 0.5);
}

.bottom-nav-post:active {
    transform: scale(0.96);
}

.bottom-nav-plus {
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
}

.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 14px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-sizing: border-box;
}

/* ---------- 内容区 ---------- */
.content {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 首页内容顶部偏移：头部 + 公告等 */
.home-content {
    padding-top: calc(52px + env(safe-area-inset-top, 0));
}

/* ---------- 公告 ---------- */
.announcement {
    padding: 12px 40px 12px var(--space-md);
    background: linear-gradient(135deg, #ff2442, #ff385c);
    color: white;
    position: relative;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.announcement-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    cursor: pointer;
    color: white;
    opacity: 0.85;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
}

.close-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

/* ---------- 搜索框 ---------- */
.search-container {
    padding: var(--space-md);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.search-box {
    display: flex;
    gap: var(--space);
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 4px 4px 4px 16px;
    transition: box-shadow var(--transition);
}

.search-box:focus-within {
    box-shadow: 0 0 0 3px rgba(255,36,66,0.12);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 14px;
    outline: none;
    color: var(--text);
}

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

.search-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255,36,66,0.25);
    transition: all var(--transition);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,36,66,0.35);
}

.search-result-count {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 4px;
}

.clear-search {
    display: inline-block;
    margin-left: 10px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.clear-search:hover { text-decoration: underline; }

/* ---------- 分类筛选 ---------- */
.category-filter {
    padding: 10px var(--space-md);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.category-select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: all var(--transition);
}

.category-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,36,66,0.08);
}

/* ---------- 小红书风格帖子卡片 ---------- */
.post-list {
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.post-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: var(--space-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.post-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.post-item:active {
    transform: scale(0.995);
}

.post-author-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.post-author-avatar,
.post-author-row .avatar-badge-wrap {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.post-author-avatar {
    border-radius: 50%;
    border: 1.5px solid var(--border);
    object-fit: cover;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.post-author-row .avatar-badge-wrap {
    overflow: visible;
}

.post-author-name {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-author-name.vip-author-name,
.result-author.vip-author-name,
.vip-author-name {
    color: #EF4444 !important;
}

/* VIP 彩色名称（QQ会员风格渐变昵称） */
.post-author-name.vip-author-name.vip-author-colorful,
.result-author.vip-author-name.vip-author-colorful,
.comment-author.vip-author-name.vip-author-colorful,
.clickable-author.vip-author-name.vip-author-colorful,
.vip-author-name.vip-author-colorful {
    color: transparent !important;
    background: linear-gradient(135deg, #22d3ee 0%, #34d399 30%, #a3e635 55%, #fbbf24 75%, #f472b6 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent;
}

/* 帖子详情作者名基础色（无内联色，改用样式表） */
.clickable-author {
    color: var(--text);
}

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

/* ---------- VIP 徽章（v10 曜金盾徽） ---------- */
.vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
    margin-left: 4px;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
}

.vip-badge svg {
    display: block;
    transition: transform .18s ease, filter .18s ease;
    transform-origin: center;
}

a:hover .vip-badge svg,
.vip-badge:hover svg {
    transform: scale(1.06) translateY(-0.5px);
    filter: brightness(1.07) saturate(1.06);
}

/* v10 徽章的流光/星芒动效内置于 SVG 并自带 prefers-reduced-motion 降级，
   此处兜底：系统减弱动效时停掉徽章过渡 */
@media (prefers-reduced-motion: reduce) {
    .vip-badge svg {
        transition: none;
    }
}

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

.post-paid-tip {
    color: var(--primary);
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

.post-content {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 帖子图片 - 紧凑贴合，单张按原比例展示 */
.post-image-preview {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    background: transparent;
    line-height: 0;
}

.post-image-preview img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-sm);
}

/* 宫格缩略图 */
.post-thumb-grid {
    display: grid;
    gap: 2px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 0;
    background: transparent;
}

.post-thumb-grid.grid-1 {
    grid-template-columns: 1fr;
    height: auto;
}
.post-thumb-grid.grid-1 .thumb-item {
    aspect-ratio: auto;
    max-height: 260px;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.post-thumb-grid.grid-1 .thumb-item img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    display: block;
    border-radius: 0;
}
.post-thumb-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.post-thumb-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.post-thumb-grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
.post-thumb-grid.grid-5, .post-thumb-grid.grid-6,
.post-thumb-grid.grid-7, .post-thumb-grid.grid-8,
.post-thumb-grid.grid-9 { grid-template-columns: repeat(3, 1fr); }
.post-thumb-grid .thumb-item { aspect-ratio: 1/1; overflow: hidden; }
.post-thumb-grid .thumb-item img { width: 100%; height: 100%; object-fit: cover; }

.more-images-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    pointer-events: none;
}

.post-footer {
    display: flex;
    gap: var(--space-md);
    font-size: 13px;
    color: var(--text-muted);
    align-items: center;
    margin-top: 2px;
}

.post-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-footer .stat-like.active {
    color: var(--primary);
}

.post-price {
    color: var(--accent);
    margin-left: auto;
    font-weight: 600;
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: var(--space-xl);
    gap: 6px;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    background: var(--card-bg);
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.page-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(255,36,66,0.3);
}

/* ---------- 登录/注册表单 ---------- */
.form-container {
    padding: var(--space-xl);
    margin-top: calc(52px + env(safe-area-inset-top, 0));
}

.form-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: var(--space-2xl);
    text-align: center;
    color: var(--primary);
}

.form-group {
    margin-bottom: var(--space-lg);
}

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

/* VIP 名称颜色切换（修改资料弹窗） */
.vip-name-style-options {
    display: flex;
    gap: 12px;
}

.vip-style-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    transition: border-color var(--transition), background var(--transition);
}

.vip-style-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.vip-style-option input[type="radio"] {
    accent-color: var(--primary);
}

.vip-style-option:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.vip-style-preview {
    font-weight: 700;
    font-size: 14px;
}

.vip-style-preview-red {
    color: #EF4444;
}

.vip-style-preview-colorful {
    color: transparent;
    background: linear-gradient(135deg, #22d3ee 0%, #34d399 30%, #a3e635 55%, #fbbf24 75%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-control {
    width: 100%;
    padding: 13px var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all var(--transition);
    outline: none;
    background: var(--card-bg);
    color: var(--text);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,36,66,0.08);
}

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

.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(255,36,66,0.25);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,36,66,0.35);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-footer {
    margin-top: var(--space-xl);
    text-align: center;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

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

/* ---------- 个人中心 ---------- */
.profile-header {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    margin-top: calc(52px + env(safe-area-inset-top, 0));
}

.profile-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
    pointer-events: none;
}

.profile-avatar {
    position: absolute;
    bottom: -40px;
    left: var(--space-lg);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: var(--shadow);
    z-index: 2;
    transition: transform var(--transition);
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-info {
    padding: 50px var(--space-lg) var(--space-lg);
    background: var(--card-bg);
}

.profile-stats-inline {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin: var(--space-md) 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-stats-inline .stats-text-item,
.profile-stats-inline .stats-text-item:link,
.profile-stats-inline .stats-text-item:visited {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text);
    transition: color var(--transition);
}

.profile-stats-inline .stats-text-item:hover {
    color: var(--primary);
}

.stats-text-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

/* ---------- 发布帖子 ---------- */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: var(--space);
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

.tool-btn {
    padding: 8px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.tool-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.post-content-editor {
    width: 100%;
    min-height: 200px;
    padding: var(--space-md);
    border: 2px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition);
    font-family: inherit;
    color: var(--text);
}

.post-content-editor:focus {
    border-color: var(--primary);
}

/* ---------- 帖子详情 ---------- */
.post-detail {
    margin-top: calc(52px + env(safe-area-inset-top, 0));
    padding: var(--space-xl);
}

.detail-header {
    margin-bottom: var(--space-xl);
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
    margin: var(--space) 0;
    line-height: 1.4;
    color: var(--text);
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: var(--space);
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-content {
    font-size: 16px;
    line-height: 1.8;
    margin: var(--space-xl) 0;
    word-wrap: break-word;
    color: var(--text);
}

.paid-content {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    margin: var(--space-xl) 0;
}

.paid-message {
    color: var(--danger);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.unlock-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.unlock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

/* ---------- 评论区 ---------- */
.comments-section {
    margin-top: var(--space-2xl);
}

.comment-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

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

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
    gap: 6px;
}

.comment-avatar,
.comment-header .avatar-badge-wrap {
    width: 32px;
    height: 32px;
    margin-right: var(--space);
    cursor: pointer;
    transition: border-color var(--transition);
}

.comment-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    overflow: hidden;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.comment-header .avatar-badge-wrap {
    overflow: visible;
}

.comment-avatar:hover,
.comment-header .avatar-badge-wrap:hover .avatar-img-wrap {
    border-color: var(--primary);
}

.comment-author {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

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

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

.comment-content {
    margin-left: 44px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    color: var(--text);
}

.comment-actions {
    margin-left: 44px;
    margin-top: var(--space-sm);
    font-size: 13px;
    display: flex;
    gap: var(--space-md);
}

.reply-btn {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    transition: color var(--transition);
}

.reply-btn:hover {
    color: var(--primary-dark);
}

.replies-section {
    margin-left: 44px;
    margin-top: var(--space);
    padding-left: var(--space-md);
    border-left: 2px solid var(--primary-light);
}

.reply-item {
    padding: var(--space) 0;
}

.more-replies {
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    margin: 6px 0;
    font-weight: 500;
    transition: color var(--transition);
}

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

/* ---------- 后台管理 ---------- */
.admin-container {
    margin-top: calc(52px + env(safe-area-inset-top, 0));
    padding: var(--space-xl);
}

.admin-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: var(--space-xl);
    gap: 0;
}

.admin-tab {
    padding: var(--space) var(--space-xl);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-tab:hover {
    color: var(--primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: var(--space) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- 认证徽章（蓝V / 黄V / 闪电） ---------- */
.cert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    margin-left: 4px;
    vertical-align: middle;
    cursor: pointer;
    transition: transform var(--transition);
    overflow: hidden;
}

.cert-badge svg {
    width: 65%;
    height: 65%;
    display: block;
}

.cert-badge:hover {
    transform: scale(1.2);
}

.cert-bluev {
    background: linear-gradient(135deg, #1d9bf0, #0ea5e9);
    color: white;
    box-shadow: 0 2px 6px rgba(29, 155, 240, 0.35);
}

.cert-yellowv {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #451a03;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.cert-lightning {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
    font-style: normal;
    font-size: 12px;
}

/* ---------- 认证名称胶囊（昵称旁展示） ---------- */
.cert-name-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    max-width: 160px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.12);
    margin-left: 5px;
    vertical-align: middle;
    cursor: pointer;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.cert-name-pill:hover {
    transform: scale(1.05);
}

.cert-name-pill-yellowv {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.16);
}

.cert-name-pill-lightning {
    background: #eef2ff;
    border-color: rgba(79, 70, 229, 0.16);
}

.cert-name-icon {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cert-name-pill-bluev .cert-name-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.cert-name-pill-yellowv .cert-name-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.cert-name-pill-lightning .cert-name-icon {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.cert-name-icon svg {
    width: 70%;
    height: 70%;
    display: block;
}

.cert-name-text {
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cert-name-pill-yellowv .cert-name-text {
    color: #b45309;
}

.cert-name-pill-lightning .cert-name-text {
    color: #4f46e5;
}

/* 仅图标认证徽章（无文字胶囊，用于频道创建者等紧凑位置） */
.cert-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
    cursor: pointer;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.cert-icon-only:hover {
    transform: scale(1.1);
}

.cert-icon-only svg {
    width: 70%;
    height: 70%;
    display: block;
}

.cert-icon-only-bluev {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

.cert-icon-only-yellowv {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.cert-icon-only-lightning {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

/* 兼容旧版蓝V类名 */
.bluev-cert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #1d9bf0, #0ea5e9);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    margin-left: 4px;
    vertical-align: middle;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(29, 155, 240, 0.35);
    transition: transform var(--transition);
}

.bluev-cert:hover {
    transform: scale(1.2);
}

/* ---------- 头像右下角认证角标（毓米社前端风格） ---------- */
.avatar-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    vertical-align: middle;
}

.avatar-badge-wrap .avatar-img-wrap {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    box-sizing: border-box;
}

.avatar-badge-wrap .avatar-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-badge-xs {
    width: 24px;
    height: 24px;
}

.avatar-badge-sm {
    width: 32px;
    height: 32px;
}

.avatar-badge-md {
    width: 40px;
    height: 40px;
}

.avatar-badge-lg {
    width: 80px;
    height: 80px;
}

/* 个人主页大头像沿用原 .profile-avatar 定位 */
.profile-header .avatar-badge-lg {
    position: absolute;
    bottom: -40px;
    left: var(--space-lg);
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 2;
    transition: transform var(--transition);
}

.profile-header .avatar-badge-lg .avatar-img-wrap {
    border: none;
}

.profile-header .avatar-badge-lg:hover {
    transform: scale(1.05);
}

.cert-avatar-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: transform var(--transition);
    z-index: 3;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(23, 50, 77, 0.18);
    right: 50%;
    bottom: 50%;
    transform: translate(50%, 50%);
}

.cert-avatar-badge svg {
    width: 62%;
    height: 62%;
    display: block;
    flex-shrink: 0;
}

.cert-avatar-badge:hover {
    transform: scale(1.15);
}

.cert-avatar-bluev {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.cert-avatar-yellowv {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.cert-avatar-lightning {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* ---------- 认证申请表单 ---------- */
.cert-apply-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-type-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.cert-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}

.cert-type-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.cert-type-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cert-type-item.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.cert-type-item:active {
    transform: scale(0.995);
}

.cert-type-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    flex-shrink: 0;
    margin-left: 0;
}

.cert-type-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cert-type-text strong {
    font-size: 15px;
    color: var(--text);
}

.cert-type-text small {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.avatar-badge-xs .cert-avatar-badge {
    width: 11px;
    height: 11px;
    border-width: 1px;
    margin-right: -6.5px;
    margin-bottom: -6.5px;
}

.avatar-badge-sm .cert-avatar-badge {
    width: 14px;
    height: 14px;
    border-width: 1.5px;
    margin-right: -9px;
    margin-bottom: -9px;
}

/* 帖子列表/频道头像 V 标确保不被父级裁切或遮挡 */
.post-author-row .avatar-badge-wrap .cert-avatar-badge,
.comment-header .avatar-badge-wrap .cert-avatar-badge {
    z-index: 5;
}

/* 帖子列表头像认证标志：与个人主页一致，骑在头像右下角边缘 */
.post-author-row .avatar-badge-wrap .cert-avatar-badge {
    margin-right: -12px;
    margin-bottom: -12px;
}

.avatar-badge-md .cert-avatar-badge {
    width: 17px;
    height: 17px;
    margin-right: -11.5px;
    margin-bottom: -11.5px;
}

.avatar-badge-lg .cert-avatar-badge {
    width: 24px;
    height: 24px;
    margin-right: -28px;
    margin-bottom: -28px;
}

/* ---------- 毓米社风格等级徽章 ---------- */
.yumi-level-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 0;
}

/* ---------- Toast 消息 ---------- */
.custom-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    z-index: 10000;
    animation: toastInOut 2.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 80%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    font-weight: 500;
}

.custom-toast.success {
    background: rgba(16, 185, 129, 0.92);
}

.custom-toast.error {
    background: rgba(255, 36, 66, 0.92);
}

.custom-toast.warning {
    background: rgba(255, 153, 0, 0.92);
}

@keyframes toastInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
}

/* ---------- 通用动画 ---------- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
    .container {
        width: 100%;
    }
}

/* ---------- 安全区适配 ---------- */
@media all and (display-mode: standalone) {
    .container {
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0));
    }
    .container.no-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

/* 签到按钮 */
.checkin-btn {
    display: flex;
    align-items: center;
    gap: var(--space);
    padding: 14px var(--space-md);
    cursor: pointer;
    border-radius: var(--radius);
    margin-bottom: 2px;
    transition: all var(--transition);
}

.checkin-btn:hover { background: var(--bg); }
.checkin-btn span { font-size: 15px; color: var(--text); font-weight: 500; }

/* 空状态 */
.empty-tip { text-align: center; padding: 50px 20px; color: var(--text-muted); }
