/* ===== HuNote 小红书风格样式 - 完整版 ===== */

/* CSS变量 */
:root {
    --hunote-primary: #ff2442;
    --hunote-primary-light: #ff4d6d;
    --hunote-primary-dark: #e02040;
    --hunote-bg: #f5f5f5;
    --hunote-card-bg: #fff;
    --hunote-text: #333;
    --hunote-text-secondary: #666;
    --hunote-text-light: #999;
    --hunote-border: #f0f0f0;
    --hunote-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --hunote-radius: 12px;
    --hunote-sidebar-width: 240px;
}

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

.hunote-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--hunote-bg);
    min-height: 100vh;
    padding-left: var(--hunote-sidebar-width);
}

/* ===== 顶部导航栏 ===== */
.hunote-topbar {
    position: fixed;
    top: 0;
    left: var(--hunote-sidebar-width);
    right: 0;
    height: 60px;
    background: var(--hunote-card-bg);
    border-bottom: 1px solid var(--hunote-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.hunote-topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hunote-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--hunote-primary);
    text-decoration: none;
}

.hunote-logo i {
    font-size: 28px;
}

.hunote-top-search {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    position: relative;
}

.hunote-top-search input {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 21px;
    padding: 0 44px 0 20px;
    font-size: 14px;
    background: #f5f5f5;
    transition: all 0.3s;
}

.hunote-top-search input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px var(--hunote-primary);
}

.hunote-top-search input::placeholder {
    color: #999;
}

.hunote-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--hunote-text-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.hunote-search-btn:hover {
    color: var(--hunote-primary);
}

.hunote-search-btn i {
    position: static;
    transform: none;
    font-size: 18px;
}

.hunote-top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 消息通知图标 */
.hunote-notification-icon {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hunote-text);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s;
}

.hunote-notification-icon:hover {
    background: #f5f5f5;
    color: var(--hunote-primary);
}

.hunote-notification-icon i {
    font-size: 22px;
}

.hunote-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--hunote-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hunote-btn-post {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--hunote-primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.hunote-btn-post:hover {
    background: var(--hunote-primary-dark);
    transform: translateY(-1px);
}

.hunote-top-user {
    position: relative;
}

.hunote-top-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
}

.hunote-top-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--hunote-card-bg);
    border-radius: var(--hunote-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.hunote-top-user:hover .hunote-top-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hunote-top-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--hunote-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.hunote-top-dropdown a:hover {
    background: #f5f5f5;
    color: var(--hunote-primary);
}

.hunote-dropdown-divider {
    height: 1px;
    background: var(--hunote-border);
    margin: 8px 0;
}

/* ===== 左侧边栏 ===== */
.hunote-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--hunote-sidebar-width);
    background: var(--hunote-card-bg);
    border-right: 1px solid var(--hunote-border);
    padding: 20px 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.hunote-sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--hunote-border);
    margin-bottom: 20px;
}

.hunote-nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.hunote-nav-section-title {
    font-size: 12px;
    color: var(--hunote-text-light);
    padding: 0 12px;
    margin-bottom: 8px;
}

.hunote-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--hunote-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.hunote-nav-item:hover {
    background: #f5f5f5;
}

.hunote-nav-item.active {
    background: var(--hunote-primary);
    color: #fff;
}

.hunote-nav-item i {
    font-size: 20px;
}

.hunote-nav-item span {
    font-size: 14px;
}

/* 左侧导航栏消息徽章 */
.hunote-nav-item {
    position: relative;
}

.hunote-nav-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--hunote-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hunote-nav-item.active .hunote-nav-badge {
    background: #fff;
    color: var(--hunote-primary);
}

/* ===== 主内容区 ===== */
.hunote-main {
    padding: 80px 24px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== 分类标签 ===== */
.hunote-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.hunote-tabs-inner {
    display: flex;
    gap: 12px;
}

.hunote-tab {
    padding: 8px 20px;
    background: var(--hunote-card-bg);
    border: 1px solid var(--hunote-border);
    border-radius: 20px;
    color: var(--hunote-text);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

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

.hunote-tab.active {
    background: var(--hunote-primary);
    color: #fff;
    border-color: var(--hunote-primary);
}

/* ===== 搜索结果提示 ===== */
.hunote-search-result {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--hunote-card-bg);
    border-radius: 12px;
    border-left: 4px solid var(--hunote-primary);
}

.hunote-search-result p {
    font-size: 14px;
    color: var(--hunote-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hunote-search-result i {
    color: var(--hunote-primary);
    font-size: 18px;
}

/* ===== 瀑布流布局 ===== */
.hunote-waterfall {
    column-count: 5;
    column-gap: 16px;
}

/* 卡片基础样式 - 统一高度 */
.hunote-card {
    break-inside: avoid;
    margin-bottom: 16px;
    background: var(--hunote-card-bg);
    border-radius: var(--hunote-radius);
    overflow: hidden;
    box-shadow: var(--hunote-shadow);
    transition: all 0.3s;
    cursor: pointer;
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
}

.hunote-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 图文卡片图片区域 - 固定比例 */
.hunote-card-image {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.hunote-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hunote-card:hover .hunote-card-image img {
    transform: scale(1.03);
}

/* 多图标记 */
.hunote-multi-image-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.hunote-multi-image-badge i {
    font-size: 14px;
}

.hunote-multi-image-badge span {
    font-weight: 500;
}

/* 纯文字卡片样式 - 统一布局 */
.hunote-card-text-only {
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
    position: relative;
}

.hunote-card-text-only .hunote-card-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 纯文字卡片内容区 - 分为文字区和底部信息区 */
.hunote-card-text-only .hunote-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
    background: #f8f9fa;
    border: 1px solid #f0f0f0;
    border-bottom: none;
}

/* 纯文字卡片文字区域 - 居中显示 */
.hunote-card-text-only .hunote-card-text-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    overflow: hidden;
}

/* 纯文字卡片标题样式 - 自然黑色文字 */
.hunote-card-text-only .hunote-card-title {
    -webkit-line-clamp: 12;
    line-height: 1.6;
    margin-bottom: 0;
    overflow: hidden;
    color: #333;
    text-align: center;
    width: 100%;
}

.hunote-card-text-only .hunote-card-title p {
    color: #333;
    margin: 0 0 8px 0;
    text-align: center;
}

.hunote-card-text-only .hunote-card-title p:last-child {
    margin-bottom: 0;
}

/* 纯文字卡片字体大小类 - 根据字数自动调整 */
.hunote-card-text-only .hunote-card-title.font-xl {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
}

.hunote-card-text-only .hunote-card-title.font-large {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.5;
}

.hunote-card-text-only .hunote-card-title.font-medium {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
}

.hunote-card-text-only .hunote-card-title.font-normal {
    font-size: 15px;
    line-height: 1.7;
}

.hunote-card-text-only .hunote-card-title.font-small {
    font-size: 13px;
    line-height: 1.8;
}

/* 纯文字卡片底部信息 - 固定在底部 */
.hunote-card-text-only .hunote-card-footer {
    flex-shrink: 0;
    background: #fff;
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
}

/* 图文卡片内容区 - 统一底部高度 */
.hunote-card-has-image .hunote-card-content {
    padding: 10px 16px;
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.hunote-card-title {
    font-size: 14px;
    line-height: 1.5;
    color: var(--hunote-text);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 纯文字卡片标题可以多行显示 */
.hunote-card-text-only .hunote-card-title {
    -webkit-line-clamp: 12;
    line-height: 1.8;
}

.hunote-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hunote-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hunote-card-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.hunote-card-author span {
    font-size: 12px;
    color: var(--hunote-text-light);
}

.hunote-card-likes {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--hunote-text-light);
}

.hunote-card-likes i {
    font-size: 14px;
}

/* ===== 加载更多 ===== */
.hunote-loadmore {
    text-align: center;
    padding: 40px 0;
}

.hunote-loadmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--hunote-card-bg);
    border: 1px solid var(--hunote-border);
    border-radius: 24px;
    color: var(--hunote-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.hunote-loadmore-btn:hover {
    border-color: var(--hunote-primary);
    color: var(--hunote-primary);
}

/* ===== 空状态 ===== */
.hunote-empty {
    text-align: center;
    padding: 80px 20px;
}

.hunote-empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 16px;
}

.hunote-empty h3 {
    font-size: 18px;
    color: var(--hunote-text);
    margin-bottom: 8px;
}

.hunote-empty p {
    font-size: 14px;
    color: var(--hunote-text-light);
    margin-bottom: 24px;
}

.hunote-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: var(--hunote-primary);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.hunote-btn-primary:hover {
    background: var(--hunote-primary-dark);
    transform: translateY(-1px);
}

/* ===== 移动端底部导航 ===== */
.hunote-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--hunote-card-bg);
    border-top: 1px solid var(--hunote-border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
}

.hunote-mobile-nav .hunote-nav-item {
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px;
    margin: 0;
}

.hunote-mobile-nav .hunote-nav-item i {
    font-size: 22px;
}

.hunote-mobile-nav .hunote-nav-item span {
    font-size: 11px;
}

/* ===== 响应式布局 ===== */
@media (max-width: 1400px) {
    .hunote-waterfall {
        column-count: 4;
    }
}

@media (max-width: 1100px) {
    .hunote-waterfall {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .hunote-page {
        padding-left: 0;
    }
    
    .hunote-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .hunote-sidebar.open {
        transform: translateX(0);
    }
    
    .hunote-topbar {
        left: 0;
    }
    
    .hunote-top-search {
        margin: 0 16px;
    }
    
    .hunote-waterfall {
        column-count: 2;
        column-gap: 12px;
    }
    
    .hunote-card {
        margin-bottom: 12px;
    }
    
    .hunote-mobile-nav {
        display: flex;
    }
    
    .hunote-main {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .hunote-waterfall {
        column-count: 2;
        column-gap: 8px;
    }
    
    .hunote-card {
        margin-bottom: 8px;
        border-radius: 8px;
    }
    
    .hunote-card-content {
        padding: 10px;
    }
    
    .hunote-card-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .hunote-main {
        padding: 72px 12px 80px;
    }
    
    .hunote-topbar {
        padding: 0 16px;
    }
    
    .hunote-btn-post span {
        display: none;
    }
    
    .hunote-btn-post {
        padding: 10px;
    }
}

/* ===== 返回顶部按钮 ===== */
.hunote-backtop {
    position: fixed;
    right: 30px;
    bottom: 100px;
    width: 44px;
    height: 44px;
    background: var(--hunote-card-bg);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.hunote-backtop.visible {
    opacity: 1;
    visibility: visible;
}

.hunote-backtop:hover {
    background: var(--hunote-primary);
    color: #fff;
    transform: translateY(-2px);
}

.hunote-backtop i {
    font-size: 20px;
}

/* ===== 加载动画 ===== */
.hunote-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.hunote-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top-color: var(--hunote-primary);
    border-radius: 50%;
    animation: hunote-spin 1s linear infinite;
}

@keyframes hunote-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Toast提示 ===== */
.hunote-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

.hunote-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== 响应式中的返回顶部 ===== */
@media (max-width: 768px) {
    .hunote-backtop {
        right: 16px;
        bottom: 80px;
        width: 40px;
        height: 40px;
    }
    
    .hunote-backtop i {
        font-size: 18px;
    }
}

/* ===== 小红书风格笔记弹窗 ===== */

/* 弹窗遮罩层 */
.xhs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.xhs-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.xhs-note-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90vw;
    max-width: 1000px;
    height: 85vh;
    max-height: 700px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.xhs-note-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* 关闭按钮 */
.xhs-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.xhs-modal-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.xhs-modal-close i {
    font-size: 20px;
    color: #333;
}

/* 弹窗内容包装器 */
.xhs-modal-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
}

/* 左侧媒体区域 */
.xhs-media-section {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
}

.xhs-media-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xhs-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 图片导航按钮 */
.xhs-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}

.xhs-nav-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.xhs-nav-btn.xhs-prev {
    left: 16px;
}

.xhs-nav-btn.xhs-next {
    right: 16px;
}

.xhs-nav-btn i {
    font-size: 24px;
    color: #333;
}

/* 图片指示器 */
.xhs-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.xhs-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.xhs-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* 纯文字笔记背景 */
.xhs-text-only-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.xhs-text-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xhs-text-icon i {
    font-size: 60px;
    color: #fff;
}

/* 右侧内容区域 */
.xhs-content-section {
    width: 360px;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #f0f0f0;
}

/* 作者头部 */
.xhs-author-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
}

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

.xhs-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.xhs-author-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.xhs-follow-btn {
    padding: 6px 16px;
    background: var(--hunote-primary);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.xhs-follow-btn:hover {
    background: var(--hunote-primary-dark);
}

/* 可滚动内容区 */
.xhs-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.xhs-scroll-content::-webkit-scrollbar {
    width: 4px;
}

.xhs-scroll-content::-webkit-scrollbar-track {
    background: transparent;
}

.xhs-scroll-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

/* 笔记正文 */
.xhs-note-body {
    margin-bottom: 24px;
}

.xhs-note-title {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.xhs-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1890ff;
    margin-bottom: 8px;
}

.xhs-location i {
    font-size: 14px;
}

.xhs-publish-time {
    font-size: 12px;
    color: #999;
}

/* 评论区 */
.xhs-comments-area {
    border-top: 1px solid #f5f5f5;
    padding-top: 20px;
}

.xhs-comments-count {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.xhs-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.xhs-comment {
    display: flex;
    gap: 12px;
}

.xhs-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.xhs-comment-main {
    flex: 1;
    min-width: 0;
}

.xhs-comment-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.xhs-comment-author {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.xhs-comment-like {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.xhs-comment-like:hover {
    color: var(--hunote-primary);
}

.xhs-comment-like i {
    font-size: 14px;
}

.xhs-comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
}

.xhs-comment-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

.xhs-comment-loc {
    color: #999;
}

.xhs-no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.xhs-no-comments i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.xhs-no-comments p {
    font-size: 13px;
}

/* 底部互动栏 */
.xhs-interaction-bar {
    border-top: 1px solid #f0f0f0;
    padding: 12px 20px;
    background: #fff;
}

.xhs-input-area {
    margin-bottom: 12px;
}

.xhs-comment-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 16px;
}

.xhs-comment-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.xhs-comment-input-wrapper input::placeholder {
    color: #999;
}

.xhs-emoji {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    color: #999;
    transition: all 0.2s;
}

.xhs-emoji:hover {
    color: #333;
}

.xhs-emoji i {
    font-size: 18px;
}

.xhs-login-tip {
    text-align: center;
    font-size: 13px;
    color: #999;
    padding: 8px;
}

.xhs-login-tip a {
    color: var(--hunote-primary);
    text-decoration: none;
}

/* 互动按钮组 */
.xhs-action-btns {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.xhs-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    transition: all 0.2s;
    border-radius: 8px;
}

.xhs-action-item:hover {
    background: #f5f5f5;
}

.xhs-action-item i {
    font-size: 20px;
}

.xhs-action-item.liked {
    color: var(--hunote-primary);
}

.xhs-action-item.liked i {
    color: var(--hunote-primary);
}

/* ===== 弹窗响应式适配 ===== */
@media (max-width: 768px) {
    .xhs-note-modal {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
        flex-direction: column;
    }
    
    .xhs-note-modal.active {
        transform: translate(-50%, -50%);
    }
    
    .xhs-media-section {
        height: 50vh;
        min-height: 300px;
    }
    
    .xhs-content-section {
        width: 100%;
        min-width: auto;
        flex: 1;
        border-left: none;
        border-top: 1px solid #f0f0f0;
    }
    
    .xhs-scroll-content {
        padding: 16px;
    }
    
    .xhs-author-header {
        padding: 12px 16px;
    }
    
    .xhs-interaction-bar {
        padding: 12px 16px;
    }
    
    .xhs-modal-close {
        top: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.5);
    }
    
    .xhs-modal-close i {
        color: #fff;
    }
    
    .xhs-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .xhs-nav-btn.xhs-prev {
        left: 8px;
    }
    
    .xhs-nav-btn.xhs-next {
        right: 8px;
    }
}

/* ===== modal.php 使用的弹窗样式 ===== */

/* 弹窗内部容器 */
.xhs-modal-inner {
    width: 100%;
    height: 100%;
    display: flex;
    background: #fff;
}

/* 纯文字笔记弹窗 - 左右分栏布局 */
.xhs-modal-inner.xhs-text-only-modal {
    flex-direction: row;
    background: #fff;
}

/* 纯文字笔记左侧文字区域 */
.xhs-modal-inner.xhs-text-only-modal .xhs-text-media {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
    min-height: 0;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-text-content {
    max-width: 500px;
    width: 100%;
    padding: 20px 0;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-text-body {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 24px;
    text-align: justify; /* 两端对齐 */
    text-justify: inter-ideograph; /* 中文两端对齐优化 */
}

.xhs-modal-inner.xhs-text-only-modal .xhs-text-body p {
    margin-bottom: 12px;
    text-align: justify; /* 段落两端对齐 */
    text-justify: inter-ideograph;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-text-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1890ff;
    margin-bottom: 12px;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-text-time {
    font-size: 13px;
    color: #999;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-modal-content {
    width: 380px;
    min-width: 380px;
    border-left: 1px solid #f0f0f0;
    background: #fff;
}

/* 纯文字笔记内容区 - 只显示评论 */
.xhs-modal-inner.xhs-text-only-modal .xhs-scrollable {
    padding: 20px;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full::after {
    content: '';
    display: none;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-text {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
    position: relative;
    z-index: 1;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-text p {
    margin-bottom: 12px;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-text p:last-child {
    margin-bottom: 0;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-time {
    color: #999;
    text-align: left;
    margin-top: 20px;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-loc {
    justify-content: flex-start;
    color: #666;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-loc i {
    color: #999;
}

/* 媒体区域 */
.xhs-modal-media {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
}

.xhs-media-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xhs-media-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 导航按钮 */
.xhs-nav-prev {
    left: 16px;
}

.xhs-nav-next {
    right: 16px;
}

/* 图片指示器容器 */
.xhs-dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

/* 图片计数 */
.xhs-img-counter {
    position: absolute;
    bottom: 50px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 5;
}

/* 内容区域 */
.xhs-modal-content {
    width: 380px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #f0f0f0;
}

/* 头部 */
.xhs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
}

.xhs-author {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.xhs-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.xhs-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.xhs-follow {
    padding: 6px 16px;
    background: var(--hunote-primary);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.xhs-follow:hover {
    background: var(--hunote-primary-dark);
}

/* 可滚动区域 */
.xhs-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.xhs-scrollable::-webkit-scrollbar {
    width: 4px;
}

.xhs-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.xhs-scrollable::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

/* 笔记内容 */
.xhs-note {
    margin-bottom: 24px;
}

.xhs-note.xhs-note-full {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
}

.xhs-note.xhs-note-full .xhs-text {
    color: #fff;
}

.xhs-note.xhs-note-full .xhs-time {
    color: rgba(255, 255, 255, 0.8);
}

.xhs-text {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 12px;
    text-align: justify; /* 两端对齐 */
    text-justify: inter-ideograph; /* 中文两端对齐优化 */
}

.xhs-text p {
    margin-bottom: 8px;
    text-align: justify; /* 段落两端对齐 */
    text-justify: inter-ideograph;
}

.xhs-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1890ff;
    margin-bottom: 8px;
}

.xhs-loc i {
    font-size: 14px;
}

.xhs-time {
    font-size: 12px;
    color: #999;
}

/* 评论区 */
.xhs-comments {
    border-top: 1px solid #f5f5f5;
    padding-top: 20px;
}

.xhs-comments-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.xhs-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.xhs-comment-item {
    display: flex;
    gap: 12px;
}

.xhs-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.xhs-comment-body {
    flex: 1;
    min-width: 0;
}

.xhs-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.xhs-comment-name {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.xhs-comment-like {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.xhs-comment-like:hover {
    color: var(--hunote-primary);
}

.xhs-comment-like i {
    font-size: 14px;
}

.xhs-comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
    cursor: pointer;
}

.xhs-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

.xhs-comment-reply-btn {
    cursor: pointer;
    color: #999;
}

.xhs-comment-reply-btn:hover {
    color: var(--hunote-primary);
}

/* 二级评论 */
.xhs-replies {
    margin-top: 12px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
}

.xhs-reply-item {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.xhs-reply-item:last-child {
    margin-bottom: 0;
}

.xhs-reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.xhs-reply-body {
    flex: 1;
    min-width: 0;
}

.xhs-reply-header {
    margin-bottom: 2px;
}

.xhs-reply-name {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.xhs-reply-text {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
    cursor: pointer;
}

.xhs-reply-to {
    color: #999;
}

.xhs-reply-meta {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.xhs-reply-more {
    font-size: 12px;
    color: #1890ff;
    cursor: pointer;
    padding: 4px 0;
}

.xhs-reply-more:hover {
    color: #40a9ff;
}

/* 空评论状态 */
.xhs-empty-comments {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.xhs-empty-comments i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.xhs-empty-comments p {
    font-size: 13px;
}

/* 底部栏 */
.xhs-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 20px;
    background: #fff;
}

.xhs-input-box {
    margin-bottom: 12px;
}

.xhs-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 16px;
}

.xhs-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

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

.xhs-send-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    color: var(--hunote-primary);
    transition: all 0.2s;
}

.xhs-send-btn:hover {
    transform: scale(1.1);
}

.xhs-send-btn i {
    font-size: 18px;
}

.xhs-login {
    text-align: center;
    font-size: 13px;
    color: #999;
    padding: 8px;
}

.xhs-login a {
    color: var(--hunote-primary);
    text-decoration: none;
}

/* 互动按钮 */
.xhs-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.xhs-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    transition: all 0.2s;
    border-radius: 8px;
}

.xhs-action:hover {
    background: #f5f5f5;
}

.xhs-action i {
    font-size: 20px;
}

.xhs-action.active {
    color: var(--hunote-primary);
}

.xhs-action.active i {
    color: var(--hunote-primary);
}

/* Toast提示 */
.xhs-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

.xhs-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* modal.php 弹窗响应式适配 */
@media (max-width: 768px) {
    .xhs-modal-inner {
        flex-direction: column;
    }
    
    .xhs-modal-media {
        height: 45vh;
        min-height: 280px;
    }
    
    .xhs-modal-content {
        width: 100%;
        min-width: auto;
        flex: 1;
        border-left: none;
        border-top: 1px solid #f0f0f0;
    }
    
    .xhs-scrollable {
        padding: 16px;
    }
    
    .xhs-header {
        padding: 12px 16px;
    }
    
    .xhs-footer {
        padding: 12px 16px;
    }
    
    .xhs-nav-prev {
        left: 8px;
    }
    
    .xhs-nav-next {
        right: 8px;
    }
    
    /* 纯文字笔记移动端适配 */
    .xhs-modal-inner.xhs-text-only-modal {
        background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    }
    
    .xhs-modal-inner.xhs-text-only-modal .xhs-scrollable {
        padding: 20px;
        min-height: auto;
    }
    
    .xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full {
        padding: 30px 24px;
        border-radius: 16px;
    }
    
    .xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full::before {
        font-size: 80px;
        top: 10px;
        left: 20px;
    }
    
    .xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-text {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .xhs-modal-inner.xhs-text-only-modal .xhs-note.xhs-note-full .xhs-text p {
        margin-bottom: 12px;
    }
}
