/* 统一表单组件高度 */
.form-component {
    min-height: 40px !important;
    display: flex;
    align-items: center;
}

.input-group.form-component .form-control,
.input-group.form-component .input-group-text {
    height: 100%;
}

/* 统一 input-group 标题栏高度与对齐 */
.input-group.form-component .input-group-text {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

#miniAppFields .input-group-text {
    min-width: 7.5rem;
    justify-content: center;
    text-align: center;
}

/* 云便签工具栏样式（仅在 noteFields 作用域内生效） */
#noteFields .btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 0.1rem 0.4rem !important;
    transition: all 0.3s ease !important;
}

#noteFields .me-1 {
    margin-right: .4rem !important;
}

#noteFields .vditor {
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

#noteFields .vditor-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--bs-border-color);
}

#noteFields .vditor-content,
#noteFields .vditor-wysiwyg,
#noteFields .vditor-reset {
    background: #ffffff;
    color: #212529;
}

#noteFields #noteCharCounter {
    background: rgba(255, 255, 255, 0.82) !important;
    color: #6c757d !important;
    border: 1px solid rgba(222, 226, 230, 0.8);
}

#noteFields #noteTitle {
    color: var(--bs-body-color);
    border-bottom-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] #noteFields .vditor {
    border-color: #44556d;
    background: #1f2733;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar {
    background: #263141;
    border-bottom-color: #44556d;
    border-radius: 14px 14px 0px 0px;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button {
    color: #d5e2f2;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon svg,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button svg {
    color: currentColor;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon svg path,
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon svg use,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button svg path,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button svg use {
    stroke: currentColor;
    fill: currentColor;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon:hover,
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon--current,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button:hover {
    background: #33465f;
    color: #aecdff;
    border-color: #4e6787;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon:focus,
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon:focus-visible,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button:focus,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button:focus-visible {
    background: #33465f;
    color: #cfe2ff;
    border-color: #5f7ca3;
    box-shadow: 0 0 0 0.15rem rgba(158, 197, 254, 0.25);
    outline: none;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon:active,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button:active,
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon--current,
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-toolbar__item--current .vditor-icon,
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-toolbar__item--current button {
    background: #3a5372;
    color: #dbe9ff;
    border-color: #6d8db7;
    box-shadow: none;
}

[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon[disabled],
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-icon.vditor-menu--disabled,
[data-bs-theme="dark"] #noteFields .vditor-toolbar button[disabled],
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-toolbar__item--disabled .vditor-icon,
[data-bs-theme="dark"] #noteFields .vditor-toolbar .vditor-toolbar__item--disabled button {
    color: #6f819a;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    opacity: 0.75;
    cursor: not-allowed;
}

[data-bs-theme="dark"] #noteFields .vditor-content,
[data-bs-theme="dark"] #noteFields .vditor-wysiwyg,
[data-bs-theme="dark"] #noteFields .vditor-reset {
    background: #1f2733;
    color: #dde7f5;
    border-radius: 0px 0px 14px 14px;
}

[data-bs-theme="dark"] #noteFields #noteCharCounter {
    background: rgba(31, 39, 51, 0.86) !important;
    color: #aebed4 !important;
    border-color: rgba(79, 97, 122, 0.9);
}

[data-bs-theme="dark"] #noteFields #noteTitle {
    color: #dde7f5;
    border-bottom-color: #4f617a !important;
}

[data-bs-theme="dark"] #noteFields #noteTitle:focus,
[data-bs-theme="dark"] #noteFields #noteTitle:focus-visible,
[data-bs-theme="dark"] #noteFields #noteTitle:active {
    color: #eef4ff !important;
    -webkit-text-fill-color: #eef4ff;
    caret-color: #eef4ff;
}

/* 兼容删除 SimpleMDE 样式，改用 Vditor */

/* 未登录状态统一背景色 */
.not-logged-in .form-control.d-flex.gap-3.align-items-center {
    background-color: var(--bs-secondary-bg);
}

/* 自定义鼠标手型样式 */
.cursor-pointer {
    cursor: pointer;
}

/* 鼠标划过背景色 */
.cursor-pointer:hover:not(.vip-upgrade-btn) {
    background-color: #fff !important;
}

/* 错误提示容器动画 */
.error-container {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
}

.error-container.show {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮样式 */
#generateBtn {
    min-height: 40px;
}

/* 摄像头模态框扫描线动画 */
@keyframes scanLine {
    0% { top: 0; opacity: 1; }
    50% { top: calc(100% - 2px); opacity: 0.8; }
    100% { top: 0; opacity: 1; }
}

/* 摄像头模态框响应式设计 */
@media (max-width: 576px) {
    #cameraModal .modal-dialog { max-width: 95% !important; margin: 1rem; }
    #cameraModal #cameraVideo { width: 100% !important; height: auto !important; max-width: 360px; }
    #cameraModal #cameraCanvas { width: 100% !important; height: auto !important; max-width: 360px; }
}

.mode-segment {
    display: flex;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
}

.mode-switch-wrap {
    padding: 0px;
    border-radius: 14px;
    /* background: #f6f9ff; */
}

.mode-option {
    flex: 1;
    padding: .75rem 1.25rem;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    font-weight: 900;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .mode-option {
        font-size: .95rem;
        padding: .5rem .5rem;
    }
}

.mode-option + .mode-option {
    border-left: 1px solid var(--bs-border-color);
}

.mode-option.active {
    background-color: var(--bs-primary);
    color: #fff;
}

.mode-option:hover {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

[data-bs-theme="dark"] .mode-segment {
    background: linear-gradient(180deg, #293546 0%, #212b39 100%);
    border-color: #3f5068;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 20px rgba(9, 14, 24, 0.18);
}

[data-bs-theme="dark"] .mode-option {
    color: #d3deeb;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="dark"] .mode-option + .mode-option {
    border-left-color: rgba(130, 150, 178, 0.28);
}

[data-bs-theme="dark"] .mode-segment .mode-option.active,
[data-bs-theme="dark"] .mode-segment .mode-option.active:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #f8fbff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 14px rgba(37, 99, 235, 0.3);
}

[data-bs-theme="dark"] .mode-segment .mode-option:not(.active):hover {
    background-color: rgba(96, 165, 250, 0.14);
    color: #dbeafe;
}

[data-bs-theme="dark"] .mode-segment .mode-option:focus-visible {
    outline: none;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.55);
}

/* 结果区：内联二维码与短链接输入之间的间距 */
#resultContainer #qrInlineContainer + .input-group {
    margin-top: 20px !important;
}

.latest-articles-section {
    padding: 6px 0 48px;
}

/* 首页头图区域需要自己承接底部留白，避免 url-card 外边距跑到背景外面 */
.header-container {
    padding-bottom: 80px;
}

.header-container .url-card {
    margin-bottom: 0;
}

.seo-links-lite {
    opacity: 0.92;
}

.seo-links-toggle {
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.seo-links-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 14px;
    font-size: 0.875rem;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
    list-style: none;
    /* 
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.02);
    */
}

.seo-links-summary::-webkit-details-marker {
    display: none;
}

.seo-links-summary::before {
    content: "+";
    font-size: 1rem;
    line-height: 1;
}

.seo-links-toggle[open] .seo-links-summary::before {
    content: "-";
}

.seo-links-panel {
    width: 100%;
    margin-top: 6px;
}

.latest-article-link {
    display: block;
    padding: 10px 12px;
    color: var(--bs-body-color);
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    text-decoration: none;
    line-height: 1.5;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.latest-article-link:hover {
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb), 0.35);
    background: rgba(var(--bs-primary-rgb), 0.03);
}

[data-bs-theme="dark"] .seo-links-summary {
    color: #9aa9bd;
    border-color: rgba(159, 179, 202, 0.18);
    background: #1a1f26;
}

[data-bs-theme="dark"] .latest-article-link {
    background: transparent;
    border-color: rgba(159, 179, 202, 0.18);
    color: #dbe4f0;
}

[data-bs-theme="dark"] .latest-article-link:hover {
    color: #9ec5fe;
    border-color: #5f7ca3;
    background: rgba(158, 197, 254, 0.08);
}

@media (max-width: 576px) {
    .header-container {
        padding-bottom: 60px;
    }
}
