/* =============================================
   解决思路助手 - problem_solving_assistant.css
   蓝色智慧主题，三栏布局，思维激发配色
   ============================================= */

/* ========== 主容器 ========== */
.psa-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #eff6ff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #bfdbfe;
}

/* 全屏模式 */
.psa-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;
    border: none;
}

/* ========== 顶部工具栏 ========== */
.psa-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 7px 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
    flex-shrink: 0;
    min-height: 36px;
}

.psa-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* 工具栏分组间分隔线 */
.psa-toolbar .toolbar-group + .toolbar-group:not(.toolbar-group--right) {
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.toolbar-group--right {
    margin-left: auto;
}

.toolbar-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #1d4ed8;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.toolbar-btn-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== Shake 抖动动画 ========== */
@keyframes psaShake {
    0%, 100% { transform: translateX(0); }
    15%, 55%, 85% { transform: translateX(-5px); }
    35%, 70% { transform: translateX(5px); }
}

.psa-input.shake,
.psa-select.shake,
.psa-textarea.shake {
    animation: psaShake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ========== 主内容区：三栏 ========== */
.psa-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #eff6ff;
}

/* ========== 左栏：历史记录 ========== */
.psa-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #bfdbfe;
    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%, #e8f2ff 100%);
    border-bottom: 1px solid #bfdbfe;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
}

.history-count {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 400;
}

.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 #bfdbfe;
    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: #374151;
    background: #f0f7ff;
}

.history-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list:hover::-webkit-scrollbar-track { background: #eff6ff; }
.history-list::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 2px; }
.history-list::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

.history-empty {
    text-align: center;
    color: #93c5fd;
    font-size: 12px;
    padding: 28px 8px;
    user-select: none;
}

.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 11px;
    margin: 3px 0;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: psaHiFadeIn 0.2s ease;
}

@keyframes psaHiFadeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

.history-item:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateX(2px);
}

.history-item.active {
    background: #dbeafe;
    border-color: #3b82f6;
    box-shadow: inset 3px 0 0 #3b82f6, 0 1px 3px rgba(59, 130, 246, 0.2);
}

.history-item-del {
    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;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.history-item:hover .history-item-del { opacity: 1; }

.history-item-del:hover {
    background: #ef4444;
    color: #fff;
}

.history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 20px;
    margin-bottom: 2px;
}

.history-item-sub {
    font-size: 11px;
    color: #3b82f6;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-time {
    font-size: 10px;
    color: #94a3b8;
}

/* ========== 中栏：表单输入 ========== */
.psa-input-panel {
    width: 370px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #bfdbfe;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========== 右栏：结果展示 ========== */
.psa-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
}

/* ========== 通用面板头部 ========== */
.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: linear-gradient(to bottom, #f0f7ff 0%, #e8f2ff 100%);
    border-bottom: 1px solid #bfdbfe;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
    white-space: nowrap;
}

.panel-tip {
    font-size: 11px;
    color: #93c5fd;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}

.result-meta-subject {
    font-size: 11px;
    color: #1d4ed8;
    background: #dbeafe;
    padding: 2px 10px;
    border-radius: 10px;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.result-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== 表单区域 ========== */
.psa-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.psa-input-body::-webkit-scrollbar { width: 4px; }
.psa-input-body::-webkit-scrollbar-track { background: transparent; }
.psa-input-body:hover::-webkit-scrollbar-track { background: #eff6ff; }
.psa-input-body::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 2px; }
.psa-input-body::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

.form-group {
    margin-bottom: 13px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.required-mark { color: #3b82f6; margin-left: 2px; }

.label-tip {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
}

.psa-input,
.psa-select,
.psa-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    font-size: 13px;
    color: #374151;
    background: #f8fbff;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.psa-input:focus,
.psa-select:focus,
.psa-textarea:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.psa-input:hover:not(:focus),
.psa-select:hover:not(:focus),
.psa-textarea:hover:not(:focus) {
    border-color: #93c5fd;
    background: #fff;
}

.psa-input::placeholder,
.psa-textarea::placeholder {
    color: #b0c8e8;
}

.psa-textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.7;
}

/* 字符计数 */
.char-count {
    text-align: right;
    font-size: 11px;
    color: #93c5fd;
    margin-top: 3px;
    transition: color 0.2s;
}

.char-count.warn  { color: #f59e0b; }
.char-count.danger { color: #ef4444; font-weight: 600; }

/* 表单两栏 */
.form-row {
    display: flex;
    gap: 10px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

/* 思维辅助标签 */
.think-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.think-tag {
    padding: 3px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 11px;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.think-tag:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.think-tag.selected {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    border-color: transparent;
}

/* ========== 结果展示区 ========== */
.psa-result-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.psa-result-body::-webkit-scrollbar { width: 5px; }
.psa-result-body::-webkit-scrollbar-track { background: transparent; }
.psa-result-body:hover::-webkit-scrollbar-track { background: #eff6ff; }
.psa-result-body::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 3px; }
.psa-result-body::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* 占位区 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px 24px;
    text-align: center;
    color: #93c5fd;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 16px;
    opacity: 0.7;
    animation: psaFloat 3.5s ease-in-out infinite;
}

@keyframes psaFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 12px;
    color: #93c5fd;
    margin: 3px 0;
    line-height: 1.6;
}

/* 加载动画 */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px 24px;
}

.loading-think {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.think-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    animation: psaBounce 1.2s ease-in-out infinite;
}

.think-dot:nth-child(1) { animation-delay: 0s; }
.think-dot:nth-child(2) { animation-delay: 0.2s; }
.think-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes psaBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40%            { transform: scale(1.2); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: #1d4ed8;
    margin: 0;
    font-weight: 500;
}

/* 错误状态区域 */
.psa-result-content--error {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px 24px;
    text-align: center;
    background: transparent;
    animation: none;
}

.error-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-icon {
    font-size: 40px;
    margin-bottom: 14px;
    opacity: 0.85;
}

.error-msg {
    font-size: 14px;
    color: #ef4444;
    margin: 0 0 6px;
    font-weight: 600;
    line-height: 1.5;
}

.error-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 16px;
}

.error-retry-btn {
    padding: 8px 22px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.error-retry-btn:hover {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

/* 结果内容区 Markdown 渲染 */
.psa-result-content {
    padding: 20px 24px;
    line-height: 1.8;
    font-size: 14px;
    color: #1e293b;
    animation: psaResultFadeIn 0.35s ease-out forwards;
}

@keyframes psaResultFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.psa-result-content h2 {
    font-size: 15px;
    font-weight: 700;
    color: #1e40af;
    margin: 20px 0 10px;
    padding: 7px 14px;
    border-left: 4px solid #3b82f6;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.08), transparent);
    border-radius: 0 5px 5px 0;
}

.psa-result-content h2:first-child {
    margin-top: 0;
}

.psa-result-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8;
    margin: 14px 0 6px;
    padding-left: 10px;
    border-left: 2px solid #93c5fd;
}

.psa-result-content ul {
    margin: 6px 0;
    padding-left: 0;
    list-style: none;
}

.psa-result-content li {
    margin-bottom: 6px;
    padding-left: 18px;
    position: relative;
    color: #374151;
    line-height: 1.7;
}

.psa-result-content li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.psa-result-content ol {
    padding-left: 20px;
    margin: 6px 0;
    counter-reset: step-counter;
    list-style: none;
}

.psa-result-content ol li {
    counter-increment: step-counter;
    padding-left: 10px;
}

.psa-result-content ol li::before {
    content: counter(step-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: #3b82f6;
    font-weight: 700;
    font-size: 13px;
}

.psa-result-content strong {
    color: #1d4ed8;
    font-weight: 600;
}

.psa-result-content em {
    color: #6366f1;
    font-style: italic;
}

.psa-result-content p {
    margin: 8px 0;
    color: #374151;
    line-height: 1.8;
}

.psa-result-content hr {
    border: none;
    border-top: 1px dashed #bfdbfe;
    margin: 14px 0;
}

.psa-result-content blockquote {
    margin: 10px 0;
    padding: 8px 14px;
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 0 4px 4px 0;
    color: #475569;
    font-size: 13px;
}

/* 行内代码样式（支持暗黑模式） */
.psa-code {
    background: #eff6ff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: #1d4ed8;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

/* ========== 模态框 ========== */
.psa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.psa-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: min(720px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.psa-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
}

.psa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    flex-shrink: 0;
}

.psa-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.psa-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.psa-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.psa-modal-body {
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 12px;
}

/* 示例卡片 */
.example-card {
    padding: 14px 16px;
    border: 1.5px solid #bfdbfe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f0f7ff;
}

.example-card:hover {
    border-color: #3b82f6;
    background: #dbeafe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.example-card-icon { font-size: 20px; }

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.example-card-badge {
    font-size: 11px;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.example-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* ========== 暗黑模式 ========== */
body.dark .psa-container {
    background: #0c1524;
    border-color: #1e3a5f;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

body.dark .psa-toolbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #1d3570 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark .psa-main-content {
    background: #0c1524;
}

body.dark .psa-history-panel {
    background: #0f1e35;
    border-right-color: #1e3a5f;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #112042, #0f1e35);
    border-bottom-color: #1e3a5f;
}

body.dark .history-panel-header h3 { color: #93c5fd; }

body.dark .history-search input {
    background: #0d1929;
    border-color: #1e3a5f;
    color: #cdd9f0;
}

body.dark .history-search input:focus {
    border-color: #3b82f6;
    background: #112042;
}

body.dark .history-search input::placeholder { color: #2d4a6e; }

body.dark .history-list:hover::-webkit-scrollbar-track { background: #0f1e35; }

body.dark .history-empty { color: #2d4a6e; }

body.dark .history-item {
    background: #0d1929;
    border-color: #1e3a5f;
}

body.dark .history-item:hover {
    background: #112042;
    border-color: #1d4ed8;
}

body.dark .history-item.active {
    background: #172554;
    border-color: #3b82f6;
    box-shadow: inset 3px 0 0 #3b82f6, 0 1px 5px rgba(0, 0, 0, 0.4);
}

body.dark .history-item-title { color: #cdd9f0; }
body.dark .history-item-sub  { color: #60a5fa; }
body.dark .history-item-time { color: #2d4a6e; }

body.dark .psa-input-panel,
body.dark .psa-result-panel {
    background: #0f1e35;
    border-color: #1e3a5f;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #112042, #0f1e35);
    border-bottom-color: #1e3a5f;
}

body.dark .panel-header h3 { color: #93c5fd; }
body.dark .panel-tip        { color: #2d4a6e; }

body.dark .psa-input-body:hover::-webkit-scrollbar-track { background: #0f1e35; }

body.dark .form-group label { color: #a8bfd8; }
body.dark .label-tip        { color: #2d4a6e; }

body.dark .psa-input,
body.dark .psa-select,
body.dark .psa-textarea {
    background: #0d1929;
    border-color: #1e3a5f;
    color: #cdd9f0;
}

body.dark .psa-input:focus,
body.dark .psa-select:focus,
body.dark .psa-textarea:focus {
    border-color: #3b82f6;
    background: #112042;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

body.dark .psa-input:hover:not(:focus),
body.dark .psa-select:hover:not(:focus),
body.dark .psa-textarea:hover:not(:focus) {
    border-color: #2d4a6e;
    background: #0f1e35;
}

body.dark .psa-input::placeholder,
body.dark .psa-textarea::placeholder { color: #1e3a5f; }

body.dark .char-count         { color: #2d4a6e; }
body.dark .char-count.warn    { color: #f59e0b; }
body.dark .char-count.danger  { color: #f87171; font-weight: 600; }

body.dark .think-tag {
    background: #0d1929;
    border-color: #1e3a5f;
    color: #60a5fa;
}

body.dark .think-tag:hover {
    background: #112042;
    border-color: #3b82f6;
}

body.dark .think-tag.selected {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
    border-color: transparent;
}

body.dark .think-dot {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
}

body.dark .psa-result-body:hover::-webkit-scrollbar-track { background: #0f1e35; }

body.dark .result-placeholder { color: #2d4a6e; }
body.dark .placeholder-title  { color: #60a5fa; }
body.dark .placeholder-desc   { color: #2d4a6e; }

body.dark .loading-text { color: #60a5fa; }

body.dark .psa-result-content {
    color: #cdd9f0;
}

body.dark .psa-result-content h2 {
    color: #93c5fd;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), transparent);
    border-left-color: #3b82f6;
}

body.dark .psa-result-content h3 {
    color: #60a5fa;
    border-left-color: #1e3a5f;
}

body.dark .psa-result-content li  { color: #a8bfd8; }
body.dark .psa-result-content p   { color: #a8bfd8; }
body.dark .psa-result-content strong { color: #60a5fa; }
body.dark .psa-result-content em  { color: #818cf8; }
body.dark .psa-result-content hr  { border-top-color: #1e3a5f; }

body.dark .psa-result-content blockquote {
    background: #112042;
    border-left-color: #3b82f6;
    color: #93c5fd;
}

body.dark .result-meta-subject {
    background: #172554;
    color: #93c5fd;
}

body.dark .result-time { color: #2d4a6e; }

body.dark .psa-code {
    background: #1e3a5f;
    color: #93c5fd;
}

body.dark .psa-modal-content {
    background: #0f1e35;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark .psa-modal-header {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

body.dark .example-card {
    background: #0d1929;
    border-color: #1e3a5f;
}

body.dark .example-card:hover {
    background: #112042;
    border-color: #3b82f6;
}

body.dark .example-card-title { color: #cdd9f0; }
body.dark .example-card-badge {
    background: #172554;
    color: #93c5fd;
}
body.dark .example-card-desc { color: #4a6a8a; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .psa-history-panel {
        display: none;
    }
    .psa-input-panel {
        width: 320px;
    }
}

@media (max-width: 680px) {
    .psa-main-content {
        flex-direction: column;
    }
    .psa-input-panel {
        width: 100%;
        height: 55%;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid #bfdbfe;
    }
    .psa-result-panel {
        min-height: 45%;
    }
    body.dark .psa-input-panel {
        border-bottom-color: #1e3a5f;
    }
}
