
:root {
    /* 参考 OpenClaw 橙红色主题 */
    --primary: #FF5A36;
    --primary-light: #FF8A6B;
    --primary-dark: #FF5A36;
    --primary-soft: rgba(255, 90, 54, 0.1);
    --border-soft: rgba(0, 0, 0, 0.05);
    --text-main: #111827;
    --text-subtle: #6b7280;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #ffffff;
    color: var(--text-main);
    font-size: 17.5px;
    /* 整体字号再放大一档 */
    line-height: 1.8;
    /* 提高基础行高，整体更疏朗 */
}

p,
li {
    line-height: 1.9;
}

/* 文档正文区域字体再放大一些，避免卡片内文字偏小 */
.doc-section p,
.doc-section li,
.doc-section td,
.doc-section th {
    font-size: 0.98rem;
}

.doc-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.doc-header {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.doc-nav-tab {
    transition: all 0.18s ease;
    color: #6b7280;
    font-weight: 500;
    position: relative;
}

.doc-nav-tab:hover {
    color: #111827;
}

.doc-nav-tab-active {
    color: #111827;
    font-weight: 500;
}

.doc-nav-tab-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: var(--primary);
}

.doc-side-nav-item {
    border-radius: 0.75rem;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.16s ease;
    width: 100%;
}

.doc-side-nav-item:hover {
    color: #111827;
    background-color: rgba(0, 0, 0, 0.03);
}

.doc-side-nav-item-active {
    background-color: var(--primary-soft);
    color: var(--primary);
    font-weight: 500;
}

.doc-toc-item {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
    border-radius: 999px;
    color: #9ca3af !important;
    /* 固定为浅灰，避免被其他样式影响 */
    cursor: pointer;
    transition: all 0.12s ease;
    display: block;
}

.doc-toc-item:hover:not(.doc-toc-item-active) {
    color: #374151 !important;
    /* hover 时中等灰色，不要太深 */
}

.doc-toc-item-active {
    color: var(--primary) !important;
    /* active 时橙色 */
    font-weight: 600;
}

.doc-toc-item-active:hover {
    color: var(--primary) !important;
    /* active 时 hover 保持橙色不变 */
}

.doc-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
}

.doc-code code {
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* API 表格样式 - 类似 markdown 表格 */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.api-table thead {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.api-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #374151;
    background-color: transparent;
}

.api-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.api-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.api-table tbody tr:last-child td {
    border-bottom: none;
}

.api-table .param-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: var(--primary);
    font-weight: 500;
}

.code-block-wrapper {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 10;
}

.code-copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.code-copy-btn.copied {
    color: var(--primary);
}

.code-copy-tooltip {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-0.25rem);
    padding: 0.25rem 0.5rem;
    background-color: var(--primary);
    color: white;
    font-size: 0.7rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100; /* 确保 tooltip 在最上层 */
}

.code-copy-btn.copied .code-copy-tooltip {
    opacity: 0; /* 复制成功后默认隐藏，hover 时显示 */
    transform: translateX(-50%) translateY(-0.25rem);
    background-color: var(--primary);
    pointer-events: none; /* 确保不阻挡鼠标事件 */
}

.code-copy-btn:hover .code-copy-tooltip {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0);
}

/* 确保复制成功后 hover 时 tooltip 显示，优先级更高 */
.code-copy-btn.copied:hover .code-copy-tooltip {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: none; /* 确保不阻挡鼠标事件 */
    display: block !important; /* 确保元素显示 */
}

/* 对勾图标直接使用橙色，不需要 hover */
.code-copy-btn i[data-lucide="check"] {
    color: var(--primary);
}

.anchor-section {
    /* 预留更多导航高度，避免标题被遮挡，并添加底部间距 */
    scroll-margin-top: 110px;
    scroll-margin-bottom: 80px;
    /* 底部预留间距 */
    display: block;
}

/* 对标题元素使用较小的 padding-bottom，确保检测可靠且不影响视觉间距 */
h1.anchor-section,
h2.anchor-section {
    padding-bottom: 10px
}

.doc-section h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.doc-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.doc-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.doc-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-subtle);
}

.doc-badge {
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    border: 1px solid #fecaca;
    color: #b91c1c;
    background-color: #fef2f2;
}

.doc-aside-hidden {
    display: none !important;
}

/* 使用 fixed 定位确保导航栏始终固定在视口中 */
#doc-left {
    position: fixed;
    top: 8rem;
    /* header 高度 + 额外间距：h-16 (4rem) + h-12 (3rem) + 1rem = 8rem */
    left: calc((100vw - 85vw) / 2 + 1.5rem);
    width: 11rem;
    /* 减小宽度，从 13rem 改为 11rem */
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    z-index: 30;
    padding-top: 1rem;
    /* 顶部内容间距 */
}

#doc-right {
    position: fixed;
    top: 8rem;
    /* header 高度 + 额外间距 */
    right: calc((100vw - 85vw) / 2 + 1.5rem);
    width: 11rem;
    /* 减小宽度，从 13rem 改为 11rem */
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    z-index: 30;
    padding-top: 1rem;
    /* 顶部内容间距 */
}

/* 响应式调整：当视口宽度大于 1600px 时，内容区域最大宽度为 1280px */
@media (min-width: 1600px) {
    #doc-left {
        left: calc((100vw - 1280px) / 2 + 1.5rem);
    }

    #doc-right {
        right: calc((100vw - 1280px) / 2 + 1.5rem);
    }
}

/* 给父容器添加 padding，为固定导航栏留出空间，避免中间内容被遮挡 */
/* 左侧导航栏：11rem (宽度) + 3.5rem (gap-14) = 14.5rem */
@media (min-width: 768px) {
    main>div.flex.gap-14 {
        padding-left: 14.5rem;
    }
}

/* 右侧导航栏：11rem (宽度) + 3.5rem (gap-14) = 14.5rem */
@media (min-width: 1024px) {
    main>div.flex.gap-14 {
        padding-right: 14.5rem;
    }
}


.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 90, 54, 0.1);
}

.upload-button {
    transition: all 0.3s cubic-bezier(0.2, 0.7, 0.3, 1.2);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 45%, var(--primary-dark) 100%);
}

.upload-button:hover {
    transform: translateY(-2px) scale(1.03);
    filter: brightness(1.06);
}

.upload-button:active {
    transform: translateY(1px) scale(0.97);
}

.loading-dots:after {
    content: ' .';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: ' .';
    }

    40% {
        content: ' ..';
    }

    60% {
        content: ' ...';
    }

    80%,
    100% {
        content: '';
    }
}

/* 加载旋转动画 - 使用自定义名称避免冲突 */
@keyframes fasr-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 加载图标专用旋转动画 - 最高优先级 */
#loadingSpinner {
    animation: fasr-spin 1s linear infinite !important;
    transform-origin: center !important;
    will-change: transform !important;
    display: block !important;
}

.result-card-enter {
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.utterance-item {
    transition: all 0.3s ease;
}

.utterance-item:hover {
    transform: translateX(4px);
}

/* 自定义滚动条样式 - 橙红色系 */
#utterancesList::-webkit-scrollbar {
    width: 8px;
}

#utterancesList::-webkit-scrollbar-track {
    background: rgba(255, 90, 54, 0.08);
    border-radius: 10px;
    margin: 8px 0;
}

#utterancesList::-webkit-scrollbar-thumb {
    background: rgba(255, 90, 54, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: all 0.2s ease;
}

#utterancesList::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 90, 54, 0.5);
    background-clip: padding-box;
}

/* Firefox 滚动条样式 */
#utterancesList {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 90, 54, 0.3) rgba(255, 90, 54, 0.08);
}

/* 完整识别文本滚动条样式 */
#completeText::-webkit-scrollbar {
    width: 8px;
}

#completeText::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 8px 0;
}

#completeText::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: all 0.2s ease;
}

#completeText::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    background-clip: padding-box;
}

/* Firefox 滚动条样式 */
#completeText {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

/* 美化实时识别区域的滚动条 */
#realtimeTextArea::-webkit-scrollbar {
    width: 6px; /* 滚动条宽度 */
}

#realtimeTextArea::-webkit-scrollbar-track {
    background: transparent; /* 背景透明 */
}

#realtimeTextArea::-webkit-scrollbar-thumb {
    background-color: rgba(255, 90, 54, 0.2); /* 滚动条颜色，带透明度 */
    border-radius: 10px; /* 圆角 */
    transition: background-color 0.3s;
}

#realtimeTextArea::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 90, 54, 0.5); /* 悬停时加深 */
}

/* 隐藏上下箭头 */
#realtimeTextArea::-webkit-scrollbar-button {
    display: none;
}

/* 确保 textarea 的基础样式支持缩进 */
#realtimeTextArea {
    white-space: pre-wrap; /* 保证空格和换行正确显示 */
    padding: 20px !important;
    line-height: 2; /* 增加行高，更像文章格式 */
    transition: all 0.1s ease; /* 增加字体平滑度，确保实时覆盖时不闪烁 */
}

/* 底部实时字幕字体与光标样式 */
#floatingSubtitle {
    font-family: "LXGW WenKai", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 28px;
    background: transparent;
}

@media (max-width: 768px) {
    #floatingSubtitle {
        font-size: 17px !important;
    }
}

/* 移动端隐藏底部悬浮字幕条 */
@media (max-width: 768px) {
    #subtitleWrapper {
        display: none !important; /* 移动端完全隐藏底部悬浮条 */
    }
}

#floatingSubtitle::after {
    content: '|';
    margin-left: 4px;
    display: inline-block;
    font-size: 28px;
    font-weight: 400;
    animation: subtitle-caret 1s steps(2, start) infinite;
}

@keyframes subtitle-caret {
    0%, 50% {
        opacity: 1;
    }
    50.01%, 100% {
        opacity: 0;
    }
}

/* ========== 移动端适配样式 ========== */

/* 移动端侧边栏遮罩层 - 默认隐藏，仅在移动端显示 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* 移动端侧边栏 - 默认隐藏，仅在移动端显示 */
.mobile-sidebar {
    display: none; /* PC端完全隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    transform: translateX(0);
}

/* 移动端侧边栏头部 */
.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-sidebar-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.mobile-sidebar-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* 移动端导航项样式 */
.mobile-sidebar .doc-side-nav-item {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    min-height: 44px; /* 触摸友好的最小高度 */
}

/* 移动端面包屑样式 */
.mobile-breadcrumb {
    display: none;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
    width: 100%;
    padding: 0.375rem 0;
    min-width: 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    margin-top: 0;
}

.mobile-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem 0;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

/* 让导航文字区域"可点击"的反馈 */
.mobile-breadcrumb-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.mobile-breadcrumb-item:active {
    background: rgba(0, 0, 0, 0.04);
}

.mobile-breadcrumb-separator {
    color: #9ca3af;
    margin: 0 0.25rem;
}

.mobile-breadcrumb-current {
    color: #111827;
    font-weight: 500;
}

/* 移动端侧边栏导航选择器样式 */
.mobile-nav-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    background: white;
    font-size: 0.875rem;
    color: #111827;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    min-height: 36px;
}

.mobile-nav-select:hover {
    border-color: var(--primary);
    background: rgba(255, 90, 54, 0.02);
}

.mobile-nav-select-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.mobile-nav-select.open .mobile-nav-select-icon {
    transform: rotate(180deg);
}

.mobile-nav-select-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    margin-top: 0.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* 提高z-index，确保在侧边栏内显示，并高于其他元素 */
    max-height: 300px;
    overflow-y: auto;
}

/* 当wrapper内的选择器打开时，显示菜单 */
.mobile-nav-select-wrapper:has(.mobile-nav-select.open) .mobile-nav-select-menu,
.mobile-nav-select-wrapper.open .mobile-nav-select-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-nav-select-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-select-item:last-child {
    border-bottom: none;
}

.mobile-nav-select-item:hover {
    background: rgba(255, 90, 54, 0.05);
}

.mobile-nav-select-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 500;
}

.mobile-nav-select-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

/* PC端样式 - 隐藏移动端特性，显示PC端特性 */
@media (min-width: 769px) {
    /* PC端隐藏移动端侧边栏 */
    .mobile-sidebar,
    .mobile-overlay {
        display: none !important;
    }

    /* PC端隐藏移动端菜单按钮 */
    .mobile-menu-btn {
        display: none !important;
    }

    /* PC端显示固定导航 */
    #doc-left,
    #doc-right {
        display: block !important;
    }

    /* PC端：如果侧边栏被强制显示（比如通过JS或窗口调整），确保菜单也能正常显示 */
    .mobile-sidebar[style*="display: block"] .mobile-nav-select-menu,
    .mobile-sidebar:not([style*="display: none"]) .mobile-nav-select-wrapper.open .mobile-nav-select-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* 移动端内容区域 */
@media (max-width: 768px) {
    /* 显示移动端菜单按钮 */
    .mobile-menu-btn {
        display: flex;
    }

    /* 显示移动端侧边栏（当需要时） */
    .mobile-sidebar {
        display: block;
    }

    /* 隐藏PC端固定导航 */
    #doc-left,
    #doc-right {
        display: none !important;
    }

    /* 移动端内容全宽 */
    main > div.flex.gap-14 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 确保上传按钮图标在移动端正确显示 */
    .upload-button i[data-lucide] {
        display: inline-block !important;
        width: 3rem !important;
        height: 3rem !important;
    }

    /* 确保所有lucide图标在移动端正确显示 */
    i[data-lucide] {
        display: inline-block !important;
    }

    /* 移动端header全宽 */
    .doc-header > div {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* 移动端header布局调整 - logo和面包屑分行 */
    .doc-header .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }

    .doc-header .flex.items-center.gap-3 {
        width: 100%;
    }

    /* 移动端内容区域 */
    #centerContent {
        width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* 移动端字体调整 */
    body {
        font-size: 15px;
        line-height: 1.6;
    }

    .doc-section h1 {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .doc-section h2 {
        font-size: 1.25rem;
        line-height: 1.4;
    }

    .doc-section h3 {
        font-size: 1.125rem;
        line-height: 1.5;
    }

    .doc-section p {
        font-size: 0.9375rem;
        line-height: 1.7;
    }

    .doc-section li {
        font-size: 0.9375rem;
        line-height: 1.7;
    }

    /* 移动端按钮和输入框字体 */
    button, input, textarea, select {
        font-size: 0.9375rem;
    }

    /* 移动端卡片文字 */
    .doc-section .rounded-xl p,
    .doc-section .rounded-xl li {
        font-size: 0.875rem;
    }

    /* 移动端卡片间距 */
    .doc-section > div {
        margin-bottom: 1.5rem;
    }

    /* 移动端表格优化 */
    .api-table {
        font-size: 0.8125rem;
    }

    .api-table th,
    .api-table td {
        padding: 0.5rem 0.75rem;
    }

    /* 移动端代码块优化 */
    .code-block-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .doc-code {
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    /* 移动端按钮和卡片文字 */
    .doc-section button,
    .doc-section .rounded-xl {
        font-size: 0.875rem;
    }

    /* 移动端输入框和文本区域 */
    input[type="text"],
    input[type="file"],
    textarea {
        font-size: 0.9375rem;
    }

    /* 移动端按钮优化 */
    .doc-side-nav-item {
        min-height: 44px;
        touch-action: manipulation;
    }

    /* 实时识别页面按钮优化 - 移动端 */
    #realtimeCard button {
        min-height: auto;
        padding: 0.375rem 0.75rem !important;
        font-size: 0.75rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.375rem !important;
    }

    /* 移动端Tab导航 */
    .doc-nav-tab {
        flex: 1;
        justify-content: center;
    }

    /* 移动端显示面包屑 */
    .mobile-breadcrumb {
        display: flex;
        align-items: center;
    }

    /* 移动端header高度调整 */
    .doc-header {
        min-height: auto;
    }

    .doc-header > div {
        min-height: auto;
    }

    /* 移动端隐藏Logo文字 */
    .desktop-logo-text {
        display: none;
    }

    /* 移动端隐藏Tab导航 */
    .doc-header nav {
        display: none;
    }

    /* 移动端实时识别区域优化 */
    #realtimeTextArea {
        line-height: 1.6 !important;
        font-size: 16px !important;
        transition: all 0.1s ease;
    }
}

/* 复制JSON按钮hover效果 */
.copy-json-btn:hover {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* 任务信息卡片优化 - 保持紧凑，只增加左右padding */
.task-info-card {
    padding: 1rem 1.25rem !important;
}

.task-info-header {
    margin-bottom: 0.75rem !important;
}

.task-info-grid {
    gap: 0.625rem 1rem !important;
}

.task-info-item {
    line-height: 1.5;
    display: inline-flex;
    align-items: baseline;
}

/* 移动端任务信息优化 */
@media (max-width: 768px) {
    .task-info-card {
        padding: 0.875rem 1rem !important;
    }
    
    .task-info-header {
        margin-bottom: 0.625rem !important;
    }
    
    .task-info-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
    html {
        -webkit-overflow-scrolling: touch;
    }

    body {
        -webkit-tap-highlight-color: transparent;
    }
}
