/* =============================================
   法律顾问 - legal_consulting.css
   主题色：深海蓝 + 法庭金色系，体现专业、权威、可信赖
   布局：三栏结构（历史 / 案情输入 / 法律意见）
   ============================================= */

/* ========== 主容器 ========== */
.lc-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f5f7fb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 35, 64, 0.1);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.lc-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;
}

/* ========== 顶部工具栏 ========== */
.lc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2340 50%, #0a1628 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(10, 22, 40, 0.45);
    flex-shrink: 0;
}

.lc-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;
    min-height: 28px;
}

.lc-toolbar-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(201, 146, 46, 0.4);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #f0d490;
    transition: all 0.2s;
    white-space: nowrap;
}

.lc-toolbar-btn:hover:not(:disabled) {
    background: rgba(201, 146, 46, 0.2);
    border-color: #c9922e;
    color: #f5d87a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.lc-toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.lc-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* 主操作按钮（开始咨询） */
.lc-toolbar-btn-primary {
    background: linear-gradient(135deg, #c9922e 0%, #a67422 100%);
    border-color: #c9922e;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(201, 146, 46, 0.45);
}

.lc-toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #d9a234 0%, #c9922e 100%);
    border-color: #d9a234;
    box-shadow: 0 4px 12px rgba(201, 146, 46, 0.55);
    color: #fff;
    transform: translateY(-1px);
}

/* 取消按钮 */
.lc-toolbar-btn-cancel {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    font-weight: 600;
}

.lc-toolbar-btn-cancel:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #fecaca;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25);
}

/* ========== 主内容区：三栏 ========== */
.lc-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f5f7fb;
}

/* ========== 左栏：历史记录 ========== */
.lc-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #d0daf0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lc-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #eef1f8 0%, #e6eaf5 100%);
    border-bottom: 1px solid #d0daf0;
    flex-shrink: 0;
}

.lc-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
}

.lc-history-count {
    font-size: 11px;
    color: #6b84a8;
    font-weight: 400;
}

.lc-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;
}

.lc-history-clear-btn:hover {
    background: #fde8e8;
}

.lc-history-search {
    padding: 8px;
    border-bottom: 1px solid #d0daf0;
    flex-shrink: 0;
}

.lc-history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #c0ccdf;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #374151;
    background: #f8faff;
}

.lc-history-search input:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 2px rgba(26, 58, 92, 0.12);
}

.lc-history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 0;
}

.lc-history-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 24px 10px;
    line-height: 1.5;
}

.lc-history-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f9;
    transition: all 0.15s;
    position: relative;
}

.lc-history-item:hover {
    background: #eef2fb;
}

.lc-history-item.active {
    background: #e8eef8;
    box-shadow: inset 3px 0 0 #3b82f6;
}

.lc-history-item-type {
    font-size: 11px;
    color: #c9922e;
    font-weight: 600;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lc-history-item-type .lc-type-badge {
    background: rgba(201, 146, 46, 0.12);
    border: 1px solid rgba(201, 146, 46, 0.3);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 10px;
    color: #9a6f1e;
}

.lc-history-item-title {
    font-size: 12px;
    color: #1e3a5f;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.lc-history-item-time {
    font-size: 10px;
    color: #94a3b8;
}

.lc-history-item-del {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.15s;
    line-height: 1;
}

.lc-history-item:hover .lc-history-item-del {
    opacity: 1;
    color: #94a3b8;
}

.lc-history-item-del:hover {
    background: #fee2e2;
    color: #ef4444 !important;
}

/* 紧急程度指示点 */
.lc-urgency-dot {
    font-size: 9px;
    line-height: 1;
    flex-shrink: 0;
}
.lc-urgency-high { color: #ef4444; }
.lc-urgency-mid  { color: #f97316; }

/* ========== 中栏：案情输入 ========== */
.lc-input-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #d0daf0;
    background: #fff;
    overflow: hidden;
}

.lc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #f8faff 0%, #f0f4fb 100%);
    border-bottom: 1px solid #d0daf0;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.lc-panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
}

.lc-panel-tip {
    font-size: 11px;
    color: #6b84a8;
}

.lc-input-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px;
}

.lc-section {
    margin-bottom: 16px;
}

.lc-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #c8d5e8;
    letter-spacing: 0.3px;
}

.lc-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.lc-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.lc-form-group-half {
    flex: 1;
    min-width: 0;
}

.lc-form-group label {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
}

.lc-select {
    padding: 7px 28px 7px 10px;
    border: 1px solid #c0ccdf;
    border-radius: 5px;
    font-size: 12px;
    color: #1e293b;
    background-color: #f8faff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b84a8' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 8px 5px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
    width: 100%;
}

.lc-select:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 2px rgba(26, 58, 92, 0.1);
}

.lc-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c0ccdf;
    border-radius: 5px;
    font-size: 13px;
    color: #1e293b;
    background: #f8faff;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
}

.lc-textarea:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 2px rgba(26, 58, 92, 0.1);
    background: #fff;
}

.lc-textarea-main {
    min-height: 140px;
}

.lc-textarea::placeholder {
    color: #94a3b8;
    font-size: 12px;
}

.lc-char-counter {
    text-align: right;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.lc-char-counter.warning {
    color: #f97316;
}

.lc-char-counter.danger {
    color: #ef4444;
}

/* 免责声明 */
.lc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 10px 12px;
    background: #fef9ec;
    border: 1px solid #f5d68a;
    border-radius: 6px;
    font-size: 11px;
    color: #92640a;
    line-height: 1.55;
    margin-top: 4px;
}

.lc-disclaimer-icon {
    flex-shrink: 0;
    font-size: 13px;
}

/* ========== 右栏：咨询结果 ========== */
.lc-result-panel {
    flex: 1.2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.lc-result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    font-size: 11px;
}

.lc-result-type {
    background: rgba(201, 146, 46, 0.12);
    border: 1px solid rgba(201, 146, 46, 0.3);
    color: #9a6f1e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.lc-result-time {
    color: #94a3b8;
    font-size: 11px;
}

.lc-result-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

/* ---- 占位符 ---- */
.lc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 24px;
    text-align: center;
}

.lc-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.scale-animation {
    display: inline-block;
    animation: scalePendulum 3s ease-in-out infinite;
}

@keyframes scalePendulum {
    0%, 100% { transform: rotate(-8deg); }
    50%       { transform: rotate(8deg); }
}

.lc-placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 10px;
}

.lc-placeholder-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 6px;
    line-height: 1.55;
}

/* ---- 加载中 ---- */
.lc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 24px;
    text-align: center;
}

.lc-loading-icon {
    font-size: 36px;
    margin-bottom: 16px;
    animation: scaleBreath 1.5s ease-in-out infinite;
}

@keyframes scaleBreath {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.12); opacity: 0.8; }
}

.lc-loading-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.lc-loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9922e;
    animation: dotBounce 1.2s ease-in-out infinite;
}

.lc-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.lc-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40%           { transform: translateY(-10px); opacity: 1; }
}

.lc-loading-text {
    font-size: 13px;
    color: #6b84a8;
    margin: 0;
    min-height: 20px;
    transition: opacity 0.25s;
}

/* ---- 结果内容 ---- */
.lc-result-content {
    padding: 20px 22px;
    font-size: 13px;
    line-height: 1.8;
    color: #1e293b;
    white-space: normal;
    word-break: break-word;
}

.lc-result-content > *:first-child {
    margin-top: 0;
}

.lc-result-content h2 {
    font-size: 15px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0 0 14px;
    padding: 10px 14px 10px 16px;
    background: linear-gradient(135deg, #eef4ff 0%, #f6f9ff 100%);
    border-left: 4px solid #c9922e;
    border-radius: 0 6px 6px 0;
    letter-spacing: 0.3px;
}

.lc-result-content h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 18px 0 8px;
    padding-left: 10px;
    border-left: 3px solid #c9922e;
}

.lc-result-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: #2d5a8e;
    margin: 14px 0 6px;
}

.lc-result-content h5 {
    font-size: 12px;
    font-weight: 600;
    color: #4a7ab5;
    margin: 10px 0 4px;
}

.lc-result-content p {
    margin: 0 0 10px;
    color: #334155;
}

.lc-result-content strong {
    color: #1a3a5c;
    font-weight: 600;
}

.lc-result-content em {
    color: #c9922e;
    font-style: normal;
    font-weight: 500;
}

.lc-result-content ul,
.lc-result-content ol {
    margin: 6px 0 10px;
    padding-left: 22px;
}

.lc-result-content li {
    margin-bottom: 5px;
    line-height: 1.7;
    color: #334155;
}

.lc-result-content li::marker {
    color: var(--caq-primary, #c9922e);
}

.lc-result-content blockquote {
    margin: 14px 0 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #eef5ff 0%, #f4f8ff 100%);
    border-left: 4px solid #1a3a5c;
    border-radius: 0 6px 6px 0;
    color: #475569;
    font-style: italic;
    font-size: 12px;
    line-height: 1.65;
}

.lc-result-content pre {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 12px 14px;
    font-size: 12px;
    overflow-x: auto;
    margin: 8px 0;
}

.lc-result-content code {
    background: #e8f0fe;
    color: #1a3a5c;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* 错误块 */
.lc-result-content--error {
    display: flex;
    align-items: flex-start;
    padding: 0;
}

.lc-result-error-block {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin: 20px;
    flex: 1;
}

.lc-result-error-icon {
    font-size: 22px;
    color: #ef4444;
    flex-shrink: 0;
}

.lc-result-error-body { flex: 1; }

.lc-result-error-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
}

.lc-result-error-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #94a3b8;
}

.lc-result-error-retry-btn {
    background: #ef4444;
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.lc-result-error-retry-btn:hover { background: #dc2626; }

/* 结果进入动画 */
.lc-result-enter {
    animation: lcFadeIn 0.35s ease-out;
}

@keyframes lcFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 示例模态框 ========== */
.lc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.55);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.lc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: min(680px, 94vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.35);
    overflow: hidden;
}

.lc-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.lc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2340 100%);
    color: #f0d490;
    flex-shrink: 0;
}

.lc-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #f0d490;
}

.lc-modal-close {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lc-modal-close:hover {
    background: rgba(239, 68, 68, 0.6);
    border-color: #ef4444;
}

.lc-modal-body {
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 12px;
}

.lc-example-card {
    border: 1.5px solid #d0daf0;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8faff;
    position: relative;
    overflow: hidden;
}

.lc-example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a3a5c, #c9922e);
    opacity: 0;
    transition: opacity 0.2s;
}

.lc-example-card:hover {
    border-color: #1a3a5c;
    background: #eef2fb;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(26, 58, 92, 0.12);
}

.lc-example-card:hover::before {
    opacity: 1;
}

.lc-example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lc-example-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.lc-example-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
    flex: 1;
}

.lc-example-badge {
    background: rgba(201, 146, 46, 0.12);
    border: 1px solid rgba(201, 146, 46, 0.35);
    color: #9a6f1e;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.lc-example-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 8px;
}

.lc-example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.lc-example-tag {
    background: #e8eef8;
    color: #3d6090;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 500;
}

/* ========== Toast通知 ========== */
.lc-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    border-radius: 22px;
    background: #1a3a5c;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(10, 22, 40, 0.3);
}

.lc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 抖动动画 ========== */
.shake {
    animation: lcShake 0.4s ease;
}

@keyframes lcShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* ========== 自定义滚动条 ========== */
.lc-history-list::-webkit-scrollbar,
.lc-input-body::-webkit-scrollbar,
.lc-result-body::-webkit-scrollbar,
.lc-modal-body::-webkit-scrollbar {
    width: 4px;
}

.lc-history-list::-webkit-scrollbar-track,
.lc-input-body::-webkit-scrollbar-track,
.lc-result-body::-webkit-scrollbar-track,
.lc-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.lc-history-list::-webkit-scrollbar-thumb,
.lc-input-body::-webkit-scrollbar-thumb,
.lc-result-body::-webkit-scrollbar-thumb,
.lc-modal-body::-webkit-scrollbar-thumb {
    background: #ce93d8;
    border-radius: 4px;
}

.lc-history-list::-webkit-scrollbar-thumb:hover,
.lc-input-body::-webkit-scrollbar-thumb:hover,
.lc-result-body::-webkit-scrollbar-thumb:hover,
.lc-modal-body::-webkit-scrollbar-thumb:hover {
    background: #ab47bc;
}

/* ========== 响应式布局 ========== */
@media (max-width: 900px) {
    .lc-history-panel {
        width: 170px;
    }
}

@media (max-width: 639px) {
    .lc-container {
        height: auto;
        min-height: unset;
    }

    .lc-main-content {
        flex-direction: column;
        overflow: visible;
    }

    .lc-history-panel {
        width: 100%;
        height: 180px;
        border-right: none;
        border-bottom: 1px solid #d0daf0;
    }

    .lc-input-panel,
    .lc-result-panel {
        border-right: none;
        height: auto;
        min-height: 300px;
    }

    .lc-input-body {
        overflow: visible;
    }

    .lc-result-body {
        overflow: visible;
        min-height: 300px;
    }

    .lc-form-row {
        flex-direction: column;
        gap: 8px;
    }

    .lc-toolbar {
        flex-wrap: wrap;
    }

    .lc-toolbar .toolbar-title {
        display: none;
    }

    .lc-container.fullscreen .lc-main-content {
        overflow-y: auto;
    }
}

/* ================================================================
   暗黑模式（body.dark 前缀）
   ================================================================ */

body.dark .lc-container {
    background: #0f1c30;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* 工具栏保持深色（已经很深，微调） */
body.dark .lc-toolbar {
    background: linear-gradient(135deg, #0d2035 0%, #080f1c 50%, #050a12 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* 主内容区 */
body.dark .lc-main-content {
    background: #0f1c30;
}

/* 历史面板 */
body.dark .lc-history-panel {
    background: #111d2e;
    border-right-color: #1e3352;
}

body.dark .lc-history-header {
    background: linear-gradient(to bottom, #152035 0%, #111d2e 100%);
    border-bottom-color: #1e3352;
}

body.dark .lc-history-header h3 {
    color: #a8c4e0;
}

body.dark .lc-history-count {
    color: #4a7ab5;
}

body.dark .lc-history-clear-btn {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

body.dark .lc-history-clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

body.dark .lc-history-search {
    border-bottom-color: #1e3352;
}

body.dark .lc-history-search input {
    border-color: #1e3352;
    background: #0d1a2e;
    color: #c8daf0;
}

body.dark .lc-history-search input:focus {
    border-color: #4a7ab5;
    box-shadow: 0 0 0 2px rgba(74, 122, 181, 0.18);
}

body.dark .lc-history-search input::placeholder {
    color: #64748b;
}

body.dark .lc-history-item {
    border-bottom-color: #1a2e46;
}

body.dark .lc-history-item:hover {
    background: #162540;
}

body.dark .lc-history-item.active {
    background: #1a2e46;
    box-shadow: inset 3px 0 0 #3b82f6;
}

body.dark .lc-history-item-type {
    color: #c9922e;
}

body.dark .lc-history-item-type .lc-type-badge {
    background: rgba(201, 146, 46, 0.15);
    border-color: rgba(201, 146, 46, 0.25);
    color: #c9922e;
}

body.dark .lc-history-item-title {
    color: #c8daf0;
}

body.dark .lc-history-item-time {
    color: #6b84a8;
}

body.dark .lc-history-item-del {
    color: #2d4258;
}

body.dark .lc-history-item:hover .lc-history-item-del {
    color: #4a6280;
}

body.dark .lc-history-item-del:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171 !important;
}

body.dark .lc-history-empty {
    color: #6b84a8;
}

body.dark .lc-urgency-high { color: #f87171; }
body.dark .lc-urgency-mid  { color: #fb923c; }

/* 输入面板 */
body.dark .lc-input-panel {
    background: #111d2e;
    border-right-color: #1e3352;
}

body.dark .lc-panel-header {
    background: linear-gradient(to bottom, #152035 0%, #111d2e 100%);
    border-bottom-color: #1e3352;
}

body.dark .lc-panel-header h3 {
    color: #a8c4e0;
}

body.dark .lc-panel-tip {
    color: #4a7ab5;
}

body.dark .lc-input-body {
    background: #111d2e;
}

body.dark .lc-section-title {
    color: #7bafd4;
    border-bottom-color: #1e3352;
}

body.dark .lc-form-group label {
    color: #7bafd4;
}

body.dark .lc-select {
    border-color: #1e3352;
    background-color: #0d1a2e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%237bafd4' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 8px 5px;
    color: #c8daf0;
}

body.dark .lc-select:focus {
    border-color: #4a7ab5;
    box-shadow: 0 0 0 2px rgba(74, 122, 181, 0.18);
}

body.dark .lc-textarea {
    border-color: #1e3352;
    background: #0d1a2e;
    color: #c8daf0;
}

body.dark .lc-textarea:focus {
    border-color: #4a7ab5;
    box-shadow: 0 0 0 2px rgba(74, 122, 181, 0.18);
    background: #0f1f35;
}

body.dark .lc-textarea::placeholder {
    color: #64748b;
}

body.dark .lc-char-counter {
    color: #6b84a8;
}

body.dark .lc-char-counter.warning {
    color: #fb923c;
}

body.dark .lc-char-counter.danger {
    color: #f87171;
}

body.dark .lc-disclaimer {
    background: rgba(201, 146, 46, 0.08);
    border-color: rgba(201, 146, 46, 0.2);
    color: #c9922e;
}

/* 结果面板 */
body.dark .lc-result-panel {
    background: #0f1c30;
}

body.dark .lc-result-type {
    background: rgba(201, 146, 46, 0.1);
    border-color: rgba(201, 146, 46, 0.25);
    color: #c9922e;
}

body.dark .lc-result-time {
    color: #6b84a8;
}

body.dark .lc-result-body::-webkit-scrollbar-track {
    background: #0f1c30;
}

body.dark .lc-result-body::-webkit-scrollbar-thumb {
    background: #9d4edd;
}

body.dark .lc-result-body::-webkit-scrollbar-thumb:hover {
    background: #7b2fbe;
}

body.dark .lc-history-list::-webkit-scrollbar-track {
    background: #111d2e;
}

body.dark .lc-history-list::-webkit-scrollbar-thumb {
    background: #9d4edd;
}

body.dark .lc-history-list::-webkit-scrollbar-thumb:hover {
    background: #7b2fbe;
}

body.dark .lc-input-body::-webkit-scrollbar-track {
    background: #111d2e;
}

body.dark .lc-input-body::-webkit-scrollbar-thumb {
    background: #9d4edd;
}

body.dark .lc-input-body::-webkit-scrollbar-thumb:hover {
    background: #7b2fbe;
}

/* 占位符 */
body.dark .lc-placeholder-title {
    color: #7bafd4;
}

body.dark .lc-placeholder-desc {
    color: #6b84a8;
}

/* 加载 */
body.dark .lc-loading-text {
    color: #4a7ab5;
}

/* 结果内容 */
body.dark .lc-result-content {
    color: #c8daf0;
}

body.dark .lc-result-content h2 {
    color: #a8c8e8;
    background: linear-gradient(135deg, #0f1e31 0%, #131f33 100%);
    border-left-color: #c9922e;
}

body.dark .lc-result-content h3 {
    color: #7bafd4;
    border-left-color: #c9922e;
}

body.dark .lc-result-content h4 {
    color: #5a95c8;
}

body.dark .lc-result-content h5 {
    color: #4a7ab5;
}

body.dark .lc-result-content p {
    color: #a8c4e0;
}

body.dark .lc-result-content strong {
    color: #c8daf0;
}

body.dark .lc-result-content em {
    color: #c9922e;
}

body.dark .lc-result-content li {
    color: #a8c4e0;
}

body.dark .lc-result-content li::marker {
    color: #c9922e;
}

body.dark .lc-result-content blockquote {
    background: linear-gradient(135deg, #0c1829 0%, #0e1e30 100%);
    border-left-color: #4a7ab5;
    color: #8ab0d0;
    font-style: italic;
}

body.dark .lc-result-content pre {
    background: #0d1a2e;
    border-color: #1e3352;
    color: #c8daf0;
}

body.dark .lc-result-content code {
    background: #152035;
    color: #7bafd4;
}

/* 错误块暗黑模式 */
body.dark .lc-result-error-block {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

body.dark .lc-result-error-title {
    color: #f87171;
}

body.dark .lc-result-error-hint {
    color: #6b84a8;
}

/* 模态框暗黑模式 */
body.dark .lc-modal {
    background: #111d2e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark .lc-modal-body {
    background: #111d2e;
}

body.dark .lc-modal-body::-webkit-scrollbar-track {
    background: #111d2e;
}

body.dark .lc-modal-body::-webkit-scrollbar-thumb {
    background: #9d4edd;
}

body.dark .lc-modal-body::-webkit-scrollbar-thumb:hover {
    background: #7b2fbe;
}

body.dark .lc-example-card {
    background: #0d1a2e;
    border-color: #1e3352;
}

body.dark .lc-example-card:hover {
    background: #152035;
    border-color: #4a7ab5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

body.dark .lc-example-title {
    color: #a8c4e0;
}

body.dark .lc-example-badge {
    background: rgba(201, 146, 46, 0.1);
    border-color: rgba(201, 146, 46, 0.25);
    color: #c9922e;
}

body.dark .lc-example-desc {
    color: #4a7ab5;
}

body.dark .lc-example-tag {
    background: #152035;
    color: #5a8ab8;
}

/* Toast 暗黑模式 */
body.dark .lc-toast {
    background: #c9922e;
    color: #fff;
}
