/*
Theme Name:     B2 TapTap胶囊导航子主题
Theme URI:      https://web.bilixz.com
Description:    模仿TapTap悬浮胶囊导航风格，仅PC端生效
Author:         小哔哩
Template:       b2
Version:        3.3.1
*/

/* ========== PC端 TapTap胶囊导航 ========== */
@media screen and (min-width: 769px) {

    .site-header {
        position: fixed !important;
        top: 16px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 999 !important;
        width: calc(100% - 32px) !important;
        max-width: 1320px !important;
        background: transparent !important;
        border: none !important;
        margin-bottom: 0 !important;
    }

    .site-header-in {
        background: transparent !important;
        border-radius: 9999px !important;
    }

    .header-banner {
        background: #ffffff !important;
        border-radius: 9999px !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
        box-shadow: 0px 8px 30px -4px rgba(0, 0, 0, 0.08) !important;
        padding: 0 !important;
        height: 56px !important;
    }

    .b2dark .header-banner {
        background: #ffffff !important;
    }

    .header-banner-content {
        display: flex !important;
        align-items: center !important;
        height: 56px !important;
        padding: 0 24px !important;
        position: relative !important;
    }

    .header-banner-left {
        display: flex !important;
        align-items: center !important;
        gap: 16px !important;
        flex-shrink: 0 !important;
        z-index: 2 !important;
    }

    .header-logo .logo img {
        height: 28px !important;
        width: auto !important;
    }

    .ym-menu ul {
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .ym-menu ul li {
        margin: 0 !important;
        padding: 0 !important;
    }

    .ym-menu ul li a {
        display: inline-flex !important;
        align-items: center !important;
        color: #6b7280 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        padding: 6px 14px !important;
        border-radius: 9999px !important;
        line-height: 20px !important;
        white-space: nowrap !important;
        transition: all 0.2s ease !important;
        text-decoration: none !important;
        background: transparent !important;
        position: relative !important;
    }

    .ym-menu ul li.current-menu-item a::after,
    .ym-menu ul li a::after,
    .header-banner-left .menu > li.current-menu-item > a::after,
    .header-banner-left .menu > li > a::after {
        display: none !important;
        content: none !important;
        background: none !important;
        height: 0 !important;
        width: 0 !important;
    }

    .ym-menu ul li a:hover {
        background: rgba(73, 69, 255, 0.08) !important;
        color: #4945ff !important;
    }

    .ym-menu ul li.current-menu-item a {
        background: rgba(73, 69, 255, 0.1) !important;
        color: #4945ff !important;
        font-weight: 600 !important;
    }

    /* ========== 新搜索组件 ========== */
    .taptap-search {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .taptap-search-input-wrap {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 0 14px !important;
        background: #f5f5f7 !important;
        border-radius: 9999px !important;
        border: 2px solid transparent !important;
        transition: all 0.25s ease !important;
        height: 38px !important;
        width: 100% !important;
        max-width: 400px !important;
        cursor: text !important;
    }

    .taptap-search-input-wrap:focus-within {
        background: #fff !important;
        border-color: #4945ff !important;
        box-shadow: 0 0 0 4px rgba(73, 69, 255, 0.1) !important;
    }

    .taptap-search-icon {
        flex-shrink: 0 !important;
        color: #9ca3af !important;
    }

    .taptap-search-input-wrap:focus-within .taptap-search-icon {
        color: #4945ff !important;
    }

    .taptap-search-input-wrap input {
        flex: 1 !important;
        border: none !important;
        outline: none !important;
        font-size: 14px !important;
        color: #1f2937 !important;
        background: transparent !important;
        padding: 8px 0 !important;
        min-width: 0 !important;
    }

    .taptap-search-input-wrap input::placeholder {
        color: #c0c4cc !important;
    }

    .taptap-search-clear {
        flex-shrink: 0 !important;
        cursor: pointer !important;
        color: #c0c4cc !important;
        transition: color 0.15s !important;
        display: none !important;
    }

    .taptap-search-clear:hover {
        color: #909399 !important;
    }

    .taptap-search-input-wrap input:not(:placeholder-shown) ~ .taptap-search-clear {
        display: block !important;
    }

    .taptap-search-submit {
        flex-shrink: 0 !important;
        padding: 0 14px !important;
        height: 28px !important;
        background: #4945ff !important;
        color: #fff !important;
        border: none !important;
        border-radius: 9999px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .taptap-search-submit:hover {
        background: #3d3bcc !important;
    }

    .taptap-search-dropdown {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 480px !important;
        background: #fff !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
        border: 1px solid #f3f4f6 !important;
        overflow: hidden !important;
        z-index: 100 !important;
        display: none !important;
        padding: 8px 0 !important;
        max-height: 360px !important;
        overflow-y: auto !important;
    }

    .taptap-search-dropdown.active {
        display: block !important;
    }

    .taptap-search-section-title {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 16px 6px !important;
        font-size: 12px !important;
        color: #9ca3af !important;
        font-weight: 500 !important;
    }

    .taptap-history-clear {
        cursor: pointer !important;
        color: #c0c4cc !important;
        transition: color 0.15s !important;
    }

    .taptap-history-clear:hover {
        color: #f56c6c !important;
    }

    .taptap-search-tags {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 4px 16px 8px !important;
    }

    .taptap-search-tag {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 5px 12px !important;
        background: #f5f5f7 !important;
        border-radius: 9999px !important;
        font-size: 13px !important;
        color: #4b5058 !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
        white-space: nowrap !important;
    }

    .taptap-search-tag:hover {
        background: rgba(73, 69, 255, 0.08) !important;
        color: #4945ff !important;
    }

    .taptap-tag-remove {
        flex-shrink: 0 !important;
        color: #c0c4cc !important;
        transition: color 0.15s !important;
    }

    .taptap-tag-remove:hover {
        color: #f56c6c !important;
    }

    .taptap-hot-tag {
        background: rgba(255, 99, 152, 0.08) !important;
        color: #ff6398 !important;
    }

    .taptap-hot-tag:hover {
        background: rgba(255, 99, 152, 0.15) !important;
        color: #ff4081 !important;
    }

    /* ========== 右侧用户区 ========== */
    .header-user {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        z-index: 2 !important;
    }

    .change-theme {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .change-theme button,
    .change-theme a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 34px !important;
        height: 34px !important;
        border: none !important;
        background: transparent !important;
        color: #6b7280 !important;
        border-radius: 10px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .change-theme button:hover,
    .change-theme a:hover {
        background: #f3f4f6 !important;
        color: #374151 !important;
    }

    .top-user-avatar .avatar {
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }

    .login-button {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .header-login-button {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .login-button button {
        height: 34px !important;
        border-radius: 9999px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        transition: all 0.2s ease !important;
    }

    .login-button button.empty {
        background: transparent !important;
        color: #374151 !important;
        border: none !important;
        padding: 0 14px !important;
    }

    .login-button button.empty:hover {
        background: #f3f4f6 !important;
    }

    .login-button button:not(.empty) {
        background: #111827 !important;
        color: #fff !important;
        border: none !important;
        padding: 0 20px !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    }

    .login-button button:not(.empty):hover {
        background: #4D4DAD !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.15) !important;
    }

    /* 用户下拉菜单 */
    .top-user-box {
        position: relative !important;
    }

    .top-user-box-drop {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        margin-top: 8px !important;
        background: #fff !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
        border: 1px solid #f3f4f6 !important;
        min-width: 280px !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-8px) scale(0.98) !important;
        transition: all 0.2s ease !important;
        z-index: 100 !important;
    }

    .b2dark .top-user-box-drop {
        background: #fff !important;
    }

    .top-user-box-drop.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }

    .top-user-info-box {
        padding: 16px !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }

    .top-user-info-box-name {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    .top-user-info-box-name .avatar {
        width: 44px !important;
        height: 44px !important;
    }

    .top-user-name h2 {
        font-size: 15px !important;
        font-weight: 600 !important;
        margin: 0 !important;
        color: #111827 !important;
    }

    .top-user-info-box-count {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        text-align: center !important;
        margin-bottom: 12px !important;
    }

    .top-user-info-box-count span {
        display: block !important;
        font-size: 11px !important;
        color: #9ca3af !important;
        margin-bottom: 2px !important;
    }

    .top-user-info-box-count b {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #111827 !important;
    }

    .top-user-box-drop ul {
        padding: 8px !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .top-user-box-drop ul li a {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 10px 12px !important;
        color: #374151 !important;
        text-decoration: none !important;
        border-radius: 10px !important;
        transition: all 0.15s ease !important;
    }

    .top-user-box-drop ul li a:hover {
        background: #f3f4f6 !important;
    }

    .top-user-box-drop ul li a i {
        font-size: 18px !important;
        color: #6b7280 !important;
    }

    .top-user-link-des {
        display: block !important;
        font-size: 11px !important;
        color: #9ca3af !important;
        margin-top: 1px !important;
    }

    .header-search-select {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin-top: 8px !important;
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
        border: 1px solid #f3f4f6 !important;
        overflow: hidden !important;
        z-index: 100 !important;
    }

    .header-search-select a {
        display: block !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        color: #374151 !important;
        text-decoration: none !important;
    }

    .header-search-select a:hover {
        background: #f3f4f6 !important;
    }

    .header-search-select a.select {
        color: #4945ff !important;
        background: rgba(73, 69, 255, 0.08) !important;
    }

    .bar-mark {
        position: absolute !important;
        top: 2px !important;
        right: 2px !important;
        width: 8px !important;
        height: 8px !important;
        background: #ef4444 !important;
        border-radius: 50% !important;
        border: 2px solid #fff !important;
    }

    .site-content {
        padding-top: 88px !important;
    }

    .site-header.scrolled .header-banner {
        box-shadow: 0px 12px 40px -8px rgba(0, 0, 0, 0.12) !important;
    }

    .header-banner .ym-menu a, .header-banner, .social-top .site-title,
    .top-search-button button, .top-search input, .login-button .b2-account-circle-line {
        color: #6b7280 !important;
        fill: #6b7280 !important;
    }

    .social-top .login-button .b2-user {
        color: #6b7280 !important;
        fill: #6b7280 !important;
    }

    .user-tips {
        position: relative !important;
    }

    .user-tips::after {
        content: attr(data-title) !important;
        position: absolute !important;
        bottom: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        padding: 6px 12px !important;
        background: #1f2937 !important;
        color: #fff !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.15s ease !important;
        margin-bottom: 8px !important;
    }

    .user-tips:hover::after {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .header-banner-right {
        display: contents !important;
    }

    .header-banner-right .mobile-show {
        display: none !important;
    }
}

/* ========== 移动端 ========== */
@media screen and (max-width: 768px) {
    .site-header {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .header-banner {
        border-radius: 0 !important;
        background: #fff !important;
    }

    .site-content {
        padding-top: 0 !important;
    }

    .header-banner-right {
        display: block !important;
    }

    .taptap-search {
        display: none !important;
    }
}

/* ============================================
   小红书风格 - 卡片网格（仅PC端）
   ============================================ */
@media screen and (min-width: 769px) {
.b2_gap.xhs-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0;
}

.b2_gap.xhs-masonry > li {
    width: 100% !important;
    margin-bottom: 0 !important;
    display: block !important;
    border-radius: 12px;
    overflow: hidden;
    background: var(--b2-bg-2, #fff);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    break-inside: avoid;
}

.b2_gap.xhs-masonry > li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.b2_gap.xhs-masonry > li .item-in {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

/* 图片在左 */
.b2_gap.xhs-masonry > li .post-module-thumb {
    padding-top: 0 !important;
    position: relative;
    width: 140px;
    min-width: 140px;
    flex-shrink: 0;
}

.b2_gap.xhs-masonry > li .post-module-thumb .thumb-link {
    display: block;
    overflow: hidden;
    height: 100%;
}

.b2_gap.xhs-masonry > li .post-module-thumb .post-thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.b2_gap.xhs-masonry > li:hover .post-thumb {
    transform: scale(1.05);
}

/* 无图片时随机颜色背景 */
.b2_gap.xhs-masonry > li .post-module-thumb.xhs-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--xhs-color-a, #667eea), var(--xhs-color-b, #764ba2));
}

.b2_gap.xhs-masonry > li .post-module-thumb.xhs-no-image .xhs-no-img-icon {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.8);
}

.b2_gap.xhs-masonry > li .post-module-thumb .pay-type {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

/* 内容区在右 */
.b2_gap.xhs-masonry > li .post-info {
    padding: 12px 14px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.b2_gap.xhs-masonry > li .post-info h2 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--b2-font-1, #333);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

.b2_gap.xhs-masonry > li .post-info h2 a {
    color: inherit;
    text-decoration: none;
}

.b2_gap.xhs-masonry > li .post-excerpt {
    font-size: 12px;
    color: var(--b2-font-2, #999);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.b2_gap.xhs-masonry > li .list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--b2-font-2, #999);
    margin-top: auto;
}

.b2_gap.xhs-masonry > li .list-footer .post-list-meta-avatar {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--b2-font-2, #999);
    flex: 1;
    min-width: 0;
}

.b2_gap.xhs-masonry > li .list-footer .post-list-meta-avatar img.avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.b2_gap.xhs-masonry > li .list-footer .post-list-meta-avatar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.b2_gap.xhs-masonry > li .post-list-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.b2_gap.xhs-masonry > li .post-list-meta li {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--b2-font-2, #999);
}

.b2_gap.xhs-masonry > li .post-list-meta li i {
    font-size: 13px;
    margin-right: 2px;
}

.b2_gap.xhs-masonry > li .post-list-meta-box {
    margin-bottom: 6px;
}

.b2_gap.xhs-masonry > li .post-list-cat-item {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--b2-bg-3, #f5f5f5);
    color: var(--b2-font-2, #666);
    text-decoration: none;
    display: inline-block;
}
}

/* ============================================
   小红书弹窗 - 左边图片轮播，右边内容（PC端）
   ============================================ */
@media screen and (min-width: 769px) {
    .xhs-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.6); z-index: 9998;
        opacity: 0; visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .xhs-overlay.active { opacity: 1; visibility: visible; }

    .xhs-modal {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        z-index: 9999; display: flex; align-items: center; justify-content: center;
        opacity: 0; visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        overflow: hidden !important;
    }
    .xhs-modal.active { opacity: 1; visibility: visible; }

    .xhs-modal-content {
        background: #fff; border-radius: 12px;
        width: 90vw; max-width: 1000px; height: 85vh; max-height: 700px;
        display: flex; overflow: hidden !important;
        transform: translateY(30px) scale(0.97);
        transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    .xhs-modal.active .xhs-modal-content { transform: translateY(0) scale(1); }

    /* 左侧：图片轮播 - 浅灰背景 */
    .xhs-modal-left {
        flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.03);
        display: flex; align-items: center; justify-content: center;
        position: relative; overflow: hidden;
    }

    .xhs-modal-images {
        width: 100%; height: 100%; position: relative; overflow: hidden;
    }

    .xhs-images-track {
        display: flex; height: 100%;
        transition: transform 0.35s ease;
    }

    .xhs-image-slide {
        flex: 0 0 100%; width: 100%; height: 100%;
        display: flex; align-items: center; justify-content: center;
    }

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

    .xhs-img-counter {
        position: absolute; bottom: 16px; right: 16px;
        padding: 4px 12px; background: rgba(0, 0, 0, 0.5);
        color: #fff; font-size: 12px; border-radius: 9999px;
        backdrop-filter: blur(8px); z-index: 5;
    }

    .xhs-img-arrow {
        position: absolute; top: 50%; transform: translateY(-50%);
        width: 36px; height: 36px; border-radius: 50%;
        background: rgba(255, 255, 255, 0.85); border: none;
        cursor: pointer; display: flex; align-items: center; justify-content: center;
        color: #333; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease; z-index: 5;
    }
    .xhs-img-arrow:hover { background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
    .xhs-img-prev { left: 12px; }
    .xhs-img-next { right: 12px; }

    .xhs-modal-right {
        width: 380px; min-width: 380px; border-left: 1px solid #eee;
        display: flex; flex-direction: column; background: #fff;
        overflow: hidden; position: relative;
    }

    /* 固定头部 - 作者+标题不滚动 */
    .xhs-modal-right-header {
        flex-shrink: 0; padding: 20px 20px 0; background: #fff;
        border-bottom: 1px solid #f3f4f6; padding-bottom: 16px;
    }

    /* 作者区块固定标识类 */
    .xhs-modal-author-fixed {
        flex-shrink: 0;
    }

    /* 关闭按钮 - 左上角，模仿小红书 */
    .xhs-modal-close {
        position: fixed; z-index: 10000;
        width: 40px; height: 40px; border-radius: 50%;
        background: rgba(0, 0, 0, 0.45); color: #fff; border: none;
        cursor: pointer; display: flex; align-items: center; justify-content: center;
        font-size: 20px; transition: all 0.2s; backdrop-filter: blur(8px);
    }
    .xhs-modal-close:hover { background: rgba(0, 0, 0, 0.65); transform: scale(1.05); }

    /* 内容区 - 标题+作者+正文都在这里滚动 */
    .xhs-modal-article {
        flex: 1; overflow-y: auto; overflow-x: hidden;
        padding: 20px; -webkit-overflow-scrolling: touch;
    }

    .xhs-modal-meta {
        display: flex; align-items: center; gap: 10px;
    }
    .xhs-modal-meta-info { flex: 1; min-width: 0; }
    .xhs-modal-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
    .xhs-modal-author { font-weight: 600; font-size: 14px; color: #1a1a1a; }
    .xhs-modal-date { font-size: 12px; color: #999; margin-top: 2px; }

    .xhs-follow-btn {
        flex-shrink: 0; padding: 6px 16px; border: 1px solid #ff2442;
        background: #fff; color: #ff2442; border-radius: 9999px;
        font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s;
    }
    .xhs-follow-btn:hover { background: #fff0f0; }
    .xhs-follow-btn.xhs-followed { background: #f5f5f5; color: #999; border-color: #e5e7eb; }

    .xhs-modal-title {
        font-size: 17px; font-weight: 700; line-height: 1.4;
        margin: 0 0 12px; color: #1a1a1a;
    }

    .xhs-modal-entry {
        font-size: 15px; line-height: 1.8; color: #333; word-wrap: break-word;
    }
    .xhs-modal-entry img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
    .xhs-modal-entry p { margin: 0 0 12px; }
    .xhs-modal-entry h2 { font-size: 17px; font-weight: 700; margin: 20px 0 10px; color: #1a1a1a; }
    .xhs-modal-entry blockquote {
        padding: 10px 14px; margin: 10px 0;
        border-left: 3px solid #4945ff; background: #f7f8fa;
        border-radius: 0 8px 8px 0; color: #666;
    }

    /* 底部操作栏 - 固定不滚动 */
    .xhs-modal-bottom-bar {
        padding: 10px 20px; border-top: 1px solid #f3f4f6;
        display: flex; align-items: center; justify-content: space-between;
        flex-shrink: 0; background: #fff;
    }

    .xhs-actions { display: flex; align-items: center; gap: 12px; }

    .xhs-action-btn {
        display: inline-flex; align-items: center; gap: 4px;
        font-size: 13px; color: #666; cursor: pointer;
        border: none; background: none; padding: 6px 10px;
        border-radius: 8px; transition: all 0.2s;
    }
    .xhs-action-btn:hover { background: #f5f5f5; color: #1a1a1a; }
    .xhs-action-btn svg { flex-shrink: 0; }
    .xhs-action-btn .xhs-count { font-size: 13px; }

    .xhs-like-btn.xhs-liked {
        color: #ff2442 !important;
    }
    .xhs-like-btn.xhs-liked svg {
        fill: #ff2442;
    }

    .xhs-download-btn {
        background: #111827 !important;
        color: #fff !important;
        border-radius: 9999px !important;
        padding: 8px 20px !important;
        font-weight: 500;
    }
    .xhs-download-btn:hover {
        background: #374151 !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* 加载中 */
    .xhs-modal-loading {
        display: flex; align-items: center; justify-content: center;
        height: 200px; color: #999; font-size: 14px;
    }
    .xhs-modal-loading::after {
        content: ''; width: 24px; height: 24px;
        border: 2px solid #eee; border-top-color: #4945ff;
        border-radius: 50%; animation: xhs-spin 0.8s linear infinite; margin-right: 8px;
    }
    @keyframes xhs-spin { to { transform: rotate(360deg); } }
}

body.xhs-modal-open { overflow: hidden !important; }

.load-more .post-load-button { border-radius: 20px; padding: 8px 28px; font-size: 13px; }
