/* ============================================
   小红书风格首页样式 - 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;
}
a { text-decoration: none; color: inherit; transition: opacity .2s; }
a:hover { opacity: .8; }
img { display: block; max-width: 100%; }

/* ====== 顶部导航栏 ====== */
.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;
}