/* ================================================
   名词所属分类 - noun_classification.css
   主题：蓝青色渐变，分类树层级可视化，学术知识感
   暗黑模式：body.dark 前缀
   ================================================ */

/* ---------- 根容器 ---------- */
.nc-container {
    display: flex;
    flex-direction: column;
    height: 660px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    overflow: hidden;
    background: #f8faff;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    box-shadow: 0 2px 16px rgba(37, 99, 235, 0.10);
    transition: height 0.3s;
}

.nc-container.fullscreen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9000;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
}

/* ---------- 工具栏 ---------- */
.nc-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 100%);
    border-bottom: 2px solid #1e40af;
}

.toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: #e0f2fe;
    letter-spacing: 0.5px;
    margin-right: 4px;
    white-space: nowrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-group:not(:last-child) {
    padding-right: 10px;
    border-right: 1px solid rgba(255,255,255,0.2);
    margin-right: 2px;
}

.toolbar-group:last-child {
    margin-left: auto;
}

.toolbar-btn {
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.12);
    color: #e0f2fe;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s;
}

.toolbar-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.toolbar-btn-primary {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.55);
    font-weight: 600;
}

.toolbar-btn-primary:hover {
    background: rgba(255,255,255,0.38);
}

.toolbar-btn-primary:disabled {
    background: rgba(255,255,255,0.10);
    opacity: 0.5;
}

/* ---------- 三栏主体 ---------- */
.nc-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ======= 左栏：历史记录 ======= */
.nc-history-panel {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #bfdbfe;
    background: #f0f7ff;
    overflow: hidden;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #bfdbfe;
    background: linear-gradient(to bottom, #e0efff 0%, #d8eaff 100%);
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    background: none;
    border: none;
    padding: 0;
}

.history-count {
    font-size: 11px;
    color: #3b82f6;
    font-weight: normal;
}

.history-clear-btn {
    background: #fff8f0;
    border: 1px solid #fbbf24;
    color: #b45309;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 3px;
    transition: all 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fde68a;
    border-color: #d97706;
}

.history-search {
    padding: 8px 10px;
    border-bottom: 1px solid #bfdbfe;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    height: 26px;
    padding: 0 8px;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    font-size: 11px;
    background: #fff;
    color: #1e3a8a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.history-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

.history-list {
    flex: 1;
    overflow-y: auto;
}

.history-list::-webkit-scrollbar { width: 5px; }
.history-list::-webkit-scrollbar-track { background: #eff6ff; }
.history-list::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 3px; }

.history-empty {
    padding: 20px 12px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    line-height: 1.8;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    margin: 4px 8px;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.history-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateX(2px);
}

.history-item.active {
    background: #dbeafe;
    border-color: #3b82f6;
    border-left-width: 3px;
    box-shadow: 0 1px 4px rgba(59,130,246,0.15);
}

.history-item-main {
    flex: 1;
    min-width: 0;
}

.history-item-noun {
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.history-item-meta {
    display: flex;
    gap: 4px;
    font-size: 10px;
    color: #64748b;
    flex-wrap: wrap;
}

.history-item-domain {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 10px;
}

.history-item-del {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    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;
}

/* ======= 中栏：输入区域 ======= */
.nc-input-panel {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #bfdbfe;
    background: #fff;
    overflow: hidden;
}

.panel-header {
    padding: 12px 14px 10px;
    border-bottom: 1px solid #dbeafe;
    background: linear-gradient(to bottom, #f8faff 0%, #f0f7ff 100%);
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0 0 2px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
}

.panel-tip {
    font-size: 11px;
    color: #64748b;
}

.nc-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

.nc-input-body::-webkit-scrollbar { width: 5px; }
.nc-input-body::-webkit-scrollbar-track { background: #f8faff; }
.nc-input-body::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 3px; }

/* 搜索框 */
.nc-search-box {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.nc-noun-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid #93c5fd;
    border-radius: 6px;
    font-size: 14px;
    color: #1e3a8a;
    background: #fff;
    outline: none;
    transition: all 0.2s;
}

.nc-noun-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.nc-noun-input::placeholder {
    color: #94a3b8;
    font-size: 12px;
}

.nc-search-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.nc-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.nc-search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 字数统计 */
.nc-char-counter {
    text-align: right;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.nc-char-counter.warning { color: #f59e0b; }
.nc-char-counter.limit { color: #ef4444; }

/* 领域选项 */
.nc-domain-group {
    margin-bottom: 14px;
}

.nc-domain-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.nc-domain-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nc-domain-option {
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    font-size: 12px;
    color: #475569;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.nc-domain-option:hover {
    border-color: #3b82f6;
    color: #1d4ed8;
    background: #eff6ff;
}

.nc-domain-option.selected {
    background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 100%);
    border-color: #1e40af;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(37,99,235,0.25);
}

/* 快速标签 */
.nc-quick-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.nc-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.nc-quick-tag {
    padding: 3px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 12px;
    color: #1d4ed8;
    cursor: pointer;
    transition: all 0.18s;
}

.nc-quick-tag:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 6px rgba(59,130,246,0.15);
}

/* 使用说明 */
.nc-tips-box {
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
}

.nc-tips-box p {
    margin: 0 0 6px 0;
    font-weight: 600;
    color: #0369a1;
}

.nc-tips-box ul {
    margin: 0;
    padding-left: 16px;
}

.nc-tips-box li {
    margin-bottom: 3px;
}

/* ======= 右栏：分类结果 ======= */
.nc-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fafcff;
    overflow: hidden;
    min-width: 0;
}

.nc-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #dbeafe;
    background: linear-gradient(to bottom, #f8faff 0%, #f0f7ff 100%);
    flex-shrink: 0;
}

.nc-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
}

.result-meta-info {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.result-noun-label {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a8a;
    background: #dbeafe;
    padding: 2px 10px;
    border-radius: 12px;
}

.result-domain-badge {
    font-size: 11px;
    color: #0e7490;
    background: #cffafe;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.nc-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.nc-result-body::-webkit-scrollbar { width: 6px; }
.nc-result-body::-webkit-scrollbar-track { background: #f8faff; }
.nc-result-body::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 3px; }

/* 占位提示 */
.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
    color: #94a3b8;
    padding: 20px;
}

.placeholder-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
    animation: pulseIcon 2.8s ease-in-out infinite;
}

.placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 8px 0;
}

.placeholder-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 3px 0;
}

/* 加载中 */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3b82f6;
    animation: dotBounce 1.2s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: #3b82f6;
    font-weight: 500;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.85; }
}

/* 结果内容 */
.result-content {
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 错误提示 */
#ncResultError {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    text-align: center;
}

.error-icon { font-size: 40px; margin-bottom: 12px; }
.error-msg { font-size: 14px; color: #dc2626; margin: 0 0 6px 0; }
.error-tip { font-size: 12px; color: #94a3b8; margin: 0 0 16px 0; }

.nc-retry-btn {
    padding: 8px 20px;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    color: #1d4ed8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.nc-retry-btn:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}

/* ======= AI 生成结果卡片样式 ======= */
.nc-result-card {
    background: #fff;
    border: 1px solid #dbeafe;
    border-top: 3px solid #1e40af;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(37,99,235,0.08);
}

.nc-noun-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 100%);
    flex-wrap: wrap;
}

.nc-noun-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.nc-noun-type {
    font-size: 12px;
    color: #bae6fd;
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.25);
}

.nc-section {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f7ff;
}

.nc-section:last-child {
    border-bottom: none;
}

.nc-section-title {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
    border-left: 3px solid #1e40af;
    padding-left: 8px;
    line-height: 1.4;
}

/* 分类层级（面包屑） */
.nc-taxonomy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
}

.nc-tax-item {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #93c5fd;
    border-radius: 16px;
    font-size: 13px;
    color: #1d4ed8;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

.nc-tax-item:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}

.nc-tax-item.nc-tax-root {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.nc-tax-item.nc-tax-current {
    background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 100%);
    color: #fff;
    border-color: #1e40af;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(37,99,235,0.25);
    cursor: default;
}

.nc-tax-arrow {
    font-size: 16px;
    color: #93c5fd;
    font-weight: 700;
    line-height: 1;
}

/* 标签组 */
.nc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nc-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

.nc-tag:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* 上位词 - 蓝紫色 */
.nc-tag-hyper {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #c4b5fd;
}

.nc-tag-hyper:hover {
    background: #ede9fe;
    border-color: #7c3aed;
}

/* 下位词 - 绿色 */
.nc-tag-hypo {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

.nc-tag-hypo:hover {
    background: #dcfce7;
    border-color: #22c55e;
}

/* 同级词 - 橙色 */
.nc-tag-sibling {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.nc-tag-sibling:hover {
    background: #ffedd5;
    border-color: #f97316;
}

/* 说明文字 */
.nc-desc {
    margin: 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    padding: 8px 12px;
    background: #f8faff;
    border-left: 3px solid #3b82f6;
    border-radius: 0 4px 4px 0;
}

/* ======= 示例模态框 ======= */
.nc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 10001;
    backdrop-filter: blur(2px);
}

.nc-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
    background: #fff;
    border-radius: 10px;
    width: 580px;
    max-width: calc(100vw - 32px);
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(37,99,235,0.18);
    flex-direction: column;
    animation: modalSlideIn 0.22s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translate(-50%, -54%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.nc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #dbeafe;
    background: linear-gradient(to bottom, #f0f7ff 0%, #e8f0ff 100%);
    flex-shrink: 0;
}

.nc-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}

.nc-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #e0eaff;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nc-modal-close:hover {
    background: #bfdbfe;
    color: #1e40af;
}

.nc-modal-body {
    overflow-y: auto;
    padding: 16px;
    max-height: calc(80vh - 60px);
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.example-card {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: #f8faff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    align-items: flex-start;
}

.example-card:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(59,130,246,0.12);
}

.example-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1.2;
}

.example-info { flex: 1; min-width: 0; }

.example-noun {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 3px;
}

.example-domain-badge {
    display: inline-block;
    font-size: 10px;
    color: #0e7490;
    background: #cffafe;
    padding: 1px 7px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.example-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* ======= 抖动动画（输入为空时） ======= */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.nc-search-box.shake .nc-noun-input {
    animation: shake 0.4s ease;
    border-color: #ef4444;
}

/* ================================================================
   暗黑模式 - body.dark 前缀
   ================================================================ */

body.dark .nc-container {
    background: #0f172a;
    border-color: #1e3a5f;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

/* 工具栏 */
body.dark .nc-toolbar {
    background: linear-gradient(135deg, #0f1f4a 0%, #0c4a6e 100%);
    border-bottom-color: #1e3a5f;
}

body.dark .toolbar-btn {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: #bae6fd;
}

body.dark .toolbar-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

body.dark .toolbar-btn-primary {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
}

/* 历史面板 */
body.dark .nc-history-panel {
    background: #0d1b2e;
    border-right-color: #1e3a5f;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #0d1b2e 0%, #0f2040 100%);
    border-bottom-color: #1e3a5f;
}

body.dark .history-panel-header h3 {
    color: #93c5fd;
}

body.dark .history-count { color: #60a5fa; }

body.dark .history-clear-btn {
    background: #1a1a0a;
    border-color: #92400e;
    color: #fbbf24;
}

body.dark .history-clear-btn:hover {
    background: #2a1a00;
    border-color: #d97706;
}

body.dark .history-search { border-bottom-color: #1e3a5f; }

body.dark .history-search input {
    background: #0f172a;
    border-color: #1e3a5f;
    color: #bae6fd;
}

body.dark .history-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

body.dark .history-search input::placeholder { color: #475569; }

body.dark .history-list::-webkit-scrollbar-track { background: #0a1628; }
body.dark .history-list::-webkit-scrollbar-thumb { background: #1e3a5f; }

body.dark .history-empty { color: #475569; }

body.dark .history-item {
    background: #0d1b2e;
    border-color: #1e3a5f;
}

body.dark .history-item:hover {
    background: #1a2f4a;
    border-color: #3b82f6;
    transform: translateX(2px);
}

body.dark .history-item.active {
    background: #1e3a5f;
    border-color: #3b82f6;
    border-left-width: 3px;
}

body.dark .history-item-noun { color: #93c5fd; }

body.dark .history-item-meta { color: #475569; }

body.dark .history-item-domain {
    background: #1e3a5f;
    color: #60a5fa;
}

body.dark .history-item-del {
    background: #2a0e0e;
    color: #f87171;
}

body.dark .history-item-del:hover {
    background: #dc2626;
    color: #fff;
}

/* 输入面板 */
body.dark .nc-input-panel {
    background: #0f172a;
    border-right-color: #1e3a5f;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #0f172a 0%, #0d1b2e 100%);
    border-bottom-color: #1e3a5f;
}

body.dark .panel-header h3 { color: #93c5fd; }
body.dark .panel-tip { color: #475569; }

body.dark .nc-input-body::-webkit-scrollbar-track { background: #0f172a; }
body.dark .nc-input-body::-webkit-scrollbar-thumb { background: #1e3a5f; }

body.dark .nc-noun-input {
    background: #0d1b2e;
    border-color: #1e3a5f;
    color: #e2e8f0;
}

body.dark .nc-noun-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}

body.dark .nc-noun-input::placeholder { color: #334155; }

body.dark .nc-search-btn {
    background: linear-gradient(135deg, #1e3a8a 0%, #0e7490 100%);
}

body.dark .nc-char-counter { color: #334155; }
body.dark .nc-char-counter.warning { color: #f59e0b; }
body.dark .nc-char-counter.limit { color: #ef4444; }

body.dark .nc-domain-label { color: #94a3b8; }

body.dark .nc-domain-option {
    background: #0d1b2e;
    border-color: #1e3a5f;
    color: #94a3b8;
}

body.dark .nc-domain-option:hover {
    border-color: #3b82f6;
    color: #93c5fd;
    background: #1a2f4a;
}

body.dark .nc-domain-option.selected {
    background: linear-gradient(135deg, #1e3a8a 0%, #0e7490 100%);
    border-color: #1e40af;
    color: #fff;
    box-shadow: 0 1px 6px rgba(37,99,235,0.3);
}

body.dark .nc-quick-label { color: #94a3b8; }

body.dark .nc-quick-tag {
    background: #0d1b2e;
    border-color: #1e3a5f;
    color: #60a5fa;
}

body.dark .nc-quick-tag:hover {
    background: #1a2f4a;
    border-color: #3b82f6;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 6px rgba(59,130,246,0.2);
}

body.dark .nc-tips-box {
    background: #0a1a2e;
    border-color: #1e3a5f;
    color: #64748b;
}

body.dark .nc-tips-box p { color: #0ea5e9; }

/* 结果面板 */
body.dark .nc-result-panel { background: #0a1220; }

body.dark .nc-result-header {
    background: linear-gradient(to bottom, #0f172a 0%, #0d1b2e 100%);
    border-bottom-color: #1e3a5f;
}

body.dark .nc-result-header h3 { color: #93c5fd; }

body.dark .result-noun-label {
    background: #1e3a5f;
    color: #93c5fd;
}

body.dark .result-domain-badge {
    background: #0c4a6e;
    color: #38bdf8;
}

body.dark .nc-result-body::-webkit-scrollbar-track { background: #0a1220; }
body.dark .nc-result-body::-webkit-scrollbar-thumb { background: #1e3a5f; }

body.dark .placeholder-title { color: #475569; }
body.dark .placeholder-desc { color: #334155; }
body.dark .loading-dots span { background: #3b82f6; }
body.dark .loading-text { color: #60a5fa; }

/* 结果卡片 */
body.dark .nc-result-card {
    background: #0d1b2e;
    border-color: #1e3a5f;
    border-top-color: #3b82f6;
    box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

body.dark .nc-noun-header {
    background: linear-gradient(135deg, #0f1f4a 0%, #0c4a6e 100%);
}

body.dark .nc-noun-title { color: #e2e8f0; }
body.dark .nc-noun-type {
    color: #7dd3fc;
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

body.dark .nc-section { border-bottom-color: #1e3a5f; }
body.dark .nc-section-title { color: #60a5fa; border-left-color: #3b82f6; }

body.dark .nc-taxonomy {
    background: #0a1a2e;
    border-color: #1e3a5f;
}

body.dark .nc-tax-item {
    background: #0d1b2e;
    border-color: #1e3a5f;
    color: #60a5fa;
}

body.dark .nc-tax-item:hover {
    background: #1a2f4a;
    border-color: #3b82f6;
}

body.dark .nc-tax-item.nc-tax-root {
    background: #0a1a2e;
    color: #93c5fd;
    border-color: #1e3a5f;
}

body.dark .nc-tax-item.nc-tax-current {
    background: linear-gradient(135deg, #1e3a8a 0%, #0e7490 100%);
    color: #fff;
    border-color: #1d4ed8;
}

body.dark .nc-tax-arrow { color: #1e3a5f; }

body.dark .nc-tag-hyper {
    background: #1e1b4b;
    color: #a78bfa;
    border-color: #3730a3;
}

body.dark .nc-tag-hyper:hover {
    background: #2e1b6e;
    border-color: #7c3aed;
}

body.dark .nc-tag-hypo {
    background: #052e16;
    color: #4ade80;
    border-color: #14532d;
}

body.dark .nc-tag-hypo:hover {
    background: #0a4422;
    border-color: #16a34a;
}

body.dark .nc-tag-sibling {
    background: #1c0a00;
    color: #fb923c;
    border-color: #7c2d12;
}

body.dark .nc-tag-sibling:hover {
    background: #2c1000;
    border-color: #ea580c;
}

body.dark .nc-desc {
    color: #cbd5e1;
    background: #0a1a2e;
    border-left-color: #3b82f6;
}

/* 模态框 */
body.dark .nc-modal {
    background: #0f172a;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

body.dark .nc-modal-header {
    background: linear-gradient(to bottom, #0d1b2e 0%, #0a1628 100%);
    border-bottom-color: #1e3a5f;
}

body.dark .nc-modal-header h3 { color: #93c5fd; }

body.dark .nc-modal-close {
    background: #1e3a5f;
    color: #94a3b8;
}

body.dark .nc-modal-close:hover {
    background: #2563eb;
    color: #fff;
}

body.dark .nc-modal-body { background: #0f172a; }

body.dark .example-card {
    background: #0d1b2e;
    border-color: #1e3a5f;
}

body.dark .example-card:hover {
    background: #1a2f4a;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

body.dark .example-noun { color: #93c5fd; }

body.dark .example-domain-badge {
    background: #0c4a6e;
    color: #38bdf8;
}

body.dark .example-card-desc { color: #475569; }

body.dark .nc-retry-btn {
    background: #0d1b2e;
    border-color: #1e3a5f;
    color: #60a5fa;
}

body.dark .nc-retry-btn:hover {
    background: #1a2f4a;
    border-color: #3b82f6;
}

/* ======= 响应式 ======= */
@media (max-width: 768px) {
    .nc-container { height: 100vh; }
    .nc-history-panel { width: 160px; }
    .nc-input-panel { width: 200px; }
    .toolbar-title { display: none; }
    .nc-domain-options { gap: 4px; }
    .nc-domain-option { font-size: 11px; padding: 3px 7px; }
}

@media (max-width: 580px) {
    .nc-history-panel { display: none; }
    .nc-input-panel { width: 220px; }
}
