/* ============ 详情页样式 ============ */

/* --- 分屏布局 --- */
.detail-layout {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.detail-main {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 300px - 24px);
}

.detail-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.detail-sidebar::-webkit-scrollbar {
    display: none;
}

/* --- 文章主体 --- */
.article-detail {
    background: #fff;
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

/* 文章标题 */
.article-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* 作者信息栏 */
.article-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid #f0f0f5;
    border-bottom: 1px solid #f0f0f5;
    margin-bottom: 32px;
}

.author-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #f0f0f5;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-badge {
    font-size: 10px;
    font-weight: 500;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #9ca3af;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.author-right-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.author-external-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 550;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.author-external-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.08));
    border-color: #c7d2fe;
    color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.author-follow {
    padding: 6px 20px;
    border: 1.5px solid #6366f1;
    background: #6366f1;
    color: #fff;
    font-size: 13px;
    font-weight: 550;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.author-follow:hover {
    background: #5558e0;
    border-color: #5558e0;
    transform: translateY(-1px);
}

.author-follow.followed {
    background: #fff;
    color: #9ca3af;
    border-color: #e5e7eb;
}

/* --- 文章正文 --- */
.article-body {
    font-size: 16px;
    line-height: 1.85;
    color: #374151;
}

.article-body p {
    margin-bottom: 18px;
}

.article-intro {
    font-size: 16px;
    color: #4b5563;
    background: #f9fafb;
    border-left: 3px solid #6366f1;
    padding: 12px 18px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 28px;
}

/* ==================================================================
 * .content —— 文章详情页正文统一容器样式
 * 其他模型详情页直接：<div class="content">{$content}</div> 即可复用
 * 作用域：.content 下的 p / h1~h6 / strong / b / em / span / a
 *        blockquote / ol / ul / li / img / table / code / hr
 * ================================================================== */
.content {
    font-size: 16px;
    line-height: 1.9;
    color: #2f3a4b;
    word-break: break-word;
    overflow-wrap: break-word;
    text-wrap: wrap !important;
    white-space: normal !important;
}

/* 强制覆盖后台编辑器可能加的 nowrap / text-wrap-mode 内联样式 */
.content p,
.content span,
.content div,
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6,
.content li,
.content td,
.content th {
    white-space: normal !important;
    text-wrap: wrap !important;
    text-wrap-mode: auto !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* —— 段落 —— */
.content p {
    margin: 0 0 20px;
    text-align: justify;
    text-justify: inter-ideograph;
}

/* —— 标题 h1 ~ h6（左侧彩色装饰竖条 + 渐变下划线） —— */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    color: #1a1a2e;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.content h1 {
    font-size: 26px;
    margin: 42px 0 18px;
    padding-left: 14px;
    border-left: 5px solid #6366f1;
    position: relative;
}

.content h2 {
    font-size: 22px;
    margin: 38px 0 16px;
    padding-left: 14px;
    border-left: 4px solid #8b5cf6;
    position: relative;
}

.content h2::after {
    content: '';
    display: block;
    margin-top: 8px;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.content h3 {
    font-size: 19px;
    margin: 30px 0 14px;
    padding-left: 12px;
    border-left: 3px solid #a78bfa;
    color: #2e274a;
}

.content h4 {
    font-size: 17px;
    margin: 24px 0 12px;
    padding-left: 10px;
    border-left: 3px solid #c4b5fd;
    color: #3d375c;
}

.content h5 {
    font-size: 16px;
    margin: 20px 0 10px;
    color: #4b456c;
}

.content h6 {
    font-size: 15px;
    margin: 18px 0 10px;
    color: #55506e;
}

/* —— 行内元素：加粗、斜体、下划线、删除线 —— */
.content strong,
.content b {
    font-weight: 700;
    color: #1a1a2e;
}

/* 编辑器里 strong 加了内联颜色（如红色）时，保留内联优先级，上面不强行覆盖 */

.content i {
    font-style: italic;
    color: #4b456c;
}
.content em {
    padding: 2px 6px;
	margin: 0 3px;
    background: #f3f4f6;
    color: #6366f1;
    border-radius: 4px;
    word-break: break-word;
	font-style: normal;
}

.content u {
    text-decoration: underline;
    text-decoration-color: #818cf8;
    text-underline-offset: 3px;
}

.content del,
.content s {
    text-decoration: line-through;
    color: #9ca3af;
}

/* —— 链接 —— */
.content a {
    color: #4f46e5;
    text-decoration: none;
    border-bottom: 1px solid rgba(79, 70, 229, 0.25);
    padding-bottom: 1px;
    transition: all 0.2s;
    word-break: break-all;
}

.content a:hover {
    color: #6366f1;
    border-bottom-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

/* —— 引用块 blockquote（带引用图标 + 渐变左侧竖条） —— */
.content blockquote {
    margin: 22px 0;
    padding: 18px 20px 18px 48px;
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
    border-left: 4px solid #8b5cf6;
    border-radius: 0 10px 10px 0;
    position: relative;
    color: #4b456c;
    font-style: normal;
}

.content blockquote::before {
    content: '“';
    position: absolute;
    left: 12px;
    top: 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    line-height: 1;
    color: #c4b5fd;
    font-weight: 700;
}

.content blockquote p {
    margin: 0 0 10px !important;
    color: #4b456c !important;
}

.content blockquote p:last-child {
    margin-bottom: 0 !important;
}

/* —— 有序列表 / 无序列表 ——
   兼容编辑器里常见的：
     <ol class=" list-paddingleft-2" style="list-style-type: decimal;">
     <ul class=" list-paddingleft-2" style="list-style-type: disc;">
*/
.content ol,
.content ul,
.content ol.list-paddingleft-2,
.content ul.list-paddingleft-2 {
    margin: 18px 0 24px;
    padding-left: 24px;
}

.content ol li,
.content ol.list-paddingleft-2 li {
    list-style: decimal outside;
    margin-bottom: 10px;
    padding-left: 4px;
    line-height: 1.9;
}

.content ol li::marker,
.content ol.list-paddingleft-2 li::marker {
    color: #6366f1;
    font-weight: 700;
}

.content ul li,
.content ul.list-paddingleft-2 li {
    list-style: disc outside;
    margin-bottom: 10px;
    padding-left: 4px;
    line-height: 1.9;
}

.content ul li::marker,
.content ul.list-paddingleft-2 li::marker {
    color: #8b5cf6;
    font-size: 1.1em;
}

/* 嵌套列表缩进 */
.content li > ol,
.content li > ul,
.content li > ol.list-paddingleft-2,
.content li > ul.list-paddingleft-2 {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* 列表里的 p 不要额外 margin，防止与 li 间距叠加 */
.content li p {
    margin: 0 0 6px;
}
.content li p:last-child {
    margin-bottom: 0;
}

/* —— 图片（响应式 + 圆角 + 阴影 + 居中） —— */
.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f5;
}

.content a img {
    border: 1px solid #e0e7ff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.content a:hover img {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.15);
}

/* —— 分隔线 hr（渐变） —— */
.content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e0e7ff, #c7d2fe, #e0e7ff, transparent);
    margin: 28px 0;
    border-radius: 2px;
}

/* —— 表格 —— */
.content table {
    width: 100%;
	max-width: 100%;
    border-collapse: collapse;
    margin: 20px 0 28px;
    font-size: 14.5px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content thead th {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
}

.content tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid #f0f0f5;
    color: #374151;
}

.content tbody tr:nth-child(even) td {
    background: #fafbff;
}

.content tbody tr:hover td {
    background: #f5f3ff;
}

/* —— 行内 code —— */
.content code,
.content kbd,
.content samp,
.content tt {
    font-family: "JetBrains Mono", "Fira Code", "Consolas", "Courier New", monospace;
    font-size: 13px;
    background: #eef2f6;
    color: #6d28d9;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
}

/* ===== 代码块样式：浅色 IDE 风格 =====
   结构：顶部 Header 栏（左：语言标签，右：复制按钮） + 代码区
   兼容：<pre class="brush:xxx;toolbar:false"> 以及 SyntaxHighlighter 渲染后 */

/* 代码块容器：整体卡片 */
.content pre,
.content pre[class*="brush:"],
.content .syntaxhighlighter,
.content .dp-highlighter {
    position: relative;
    background-color: #f6f8fa !important;
    color: #24292f !important;
    border-radius: 8px !important;
    margin: 20px 0 28px !important;
    padding: 50px 16px 16px 16px !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
    font-family: "JetBrains Mono", "Fira Code", "Consolas", "Courier New", monospace !important;
    font-size: 13.5px !important;
    line-height: 1.8 !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

/* 顶部 Header 横条背景 */
.content pre,
.content pre[class*="brush:"],
.content .syntaxhighlighter,
.content .dp-highlighter {
    background-image: linear-gradient(to bottom, #ebedf0 0, #ebedf0 36px, transparent 36px) !important;
    background-repeat: no-repeat !important;
}

/* 代码区滚动 */
.content pre code,
.content pre[class*="brush:"] code,
.content .syntaxhighlighter .code,
.content .dp-highlighter > div {
    overflow-x: auto !important;
    display: block !important;
}

/* ---- 顶部 Header：语言标签（左） ---- */
.content pre::before,
.content pre[class*="brush:"]::before,
.content .syntaxhighlighter::before,
.content .dp-highlighter::before {
    content: attr(data-lang);
    position: absolute;
    top: 0;
    left: 12px;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    color: #4b5563;
    font-family: "PingFang SC", "DFPKingGothicGB-Regular", "Microsoft YaHei", sans-serif !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    z-index: 2;
}

/* 根据 brush:xxx 类名自动推断并显示语言名 */
.content pre[class*="brush:css"]::before     { content: 'CSS'; }
.content pre[class*="brush:html"]::before    { content: 'HTML'; }
.content pre[class*="brush:js"]::before,
.content pre[class*="brush:javascript"]::before { content: 'JavaScript'; }
.content pre[class*="brush:php"]::before     { content: 'PHP'; }
.content pre[class*="brush:python"]::before,
.content pre[class*="brush:py"]::before      { content: 'Python'; }
.content pre[class*="brush:java"]::before    { content: 'Java'; }
.content pre[class*="brush:xml"]::before,
.content pre[class*="brush:markup"]::before  { content: 'HTML'; }
.content pre[class*="brush:sql"]::before     { content: 'SQL'; }
.content pre[class*="brush:bash"]::before,
.content pre[class*="brush:shell"]::before   { content: 'Shell'; }
.content pre[class*="brush:json"]::before    { content: 'JSON'; }
.content pre[class*="brush:text"]::before,
.content pre[class*="brush:plain"]::before   { content: 'Text'; }

/* ---- 顶部 Header：复制按钮（右） ---- */
.content pre::after,
.content pre[class*="brush:"]::after,
.content .syntaxhighlighter::after,
.content .dp-highlighter::after {
    content: '复制';
    position: absolute;
    top: 0;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 10px;
    color: #6b7280;
    font-family: "PingFang SC", "DFPKingGothicGB-Regular", "Microsoft YaHei", sans-serif !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s;
}

.content pre:hover::after,
.content pre:hover[class*="brush:"]::after,
.content .syntaxhighlighter:hover::after,
.content .dp-highlighter:hover::after {
    color: #374151;
}

/* 复制成功状态 */
.content pre.copied::after,
.content pre[class*="brush:"].copied::after {
    content: '已复制';
    color: #10b981;
}

/* 隐藏 SyntaxHighlighter 自带的行号/工具栏 */
.content .syntaxhighlighter .gutter,
.content .syntaxhighlighter .toolbar,
.content .dp-highlighter .toolbar,
.content .dp-highlighter .gutter,
.content pre[class*="brush:"] .dp-highlighter .gutter {
    display: none !important;
    background: none !important;
}

/* SyntaxHighlighter 内部行背景透明 */
.content .syntaxhighlighter .line,
.content .syntaxhighlighter .line.alt1,
.content .syntaxhighlighter .line.alt2,
.content .syntaxhighlighter .line.highlighted,
.content .dp-highlighter .line {
    background-color: transparent !important;
}

.content .syntaxhighlighter code,
.content .dp-highlighter code,
.content .syntaxhighlighter .container {
    padding: 0 !important;
    margin: 0 !important;
}

/* ---- 浅色语法高亮配色 ---- */
.content pre span,
.content .syntaxhighlighter span,
.content .dp-highlighter span {
    background: transparent !important;
}

/* 关键字 (keyword / if / else / return / !important) */
.content pre .keyword,
.content .syntaxhighlighter .keyword,
.content .dp-highlighter .keyword { color: #cf222e !important; font-weight: 600; }

/* 字符串 (string) */
.content pre .string,
.content .syntaxhighlighter .string,
.content .dp-highlighter .string { color: #0a3069 !important; }

/* 注释 (comment) */
.content pre .comments,
.content pre .comment,
.content .syntaxhighlighter .comments,
.content .syntaxhighlighter .comment,
.content .dp-highlighter .comments {
    color: #6e7781 !important;
    font-style: italic !important;
    font-weight: 400 !important;
}

/* 数字 (value / number) */
.content pre .value,
.content pre .number,
.content .syntaxhighlighter .value,
.content .syntaxhighlighter .number,
.content .dp-highlighter .value,
.content .dp-highlighter .number { color: #953800 !important; font-weight: 600; }

/* 函数名 (function) */
.content pre .function,
.content .syntaxhighlighter .function,
.content .dp-highlighter .function { color: #8250df !important; font-weight: 600; }

/* 属性/变量 (variable / attribute) */
.content pre .variable,
.content pre .attribute,
.content pre .tag-name,
.content .syntaxhighlighter .variable,
.content .dp-highlighter .variable { color: #953800 !important; }

/* CSS 属性名 (property) */
.content pre .property,
.content .syntaxhighlighter .property { color: #24292f !important; font-weight: 500 !important; }

/* HTML 标签 < > */
.content pre .tag,
.content .syntaxhighlighter .tag,
.content .dp-highlighter .tag { color: #116329 !important; font-weight: 600 !important; }

/* !important 等特殊值 */
.content pre .color,
.content pre .rule,
.content pre .important { color: #cf222e !important; font-weight: 700 !important; }

/* SyntaxHighlighter 字号统一 */
.content .syntaxhighlighter,
.content .syntaxhighlighter *,
.content .dp-highlighter,
.content .dp-highlighter * {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
}

/* <pre><code>...</code></pre> 形式的 code */
.content pre code {
    background: transparent !important;
    color: #24292f !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    font-family: "JetBrains Mono", "Fira Code", "Consolas", "Courier New", monospace !important;
    display: block !important;
}

/* —— 浮动 / 对齐 —— */
.content .alignleft {
    float: left;
    margin: 6px 16px 10px 0;
}

.content .alignright {
    float: right;
    margin: 6px 0 10px 16px;
}

.content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 清除浮动，防止图片浮动把 blockquote 撑坏 */
.content::after {
    content: '';
    display: block;
    clear: both;
}

/* 强制换行：覆盖内容中可能粘贴的 nowrap 内联样式
   （text-wrap-mode:nowrap / white-space:nowrap 都强制改为可换行） */
.content [style*="nowrap"] {
    text-wrap-mode: wrap !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

.code-lang {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.code-copy {
    font-size: 12px;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.code-copy:hover {
    color: #fff;
}

.article-code-block pre {
    padding: 16px 20px;
    overflow-x: auto;
}

.article-code-block code {
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 13.5px;
    line-height: 1.7;
    color: #cdd6f4;
}

/* 文章图片 */
.article-img-wrap {
    margin: 24px 0;
    text-align: center;
}

.article-img-wrap img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.article-img-caption {
    margin-top: 10px;
    font-size: 13px;
    color: #9ca3af;
}

/* 提示框 */
.article-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
}

.tip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.tip-content {
    font-size: 14px;
    color: #92400e;
    line-height: 1.7;
}

/* --- 文章标签 --- */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f5;
}

.article-tag {
    font-size: 13px;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.article-tag:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #5558e0;
}

/* --- 互动栏 --- */
.article-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 28px 0 8px;
    border-top: 1px solid #f0f0f5;
    margin-top: 24px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 13px;
    transition: all 0.2s ease;
    padding: 8px 20px;
    border-radius: 12px;
}

.action-btn:hover {
    background: #f9fafb;
    color: #6366f1;
}

.action-btn.active {
    color: #6366f1;
}

.action-btn.active svg {
    fill: #6366f1;
}

.action-count {
    font-weight: 600;
}

/* --- 评论区（v3 全宽+美化回复） --- */
.comment-section {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
}

/* 标题行 */
.comment-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 24px 32px 20px;
}

.comment-title-text {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    position: relative;
    padding-left: 14px;
}

.comment-title-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
}

.comment-count {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 10px;
    min-width: 28px;
    text-align: center;
}

.comment-tip {
    margin-left: auto;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

/* 评论发布表单 */
.comment-form-wrap {
    background: linear-gradient(135deg, #fafbff, #f5f3ff);
    border: 1px solid #ede9fe;
    border-radius: 14px;
    padding: 20px;
    margin: 0 32px 28px;
    transition: all 0.25s ease;
}

.comment-form-wrap:focus-within {
    border-color: #c4b5fd;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
    background: #fff;
}

.comment-form-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14px;
    color: #374151;
    outline: none;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    line-height: 1.65;
    background: #fff;
    box-sizing: border-box;
}

.comment-textarea::placeholder {
    color: #c0c0d0;
}

.comment-textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.comment-textarea-sm {
    padding: 10px 14px;
    font-size: 13px;
}

.comment-form-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-form-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comment-code-img {
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s;
}

.comment-code-img:hover {
    border-color: #818cf8;
}

.comment-code-input {
    width: 90px;
    height: 36px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    color: #374151;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-code-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.comment-submit-btn {
    height: 38px;
    padding: 0 26px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.comment-submit-btn:hover {
    opacity: 0.92;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.comment-submit-btn:active {
    transform: scale(0.97);
}

.comment-submit-sm {
    height: 34px;
    padding: 0 18px;
    font-size: 13px;
}

/* 评论验证码 */
.comment-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.comment-code-img {
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}
.comment-code-input {
    width: 80px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

/* 评论空状态 */
.comment-empty {
    text-align: center;
    padding: 32px 0;
    color: #9ca3af;
    font-size: 14px;
}

/* ========== 私密内容提示（bugongkai 字段控制） ========== */
/* 站长查看私密内容时的内联小提示 */
.article-private-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
    font-size: 13px;
    border-radius: 10px;
    border-left: 3px solid #f59e0b;
}
.article-private-tip svg {
    flex-shrink: 0;
    color: #d97706;
}

/* 非站长查看私密内容时的居中占位块 */
.article-private-block {
    text-align: center;
    padding: 60px 24px;
    background: #fafbff;
    border: 1px dashed #e5e7eb;
    border-radius: 16px;
    margin: 12px 0;
}
.article-private-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}
.article-private-text {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 6px;
}
.article-private-sub {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* 评论列表 */
.comment-list {
    display: flex;
    flex-direction: column;
    padding: 0 32px;
}

.comment-item {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid #f3f3f8;
    transition: background 0.15s;
}

.comment-item:last-child {
    border-bottom: none;
}

/* 文字头像（无头像时显示） */
.comment-item-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 图片头像（有头像时显示） */
.comment-item-avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 2px solid #fff;
}

.comment-item-body {
    flex: 1;
    min-width: 0;
}

.comment-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.comment-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.comment-item-name a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-item-name a:hover {
    color: #6366f1;
}

.comment-item-time {
    font-size: 12px;
    color: #b0b0c0;
}

/* 评论正文 */
.comment-item-text {
    font-size: 14.5px;
    color: #4b5563;
    line-height: 1.8;
    word-break: break-word;
}

/* 回复格式美化：原始评论中的用户名（会员）蓝色加粗 */
.comment-item-text .original_comment .user_name {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    margin-right: 2px;
}

/* 回复格式：管理员回复部分 — 换行 + 分割线 */
.comment-item-text .user_name {
    display: inline;
}

/* 评论回复：原评论与回复分行显示，回复用气泡风格 */
.comment-item-text {
    position: relative;
}

/* 原评论内容 */
.comment-item-text .original_comment {
    display: block;
    color: #374151;
    line-height: 1.7;
}

/* 管理员回复区块：气泡风格，左上角尖角 */
.comment-item-text .reply-bubble {
    position: relative;
    margin-top: 12px;
    padding: 10px 14px;
    background: #f3f4f6;
    border-radius: 0 10px 10px 10px;
    color: #374151;
    line-height: 1.7;
}

/* 气泡左上角尖角 */
.comment-item-text .reply-bubble::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 6px 8px;
    border-color: transparent transparent #f3f4f6 transparent;
}

/* 气泡内管理员/回复人名称 */
.comment-item-text .reply-bubble .user_name {
    display: inline;
    margin-right: 2px;
}

/* 回复者昵称：紫色，与原评论蓝色用户名区分 */
.comment-item-text .reply-bubble .reply-user-name {
    color: #8b5cf6;
    font-weight: 600;
}

/* 管理员名称加粗橙色 */
.comment-item-text .reply-bubble .user_name strong {
    color: #de4c1c !important;
    font-weight: 700;
}

/* 隐藏 nl2br 产生的换行 */
.comment-item-text br {
    display: none;
}

.comment-item-actions {
    margin-top: 10px;
}

.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    border: none;
    padding: 2px 8px;
    border-radius: 6px;
}

.comment-reply-btn:hover {
    color: #6366f1;
    background: #f5f3ff;
}

/* 回复表单 */
.comment-reply-form {
    margin-top: 14px;
    background: #fafaff;
    border: 1px solid #ede9fe;
    border-radius: 10px;
    padding: 14px;
}

.comment-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 8px;
}

/* 空状态 */
.comment-empty {
    text-align: center;
    padding: 48px 20px;
}

.comment-empty svg {
    opacity: 0.4;
}

.comment-empty p {
    margin-top: 14px;
    font-size: 14px;
    color: #b0b0c0;
}

/* 查看全部 */
.comment-view-all {
    text-align: center;
    margin: 0;
    padding: 20px 32px 28px;
    border-top: 1px solid #f5f5f8;
}

.comment-view-all a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 9px 28px;
    border: 1.5px solid #e5e7eb;
    border-radius: 22px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.25s;
}

.comment-view-all a:hover {
    border-color: #818cf8;
    color: #6366f1;
    background: #f5f3ff;
}

/* --- 相关推荐 --- */
.related-section {
    background: #fff;
    border-radius: 16px;
    padding: 28px 48px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.related-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid #6366f1;
}

.related-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.related-item {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.related-item:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-item-title {
    font-size: 13.5px;
    color: #1f2937;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.related-item:hover .related-item-title {
    color: #6366f1;
}

.related-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.related-cat {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    background: #eef2ff;
    color: #6366f1;
    font-size: 11px;
}

.related-thumb {
    width: 100px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* --- 右侧边栏卡片 --- */
.sidebar-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.sidebar-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sidebar-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

.sidebar-refresh {
    font-size: 12px;
    color: #9ca3af;
    transition: color 0.2s;
}

.sidebar-refresh:hover {
    color: #6366f1;
}

/* 热榜列表 */
.hot-list,
.recommend-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-list li,
.recommend-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid #f5f5f8;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 6px;
}

.hot-list li:last-child,
.recommend-list li:last-child {
    border-bottom: none;
}

.hot-list li:hover,
.recommend-list li:hover {
    background: #f9fafb;
}

.hot-rank {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: #d1d5db;
}

.hot-list li:nth-child(1) .hot-rank { background: #ef4444; }
.hot-list li:nth-child(2) .hot-rank { background: #f97316; }
.hot-list li:nth-child(3) .hot-rank { background: #eab308; }

.hot-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s;
}

.hot-list li:hover .hot-title {
    color: #6366f1;
}

.hot-heat {
    font-size: 11px;
    color: #ef4444;
    flex-shrink: 0;
}

/* 精选推荐 */
.recommend-item {
    display: flex;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid #f5f5f8;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 6px;
}

.recommend-item:last-child {
    border-bottom: none;
}

.recommend-item:hover {
    background: #f9fafb;
}

.recommend-thumb {
    width: 64px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.recommend-info {
    flex: 1;
    min-width: 0;
}

.recommend-title {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s;
}

.recommend-item:hover .recommend-title {
    color: #6366f1;
}

.recommend-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* --- 浮动工具栏 --- */
.floating-toolbar {
    position: fixed;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.floating-left {
    top: 90px;
    left: calc(240px + 24px);
}

.floating-right {
    bottom: 40px;
    right: 10px;
}

.ft-item {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    position: relative;
}

.ft-item:hover {
    background: #6366f1;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.ft-item:hover svg {
    stroke: #fff;
}

.ft-item.active {
    background: #ef4444;
    color: #fff;
}

.ft-item.active svg {
    stroke: #fff;
}

.ft-label {
    font-size: 11px;
    line-height: 1;
}

.ft-count {
    font-size: 10px;
    color: #9ca3af;
}

.ft-item:hover .ft-count {
    color: #fff;
}

/* 右侧浮动项 */
.ft-qr-item,
.ft-nav-item,
.ft-back-item {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    position: relative;
}

.ft-qr-item:hover,
.ft-nav-item:hover,
.ft-back-item:hover {
    background: #6366f1;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.ft-qr-item:hover svg,
.ft-nav-item:hover svg,
.ft-back-item:hover svg {
    stroke: #fff;
}

/* 二维码弹出层 */
.ft-qr-popup {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ft-qr-item:hover .ft-qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-4px);
}

.ft-qr-code {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f5;
}

.ft-qr-code svg {
    width: 100%;
    height: 100%;
}

.ft-qr-popup p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* --- 返回顶部（详情页隐藏，使用浮动工具栏的返回顶部） --- */
body.detail-page .back-to-top,
body.aidaohang-detail-page .back-to-top {
    display: none;
}

body.detail-page .back-to-top.show,
body.aidaohang-detail-page .back-to-top.show {
    opacity: 1;
    visibility: visible;
}

body.detail-page .back-to-top:hover,
body.aidaohang-detail-page .back-to-top:hover {
    background: #6366f1;
    color: #fff;
    transform: translateY(-3px);
}

/* --- 响应式 --- */
@media (max-width: 1200px) {
    .detail-sidebar {
        width: 260px;
    }

    .detail-main {
        max-width: calc(100% - 260px - 24px);
    }
}

@media (max-width: 1024px) {
    .detail-layout {
        flex-direction: column;
    }

    .detail-main {
        max-width: 100%;
    }

    .detail-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .floating-left {
        top: 70px;
        left: 12px;
    }

    .floating-right {
        bottom: 12px;
        right: 12px;
    }
}

@media (max-width: 768px) {
    .article-detail,
    .comment-section,
    .related-section {
        padding: 24px 20px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-actions {
        gap: 20px;
    }

    .article-author-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ft-item,
    .ft-qr-item,
    .ft-nav-item,
    .ft-back-item {
        width: 44px;
        height: 44px;
    }

    .ft-label {
        font-size: 10px;
    }

    .related-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .related-thumb {
        width: 90px;
        height: 64px;
    }
}

/* --- 会员内容限制遮罩 --- */
.article-content-wrap {
    position: relative;
}

/* 未解锁状态：限制高度 + 遮罩 */
body.vip-locked .article-content-wrap {
    max-height: 420px;
    overflow: hidden;
}

/* 渐变遮罩层 */
body.vip-locked .vip-lock-mask {
    display: block;
}

.vip-lock-mask {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    pointer-events: none;
}

.vip-lock-blur {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 35%,
        rgba(255, 255, 255, 0.92) 65%,
        rgba(255, 255, 255, 1) 100%
    );
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

/* 提示卡片 */
.vip-lock-card {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.08);
    pointer-events: auto;
    max-width: calc(100% - 48px);
    width: 420px;
    text-align: center;
}

.vip-lock-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
    flex-shrink: 0;
}

.vip-lock-text {
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

.vip-lock-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    border-bottom: 1px dashed rgba(99, 102, 241, 0.5);
}

.vip-lock-link:hover {
    color: #5558e0;
    border-bottom-color: #5558e0;
}

.vip-lock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 24px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.vip-lock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.vip-lock-btn:active {
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .vip-lock-card {
        width: calc(100% - 32px);
        padding: 16px 20px;
    }

    .vip-lock-icon {
        width: 42px;
        height: 42px;
    }

    .vip-lock-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* --- 底部浮动搜索框 --- */
.floating-search {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 6px 6px 6px 20px;
    width: 420px;
    max-width: calc(100vw - 80px);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.floating-search:focus-within {
    box-shadow: 0 6px 32px rgba(99, 102, 241, 0.18), 0 0 0 2px rgba(99, 102, 241, 0.2);
    transform: translateX(-50%) translateY(-2px);
}

.fs-icon {
    display: flex;
    align-items: center;
    color: #9ca3af;
    flex-shrink: 0;
}

.fs-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #374151;
    padding: 0 12px;
    height: 36px;
    background: transparent;
    min-width: 0;
    width: auto;
    box-sizing: border-box;
}

.fs-input::placeholder {
    color: #9ca3af;
}

.fs-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.fs-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.fs-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 4px;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.fs-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.floating-search.show-close .fs-close {
    display: flex;
}

/* 搜索建议下拉 */
.fs-suggestions {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.floating-search.show-suggestions .fs-suggestions {
    display: flex;
}

.fs-suggestion-title {
    font-size: 11px;
    color: #9ca3af;
    padding: 6px 12px 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fs-suggestion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: background 0.15s;
}

.fs-suggestion-item:hover {
    background: #f3f4f6;
}

.fs-suggestion-item svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.fs-suggestion-item .hot-tag {
    font-size: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

/* 搜索历史头部：标题 + 清空按钮 */
.fs-suggestion-title.fs-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fs-clear-history {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #9ca3af;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}
.fs-clear-history:hover { color: #ef4444; }

/* 历史条目：时钟图标 + 文字 + 删除按钮 */
.fs-history-item {
    position: relative;
}
.fs-history-item svg { color: #c4b5fd; }
.fs-history-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-history-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.fs-history-del:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* 响应式 */
@media (max-width: 768px) {
    .floating-search {
        width: calc(100vw - 32px);
        bottom: 12px;
        padding: 5px 5px 5px 14px;
    }

    .fs-input {
        font-size: 13px;
        height: 34px;
    }

    .fs-btn {
        width: 36px;
        height: 34px;
    }
}