/* ============================================
   小红书风格首页样式 - xhs-style.css
   5列瀑布流版本
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body.xhs-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: color-mix(in srgb, #fff 88%, var(--color-primary, #ff2442) 12%);
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.xhs-circle-join-btn.is-joined,
.xhs-circle-join-btn:disabled {
    background: #eef2f7 !important;
    color: #64748b !important;
    box-shadow: none !important;
}
a { text-decoration: none; color: inherit; transition: opacity .2s; }
a:hover { opacity: .8; }
img { display: block; max-width: 100%; }

.xhs-sidebar-message-item,
.xhs-user-card-actions {
    display: none !important;
}

.pc-circle-page,
.pc-circles-page {
    width: min(1180px, calc(100vw - 340px));
    margin: 42px 0 56px 48px;
}

.pc-circle-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 56px;
}

.pc-circle-hero-main {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.pc-circle-avatar {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    object-fit: cover;
    flex: 0 0 auto;
    box-shadow: 0 16px 42px rgba(255, 36, 66, .16);
}

.pc-circle-info h1,
.pc-circles-head h1 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.pc-circle-meta {
    margin: 10px 0 0;
    color: #8b95a1;
    font-size: 14px;
}

.pc-circle-desc {
    margin: 12px 0 0;
    color: #606b7a;
    font-size: 15px;
    line-height: 1.6;
}

.pc-circle-follow {
    min-width: 114px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #1d8cff;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(29, 140, 255, .22);
}

.pc-circle-follow.is-joined {
    background: #ffe9ef !important;
    color: #ff2442 !important;
    box-shadow: none !important;
}

.pc-circle-waterfall.xhs-waterfall {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
}

.pc-circles-head {
    position: relative;
    margin-bottom: 26px;
}

.pc-circles-tabs {
    display: flex;
    align-items: center;
    gap: 38px;
    margin-top: 30px;
}

.pc-circles-tabs a {
    position: relative;
    color: #334155;
    font-size: 17px;
    font-weight: 650;
    padding-bottom: 16px;
}

.pc-circles-tabs a.active {
    color: #ff2442;
}

.pc-circles-tabs a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: #ff2442;
}

.pc-circle-sort {
    position: absolute;
    right: 8px;
    bottom: 13px;
    border: 0;
    background: transparent;
    color: #334155;
    font-weight: 650;
    cursor: pointer;
}

.pc-circle-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pc-circle-list-card {
    min-height: 176px;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 104px 104px 132px;
    align-items: center;
    gap: 28px;
    padding: 28px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 38px rgba(15, 23, 42, .05);
}

.pc-circle-list-cover {
    width: 150px;
    height: 150px;
    border-radius: 18px;
    overflow: hidden;
    background: #f1f5f9;
}

.pc-circle-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-circle-list-info h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111827;
    font-size: 22px;
    font-weight: 800;
}

.pc-circle-list-info h2 span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #ff2442;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.pc-circle-list-info p {
    margin: 16px 0 18px;
    color: #334155;
    font-size: 15px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-circle-list-users {
    display: flex;
    align-items: center;
}

.pc-circle-list-users img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    margin-right: -8px;
}

.pc-circle-list-users em {
    margin-left: 16px;
    color: #64748b;
    font-style: normal;
    font-size: 14px;
}

.pc-circle-list-stat {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc, #fff);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, .45);
}

.pc-circle-list-stat strong {
    color: #111827;
    font-size: 18px;
}

.pc-circle-list-stat span {
    color: #64748b;
    font-size: 13px;
}

.pc-circle-enter {
    justify-self: end;
    min-width: 110px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ff2442;
    border-radius: 999px;
    color: #ff2442;
    font-weight: 700;
}

.pc-circle-empty {
    padding: 80px 20px;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 1180px) {
    .pc-circle-page,
    .pc-circles-page {
        width: calc(100vw - 300px);
        margin-left: 28px;
    }
    .pc-circle-waterfall.xhs-waterfall {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .pc-circle-list-card {
        grid-template-columns: 120px minmax(0, 1fr) 88px 88px;
    }
    .pc-circle-enter {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

/* ====== 顶部导航栏 ====== */
.xhs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 1000;
    display: flex;
    align-items: center;
}
.xhs-header-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.xhs-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 120px;
}
.xhs-logo-img {
    height: 32px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}
.xhs-logo-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* 搜索框容器 - 居中 */
.xhs-search-box {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 40px;
}
.xhs-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
}
.xhs-search-icon {
    position: absolute;
    left: 12px;
    color: #999;
    pointer-events: none;
}
.xhs-search-input {
    width: 100%;
    height: 38px;
    padding: 0 16px 0 38px;
    border: 1px solid solid #eee;
    border-radius: 999px;
    background: #f5f5f5;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all .2s;
    border-color: transparent;
}
.xhs-search-input:focus {
    background: #fff;
    border-color: var(--color-primary, #ff2442);
    box-shadow: 0 0 0 2px rgba(255,36,66,.08);
}
.xhs-search-input::placeholder { color: #bbb; }

/* 搜索切换按钮：默认隐藏，最小窗口显示 */
.xhs-search-toggle { display: none !important; font-size: 16px; padding: 6px 10px; line-height: 1; }
/* 最小窗口搜索框展开状态 */
.xhs-search-box.xhs-search-expanded {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    padding: 0 16px;
    background: #fff;
    z-index: 100;
    align-items: center;
    display: flex;
}
.xhs-search-box.xhs-search-expanded .xhs-search-form {
    max-width: none;
}

/* 右侧按钮 */
.xhs-header-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
/* 按钮样式 */
.xhs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: all .2s;
}
.xhs-btn-primary {
    background: var(--color-primary, #ff2442);
    color: #fff;
}
.xhs-btn-primary:hover { opacity: .9; color: #fff; }
.xhs-btn-outline {
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
}
.xhs-btn-outline:hover { border-color: #bbb; color: #333; }
.xhs-btn-block { width: 100%; }

/* 侧边栏更多菜单里的PC专属项：大屏隐藏（头部已有按钮），小屏显示 */
.xhs-more-pc { display: none; }

/* 头部更多按钮：默认隐藏，小窗口显示 */
.xhs-header-more-toggle { display: none !important; font-size: 18px; padding: 6px 10px; line-height: 1; }

/* 创作者中心下拉菜单 */
.xhs-creator-center-wrap {
    position: relative;
    display: inline-block;
}
.xhs-creator-center-btn {
    cursor: pointer;
}
.xhs-creator-center-dropdown {
    position: fixed;
    display: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    padding: 8px 0;
    z-index: 9999;
    min-width: 240px;
    animation: moreFadeIn .2s ease;
}
.xhs-creator-center-dropdown.active {
    display: block;
}
.xhs-cc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
    text-decoration: none;
    color: #333;
    transition: background .15s;
    border-radius: 8px;
    margin: 2px 6px;
}
.xhs-cc-item:hover {
    background: #f5f5f5;
}
.xhs-cc-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.xhs-cc-text {
    flex: 1;
    min-width: 0;
}
.xhs-cc-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}
.xhs-cc-desc {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    line-height: 1.3;
}

/* 头部更多下拉菜单 */
.xhs-header-more-dropdown {
    position: fixed;
    display: none;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    padding: 10px 0;
    z-index: 9999;
    min-width: 260px;
}
.xhs-header-more-dropdown.active {
    display: block;
    animation: moreFadeIn .2s ease;
}

/* ====== 主体布局 ====== */
.xhs-main {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 76px;
    min-height: calc(100vh - 60px);
    gap: 18px;
    padding-left: calc(180px + 120px);
    padding-right: 24px;
}

/* ====== 左侧边栏 ====== */
.xhs-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: fixed;
    top: 76px;
    left: calc((100vw - 1600px) / 2 + 14px);
    height: calc(100vh - 92px);
    overflow-y: auto;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.xhs-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}
.xhs-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    transition: all .15s;
    cursor: pointer;
}
.xhs-nav-item:hover {
    background: #f0f0f0;
}
.xhs-nav-item.active {
    background: var(--color-primary, #ff2442);
    color: #fff;
    font-weight: 600;
}
.xhs-nav-item.active svg {
    fill: #fff;
}
.xhs-nav-item svg {
    fill: #666;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

/* 用户卡片 */
.xhs-user-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.xhs-user-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.xhs-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.xhs-user-name {
    font-weight: 600;
    font-size: 13px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xhs-user-card-stats {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}
.xhs-stat-item {
    text-align: center;
}
.xhs-stat-item strong {
    display: block;
    font-size: 14px;
    color: #333;
}
.xhs-stat-item span {
    font-size: 10px;
    color: #999;
}
.xhs-user-card-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.xhs-card-link {
    font-size: 12px;
    color: #666;
}
.xhs-card-link:hover { color: var(--color-primary, #ff2442); }
.xhs-logout-btn {
    width: 100%;
    padding: 7px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: background .2s;
}
.xhs-logout-btn:hover { background: #eee; }

/* 未登录提示 */
#xhs-login-prompt p {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--color-primary, #ff2442);
}
.xhs-login-hints {
    list-style: none;
    margin-bottom: 12px;
}
.xhs-login-hints li {
    font-size: 11px;
    color: #888;
    padding: 2px 0;
}

/* ====== 主内容区 ====== */
.xhs-content {
    flex: 1;
    min-width: 0;
}

/* ====== Tab 标签栏 ====== */
.xhs-tabs {
    margin-bottom: 14px;
    background: #fff;
    border-radius: 10px;
    padding: 0 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.xhs-tabs-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
}
.xhs-tabs-inner::-webkit-scrollbar { display: none; }
.xhs-tab-item {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all .2s;
    cursor: pointer;
}
.xhs-tab-item:hover { color: #333; }
.xhs-tab-item.active {
    background: #333;
    color: #fff;
    font-weight: 600;
}

/* ====== 5列瀑布流布局 ====== */
.xhs-waterfall {
    display: flex;
    gap: 12px;
    align-items: start;
}
.xhs-waterfall-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(20% - 10px);
    min-width: 0;
}

/* ====== 笔记卡片 ====== */
.xhs-note-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
}
.xhs-note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

/* 图片区域 */
.xhs-note-img-wrapper {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
    max-height: 280px;
}
.xhs-note-img {
    width: 100%;
    display: block;
    object-fit: cover;
    min-height: 120px;
    max-height: 280px;
    transition: transform .3s;
}
.xhs-note-card:hover .xhs-note-img {
    transform: scale(1.03);
}
.xhs-note-img-placeholder {
    min-height: 160px;
    background: linear-gradient(135deg, #f0f0f0 25%, #e8e8e8 25%, #e8e8e8 50%, #f0f0f0 50%, #f0f0f0 75%, #e8e8e8 75%);
    background-size: 20px 20px;
}

/* 无图纯文字帖内容区 */
.xhs-note-text-content {
    min-height: 100px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
}
.xhs-note-text-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 多图角标 */
.xhs-note-img-count {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    background: rgba(0,0,0,.45);
    color: #fff;
    border-radius: 8px;
    font-size: 10px;
    backdrop-filter: blur(4px);
}

/* 视频图标 */
.xhs-note-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,.35);
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

/* 笔记信息区域 */
.xhs-note-info {
    padding: 6px 14px 12px;
}
.xhs-note-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    word-break: break-all;
}
.xhs-note-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 作者信息 */
.xhs-note-author {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.xhs-author-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.xhs-author-name {
    font-size: 11px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70px;
}

/* 用户徽标 */
.xhs-user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
}
.xhs-user-badge.vip {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #fff;
}
.xhs-user-badge.auth {
    background: #e8f5e9;
    color: #2e7d32;
}
.xhs-user-badge.official {
    background: #fce4ec;
    color: #c62828;
}

/* 统计数据 */
.xhs-note-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.xhs-stat {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #999;
}
.xhs-stat svg {
    fill: #999;
}

/* ====== 加载更多 ====== */
.xhs-load-more {
    text-align: center;
    padding: 20px 0;
}
.xhs-load-more-btn {
    padding: 8px 40px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.xhs-load-more-btn:hover {
    border-color: var(--color-primary, #ff2442);
    color: var(--color-primary, #ff2442);
}
.xhs-load-more-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ====== 底部 ====== */
.xhs-footer {
    text-align: center;
    padding: 24px 20px;
    color: #bbb;
    font-size: 12px;
    margin-top: 30px;
}

/* ====== 响应式 ====== */
/* 大屏（>1400px）：5列 */
@media (min-width: 1401px) {
    .xhs-waterfall-col { width: calc(20% - 10px); }
}

/* 中大屏（1200-1400px）：4列 */
@media (max-width: 1400px) {
    .xhs-waterfall-col:nth-child(5) { display: none; }
    .xhs-waterfall-col { width: calc(25% - 9px); }
}

/* 1200-1648px：sidebar左对齐 */
@media (max-width: 1648px) {
    .xhs-sidebar { left: 14px; }
    .xhs-main { padding-left: calc(180px + 120px); }
}

/* 中屏（992-1199px）：3列，侧边栏隐藏，头部显示更多按钮 */
@media (max-width: 1199px) {
    .xhs-sidebar { display: none !important; }
    .xhs-waterfall-col:nth-child(4),
    .xhs-waterfall-col:nth-child(5) { display: none; }
    .xhs-waterfall-col { width: calc(33.333% - 8px); }
    .xhs-main { padding-left: 16px; padding-right: 16px; }
    /* 头部按钮切换 */
    .xhs-header-btn-pc { display: none; }
    .xhs-header-more-toggle { display: inline-flex !important; }
}

/* 平板（768-991px）：2列 */
@media (max-width: 991px) {
    .xhs-waterfall-col:nth-child(3),
    .xhs-waterfall-col:nth-child(4),
    .xhs-waterfall-col:nth-child(5) { display: none; }
    .xhs-waterfall-col { width: calc(50% - 6px); }
    .xhs-header-inner { padding: 0 16px; }
    .xhs-logo img { height: 32px; }
}

/* 手机/小窗口（<768px）：2列紧凑 */
@media (max-width: 767px) {
    .xhs-header-inner { padding: 0 12px; }
    .xhs-logo img { height: 28px; }
    /* 搜索框隐藏，显示搜索按钮 */
    .xhs-search-box { display: none; }
    .xhs-search-toggle { display: inline-flex !important; }
    .xhs-header-actions .xhs-btn-outline { font-size: 13px; padding: 6px 12px; }
    .xhs-waterfall { gap: 8px; }
    .xhs-waterfall-col { gap: 8px; width: calc(50% - 4px); }
    .xhs-note-card { border-radius: 10px; }
    .xhs-note-info { padding: 8px 10px 10px; }
    .xhs-note-title { font-size: 12px; }
    .xhs-tab-item { padding: 5px 10px; font-size: 12px; }
    .xhs-tab-bar { gap: 4px; overflow-x: auto; }
}

/* ====== 滚动条美化 ====== */
.xhs-sidebar::-webkit-scrollbar { width: 4px; }
.xhs-sidebar::-webkit-scrollbar-track { background: transparent; }
.xhs-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.xhs-sidebar::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* ====== 搜索页样式 ====== */
.xhs-search-page {
    padding-top: 10px;
}
.xhs-search-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 60px;
    z-index: 100;
}
.xhs-search-tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.xhs-search-tab {
    font-size: 15px;
    color: #333;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all .2s;
    font-weight: 400;
}
.xhs-search-tab:hover {
    color: #ff2442;
}
.xhs-search-tab.active {
    color: #333;
    font-weight: 600;
    border-bottom-color: #333;
}
/* 搜索页瀑布流 */
.xhs-search-waterfall .xhs-note-card {
    border-radius: 8px;
}
.xhs-search-waterfall .xhs-note-img-wrapper {
    max-height: none;
}
.xhs-search-waterfall .xhs-note-img {
    max-height: none;
    min-height: auto;
}
.xhs-search-waterfall .xhs-note-info {
    padding: 8px 12px 10px;
}
.xhs-search-waterfall .xhs-note-title {
    font-size: 13px;
    margin-bottom: 6px;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 底部信息：头像+昵称 | 日期 | 点赞 */
.xhs-search-waterfall .xhs-note-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xhs-search-waterfall .xhs-note-author {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.xhs-search-waterfall .xhs-author-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.xhs-search-waterfall .xhs-author-name {
    font-size: 11px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60px;
}
.xhs-search-waterfall .xhs-note-date {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
}
.xhs-search-waterfall .xhs-stat {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
}
.xhs-search-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 14px;
}

/* ====== 动画 ====== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.xhs-note-card {
    animation: fadeInUp .3s ease both;
}
/* 5列卡片错开动画 */
.xhs-waterfall-col .xhs-note-card:nth-child(1) { animation-delay: 0s; }
.xhs-waterfall-col .xhs-note-card:nth-child(2) { animation-delay: .02s; }
.xhs-waterfall-col .xhs-note-card:nth-child(3) { animation-delay: .04s; }
.xhs-waterfall-col .xhs-note-card:nth-child(4) { animation-delay: .06s; }
.xhs-waterfall-col .xhs-note-card:nth-child(5) { animation-delay: .08s; }
.xhs-waterfall-col .xhs-note-card:nth-child(6) { animation-delay: .1s; }
.xhs-waterfall-col .xhs-note-card:nth-child(7) { animation-delay: .12s; }
.xhs-waterfall-col .xhs-note-card:nth-child(8) { animation-delay: .14s; }

/* ===== 侧边栏底部更多 ===== */
.xhs-sidebar-bottom {
    margin-top: auto;
    padding-top: 8px;
    flex-shrink: 0;
}

/* ===== 侧边栏更多按钮 ===== */
.xhs-sidebar-more {
    position: relative;
    padding: 8px 0;
    margin-top: 4px;
}
.xhs-more-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 15px;
    color: #888;
    cursor: pointer;
    border-radius: 10px;
    transition: all .2s;
}
.xhs-more-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #555;
}
.xhs-more-icon {
    font-size: 18px;
    line-height: 1;
}
/* 更多下拉菜单 */
.xhs-sidebar-more-dropdown {
    position: fixed;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    padding: 10px 0;
    display: none;
    z-index: 9999;
    min-width: 260px;
}
.xhs-sidebar-more-dropdown.active {
    display: block;
    animation: moreFadeIn .2s ease;
}
@keyframes moreFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.xhs-more-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
}
.xhs-more-item:hover {
    background: #f5f5f5;
}
.xhs-more-arrow {
    color: #ccc;
    font-size: 16px;
}
.xhs-more-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 16px;
}
.xhs-more-label {
    color: #999;
    font-size: 13px;
    cursor: default;
}
.xhs-more-label:hover {
    background: none;
}
.xhs-more-theme-row {
    justify-content: space-between;
}
.xhs-theme-switch {
    display: flex;
    gap: 2px;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 2px;
}
.xhs-theme-opt {
    width: 30px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 18px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    color: #999;
}
.xhs-theme-opt.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.xhs-theme-opt:hover:not(.active) {
    color: #666;
}

/* ============================================
   用户主页样式
   ============================================ */

/* 用户主页头部 */
.xhs-user-profile-header {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.xhs-user-profile-info {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.xhs-user-profile-avatar {
    flex-shrink: 0;
}

.xhs-user-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.xhs-user-profile-meta {
    flex: 1;
    padding-top: 8px;
}

.xhs-user-profile-name {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.xhs-user-profile-id {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.xhs-user-profile-ip {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #eee;
}

.xhs-user-profile-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.xhs-user-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.xhs-user-profile-stats {
    display: flex;
    gap: 32px;
}

.xhs-profile-stat {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.xhs-profile-stat strong {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.xhs-profile-stat span {
    font-size: 13px;
    color: #999;
}

/* 用户主页Tab */
.xhs-user-profile-tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 0 32px 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

.xhs-profile-tab-item {
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    transition: color .2s;
}

.xhs-profile-tab-item:hover {
    color: #333;
}

.xhs-profile-tab-item.active {
    color: #333;
    font-weight: 600;
}

.xhs-profile-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--color-primary, #ff2442);
    border-radius: 2px;
}

/* 用户主页内容区 */
.xhs-user-profile-content {
    background: transparent;
    min-height: 300px;
    opacity: 0;
    transition: opacity .3s ease;
    display: none;
}
.xhs-user-profile-content.active {
    display: block;
    opacity: 1;
}

/* 响应式适配 */
@media (max-width: 1199px) {
    .xhs-user-profile-header {
        padding: 24px;
    }

    .xhs-user-profile-avatar img {
        width: 100px;
        height: 100px;
    }

    .xhs-user-profile-name {
        font-size: 20px;
    }

    .xhs-user-profile-tabs {
        padding: 0 24px 16px;
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .xhs-user-profile-header {
        padding: 20px;
        border-radius: 12px;
    }

    .xhs-user-profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .xhs-user-profile-avatar img {
        width: 80px;
        height: 80px;
    }

    .xhs-user-profile-meta {
        padding-top: 0;
    }

    .xhs-user-profile-name {
        font-size: 18px;
    }

    .xhs-user-profile-stats {
        justify-content: center;
        gap: 24px;
    }

    .xhs-user-profile-tabs {
        padding: 0 20px 12px;
        gap: 20px;
        justify-content: center;
    }

    .xhs-profile-tab-item {
        font-size: 14px;
    }
}

/* ============================================
   发布页面样式
   ============================================ */
.xhs-publish-container {
    padding: 24px 32px;
    max-width: 900px;
    margin: 0 auto;
}

/* Tab 切换 */
.xhs-publish-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e4e4e4;
    padding-bottom: 12px;
}

.xhs-publish-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.xhs-publish-tab:hover {
    background: #f5f5f5;
    color: #333;
}

.xhs-publish-tab.active {
    background: var(--color-primary, #ff2442);
    color: #fff;
}

.xhs-publish-tab svg {
    flex-shrink: 0;
}

/* 内容面板 */
.xhs-publish-panel {
    display: none;
}

.xhs-publish-panel.active {
    display: block;
}

/* 上传区域 */
.xhs-upload-area {
    background: #f8f8f8;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.xhs-upload-area:hover {
    border-color: var(--color-primary, #ff2442);
    background: #fff5f6;
}

.xhs-upload-icon {
    color: #ccc;
    margin-bottom: 16px;
}

.xhs-upload-area:hover .xhs-upload-icon {
    color: var(--color-primary, #ff2442);
}

.xhs-upload-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.xhs-upload-btn {
    background: var(--color-primary, #ff2442);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.xhs-upload-btn:hover {
    opacity: 0.9;
}

/* 上传提示 */
.xhs-upload-tips {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e4e4e4;
}

.xhs-tip-item {
    text-align: center;
    flex: 1;
}

.xhs-tip-item h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.xhs-tip-item p {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

/* 长文编辑器 */
.xhs-text-editor {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e4e4e4;
}

.xhs-editor-title {
    position: relative;
    margin-bottom: 16px;
}

.xhs-editor-title input {
    width: 100%;
    padding: 12px 60px 12px 0;
    border: none;
    border-bottom: 1px solid #e4e4e4;
    font-size: 18px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s ease;
}

.xhs-editor-title input:focus {
    border-color: var(--color-primary, #ff2442);
}

.xhs-editor-title input::placeholder {
    color: #999;
}

.xhs-title-count {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
}

.xhs-editor-content {
    position: relative;
    margin-bottom: 16px;
}

.xhs-editor-content textarea {
    width: 100%;
    min-height: 300px;
    padding: 12px 60px 12px 0;
    border: none;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.xhs-editor-content textarea::placeholder {
    color: #999;
}

.xhs-content-count {
    position: absolute;
    right: 0;
    bottom: 12px;
    font-size: 12px;
    color: #999;
}

/* 编辑器工具栏 */
.xhs-editor-toolbar {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e4e4e4;
}

.xhs-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e4e4e4;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.xhs-toolbar-btn:hover {
    border-color: var(--color-primary, #ff2442);
    color: var(--color-primary, #ff2442);
}

.xhs-toolbar-btn svg {
    flex-shrink: 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .xhs-publish-container {
        padding: 16px;
    }
    
    .xhs-publish-tabs {
        gap: 4px;
    }
    
    .xhs-publish-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .xhs-upload-area {
        padding: 40px 20px;
    }
    
    .xhs-upload-tips {
        flex-direction: column;
        gap: 20px;
    }
    
    .xhs-editor-toolbar {
        flex-wrap: wrap;
    }
}

/* ==================== 创作服务平台 - 发布页 ==================== */
.xhs-creator-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #f5f5f5;
}

/* 顶部导航栏 */
.xhs-creator-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 100;
}

/* 主体区域：侧边栏 + 主内容区并排 */
.xhs-creator-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.xhs-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xhs-topbar-logo {
    flex-shrink: 0;
    height: 22px;
    width: auto;
}

.xhs-topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.xhs-topbar-right {
    display: flex;
    align-items: center;
}

.xhs-topbar-user {
    display: flex;
    align-items: center;
}

.xhs-topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #f0f0f0;
    transition: border-color 0.2s;
}

.xhs-topbar-avatar:hover {
    border-color: #ff2442;
}

.xhs-topbar-user {
    position: relative;
}

.xhs-topbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 120px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 200;
}

.xhs-topbar-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.xhs-topbar-dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
}

.xhs-topbar-dropdown-item:hover {
    background: #f5f5f5;
    color: #ff2442;
}

/* 左侧边栏 */
.xhs-creator-sidebar {
    width: 240px;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.xhs-creator-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    margin-bottom: 16px;
}

.xhs-brand-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.xhs-publish-entry {
    padding: 0 16px;
    margin-bottom: 16px;
}

.xhs-publish-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--color-primary, #ff2442);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.xhs-publish-dropdown-btn:hover {
    opacity: 0.9;
}

/* 导航菜单 */
.xhs-creator-nav {
    flex: 1;
    padding: 0 12px;
}

.xhs-creator-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #666;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.xhs-creator-nav-item:hover {
    background: #f5f5f5;
    color: #333;
}

.xhs-creator-nav-item.active {
    background: #fff5f6;
    color: var(--color-primary, #ff2442);
    font-weight: 500;
}

.xhs-nav-arrow {
    margin-left: auto;
    transform: rotate(90deg);
}

.xhs-creator-submenu {
    padding-left: 46px;
    margin-bottom: 8px;
}

.xhs-creator-subitem {
    display: block;
    padding: 8px 0;
    color: #999;
    font-size: 13px;
}

.xhs-creator-subitem:hover {
    color: #666;
}

.xhs-sidebar-collapse {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    margin-top: auto;
    color: #999;
    font-size: 13px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.xhs-sidebar-collapse:hover {
    color: #666;
}

/* 主内容区 */
.xhs-creator-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 上传区域 */
.xhs-creator-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.xhs-upload-zone {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 0;
    overflow-y: auto;
}

/* 上传内容内层框架 */
.xhs-upload-area-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 18px;
    padding: 40px;
    min-height: 200px;
    width: 99%;
}

.xhs-upload-zone:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.xhs-upload-cloud {
    margin-bottom: 28px;
}

.xhs-upload-cloud svg {
    width: 100px;
    height: 100px;
}

.xhs-upload-hint {
    color: #999;
    font-size: 16px;
    margin-bottom: 24px;
}

.xhs-upload-primary-btn {
    padding: 14px 40px;
    background: var(--color-primary, #ff2442);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.xhs-upload-primary-btn:hover {
    opacity: 0.9;
}

/* 上传说明（在 .xhs-upload-zone 内部） */
.xhs-upload-info {
    display: flex;
    gap: 32px;
    padding-top: 24px;
    margin-top: auto;
    width: 100%;
}

.xhs-info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.xhs-info-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.xhs-info-item h4 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 2px 0;
}

.xhs-info-item p {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    margin: 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .xhs-creator-sidebar {
        display: none;
    }
    
    .xhs-creator-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .xhs-creator-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .xhs-creator-content {
        padding: 20px;
    }
    
    .xhs-upload-info {
        flex-direction: column;
        gap: 16px;
    }
}

/* 创作平台页面覆盖 body 背景 */
body.xhs-body .xhs-creator-layout,
body.xhs-body > .xhs-creator-layout {
    background: #f5f5f5;
}

/* ====== Tab 面板切换 ====== */
.xhs-tab-panel {
    display: none;
}

.xhs-tab-panel-active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* 内容区内部 Tab 导航栏 */
.xhs-creator-inner-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 8px;
    margin-bottom: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    border: 1px solid #e4e4e4;
    border-bottom: none;
}

.xhs-creator-inner-tabs .xhs-creator-tab {
    padding: 16px 28px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 15px;
    cursor: pointer;
    border-radius: 0;
    position: relative;
    transition: color 0.2s ease;
}

.xhs-creator-inner-tabs .xhs-creator-tab:hover {
    color: #333;
    background: transparent;
}

.xhs-creator-inner-tabs .xhs-creator-tab.active {
    color: #ff2442;
    font-weight: 600;
    background: transparent;
}

.xhs-creator-inner-tabs .xhs-creator-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: #ff2442;
    border-radius: 2px;
}

.xhs-creator-tab-spacer {
    flex: 1;
}

.xhs-creator-inner-tabs .xhs-creator-draft {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999;
    font-size: 13px;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.xhs-creator-inner-tabs .xhs-creator-draft:hover {
    color: #666;
    background: #f5f5f5;
}

/* Tab 面板内容区与内部 Tab 栏衔接 */
.xhs-creator-content > .xhs-tab-panel-active > .xhs-upload-zone,
.xhs-creator-content > .xhs-tab-panel-active > .xhs-article-hero {
    border-radius: 0 0 12px 12px;
    border: 1px solid #e4e4e4;
    border-top: none;
}

/* 写长文面板：白色框架内的合集区域 */
.xhs-creator-content > .xhs-tab-panel-active > .xhs-upload-zone.xhs-article-panel {
    border-radius: 0 0 12px 12px;
    border: 1px solid #e4e4e4;
    border-top: none;
}

/* 上传图文 - 图片图标 */
.xhs-upload-image-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* 按钮组（上传图片 + 文字配图）*/
.xhs-upload-btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.xhs-upload-secondary-btn {
    padding: 10px 28px;
    border-radius: 24px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.xhs-upload-secondary-btn:hover {
    border-color: #ff2442;
    color: #ff2442;
}

/* 写长文编辑器 */
.xhs-article-editor {
    max-width: 720px;
    margin: 20px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

.xhs-article-title {
    width: 100%;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 18px 24px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    outline: none;
    box-sizing: border-box;
}

.xhs-article-title::placeholder {
    color: #bbb;
    font-weight: 400;
}

.xhs-article-body {
    min-height: 400px;
    padding: 20px 24px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    outline: none;
}

.xhs-article-body:empty:before {
    content: attr(placeholder);
    color: #bbb;
}

.xhs-article-body:focus:empty:before {
    color: #ccc;
}

.xhs-article-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 10px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.xhs-toolbar-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
}

.xhs-toolbar-btn:hover {
    background: #eee;
    color: #333;
}

/* ====== 写长文 Hero 区域 ====== */
.xhs-article-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 30px;
    gap: 50px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.xhs-article-hero-left {
    flex-shrink: 0;
}

.xhs-article-hero-title {
    font-size: 34px;
    font-weight: 700;
    color: #222;
    line-height: 1.35;
    margin: 0 0 28px 0;
    letter-spacing: -0.5px;
    position: relative;
}

/* 手绘装饰线 */
.xhs-article-hero-title::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 18px;
    width: 180px;
    height: 12px;
    background: linear-gradient(135deg, rgba(167,139,250,0.4) 0%, rgba(59,130,246,0.3) 100%);
    border-radius: 6px;
    transform: rotate(-2deg);
    z-index: -1;
}

.xhs-article-hero-actions {
    display: flex;
    gap: 14px;
}

.xhs-article-hero-actions .xhs-upload-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 右侧手机预览 */
.xhs-article-hero-right {
    position: relative;
    width: 260px;
    flex-shrink: 0;
}

.xhs-article-preview-phone {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.10), 0 2px 15px rgba(0,0,0,0.05);
    padding: 10px;
    transform: perspective(800px) rotateY(-5deg) rotateX(3deg);
    transition: transform 0.3s ease;
}

.xhs-article-preview-phone:hover {
    transform: perspective(800px) rotateY(-2deg) rotateX(1deg);
}

.xhs-preview-screen {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0f0f0;
}

.xhs-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px 8px;
    font-size: 11px;
    color: #999;
    border-bottom: 1px solid #f5f5f5;
}

.xhs-preview-author {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 12px;
    margin-right: auto;
}

.xhs-preview-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #eee;
    object-fit: cover;
}

.xhs-preview-follow {
    color: #ff2442;
    font-size: 10px;
    border: 1px solid #ff2442;
    border-radius: 10px;
    padding: 1px 7px;
}

.xhs-preview-content {
    padding: 12px 14px;
}

.xhs-preview-date {
    font-size: 10px;
    color: #bbb;
    margin: 0 0 8px;
}

.xhs-preview-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    line-height: 1.45;
    margin: 0 0 6px;
}

.xhs-highlight-text {
    background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
    padding: 0 3px;
    border-radius: 2px;
}

.xhs-preview-desc {
    font-size: 10px;
    color: #888;
    line-height: 1.55;
    margin: 0 0 10px;
}

.xhs-preview-image {
    border-radius: 8px;
    overflow: hidden;
}

.xhs-preview-img-placeholder {
    width: 100%;
    height: 90px;
    background: linear-gradient(135deg, #d4a574 0%, #c49a6c 50%, #b8956a 100%);
    border-radius: 8px;
}

.xhs-preview-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 10px;
    border-top: 1px solid #f5f5f5;
}

.xhs-preview-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #aaa;
}

/* 装饰元素 */
.xhs-article-deco {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.xhs-deco-star {
    top: -10px;
    right: -15px;
    font-size: 26px;
    color: #a78bfa;
    opacity: 0.7;
}

.xhs-deco-squiggle {
    bottom: 20px;
    left: -25px;
    opacity: 0.6;
}

/* 底部长文合集区域（在白色框架内左下角） */
.xhs-article-panel .xhs-article-collection-section {
    max-width: none;
    margin: 0;
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    text-align: left;
    flex-shrink: 0;
}

.xhs-article-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.xhs-article-panel .xhs-article-hero {
    flex: 1;
    min-height: 0;
    max-height: 60%;
    overflow-y: auto;
}

.xhs-collection-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px;
}

.xhs-collection-bar {
    width: 3px;
    height: 18px;
    background: #ff2442;
    border-radius: 2px;
}

.xhs-collection-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 36px 0;
    color: #bbb;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.xhs-collection-empty:hover {
    color: #999;
}

@media (max-width: 900px) {
    .xhs-article-hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px 20px;
        gap: 30px;
    }

    .xhs-article-hero-title {
        font-size: 26px;
    }

    .xhs-article-hero-title::after {
        left: 50%;
        transform: translateX(-50%) rotate(-2deg);
    }

    .xhs-article-hero-actions {
        justify-content: center;
    }

    .xhs-article-hero-right {
        width: 200px;
    }

    .xhs-deco-squiggle {
        display: none;
    }
}

/* ===== 搜索页 - 圈子左图右文卡片 ===== */
.xhs-search-circles {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}
.xhs-search-circle-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: background .2s, box-shadow .2s;
}
.xhs-search-circle-item:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
body.dark-mode .xhs-search-circle-item {
    background: #1e252b;
}
body.dark-mode .xhs-search-circle-item:hover {
    background: #28323a;
}
.xhs-search-circle-cover {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}
body.dark-mode .xhs-search-circle-cover {
    border-color: #333;
}
.xhs-search-circle-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.xhs-search-circle-info {
    flex: 1;
    min-width: 0;
}
.xhs-search-circle-name {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin: 0 0 6px;
    line-height: 1.3;
}
body.dark-mode .xhs-search-circle-name {
    color: #e8e8e8;
}
.xhs-search-circle-stats {
    font-size: 14px;
    color: #666;
    margin: 0 0 4px;
}
body.dark-mode .xhs-search-circle-stats {
    color: #999;
}
.xhs-search-circle-desc {
    font-size: 13px;
    color: #999;
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 500px;
}
body.dark-mode .xhs-search-circle-desc {
    color: #777;
}

/* ===== 搜索用户列表（小红书风格）==== */
.xhs-search-user-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.xhs-search-user-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.xhs-search-user-item:hover {
    background: #fafafa;
}

.xhs-search-user-link {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.xhs-search-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 16px;
    background: #f0f0f0;
}

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

.xhs-search-user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.xhs-search-user-name {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.xhs-search-user-badge {
    font-size: 11px;
    color: #ff2442;
    border: 1px solid #ff2442;
    border-radius: 4px;
    padding: 0 4px;
    line-height: 18px;
    font-weight: 500;
}

.xhs-search-user-active {
    font-size: 12px;
    color: #999;
}

.xhs-search-user-detail {
    font-size: 13px;
    color: #666;
    margin-bottom: 3px;
}

.xhs-search-user-stats {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xhs-stat-sep {
    color: #e0e0e0;
}

.xhs-follow-btn {
    flex-shrink: 0;
    margin-left: 16px;
    padding: 6px 22px;
    border-radius: 20px;
    border: none;
    background: #ff2442;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.xhs-follow-btn:hover {
    background: #e01f3b;
}

/* 暗黑模式 */
body.dark-mode .xhs-search-user-item {
    background: transparent;
    border-bottom-color: #333;
}
body.dark-mode .xhs-search-user-item:hover {
    background: rgba(255,255,255,0.04);
}
body.dark-mode .xhs-search-user-name {
    color: #e8e8e8;
}
body.dark-mode .xhs-search-user-detail {
    color: #aaa;
}
body.dark-mode .xhs-search-user-stats {
    color: #777;
}

/* ===== PC 首页新版布局 ===== */
body.xhs-body {
    background: #fff;
    color: #111827;
}

.xhs-header {
    height: 64px;
    background: #fff;
    border-bottom: 0;
    box-shadow: none;
}

.xhs-header-inner {
    max-width: none;
    height: 64px;
    padding: 0 62px;
    position: relative;
}

.xhs-logo {
    width: 266px;
}

.xhs-logo-img,
.xhs-logo img {
    height: 34px;
    max-width: 140px;
    object-fit: contain;
}

.xhs-search-box {
    position: absolute;
    left: 50%;
    top: 12px;
    width: 540px;
    max-width: 36vw;
    transform: translateX(-50%);
    padding: 0;
}

.xhs-search-form {
    max-width: none;
}

.xhs-search-input {
    height: 40px;
    padding: 0 46px 0 18px;
    border: 0;
    border-radius: 22px;
    background: #f7f7f7;
    color: #333;
    font-size: 14px;
}

.xhs-search-input:focus {
    background: #f5f5f5;
    box-shadow: none;
}

.xhs-search-input::placeholder {
    color: #b8b8b8;
}

.xhs-search-icon {
    left: auto;
    right: 16px;
    color: #333;
    pointer-events: none;
}

.xhs-header-actions {
    margin-left: auto;
    gap: 32px;
}

.xhs-header-actions .xhs-btn {
    height: auto;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: #555 !important;
    box-shadow: none !important;
    font-size: 16px;
    font-weight: 400;
}

.xhs-header-actions .xhs-btn:hover {
    color: #111 !important;
    transform: none;
}

.xhs-main {
    max-width: none;
    min-height: calc(100vh - 64px);
    padding-top: 82px;
    padding-left: 360px;
    padding-right: 62px;
    gap: 0;
}

.xhs-sidebar {
    position: fixed;
    left: 62px;
    top: 82px;
    width: 267px;
    height: calc(100vh - 96px);
    padding: 0;
    background: transparent;
    border-right: 0;
    overflow: visible;
}

.xhs-sidebar-nav {
    gap: 12px;
}

.xhs-nav-item {
    height: 48px;
    padding: 0 18px;
    border-radius: 24px;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    gap: 14px;
}

.xhs-nav-item:hover,
.xhs-nav-item.active {
    background: #f5f5f5;
    color: #111;
}

.xhs-nav-item svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

#xhs-login-prompt {
    display: block;
    margin-top: 20px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

#xhs-login-prompt p,
.xhs-login-hints {
    display: none;
}

#sidebarLoginBtn {
    height: 48px;
    border-radius: 24px;
    background: #ff2442;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: none;
}

#sidebarLoginBtn:hover {
    filter: brightness(.98);
    transform: none;
}

.xhs-sidebar-bottom {
    margin-top: auto;
    padding: 0 0 22px;
}

.xhs-more-btn {
    height: 42px;
    padding: 0 18px;
    color: #111;
    font-weight: 700;
}

.xhs-content {
    width: 100%;
    min-width: 0;
}

.xhs-tabs {
    position: sticky;
    top: 64px;
    z-index: 50;
    margin: 0 0 16px;
    padding: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.xhs-tabs-inner {
    gap: 20px;
    padding: 0 0 16px;
}

.xhs-tab-item {
    height: 40px;
    padding: 0 16px;
    border-radius: 20px;
    color: #333;
    font-size: 16px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
}

.xhs-tab-item:hover {
    color: #111;
    background: #f7f7f7;
}

.xhs-tab-item.active {
    background: #f5f5f5;
    color: #111;
    font-weight: 700;
}

.xhs-waterfall {
    gap: 32px;
    align-items: flex-start;
}

.xhs-waterfall-col {
    width: calc(20% - 26px);
    gap: 28px;
}

.xhs-note-card {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.xhs-note-card:hover {
    transform: none;
    box-shadow: none;
}

.xhs-note-img-wrapper {
    max-height: none;
    border-radius: 10px;
    background: #f5f5f5;
}

.xhs-note-img {
    min-height: 0;
    max-height: none;
    border-radius: 10px;
}

.xhs-note-random-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 220px;
    border-radius: 14px;
    overflow: hidden;
    background-color: #ffe1eb;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border: 1px solid rgba(255, 150, 190, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 28px;
}

.xhs-note-quote {
    position: absolute;
    left: 28px;
    top: 22px;
    color: rgba(255, 133, 180, .36);
    font-size: 56px;
    font-family: Georgia, serif;
    font-weight: 700;
    line-height: 1;
}

.xhs-note-random-title {
    color: #57505c;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xhs-note-random-mark {
    position: absolute;
    right: 28px;
    bottom: 28px;
    width: 18px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 133, 180, .36);
}

.xhs-note-card:hover .xhs-note-img {
    transform: none;
}

.xhs-note-video-icon {
    top: 12px;
    right: 12px;
    left: auto;
    width: 24px;
    height: 24px;
    transform: none;
    background: rgba(0,0,0,.38);
}

.xhs-note-video-icon svg {
    width: 14px;
    height: 14px;
}

.xhs-note-img-count {
    right: 10px;
    bottom: 10px;
}

.xhs-note-info {
    padding: 10px 4px 0;
}

.xhs-note-title {
    margin-bottom: 10px;
    color: #222;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    word-break: break-word;
}

.xhs-note-meta {
    align-items: center;
}

.xhs-note-author {
    gap: 6px;
}

.xhs-author-avatar {
    width: 20px;
    height: 20px;
}

.xhs-author-name {
    max-width: 120px;
    color: #666;
    font-size: 12px;
}

.xhs-note-stats {
    gap: 4px;
}

.xhs-stat {
    color: #666;
    font-size: 12px;
}

.xhs-stat svg {
    fill: none;
    stroke: #888;
    stroke-width: 1.8;
}

.xhs-footer {
    display: none;
}

@media (max-width: 1648px) {
    .xhs-main {
        padding-left: 330px;
        padding-right: 42px;
    }

    .xhs-sidebar {
        left: 42px;
        width: 250px;
    }
}

@media (max-width: 1400px) {
    .xhs-waterfall {
        gap: 24px;
    }

    .xhs-waterfall-col {
        width: calc(25% - 18px);
    }
}

@media (max-width: 1199px) {
    .xhs-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .xhs-search-box {
        max-width: 46vw;
    }
}

/* ===== PC 首页 2026 卡片化布局 ===== */
@media (min-width: 1200px) {
    body.xhs-body {
        min-height: 100vh;
        background:
            radial-gradient(circle at 76% 0%, rgba(255, 36, 66, .08), transparent 32%),
            linear-gradient(120deg, #fbfcff 0%, #ffffff 48%, #fff2f5 100%);
        color: #15223a;
    }

    .xhs-header {
        left: 250px;
        height: 88px;
        border-bottom: 0;
        background: rgba(255, 255, 255, .74);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: none;
    }

    .xhs-header-inner {
        max-width: 1500px;
        height: 88px;
        margin: 0 auto;
        padding: 0 32px;
        gap: 22px;
    }

    .xhs-header .xhs-logo {
        display: none;
    }

    .xhs-search-box {
        position: static;
        width: 520px;
        max-width: 38vw;
        margin-left: auto;
        margin-right: auto;
        transform: none;
    }

    .xhs-search-form {
        position: relative;
        height: 42px;
    }

    .xhs-search-icon {
        left: 18px;
        right: auto;
        color: #6d7585;
    }

    .xhs-search-input {
        height: 42px;
        padding: 0 18px 0 48px;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, .9);
        box-shadow: 0 12px 34px rgba(15, 23, 42, .08);
        color: #17223b;
    }

    .xhs-header-actions {
        gap: 24px;
        align-items: center;
        margin-left: 0;
    }

    .xhs-header-actions .xhs-btn {
        border: 0 !important;
        background: transparent !important;
        color: #1f2937 !important;
        box-shadow: none !important;
        font-size: 15px;
        font-weight: 500;
        padding: 0 !important;
    }

    .xhs-header-actions .xhs-creator-center-btn {
        height: 42px !important;
        padding: 0 22px !important;
        border-radius: 999px !important;
        background: #ff2442 !important;
        color: #fff !important;
        font-weight: 700;
        box-shadow: 0 14px 30px rgba(255, 36, 66, .28) !important;
    }

    .xhs-sidebar {
        top: 0;
        left: 0;
        width: 250px;
        height: 100vh;
        padding: 36px 0 24px;
        border-right: 1px solid rgba(226, 232, 240, .78);
        background: rgba(255, 255, 255, .92);
        box-shadow: 24px 0 60px rgba(15, 23, 42, .04);
        overflow-y: auto;
        align-items: center;
    }

    .xhs-sidebar-logo {
        display: flex;
        width: 130px;
        height: 52px;
        margin: 0 auto 34px;
        align-items: center;
        justify-content: center;
        border-radius: 18px;
        overflow: hidden;
    }

    .xhs-sidebar-logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
    }

    .xhs-sidebar-nav {
        width: 202px;
        gap: 12px;
        margin-top: 0;
        margin-left: auto;
        margin-right: auto;
    }

    .xhs-nav-item {
        height: 50px;
        padding: 0 22px;
        border-radius: 16px;
        color: #202532;
        font-size: 16px;
        font-weight: 600;
    }

    .xhs-nav-item svg {
        width: 19px;
        height: 19px;
        flex: 0 0 19px;
    }

    .xhs-nav-item.active {
        background: #fff0f3;
        color: #ff2442;
        box-shadow: none;
    }

    .xhs-user-card {
        width: 202px;
        box-sizing: border-box;
        margin-top: 34px;
        padding: 20px;
        border: 0;
        border-radius: 16px;
        background: rgba(255,255,255,.92);
        box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
    }

    .xhs-sidebar-bottom {
        width: 202px;
        margin-top: auto;
        padding-bottom: 0;
        margin-left: auto;
        margin-right: auto;
    }

    .xhs-more-btn {
        width: 100%;
        justify-content: flex-start;
        background: transparent;
        box-shadow: none;
    }

    .xhs-main {
        display: block;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        padding: 96px 0 48px 250px;
    }

    .xhs-content {
        width: min(1500px, calc(100vw - 314px));
        margin: 0 auto;
        padding: 0 32px 42px;
    }

    .xhs-tabs {
        position: relative;
        top: auto;
        z-index: 1;
        margin: 0 0 18px;
        padding: 12px 14px;
        border-radius: 16px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    }

    .xhs-tabs-inner {
        gap: 16px;
        padding: 0;
        align-items: center;
        overflow: hidden;
    }

    .xhs-tab-item {
        height: 40px;
        padding: 0 18px;
        border-radius: 999px;
        color: #202532;
        font-size: 15px;
        white-space: nowrap;
    }

    .xhs-tab-item.active {
        background: #ff2442;
        color: #fff;
        box-shadow: 0 10px 22px rgba(255, 36, 66, .25);
    }

    .xhs-tab-grid {
        width: 38px;
        height: 38px;
        margin-left: auto;
        border: 0;
        border-radius: 12px;
        background: #f7f8fb;
        color: #202532;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex: 0 0 38px;
    }

    .xhs-hero-banner {
        position: relative;
        height: 250px;
        margin-bottom: 28px;
        border-radius: 16px;
        overflow: hidden;
        background:
            radial-gradient(circle at 25% 24%, rgba(255,255,255,.2), transparent 18%),
            linear-gradient(110deg, #1677ff 0%, #4287ff 45%, #8b5cf6 100%);
        box-shadow: 0 20px 48px rgba(58, 105, 235, .22);
        display: grid;
        grid-template-columns: 42% 1fr;
        align-items: center;
    }

    .xhs-hero-banner::before,
    .xhs-hero-banner::after {
        content: "";
        position: absolute;
        width: 84px;
        height: 84px;
        border-radius: 26px;
        border: 8px solid rgba(255,255,255,.08);
        transform: rotate(18deg);
    }

    .xhs-hero-banner::before {
        left: 58px;
        top: 38px;
    }

    .xhs-hero-banner::after {
        left: 360px;
        bottom: 34px;
    }

    .xhs-hero-mascot {
        position: relative;
        height: 100%;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        z-index: 1;
    }

    .xhs-hero-mascot img {
        width: 250px;
        height: 250px;
        object-fit: contain;
        filter: drop-shadow(0 24px 30px rgba(0,0,0,.16));
    }

    .xhs-hero-copy {
        position: relative;
        z-index: 1;
        color: #fff;
        padding-right: 70px;
    }

    .xhs-hero-copy h2 {
        margin: 0 0 12px;
        font-size: 42px;
        line-height: 1.12;
        font-weight: 900;
        letter-spacing: 0;
    }

    .xhs-hero-copy p {
        margin: 0 0 24px;
        font-size: 21px;
        line-height: 1.4;
        color: rgba(255,255,255,.9);
    }

    .xhs-hero-btn {
        height: 46px;
        padding: 0 30px;
        border-radius: 999px;
        background: #fff;
        color: #2563eb;
        font-size: 16px;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 14px 24px rgba(17, 24, 39, .16);
    }

    .xhs-hero-dots {
        position: absolute;
        left: 50%;
        bottom: 18px;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
        z-index: 2;
    }

    .xhs-hero-dots span {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: rgba(255,255,255,.35);
    }

    .xhs-hero-dots span.active {
        width: 22px;
        background: #fff;
    }

    .xhs-waterfall {
        gap: 20px;
        align-items: flex-start;
    }

    .xhs-waterfall-col {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        gap: 20px;
    }

    .xhs-note-card {
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
        overflow: hidden;
        transition: transform .18s ease, box-shadow .18s ease;
    }

    .xhs-note-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
    }

    .xhs-note-img-wrapper {
        width: 100%;
        aspect-ratio: 4 / 3;
        max-height: none;
        border-radius: 0;
        background: #edf2f7;
        overflow: hidden;
    }

    .xhs-note-img {
        width: 100%;
        height: 100%;
        min-height: 0;
        max-height: none;
        border-radius: 0;
        object-fit: cover;
        display: block;
    }

    .xhs-note-random-card {
        min-height: 0;
        height: 100%;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
    }

    .xhs-note-info {
        padding: 12px 14px 14px;
    }

    .xhs-note-title {
        min-height: 40px;
        margin-bottom: 12px;
        color: #182235;
        font-size: 15px;
        line-height: 1.42;
        font-weight: 700;
    }

    .xhs-note-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .xhs-author-avatar {
        width: 22px;
        height: 22px;
    }

    .xhs-author-name {
        max-width: 100px;
        color: #667085;
        font-size: 12px;
    }

    .xhs-user-badge {
        height: 16px;
        min-width: 16px;
        border-radius: 4px;
        font-size: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .xhs-note-stats .xhs-stat {
        color: #667085;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
}

@media (min-width: 1200px) and (max-width: 1440px) {
    .xhs-content {
        width: calc(100vw - 282px);
        padding-left: 24px;
        padding-right: 24px;
    }

    .xhs-hero-copy h2 {
        font-size: 36px;
    }

    .xhs-hero-copy p {
        font-size: 18px;
    }

    .xhs-waterfall-col:nth-child(5) {
        display: none;
    }
}

/* ===== PC 首页细节修正：去横幅、补右上角、收窄内容 ===== */
@media (min-width: 1200px) {
    body.xhs-body {
        --xhs-sidebar-width: 250px;
        --xhs-sidebar-gap: 1px;
        --xhs-content-width: 1360px;
        --xhs-shell-width: calc(var(--xhs-sidebar-width) + var(--xhs-sidebar-gap) + var(--xhs-content-width));
        --xhs-shell-left: max(24px, calc((100vw - var(--xhs-shell-width)) / 2));
    }

    .xhs-hero-banner {
        display: none !important;
    }

    .xhs-header {
        left: calc(var(--xhs-shell-left) + var(--xhs-sidebar-width) + var(--xhs-sidebar-gap));
        width: var(--xhs-content-width);
        max-width: calc(100vw - var(--xhs-shell-left) - var(--xhs-sidebar-width) - var(--xhs-sidebar-gap) - 24px);
    }

    .xhs-header-inner {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .xhs-search-box {
        width: 500px;
        max-width: 36vw;
        margin-left: auto;
        margin-right: auto;
    }

    .xhs-header-actions {
        flex: 0 0 auto;
        gap: 22px;
    }

    .xhs-header-userbar {
        display: inline-flex;
        align-items: center;
        gap: 16px;
        margin-left: 2px;
    }

    .xhs-header-notice {
        position: relative;
        width: 42px;
        height: 42px;
        border-radius: 999px;
        color: #1f2937;
        background: rgba(255, 255, 255, .88);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
        display: none !important;
    }

    .xhs-header-notice span {
        position: absolute;
        top: 4px;
        right: 5px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: #ff2442;
        color: #fff;
        font-size: 10px;
        line-height: 16px;
        text-align: center;
        font-weight: 800;
        box-shadow: 0 0 0 2px #fff;
    }

    .xhs-header-profile {
        height: 46px;
        padding: 4px 12px 4px 5px;
        border-radius: 999px;
        color: #17223b;
        background: rgba(255, 255, 255, .9);
        display: inline-flex;
        align-items: center;
        gap: 9px;
        box-shadow: 0 14px 32px rgba(15, 23, 42, .1);
    }

    .xhs-header-avatar {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
    }

    .xhs-header-name {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #17223b;
        font-size: 14px;
        font-weight: 700;
    }

    .xhs-content {
        width: var(--xhs-content-width);
        max-width: calc(100vw - var(--xhs-shell-left) - var(--xhs-sidebar-width) - var(--xhs-sidebar-gap) - 24px);
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .xhs-sidebar {
        left: var(--xhs-shell-left);
    }

    .xhs-main {
        padding-left: calc(var(--xhs-shell-left) + var(--xhs-sidebar-width) + var(--xhs-sidebar-gap));
    }

    .xhs-tabs {
        margin-bottom: 20px;
    }

    .xhs-tabs-inner {
        gap: 14px;
    }

    .xhs-tab-item {
        padding-left: 17px;
        padding-right: 17px;
    }

    .xhs-tab-grid {
        display: inline-flex !important;
        width: 42px;
        height: 42px;
        margin-left: auto;
        border-radius: 13px;
        background: #fff;
        color: #1f2937;
        box-shadow: inset 0 0 0 1px rgba(226, 232, 240, .85);
    }

    .xhs-sidebar .xhs-user-card {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1200px) and (max-width: 1440px) {
    body.xhs-body {
        --xhs-content-width: calc(100vw - 310px);
        --xhs-shell-left: 24px;
    }

    .xhs-header-inner,
    .xhs-content {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-right: 0;
    }

    .xhs-search-box {
        width: 420px;
        max-width: 34vw;
    }
}

/* PC 首页背景改为参考图的浅灰白底 */
@media (min-width: 1200px) {
    body.xhs-body {
        background:
            radial-gradient(circle at 72% 0%, rgba(226, 232, 240, .55), transparent 30%),
            linear-gradient(120deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%) !important;
    }

    .xhs-header {
        background:
            radial-gradient(circle at 72% 0%, rgba(226, 232, 240, .55), transparent 30%),
            linear-gradient(120deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%) !important;
    }

    .xhs-main {
        background: transparent !important;
    }
}

/* 发布页/笔记管理页左侧导航统一为 PC 首页同款 */
.pc-publish-sidebar,
.page .side {
    width: 250px !important;
    padding: 48px 22px 42px !important;
    background: rgba(255, 255, 255, .86) !important;
    border-right: 1px solid rgba(226, 232, 240, .72) !important;
    box-sizing: border-box !important;
    align-items: center !important;
}

.pc-publish-logo,
.page .side .logo {
    margin: 0 auto 54px !important;
}

.pc-publish-logo img,
.page .side .logo {
    width: 80px !important;
    max-height: 42px !important;
    object-fit: contain !important;
}

.pc-publish-navs,
.page .side .nav {
    width: 202px !important;
    display: grid !important;
    gap: 12px !important;
    margin: 0 auto !important;
}

.pc-publish-nav:not(.creator-home-nav),
.page .side .nav > a:not(.creator-home-nav) {
    display: none !important;
}

.pc-publish-nav.creator-home-nav,
.page .side .nav > a.creator-home-nav {
    height: 50px !important;
    padding: 0 22px !important;
    border-radius: 18px !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    color: #1f2937 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.pc-publish-nav.creator-home-nav.active,
.page .side .nav > a.creator-home-nav.active {
    color: #ff2442 !important;
    background: #fff0f3 !important;
    box-shadow: none !important;
}

.pc-publish-nav-icon,
.page .side .nav > a.creator-home-nav svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    color: currentColor !important;
}

.pc-publish-side-card,
.pc-publish-logout,
.page .side .tips,
.page .side .logout {
    display: none !important;
}

.pc-publish-user-card,
.page .side .profile {
    width: 202px !important;
    margin: 54px auto 0 !important;
    padding: 20px 18px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08) !important;
    border: 0 !important;
    box-sizing: border-box !important;
}

.pc-publish-user-head,
.page .side .profile:not(.side-profile-card) {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.page .side .profile.side-profile-card {
    display: block !important;
}

.page .side .profile.side-profile-card > img,
.page .side .profile.side-profile-card > strong {
    vertical-align: middle;
}

.page .side .profile.side-profile-card > strong {
    margin-left: 10px;
}

.pc-publish-user-head img,
.page .side .profile img {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.pc-publish-user-head strong,
.page .side .profile strong {
    color: #1f2937 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
}

.pc-publish-user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
    text-align: center;
}

.pc-publish-user-stats b {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.2;
}

.pc-publish-user-stats em {
    display: block;
    margin-top: 6px;
    color: #98a2b3;
    font-size: 12px;
    font-style: normal;
}

.pc-publish-user-links {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.pc-publish-user-links a {
    color: #667085;
    font-size: 13px;
    text-decoration: none;
}

/* 统一 PC 首页顶部、左侧栏和页面底色，消除色差 */
@media (min-width: 1200px) {
    html,
    body.xhs-body,
    .xhs-header,
    .xhs-header-inner,
    .xhs-main,
    .xhs-content,
    .xhs-waterfall,
    .xhs-waterfall-col {
        background: #f8fafc !important;
        background-image: none !important;
    }

    .xhs-header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }

    .xhs-sidebar {
        background: #fff !important;
        background-image: none !important;
        border-right: 0 !important;
        box-shadow: none !important;
    }

    .xhs-content {
        box-shadow: none !important;
    }

    .xhs-tabs {
        background: #fff !important;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .04) !important;
    }
}

/* 首页恢复原瀑布流：图片按原比例显示 */
@media (min-width: 1200px) {
    .xhs-tabs {
        background: #fff !important;
        background-image: none !important;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .04) !important;
    }

    .xhs-tabs-inner {
        background: transparent !important;
        background-image: none !important;
    }

    .xhs-waterfall {
        display: flex !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .xhs-waterfall-col {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .xhs-note-img-wrapper {
        aspect-ratio: auto !important;
        height: auto !important;
        max-height: none !important;
        background: transparent !important;
    }

    .xhs-note-img {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        object-fit: contain !important;
    }
}

/* 首页底部版权显示 */
.xhs-footer {
    display: block !important;
}

@media (min-width: 1200px) {
    .xhs-footer {
        width: var(--xhs-content-width, 1360px);
        max-width: calc(100vw - var(--xhs-shell-left, 24px) - var(--xhs-sidebar-width, 250px) - var(--xhs-sidebar-gap, 28px) - 24px);
        margin: 32px 0 28px calc(var(--xhs-shell-left, 24px) + var(--xhs-sidebar-width, 250px) + var(--xhs-sidebar-gap, 28px));
        padding: 0 0 24px;
        color: #98a2b3;
        font-size: 13px;
        font-weight: 700;
        text-align: center;
    }
}

/* 首页底部版权，避开旧版 .xhs-footer 隐藏规则 */
.xhs-site-footer {
    display: block;
    color: #98a2b3;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.xhs-site-footer-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

@media (min-width: 1200px) {
    .xhs-site-footer {
        width: var(--xhs-content-width, 1360px);
        max-width: calc(100vw - var(--xhs-shell-left, 24px) - var(--xhs-sidebar-width, 250px) - var(--xhs-sidebar-gap, 28px) - 24px);
        margin: 32px 0 28px calc(var(--xhs-shell-left, 24px) + var(--xhs-sidebar-width, 250px) + var(--xhs-sidebar-gap, 28px));
        padding: 0 0 24px;
    }
}
