/* =============================================
   IT专家 - it_expert.css
   科技蓝·深空配色主题，三栏布局
   dark mode: body.dark 前缀
   ============================================= */

/* ========== 主容器 ========== */
.ite-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f0f4ff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.12);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.ite-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    min-height: unset;
}

/* ========== 顶部工具栏 ========== */
.ite-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 16px rgba(37, 99, 235, 0.5);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ite-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    margin-right: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
}

/* 右侧工具组（暗黑/全屏按钮） */
.toolbar-group--right {
    margin-left: auto;
}

.toolbar-btn {
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    transition: all 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 主操作按钮（开始分析） */
.toolbar-btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%) !important;
    border-color: transparent !important;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 12px rgba(6, 182, 212, 0.55);
    color: #fff !important;
    letter-spacing: 0.3px;
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%) !important;
    box-shadow: 0 4px 18px rgba(6, 182, 212, 0.65);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ========== 表单校验抖动 ========== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-5px); }
    30%, 70% { transform: translateX(5px); }
}

.ite-input.shake,
.ite-select.shake,
.ite-textarea.shake {
    animation: shake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ========== 主内容区：三栏 ========== */
.ite-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f0f4ff;
}

/* ========== 左栏：历史记录 ========== */
.ite-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #dbeafe;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #f0f7ff 0%, #e8f0fe 100%);
    border-bottom: 1px solid #dbeafe;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
}

.history-count {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 400;
}

.history-limit-footer {
    flex-shrink: 0;
    padding: 5px 8px;
    text-align: center;
    font-size: 10px;
    color: #94a3b8;
    border-top: 1px solid #dbeafe;
    background: #f0f7ff;
    letter-spacing: 0.2px;
    user-select: none;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fde8e8;
}

.history-search {
    padding: 8px;
    border-bottom: 1px solid #dbeafe;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #1e3a8a;
    background: #f8faff;
}

.history-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.history-search input::placeholder {
    color: #93c5fd;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    background: #ffffff;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #93c5fd;
}

.history-empty {
    text-align: center;
    color: #93c5fd;
    font-size: 12px;
    padding: 24px 8px;
    user-select: none;
}

/* 历史记录条目 */
.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 11px;
    margin: 3px 0;
    background: #f8faff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
    animation: ite-fadeIn 0.2s ease;
}

@keyframes ite-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateX(2px);
}

.history-item.active {
    background: #dbeafe;
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2), inset 3px 0 0 #3b82f6;
}

.history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.18s;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    background: #ef4444;
    color: white;
}

.history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 20px;
}

.history-item-category {
    display: inline-block;
    font-size: 10px;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    padding: 1px 6px;
    border-radius: 8px;
    margin-bottom: 3px;
    font-weight: 500;
}

.history-item-time {
    font-size: 10px;
    color: #93c5fd;
}

/* ========== 中栏：输入面板 ========== */
.ite-input-panel {
    width: 360px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #dbeafe;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    background: linear-gradient(to bottom, #f0f7ff 0%, #e8f0fe 100%);
    border-bottom: 1px solid #dbeafe;
    flex-shrink: 0;
    min-height: 44px;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
}

.panel-tip {
    font-size: 11px;
    color: #93c5fd;
    background: rgba(219, 234, 254, 0.5);
    padding: 2px 8px;
    border-radius: 4px;
}

.ite-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ite-input-body::-webkit-scrollbar {
    width: 4px;
}

.ite-input-body::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 2px;
}

.ite-input-body::-webkit-scrollbar-thumb:hover {
    background: #93c5fd;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-row {
    flex-direction: row;
    gap: 10px;
}

.form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
}

.required-mark {
    color: #ef4444;
    margin-left: 2px;
}

.label-tip {
    font-size: 10px;
    font-weight: 400;
    color: #93c5fd;
}

.ite-select,
.ite-input {
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    font-size: 13px;
    color: #1e3a8a;
    background: #f8faff;
    outline: none;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.ite-select:focus,
.ite-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ite-textarea {
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    font-size: 13px;
    color: #1e3a8a;
    background: #f8faff;
    outline: none;
    resize: vertical;
    min-height: 120px;
    font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
    line-height: 1.6;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.ite-textarea:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ite-textarea::placeholder {
    color: #93c5fd;
    font-family: inherit;
}

.ite-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.ite-textarea-hint {
    font-size: 10px;
    color: #93c5fd;
}

#charCount {
    font-size: 10px;
    color: #93c5fd;
}

#charCount.warn {
    color: #f59e0b;
}

#charCount.danger {
    color: #ef4444;
}

/* ========== 右栏：结果面板 ========== */
.ite-result-panel {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.result-category-tag {
    font-size: 11px;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 500;
}

/* 结果字数统计 */
.result-word-count {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-variant-numeric: tabular-nums;
}

.result-time {
    font-size: 11px;
    color: #94a3b8;
}

.result-regen-btn {
    font-size: 11px;
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.result-regen-btn:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}

.ite-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    background: #ffffff;
}

.ite-result-body::-webkit-scrollbar {
    width: 6px;
}

.ite-result-body::-webkit-scrollbar-track {
    background: transparent;
}

.ite-result-body::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 3px;
}

.ite-result-body::-webkit-scrollbar-thumb:hover {
    background: #93c5fd;
}

/* 占位区 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    color: #93c5fd;
    user-select: none;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
    animation: ite-float 3s ease-in-out infinite;
}

@keyframes ite-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #60a5fa;
    margin: 0 0 8px 0;
}

.placeholder-desc {
    font-size: 13px;
    color: #93c5fd;
    margin: 2px 0;
}

.placeholder-quote {
    margin-top: 20px;
    padding: 10px 20px;
    border-left: 3px solid #3b82f6;
    font-size: 12px;
    font-style: italic;
    color: #60a5fa;
    background: #eff6ff;
    border-radius: 0 6px 6px 0;
}

/* 加载中 */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
}

.loading-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    animation: ite-bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ite-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40%            { transform: translateY(-16px); opacity: 1; }
}

.loading-text {
    font-size: 14px;
    color: #60a5fa;
    font-weight: 500;
    margin: 0;
}

/* 结果内容区 */
.result-content {
    font-size: 14px;
    line-height: 1.75;
    color: #1e3a8a;
}

/* Markdown 渲染样式 */
.result-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1d4ed8;
    margin: 18px 0 8px 0;
    padding: 6px 0 6px 10px;
    border-bottom: none;
    border-left: 3px solid #3b82f6;
    background: linear-gradient(to right, #eff6ff, transparent);
    border-radius: 0 4px 4px 0;
}

.result-content h4 {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    margin: 12px 0 6px 0;
}

.result-content p {
    margin: 0 0 10px 0;
    color: #334155;
}

.result-content ul,
.result-content ol {
    margin: 6px 0 10px 0;
    padding-left: 22px;
}

.result-content li {
    margin-bottom: 4px;
    color: #334155;
}

.result-content code {
    font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
    font-size: 12.5px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid #bfdbfe;
}

.result-content pre {
    background: #0d1b2a;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 7px;
    overflow-x: auto;
    margin: 10px 0;
    font-size: 12.5px;
    line-height: 1.75;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    border: 1px solid #1e293b;
}

.result-content pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
    border: none;
    font-size: inherit;
}

.result-content strong {
    color: #1d4ed8;
    font-weight: 700;
}

.result-content em {
    color: #0284c7;
    font-style: italic;
}

.result-content hr {
    border: none;
    border-top: 1px solid #dbeafe;
    margin: 14px 0;
}

.result-content blockquote {
    border-left: 3px solid #3b82f6;
    background: #eff6ff;
    padding: 8px 14px;
    margin: 10px 0;
    border-radius: 0 5px 5px 0;
    color: #334155;
}

/* 结果区入场动画（命名独立类，禁止在 .result-content 中硬编码 animation） */
@keyframes ite-resultFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ite-result-enter {
    animation: ite-resultFadeIn 0.35s ease-out forwards;
}

/* 错误提示框 */
.ite-error-box {
    color: #ef4444;
    padding: 16px 18px;
    background: #fef2f2;
    border-radius: 6px;
    border-left: 3px solid #ef4444;
    line-height: 1.6;
}

/* 错误状态区域：flex 居中（与 placeholder/loading 一致） */
.result-content--error {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    flex: 1;
}

.ite-error-box strong {
    color: #dc2626;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}

.ite-error-retry-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 5px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.ite-error-retry-btn:hover {
    background: #fecaca;
    border-color: #f87171;
}

/* 代码块包装器（用于复制按钮定位） */
.code-block-wrapper {
    position: relative;
    margin: 10px 0;
}

.code-block-wrapper pre {
    margin: 0;
}

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 9px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
    z-index: 1;
    user-select: none;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.42);
}

/* ========== 示例模态框 ========== */
.ite-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

.ite-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    width: 680px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.ite-modal-content {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    box-shadow: 0 16px 48px rgba(30, 58, 138, 0.2);
    animation: ite-modalIn 0.25s ease-out;
}

@keyframes ite-modalIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.ite-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    flex-shrink: 0;
}

.ite-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.ite-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ite-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.ite-modal-body {
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #f8faff;
}

.ite-modal-body::-webkit-scrollbar {
    width: 6px;
}

.ite-modal-body::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 3px;
}

.ite-modal-body::-webkit-scrollbar-thumb:hover {
    background: #93c5fd;
}

/* 示例卡片 */
.example-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.example-card:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.example-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-card-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
}

.example-card-badge {
    font-size: 10px;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    padding: 1px 7px;
    border-radius: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.example-card-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .ite-input-panel { width: 280px; }
}

@media (max-width: 700px) {
    .ite-history-panel { display: none; }
    .ite-input-panel { width: 50%; }
    .ite-modal-body { grid-template-columns: 1fr; }
    .form-group-row { flex-direction: column; }
}

@media print {
    .ite-toolbar,
    .ite-history-panel,
    .ite-input-panel { display: none !important; }
    .ite-result-panel { flex: 1; }
    .ite-container { box-shadow: none; }
}

/* ========== 暗黑模式（body.dark 前缀） ========== */
body.dark .ite-container {
    background: #0f172a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark .ite-toolbar {
    background: linear-gradient(135deg, #0f2156 0%, #1e3a8a 50%, #164e63 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

body.dark .ite-main-content {
    background: #0f172a;
}

/* 历史面板 - 暗黑 */
body.dark .ite-history-panel {
    background: #0f172a;
    border-right-color: rgba(59, 130, 246, 0.2);
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

body.dark .history-panel-header h3 {
    color: #93c5fd;
}

body.dark .history-clear-btn {
    background: #2d1515;
    color: #f87171;
    border: 1px solid #7f1d1d;
}

body.dark .history-clear-btn:hover {
    background: #3d1a1a;
}

body.dark .history-limit-footer {
    background: #0f172a;
    border-top-color: rgba(59, 130, 246, 0.2);
    color: #334155;
}

body.dark .history-search {
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

body.dark .history-search input {
    background: #1e293b;
    border-color: #334155;
    color: #bfdbfe;
}

body.dark .history-search input::placeholder {
    color: #334155;
}

body.dark .history-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

body.dark .history-list {
    background: #0f172a;
}

body.dark .history-list::-webkit-scrollbar-thumb {
    background: #1e3a8a;
}

body.dark .history-list::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

body.dark .history-empty {
    color: #334155;
}

body.dark .history-item {
    background: #1e293b;
    border-color: rgba(59, 130, 246, 0.2);
    color: #e2e8f0;
}

body.dark .history-item:hover {
    background: #1e3a5f;
    border-color: #3b82f6;
}

body.dark .history-item.active {
    background: #1e3a5f;
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3), inset 3px 0 0 #3b82f6;
}

body.dark .history-item-title {
    color: #bfdbfe;
}

body.dark .history-item-time {
    color: #334155;
}

/* 输入面板 - 暗黑 */
body.dark .ite-input-panel {
    background: #0f172a;
    border-right-color: rgba(59, 130, 246, 0.2);
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

body.dark .panel-header h3 {
    color: #93c5fd;
}

body.dark .panel-tip {
    color: #64748b;
    background: rgba(30, 58, 138, 0.2);
}

body.dark .ite-input-body {
    background: #0f172a;
}

body.dark .ite-input-body::-webkit-scrollbar-thumb {
    background: #1e3a8a;
}

body.dark .form-group label {
    color: #93c5fd;
}

body.dark .ite-select,
body.dark .ite-input {
    background: #1e293b;
    border-color: #334155;
    color: #bfdbfe;
}

body.dark .ite-select:focus,
body.dark .ite-input:focus {
    border-color: #3b82f6;
    background: #263352;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.dark .ite-textarea {
    background: #1e293b;
    border-color: #334155;
    color: #bfdbfe;
}

body.dark .ite-textarea:focus {
    border-color: #3b82f6;
    background: #263352;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.dark .ite-textarea::placeholder {
    color: #334155;
}

body.dark .ite-textarea-hint {
    color: #334155;
}

body.dark #charCount {
    color: #334155;
}

body.dark #charCount.warn {
    color: #d97706;
}

body.dark #charCount.danger {
    color: #ef4444;
    font-weight: 600;
}

/* 结果面板 - 暗黑 */
body.dark .ite-result-panel {
    background: #0f172a;
}

body.dark .result-regen-btn {
    background: #1e293b;
    border-color: #334155;
    color: #60a5fa;
}

body.dark .result-regen-btn:hover {
    background: #1e3a5f;
    border-color: #3b82f6;
}

body.dark .ite-result-body {
    background: #0f172a;
}

body.dark .ite-result-body::-webkit-scrollbar-thumb {
    background: #1e3a8a;
}

body.dark .ite-result-body::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

body.dark .placeholder-title {
    color: #3b82f6;
}

body.dark .placeholder-desc {
    color: #334155;
}

body.dark .placeholder-quote {
    border-left-color: #2563eb;
    background: #1e293b;
    color: #60a5fa;
}

body.dark .loading-text {
    color: #60a5fa;
}

body.dark .loading-dots span {
    background: #3b82f6;
}

/* 结果字数统计 - 暗黑 */
body.dark .result-word-count {
    color: #64748b;
    background: #1e293b;
    border-color: #334155;
}

body.dark .result-content {
    color: #e2e8f0;
}

body.dark .result-content h3 {
    color: #60a5fa;
    border-left-color: #3b82f6;
    background: linear-gradient(to right, rgba(30, 58, 95, 0.5), transparent);
    border-bottom: none;
}

body.dark .result-content h4 {
    color: #93c5fd;
}

body.dark .result-content p,
body.dark .result-content li {
    color: #cbd5e1;
}

body.dark .result-content code {
    background: #1e293b;
    color: #38bdf8;
    border-color: #334155;
}

body.dark .result-content strong {
    color: #60a5fa;
}

body.dark .result-content em {
    color: #38bdf8;
}

body.dark .result-content hr {
    border-top-color: #1e293b;
}

body.dark .result-content blockquote {
    border-left-color: #3b82f6;
    background: #1e293b;
    color: #cbd5e1;
}

/* 错误状态 - 暗黑 */
body.dark .ite-error-box {
    background: #2d1515;
    border-left-color: #ef4444;
    color: #fca5a5;
}

body.dark .ite-error-box strong {
    color: #f87171;
}

body.dark .ite-error-retry-btn {
    background: #3d1515;
    border-color: #7f1d1d;
    color: #f87171;
}

body.dark .ite-error-retry-btn:hover {
    background: #4d1b1b;
}

/* 模态框 - 暗黑 */
body.dark .ite-modal-content {
    background: #0f172a;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

body.dark .ite-modal-body {
    background: #0f172a;
}

body.dark .example-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark .example-card:hover {
    background: #1e3a5f;
    border-color: #3b82f6;
}

body.dark .example-card-title {
    color: #bfdbfe;
}

body.dark .example-card-desc {
    color: #64748b;
}
