@font-face {
    font-family: 'Source Sans 3';
    src: url('https://cdn.orbitmoonalpha.com/wp-content/astra-local-fonts/source-sans-3/nwpStKy2OAdR1K-IwhWudF-R3w8aZQ.woff2') format('woff2');
}

body *:not(i[class*="fa-"]):not(.fa-solid):not(.fas) {
    font-family: 'Source Sans 3', sans-serif;
}

.progress-ring__circle {
    transition: 0.35s stroke-dashoffset;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

#loadingText {
    transition: opacity 0.5s, color 0.5s;
    font-size: 18px;
    margin-top: 10px;
}

.dropdown-menu {
    font-size: 18px;
    display: inline-block;
    margin: 10px 20px;
}

#url, #questionInput {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

.output-margin-top-25 {
    margin-top: 25px;
}

.fixed-width-output {
    width: 100%;
    max-width: 600px;
    word-wrap: break-word;
    overflow-x: hidden;
}

.copy-button {
    display: inline-block;
    padding: 5px 10px;
    font-size: 14px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.file-upload-container {
    position: absolute;
    top: 190px;
    right: 25px;
    background-color: rgba(128, 0, 128, 0.3);
    color: white;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    /*width: auto;*/
    height: 30px;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    z-index: 10;
}

/* 针对手机端 */
@media (max-width: 768px) {
    .file-upload-container {
        top: 175px; /* 调整为更小的值，根据您的页面测试，例如80px或120px */
        right: 12px; /* 缩小right值，使其在窄屏上不溢出 */
        width: 28px; /* 可选：略微缩小按钮大小以适应小屏幕 */
        height: 28px;
        line-height: 18px; /* 调整行高以保持居中 */
    }
}

.file-upload-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

.progress-bar-inner {
    height: 20px;
    width: 0;
    background-color: #4CAF50;
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 0.3s ease;
}

.modal {
    display: none;
    position: absolute;
    z-index: 1000;
}

.modal-content {
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 300px;
    max-width: 90vw;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    color: #333;
    animation: slideIn 0.3s ease-out;
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        max-width: 100%;
        padding: 8px 12px;
        font-size: 14px;
    }
}

#stockInfoText {
    margin: 0;
    line-height: 1.5;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    color: #888;
}

.close-btn:hover {
    color: #000;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dropdown-menu {
    font-size: 18px;
    display: inline-block;
    margin: 10px 20px;
}

.dropdown-item {
    position: relative;
    display: inline-block;
    margin: 0 6px;
    text-decoration: none;
    color: #333;
}

.dropdown-item, .dropdown-item:link, .dropdown-item:visited {
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 2px 6px;
    text-decoration: none;
}

.tooltip-text {
    display: none;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
}

.dropdown-item:hover .tooltip-text {
    display: block;
}

.tools-header {
    font-size: 16px;
    color: #333;
    margin: 10px 20px 2px 20px;
    display: block;
}

.tools-title {
    font-weight: 500;
}

.preview-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
}

.preview-container h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
}

.preview-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.preview-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 4px;
}

.preview-container p {
    margin: 10px 0;
    font-size: 14px;
}

.preview-button {
    display: inline-block;
    padding: 5px 10px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 5px;
}

.active-tool-display {
    display: inline-block;
    margin-left: 20px;
    font-size: 16px;
    color: #333;
    padding: 6px 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(5px);
}

.active-tool-display:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .active-tool-display {
        margin-left: 10px;
        font-size: 14px;
        padding: 4px 8px;
    }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 12px;
    background-color: #fff;
    opacity: 0.9;
    animation: confetti-float 2s ease forwards;
    transform-origin: center;
}

@keyframes confetti-float {
    0% {
        opacity: 0.9;
        transform: translate(0, 0) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translate(var(--x), var(--y)) scale(1) rotate(360deg);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--x) + var(--drift)), calc(var(--y) + 50vh)) scale(1) rotate(720deg);
    }
}

.download-video-btn {
    display: inline-block;
    margin-left: 20px;
    font-size: 18px;
    color: white;
    padding: 6px 12px;
    background-color: #4CAF50;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    cursor: pointer;
    border: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .download-video-btn {
        margin-left: 10px;
        font-size: 18px;
        padding: 4px 8px;
    }
}

/*!* 确保 Font Awesome 固体图标正常显示 *!*/
/*i.fa-solid,*/
/*i[class*="fa-"] {*/
/*    font-family: 'Font Awesome 6 Free' !important;*/
/*    font-weight: 900;*/
/*}*/

/* 拖曳上传 */
.drag-upload-overlay {
    position: fixed;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    background: rgba(34, 56, 90, 0.52); /* 半透明 */
    border: 2px dashed #3399ff;
    border-radius: 12px;
    color: #fff;
    pointer-events: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 32px rgba(40, 52, 120, 0.15);
    font-size: 18px;
    user-select: none;
}

.drag-upload-content {
    text-align: center;
    pointer-events: none;
}

.drag-upload-icon {
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
}

.version-label {
    font-size: 8px;
    color: rgba(0, 0, 0, 0.25);
    line-height: 1;
    margin-bottom: 2px;
    margin-left: 3px;
    user-select: none;
}

/*回复框*/
.output-container {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #eff1f2;
    border-radius: 10px;
    margin: 24px 0;
    padding: 20px 16px 16px 16px;
    box-shadow: 0 2px 12px rgba(60, 60, 60, 0.03);
    overflow: visible;
}

.output-actions {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 2;
}

.output-actions button {
    border: none;
    background: #f6faff;
    border-radius: 6px;
    margin-left: 4px;
    padding: 5px 7px;
    cursor: pointer;
    color: #2d3640;
    font-size: 1.05em;
    transition: background .15s;
    box-shadow: 0 1px 2px #eef4, 0 0px 0px #0000;
}

.output-actions button:hover {
    background: #e3eeff;
}

.output-content {
    padding-top: 10px;
    min-height: 24px;
    word-wrap: break-word;
}

.output-actions button i[class^="fa-"],
.output-actions button i[class*=" fa-"] {
    font-size: 0.7em;
    vertical-align: middle;
}

/* 截图时专用（.screenshotting优先级高，临时加） */
/*.output-container.screenshotting {*/
/*    background: #fff !important;*/
/*    border-radius: 14px !important;*/
/*    box-shadow: 0 4px 18px rgba(60,60,60,0.07) !important;*/
/*    border: 1.5px solid #f2f3f8 !important;*/
/*    padding: 24px 20px 22px 20px !important;*/
/*}*/
.output-container.screenshotting .output-actions {
    /* 视需求，截图时可隐藏操作按钮。如果想保留按钮，删掉此行 */
    display: none !important;
}

/* 让输出里的大表格、公式横向可滚动（不会影响普通段落） */
.output-content table,
.output-content pre,
    /* 让 MathJax block 公式不溢出、有滚动条，且不会撑破 output-content 的宽度 */
.output-content .mjx-container {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
    padding-bottom: 2px;
    scrollbar-width: thin;
    scrollbar-color: #b6c8de #f3f7ff;
    /* 让滚动条美观，并略有可滚动提示 */
}

.output-content .mjx-container::-webkit-scrollbar {
    height: 7px;
    background: #f3f7ff;
}

.output-content .mjx-container::-webkit-scrollbar-thumb {
    background: #b6c8de;
    border-radius: 4px;
}

.output-content .mjx-container > svg,
.output-content .mjx-container > .mjx-math {
    min-width: 0 !important;
    max-width: 100% !important;
    word-break: normal;
}


/* 表格宽了可以横滚，不会被内容硬挤断行 */
.output-content table {
    white-space: nowrap;
}

#share-modal-mask {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.22);
    /* 若想有淡入淡出，可加 transition: all .2s; */
}

#share-modal-content {
    position: absolute;
    left: 50%;
    top: 30%;
    transform: translate(-50%, 0);
    background: #fff;
    border-radius: 12px;
    padding: 1.5em 1.4em;
    min-width: 320px;
    max-width: 95vw;
    box-shadow: 0 6px 24px #0002;
    text-align: center;
    /* 可选美化 */
    animation: popupFadeIn .26s cubic-bezier(.15, 1.4, .55, 1.01);
}

@keyframes popupFadeIn {
    from {
        transform: translate(-50%, 8%) scale(.92);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
}

#share-modal-content img {
    max-width: 320px;
    max-height: 420px;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0001;
    background: #f6f7f9;
    margin-bottom: 1em;
}

#share-modal-content button {
    display: inline-block;
    margin: 0.8em 0.4em;
    padding: 0.6em 1.6em;
    border: none;
    outline: none;
    border-radius: 6px;
    background: #2463f7;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.17s;
}

#share-modal-content button:hover {
    background: #1853cd;
}

#share-modal-content button:active {
    background: #00318e;
}

#share-modal-content button:last-child {
    background: #888;
}

#share-modal-content button:last-child:hover {
    background: #ad1111;
    color: #fff;
}

@media (max-width: 520px) {
    #share-modal-content {
        min-width: 90vw;
        padding: 1em 0.5em;
    }

    #share-modal-content img {
        max-width: 98vw;
    }
}

/* thread modules */
.thread-history-btn {
    opacity: 0.5; /* 默认透明度 */
    transition: opacity 0.3s ease, box-shadow 0.3s ease; /* 平滑过渡 */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px 0 #23284a23;
    margin-left: auto;
}

/* 激活状态：完全不透明 + 更柔和淡雅的绿色光环特效 */
.thread-history-btn.active {
    opacity: 1; /* 完全不透明，保持不变 */
    background: linear-gradient(45deg, #a8e6a1, #b2f2b2); /* 改为更柔和的浅绿色渐变 */
    box-shadow: 0 0 10px #a8e6a1, 0 0 20px #b2f2b2; /* 光环效果，使用更淡雅的绿色 */
    animation: cyberGlow 1.5s infinite alternate; /* 动画保持不变 */
}

/* 赛博光环动画（已调整颜色） */
@keyframes cyberGlow {
    from {
        box-shadow: 0 0 10px #a8e6a1, 0 0 15px #b2f2b2; /* 从更柔和的阴影开始 */
    }
    to {
        box-shadow: 0 0 15px #a8e6a1, 0 0 25px #b2f2b2; /* 到更淡雅的阴影结束 */
    }
}

.thread-modal-content {
    background-color: #f9f9f9; /* 或您想要的样式 */
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 300px;
    max-width: 90vw;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    color: #333;
    animation: slideIn 0.3s ease-out;
}

.thread-history-wrap {
    position: relative;
    display: inline-block;
}

.thread-history-modal {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    /* 也可以在js脚本中动态显示隐藏 */
}

.thread-history-modal-content p {
    margin: 0 0 8px 0;
    padding-left: 40px; /* 和li的padding-left一样 */
    text-align: left;
}


.thread-history-modal-content {
    background-color: rgba(249, 249, 249, 0.2);
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 250px;
    max-width: 90vw;
    font-size: 13px;
    color: #333;
    animation: slideIn 0.3s ease-out;
}

.thread-history-close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    color: #888;
}

#threadList li.selected {
    background: #b4ffbe;
    font-weight: bold;
    box-shadow: 0 0 6px #7ee095;
}

.delete-thread-btn {
    width: 22px !important; /* 强制宽度24px */
    height: 22px !important; /* 强制高度24px */
    padding: 0 !important; /* 避免按钮内边距撑大 */
    border: none !important;
    border-radius: 50% !important; /* 绝对圆形 */
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important; /* 字体别太大 */
    line-height: 1 !important; /* 行高不要撑开 */
    background: #f5f5f5 !important;
    color: #e05a5a !important;
    cursor: pointer !important;
    margin-left: 4px !important;
    outline: none !important;
    vertical-align: middle !important;
}


/* 加强hover/active等 */
.delete-thread-btn:hover {
    background: #fdeeee;
    color: #c20000;
}

.delete-thread-btn:active {
    background: #ffdddd;
}

#threadList li:last-child {
    justify-content: flex-end;
}

/* thread modules */


/*record*/
.upload-btn,
.microphone-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(128,0,128,0.22) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    padding: 0 !important;
    margin: 0 8px 0 0 !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.upload-btn input[type="file"] {
    position: absolute;
    left: 0; top: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; z-index: 9;
}
.upload-btn { font-weight: bold; }
.upload-btn span, .microphone-btn i {
    pointer-events: none;
    font-size: 18px !important;
    line-height: 1 !important;
    color: #fff !important;
    margin: 0;
    /*font-family: inherit;*/
}
.file-upload-row {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    right: 0;
    top: 185px;
    z-index: 30;
    width: auto !important;
    height: auto !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
@media (max-width: 600px) {
    .file-upload-row {
        position: static;
        margin-top: -45px;
        margin-bottom: 6px;
        width: 100%;
        justify-content: flex-end;
    }
    #audioRemain {
        display: inline !important;
        font-size: 12px !important;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .upload-btn,
    .microphone-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
}
#audioWave {
    display: none;
    vertical-align: middle;
    margin-left: 10px;
    width: 60px;
    height: 40px;
}
#audioProgress {
    display: none;
    width: 10px;
    height: 6px;
    background: #EEE;
    position: relative;
    margin-left: 8px;
    vertical-align: middle;
}
#audioProgressBar { display: none !important; }
/*record*/

/*notification*/
.notification-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    background: none;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
}

.toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: #1d1d1f;
    user-select: none;
}

.apple-toggle {
    position: relative;
    display: inline-block;
}

.toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: block;
    width: 42px;
    height: 25px;
    background: #e5e5e7;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-checkbox:checked + .toggle-slider {
    background: #34c759;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.toggle-checkbox:checked + .toggle-slider:before {
    transform: translateX(17px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-checkbox:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f2f2f7;
}

.toggle-checkbox:disabled + .toggle-slider:before {
    background: #d1d1d6;
}

.toggle-slider:active:before {
    width: 24px;
}

.toggle-checkbox:checked + .toggle-slider:active:before {
    transform: translateX(14px);
}

.toggle-status {
    font-size: 13px;
    color: #8e8e93;
    min-width: 60px;
    user-select: none;
}

/* 状态指示颜色 */
.toggle-status.granted {
    color: #34c759;
}

.toggle-status.denied {
    color: #ff3b30;
}

.toggle-status.default {
    color: #8e8e93;
}



/*notification*/

/* 包裹 URL 輸入框和縮略圖的容器 */
@font-face {
    font-family: 'Source Sans 3';
    src: url('https://cdn.orbitmoonalpha.com/wp-content/astra-local-fonts/source-sans-3/nwpStKy2OAdR1K-IwhWudF-R3w8aZQ.woff2') format('woff2');
}

body *:not(i[class*="fa-"]):not(.fa-solid):not(.fas) {
    font-family: 'Source Sans 3', sans-serif;
}

.progress-ring__circle {
    transition: 0.35s stroke-dashoffset;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

#loadingText {
    transition: opacity 0.5s, color 0.5s;
    font-size: 18px;
    margin-top: 10px;
}

.dropdown-menu {
    font-size: 18px;
    display: inline-block;
    margin: 10px 20px;
}

#url, #questionInput {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

.output-margin-top-25 {
    margin-top: 25px;
}

.fixed-width-output {
    width: 100%;
    max-width: 600px;
    word-wrap: break-word;
    overflow-x: hidden;
}

.copy-button {
    display: inline-block;
    padding: 5px 10px;
    font-size: 14px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.file-upload-container {
    position: absolute;
    top: 190px;
    right: 25px;
    background-color: rgba(128, 0, 128, 0.3);
    color: white;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    /*width: auto;*/
    height: 30px;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    z-index: 10;
}

/* 针对手机端 */
@media (max-width: 768px) {
    .file-upload-container {
        top: 175px; /* 调整为更小的值，根据您的页面测试，例如80px或120px */
        right: 12px; /* 缩小right值，使其在窄屏上不溢出 */
        width: 28px; /* 可选：略微缩小按钮大小以适应小屏幕 */
        height: 28px;
        line-height: 18px; /* 调整行高以保持居中 */
    }
}

.file-upload-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

.progress-bar-inner {
    height: 20px;
    width: 0;
    background-color: #4CAF50;
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 0.3s ease;
}

.modal {
    display: none;
    position: absolute;
    z-index: 1000;
}

.modal-content {
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 300px;
    max-width: 90vw;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    color: #333;
    animation: slideIn 0.3s ease-out;
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        max-width: 100%;
        padding: 8px 12px;
        font-size: 14px;
    }
}

#stockInfoText {
    margin: 0;
    line-height: 1.5;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    color: #888;
}

.close-btn:hover {
    color: #000;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dropdown-menu {
    font-size: 18px;
    display: inline-block;
    margin: 10px 20px;
}

.dropdown-item {
    position: relative;
    display: inline-block;
    margin: 0 6px;
    text-decoration: none;
    color: #333;
}

.dropdown-item, .dropdown-item:link, .dropdown-item:visited {
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 2px 6px;
    text-decoration: none;
}

.tooltip-text {
    display: none;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
}

.dropdown-item:hover .tooltip-text {
    display: block;
}

.tools-header {
    font-size: 16px;
    color: #333;
    margin: 10px 20px 2px 20px;
    display: block;
}

.tools-title {
    font-weight: 500;
}

.preview-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
}

.preview-container h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
}

.preview-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.preview-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 4px;
}

.preview-container p {
    margin: 10px 0;
    font-size: 14px;
}

.preview-button {
    display: inline-block;
    padding: 5px 10px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 5px;
}

.active-tool-display {
    display: inline-block;
    margin-left: 20px;
    font-size: 16px;
    color: #333;
    padding: 6px 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(5px);
}

.active-tool-display:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .active-tool-display {
        margin-left: 10px;
        font-size: 14px;
        padding: 4px 8px;
    }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 12px;
    background-color: #fff;
    opacity: 0.9;
    animation: confetti-float 2s ease forwards;
    transform-origin: center;
}

@keyframes confetti-float {
    0% {
        opacity: 0.9;
        transform: translate(0, 0) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translate(var(--x), var(--y)) scale(1) rotate(360deg);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--x) + var(--drift)), calc(var(--y) + 50vh)) scale(1) rotate(720deg);
    }
}

.download-video-btn {
    display: inline-block;
    margin-left: 20px;
    font-size: 18px;
    color: white;
    padding: 6px 12px;
    background-color: #4CAF50;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    cursor: pointer;
    border: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .download-video-btn {
        margin-left: 10px;
        font-size: 18px;
        padding: 4px 8px;
    }
}

/*!* 确保 Font Awesome 固体图标正常显示 *!*/
/*i.fa-solid,*/
/*i[class*="fa-"] {*/
/*    font-family: 'Font Awesome 6 Free' !important;*/
/*    font-weight: 900;*/
/*}*/

/* 拖曳上传 */
.drag-upload-overlay {
    position: fixed;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    background: rgba(34, 56, 90, 0.52); /* 半透明 */
    border: 2px dashed #3399ff;
    border-radius: 12px;
    color: #fff;
    pointer-events: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 32px rgba(40, 52, 120, 0.15);
    font-size: 18px;
    user-select: none;
}

.drag-upload-content {
    text-align: center;
    pointer-events: none;
}

.drag-upload-icon {
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
}

.version-label {
    font-size: 8px;
    color: rgba(0, 0, 0, 0.25);
    line-height: 1;
    margin-bottom: 2px;
    margin-left: 3px;
    user-select: none;
}

/*回复框*/
.output-container {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #eff1f2;
    border-radius: 10px;
    margin: 24px 0;
    padding: 20px 16px 16px 16px;
    box-shadow: 0 2px 12px rgba(60, 60, 60, 0.03);
    overflow: visible;
}

.output-actions {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 2;
}

.output-actions button {
    border: none;
    background: #f6faff;
    border-radius: 6px;
    margin-left: 4px;
    padding: 5px 7px;
    cursor: pointer;
    color: #2d3640;
    font-size: 1.05em;
    transition: background .15s;
    box-shadow: 0 1px 2px #eef4, 0 0px 0px #0000;
}

.output-actions button:hover {
    background: #e3eeff;
}

.output-content {
    padding-top: 10px;
    min-height: 24px;
    word-wrap: break-word;
}

.output-actions button i[class^="fa-"],
.output-actions button i[class*=" fa-"] {
    font-size: 0.7em;
    vertical-align: middle;
}

/* 截图时专用（.screenshotting优先级高，临时加） */
/*.output-container.screenshotting {*/
/*    background: #fff !important;*/
/*    border-radius: 14px !important;*/
/*    box-shadow: 0 4px 18px rgba(60,60,60,0.07) !important;*/
/*    border: 1.5px solid #f2f3f8 !important;*/
/*    padding: 24px 20px 22px 20px !important;*/
/*}*/
.output-container.screenshotting .output-actions {
    /* 视需求，截图时可隐藏操作按钮。如果想保留按钮，删掉此行 */
    display: none !important;
}

/* 让输出里的大表格、公式横向可滚动（不会影响普通段落） */
.output-content table,
.output-content pre,
    /* 让 MathJax block 公式不溢出、有滚动条，且不会撑破 output-content 的宽度 */
.output-content .mjx-container {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
    padding-bottom: 2px;
    scrollbar-width: thin;
    scrollbar-color: #b6c8de #f3f7ff;
    /* 让滚动条美观，并略有可滚动提示 */
}

.output-content .mjx-container::-webkit-scrollbar {
    height: 7px;
    background: #f3f7ff;
}

.output-content .mjx-container::-webkit-scrollbar-thumb {
    background: #b6c8de;
    border-radius: 4px;
}

.output-content .mjx-container > svg,
.output-content .mjx-container > .mjx-math {
    min-width: 0 !important;
    max-width: 100% !important;
    word-break: normal;
}


/* 表格宽了可以横滚，不会被内容硬挤断行 */
.output-content table {
    white-space: nowrap;
}

#share-modal-mask {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.22);
    /* 若想有淡入淡出，可加 transition: all .2s; */
}

#share-modal-content {
    position: absolute;
    left: 50%;
    top: 30%;
    transform: translate(-50%, 0);
    background: #fff;
    border-radius: 12px;
    padding: 1.5em 1.4em;
    min-width: 320px;
    max-width: 95vw;
    box-shadow: 0 6px 24px #0002;
    text-align: center;
    /* 可选美化 */
    animation: popupFadeIn .26s cubic-bezier(.15, 1.4, .55, 1.01);
}

@keyframes popupFadeIn {
    from {
        transform: translate(-50%, 8%) scale(.92);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
}

#share-modal-content img {
    max-width: 320px;
    max-height: 420px;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0001;
    background: #f6f7f9;
    margin-bottom: 1em;
}

#share-modal-content button {
    display: inline-block;
    margin: 0.8em 0.4em;
    padding: 0.6em 1.6em;
    border: none;
    outline: none;
    border-radius: 6px;
    background: #2463f7;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.17s;
}

#share-modal-content button:hover {
    background: #1853cd;
}

#share-modal-content button:active {
    background: #00318e;
}

#share-modal-content button:last-child {
    background: #888;
}

#share-modal-content button:last-child:hover {
    background: #ad1111;
    color: #fff;
}

@media (max-width: 520px) {
    #share-modal-content {
        min-width: 90vw;
        padding: 1em 0.5em;
    }

    #share-modal-content img {
        max-width: 98vw;
    }
}

/* thread modules */
.thread-history-btn {
    opacity: 0.5; /* 默认透明度 */
    transition: opacity 0.3s ease, box-shadow 0.3s ease; /* 平滑过渡 */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px 0 #23284a23;
    margin-left: auto;
}

/* 激活状态：完全不透明 + 更柔和淡雅的绿色光环特效 */
.thread-history-btn.active {
    opacity: 1; /* 完全不透明，保持不变 */
    background: linear-gradient(45deg, #a8e6a1, #b2f2b2); /* 改为更柔和的浅绿色渐变 */
    box-shadow: 0 0 10px #a8e6a1, 0 0 20px #b2f2b2; /* 光环效果，使用更淡雅的绿色 */
    animation: cyberGlow 1.5s infinite alternate; /* 动画保持不变 */
}

/* 赛博光环动画（已调整颜色） */
@keyframes cyberGlow {
    from {
        box-shadow: 0 0 10px #a8e6a1, 0 0 15px #b2f2b2; /* 从更柔和的阴影开始 */
    }
    to {
        box-shadow: 0 0 15px #a8e6a1, 0 0 25px #b2f2b2; /* 到更淡雅的阴影结束 */
    }
}

.thread-modal-content {
    background-color: #f9f9f9; /* 或您想要的样式 */
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 300px;
    max-width: 90vw;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    color: #333;
    animation: slideIn 0.3s ease-out;
}

.thread-history-wrap {
    position: relative;
    display: inline-block;
}

.thread-history-modal {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    /* 也可以在js脚本中动态显示隐藏 */
}

.thread-history-modal-content p {
    margin: 0 0 8px 0;
    padding-left: 40px; /* 和li的padding-left一样 */
    text-align: left;
}


.thread-history-modal-content {
    background-color: rgba(249, 249, 249, 0.2);
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 250px;
    max-width: 90vw;
    font-size: 13px;
    color: #333;
    animation: slideIn 0.3s ease-out;
}

.thread-history-close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    color: #888;
}

#threadList li.selected {
    background: #b4ffbe;
    font-weight: bold;
    box-shadow: 0 0 6px #7ee095;
}

.delete-thread-btn {
    width: 22px !important; /* 强制宽度24px */
    height: 22px !important; /* 强制高度24px */
    padding: 0 !important; /* 避免按钮内边距撑大 */
    border: none !important;
    border-radius: 50% !important; /* 绝对圆形 */
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important; /* 字体别太大 */
    line-height: 1 !important; /* 行高不要撑开 */
    background: #f5f5f5 !important;
    color: #e05a5a !important;
    cursor: pointer !important;
    margin-left: 4px !important;
    outline: none !important;
    vertical-align: middle !important;
}


/* 加强hover/active等 */
.delete-thread-btn:hover {
    background: #fdeeee;
    color: #c20000;
}

.delete-thread-btn:active {
    background: #ffdddd;
}

#threadList li:last-child {
    justify-content: flex-end;
}

/* thread modules */


/*record*/
.upload-btn,
.microphone-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(128,0,128,0.22) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    padding: 0 !important;
    margin: 0 8px 0 0 !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.upload-btn input[type="file"] {
    position: absolute;
    left: 0; top: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; z-index: 9;
}
.upload-btn { font-weight: bold; }
.upload-btn span, .microphone-btn i {
    pointer-events: none;
    font-size: 18px !important;
    line-height: 1 !important;
    color: #fff !important;
    margin: 0;
    /*font-family: inherit;*/
}
.file-upload-row {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    right: 0;
    top: 185px;
    z-index: 30;
    width: auto !important;
    height: auto !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
@media (max-width: 600px) {
    .file-upload-row {
        position: static;
        margin-top: -45px;
        margin-bottom: 6px;
        width: 100%;
        justify-content: flex-end;
    }
    #audioRemain {
        display: inline !important;
        font-size: 12px !important;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .upload-btn,
    .microphone-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
}
#audioWave {
    display: none;
    vertical-align: middle;
    margin-left: 10px;
    width: 60px;
    height: 40px;
}
#audioProgress {
    display: none;
    width: 10px;
    height: 6px;
    background: #EEE;
    position: relative;
    margin-left: 8px;
    vertical-align: middle;
}
#audioProgressBar { display: none !important; }
/*record*/

/*notification*/
.notification-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    background: none;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
}

.toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: #1d1d1f;
    user-select: none;
}

.apple-toggle {
    position: relative;
    display: inline-block;
}

.toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: block;
    width: 42px;
    height: 25px;
    background: #e5e5e7;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-checkbox:checked + .toggle-slider {
    background: #34c759;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.toggle-checkbox:checked + .toggle-slider:before {
    transform: translateX(17px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-checkbox:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f2f2f7;
}

.toggle-checkbox:disabled + .toggle-slider:before {
    background: #d1d1d6;
}

.toggle-slider:active:before {
    width: 24px;
}

.toggle-checkbox:checked + .toggle-slider:active:before {
    transform: translateX(14px);
}

.toggle-status {
    font-size: 13px;
    color: #8e8e93;
    min-width: 60px;
    user-select: none;
}

/* 状态指示颜色 */
.toggle-status.granted {
    color: #34c759;
}

.toggle-status.denied {
    color: #ff3b30;
}

.toggle-status.default {
    color: #8e8e93;
}



/*notification*/

/* 包裹 URL 輸入框和縮略圖的容器 */
.url-input-and-attachments-wrapper {
    position: relative; /* 關鍵：使內部絕對定位的元素相對於此容器 */
    margin-bottom: 8px; /* 保持與下方 Prompt 標籤的間距 */
    /* 這裡不需要特別設置 width，它會自適應父容器 */
    /* 關鍵：為懸浮縮略圖預留足夠的高度 */
    /* 假設 URL input 是 40px 高，我們需要在其上方留出縮略圖的高度 */
    /* 或者，我們讓縮略圖「懸浮在 input 內部」 */
}

/* URL 輸入框本身（維持現有樣式，只調整只讀狀態） */
#url[readonly] {
    /* 讓用戶知道這是只讀的，但由於你不需要文本提示，這裡僅僅作為標記 */
    cursor: default; /* 預設鼠標，不提示可點擊切換 */
    /* 可以添加一個輕微的視覺變化，比如邊框變色 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
}

/* 懸浮縮略圖的容器 */
.floating-thumbnails-container {
    position: absolute;
    /* 這裡才是關鍵：讓縮略圖的「底部」與 URL input 的「頂部」對齊 */
    /* 假設 input 框高度為 H，縮略圖高度為 S。 */
    /* 如果要放在輸入框的右上角，我們將 top 設置為略小於輸入框的 padding-top 的值 */
    /* 例如，如果 input 框的 padding-top 是 10px，那麼 top: 5px 就可以讓它下沉一點 */
    /* 讓我們嘗試放在輸入框的內右側，而不是上方 */
    top: 50%; /* 垂直居中於 .url-input-and-attachments-wrapper */
    transform: translateY(-50%); /* 精確垂直居中 */
    right: 10px; /* 距離右邊緣 10px */
    display: flex; /* 讓多個縮略圖並排 */
    flex-direction: row-reverse; /* 讓縮略圖從右往左排列，以便 slot1 在左，slot2 在右 */
    gap: 8px; /* 縮略圖之間的間距 */
    pointer-events: none; /* 預設不響應鼠標事件，讓鼠標穿透 */
    z-index: 100; /* 確保懸浮在最上層 */
    /* 初始隱藏，通過 JS 移除 hidden 類來顯示 */
}

/* 初始隱藏 */
.floating-thumbnails-container.hidden {
    display: none;
}

/* 每個懸浮縮略圖的包裹器 */
.floating-thumbnail-item {
    position: relative;
    width: 45px; /* 縮略圖尺寸 */
    height: 45px;
    border-radius: 8px; /* 圓角 */
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.2); /* 輕微透明白色背景 */
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); /* 更明顯的陰影營造懸浮感 */
    pointer-events: auto; /* 讓縮略圖本身響應鼠標事件 */
    transition: transform 0.2s ease; /* 添加變形過渡效果 */
}
.floating-thumbnail-item:hover {
    transform: translateY(-3px); /* 鼠標懸停時輕微上浮 */
}

/* 懸浮縮略圖圖片 */
.floating-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 懸浮刪除按鈕 */
.floating-thumbnail-delete-btn {
    position: absolute;
    top: 50%; /* 垂直居中 */
    left: 50%; /* 水平居中 */
    transform: translate(-50%, -50%); /* 精確居中 */
    width: 24px;
    height: 24px;
    background-color: rgba(220, 53, 69, 0.9); /* 半透明紅色背景 */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0; /* 預設隱藏 */
    transition: opacity 0.2s ease; /* 淡入淡出效果 */
    pointer-events: none; /* 預設不響應鼠標事件 */
}

/* 鼠標懸停在縮略圖上時顯示刪除按鈕 */
.floating-thumbnail-item:hover .floating-thumbnail-delete-btn {
    opacity: 1;
    pointer-events: auto; /* 懸停時可點擊 */
}