/* ====================================================
   取名助手 - naming_assistant.css
   主题色：金色/琥珀 (#C9922B → #E8B84B)，寓意吉祥如意
   ==================================================== */

/* ---- 全局重置 ---- */
*, *::before, *::after { box-sizing: border-box; }

/* ---- 主容器 ---- */
.na-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    min-height: 560px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8d5a0;
    background: #fffdf5;
    box-shadow: 0 4px 20px rgba(201, 146, 43, 0.12);
    transition: background 0.3s, border-color 0.3s;
}
.na-container.na-fullscreen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    height: 100vh;
    z-index: 9000;
    border-radius: 0;
    border: none;
}

/* ---- 工具栏 ---- */
.na-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 48px;
    background: linear-gradient(135deg, #7B4F0E 0%, #C9922B 50%, #E8B84B 100%);
    flex-shrink: 0;
    gap: 8px;
    flex-wrap: nowrap;
}
.na-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.na-toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff8e8;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.na-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 5px;
    background: rgba(255,255,255,0.15);
    color: #fff8e8;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.1s;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}
.na-toolbar-btn:hover {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-1px);
}
.na-toolbar-btn:active { transform: translateY(0); }
.na-toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
.na-btn-primary {
    background: rgba(255,255,255,0.92) !important;
    color: #8B5E0A !important;
    font-weight: 700 !important;
    border-color: rgba(255,255,255,0.8) !important;
}
.na-btn-primary:hover:not(:disabled) {
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.na-btn-cancel {
    background: rgba(220, 53, 69, 0.8) !important;
    border-color: rgba(255,100,100,0.5) !important;
}

/* ---- 三栏主内容 ---- */
.na-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ---- 左栏：历史记录 ---- */
.na-history-panel {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8d5a0;
    background: #fffbf0;
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s;
}
.na-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #fdf5e0, #f9eeca);
    border-bottom: 1px solid #e8d5a0;
    flex-shrink: 0;
}
.na-history-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #8B5E0A;
    background: none;
    border: none;
    padding: 0;
}
.na-history-count {
    font-size: 11px;
    color: #b89060;
    margin-left: 4px;
}
.na-history-clear-btn {
    background: #fff5f5;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}
.na-history-clear-btn:hover { background: #fde8e8; }
.na-history-search {
    padding: 6px 8px;
    border-bottom: 1px solid #e8d5a0;
    flex-shrink: 0;
}
.na-history-search input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #dcc87a;
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
    color: #5a3e0a;
    outline: none;
    transition: border-color 0.2s;
}
.na-history-search input:focus { border-color: #C9922B; }
.na-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}
.na-history-list::-webkit-scrollbar { width: 4px; }
.na-history-list::-webkit-scrollbar-track { background: transparent; }
.na-history-list::-webkit-scrollbar-thumb { background: #dcc87a; border-radius: 2px; }
.na-history-list::-webkit-scrollbar-thumb:hover { background: #c8a850; }
.na-history-empty {
    padding: 20px 12px;
    text-align: center;
    color: #b89060;
    font-size: 12px;
    line-height: 1.6;
}
.na-history-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0e4b0;
    transition: background 0.15s;
    position: relative;
}
.na-history-item:hover { background: #fef7e0; }
.na-history-item.active {
    background: #fef0c0;
    box-shadow: inset 3px 0 0 #3b82f6;
}
.na-history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #5a3e0a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.na-history-item-type {
    font-size: 11px;
    color: #b89060;
}
.na-history-item-del {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 2px 4px;
}
.na-history-item:hover .na-history-item-del { opacity: 1; }

/* ---- 中栏：输入面板 ---- */
.na-input-panel {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8d5a0;
    background: #fffdf5;
    overflow: hidden;
    transition: background 0.3s;
}
.na-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #fdf5e0, #f9eeca);
    border-bottom: 1px solid #e8d5a0;
    flex-shrink: 0;
}
.na-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #8B5E0A;
}
.na-panel-tip {
    font-size: 11px;
    color: #b89060;
}
.na-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.na-input-body::-webkit-scrollbar { width: 4px; }
.na-input-body::-webkit-scrollbar-thumb { background: #dcc87a; border-radius: 2px; }
.na-input-body::-webkit-scrollbar-thumb:hover { background: #c8a850; }

/* 名称类型选择器 */
.na-type-group {
    margin-bottom: 14px;
}
.na-type-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8B5E0A;
    margin-bottom: 6px;
}
.na-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}
.na-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7px 4px;
    border: 1.5px solid #e0c878;
    border-radius: 6px;
    background: #fff;
    color: #6b4a0a;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
    line-height: 1.3;
    min-height: 48px;
    gap: 3px;
}
.na-type-btn .na-type-icon { font-size: 16px; }
.na-type-btn:hover {
    border-color: #C9922B;
    background: #fef9ed;
    color: #8B5E0A;
}
.na-type-btn.selected {
    border-color: #C9922B;
    background: linear-gradient(135deg, #fdf0cc, #fce0a0);
    color: #7B4F0E;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(201, 146, 43, 0.25);
}

/* 动态表单区域 */
.na-form-section {
    display: none;
}
.na-form-section.active {
    display: block;
}
.na-form-row {
    margin-bottom: 10px;
}
.na-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8B5E0A;
    margin-bottom: 4px;
}
.na-form-label .na-required {
    color: #e53935;
    margin-left: 2px;
}
.na-input, .na-select, .na-textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #dcc87a;
    border-radius: 5px;
    font-size: 13px;
    color: #4a3000;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.na-input:focus, .na-select:focus, .na-textarea:focus {
    border-color: #C9922B;
    box-shadow: 0 0 0 3px rgba(201, 146, 43, 0.15);
}
.na-textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}
.na-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C9922B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

/* 性别/风格选项按钮组 */
.na-radio-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.na-radio-btn {
    padding: 5px 12px;
    border: 1.5px solid #dcc87a;
    border-radius: 20px;
    font-size: 12px;
    color: #8B5E0A;
    background: #fff;
    cursor: pointer;
    transition: all 0.18s;
    user-select: none;
}
.na-radio-btn:hover {
    border-color: #C9922B;
    background: #fef9ed;
}
.na-radio-btn.selected {
    border-color: #C9922B;
    background: linear-gradient(135deg, #fdf0cc, #fce0a0);
    font-weight: 600;
    color: #7B4F0E;
}

/* 五行选择 */
.na-wuxing-group {
    display: flex;
    gap: 5px;
}
.na-wuxing-btn {
    flex: 1;
    padding: 5px 4px;
    border: 1.5px solid #dcc87a;
    border-radius: 5px;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s;
    background: #fff;
    color: #8B5E0A;
    user-select: none;
}
.na-wuxing-btn:hover { border-color: #C9922B; background: #fef9ed; }
.na-wuxing-btn[data-elem="金"].selected { background: #fff8dc; border-color: #d4af37; color: #7a6010; }
.na-wuxing-btn[data-elem="木"].selected { background: #f0fff0; border-color: #3a7a3a; color: #2a5a2a; }
.na-wuxing-btn[data-elem="水"].selected { background: #e8f4fd; border-color: #3a80c8; color: #1a5090; }
.na-wuxing-btn[data-elem="火"].selected { background: #fff0ed; border-color: #d05030; color: #a03020; }
.na-wuxing-btn[data-elem="土"].selected { background: #fdf0e0; border-color: #b87a30; color: #8a5820; }

/* 字数步进器 */
.na-counter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.na-counter-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #dcc87a;
    border-radius: 4px;
    background: #fff;
    color: #8B5E0A;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.na-counter-btn:hover { background: #fef9ed; }
.na-counter-val {
    font-size: 14px;
    font-weight: 600;
    color: #7B4F0E;
    min-width: 28px;
    text-align: center;
}
/* 计数器描述文字 */
.na-counter-hint {
    font-size: 12px;
    color: #a07030;
    margin-left: 4px;
}

/* 使用说明提示框 */
.na-tips-box {
    background: linear-gradient(135deg, #fffbe8, #fdf5cc);
    border: 1px solid #e8d090;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 14px;
    font-size: 12px;
    color: #8B5E0A;
}
.na-tips-box p { margin: 0 0 5px; font-weight: 600; }
.na-tips-box ul { margin: 0; padding-left: 16px; }
.na-tips-box li { margin-bottom: 3px; }

/* ---- 右栏：结果面板 ---- */
.na-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fffdf5;
    min-width: 0;
}
.na-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #fdf5e0, #f9eeca);
    border-bottom: 1px solid #e8d5a0;
    flex-shrink: 0;
}
.na-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #8B5E0A;
}
.na-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.na-type-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fdf0cc, #fce0a0);
    color: #7B4F0E;
    font-weight: 600;
    border: 1px solid #e8c870;
}
.na-btn-regenerate {
    padding: 4px 10px;
    border: 1px solid #dcc87a;
    border-radius: 4px;
    background: #fff;
    color: #8B5E0A;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.na-btn-regenerate:hover { background: #fef9ed; }
.na-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.na-result-body::-webkit-scrollbar { width: 5px; }
.na-result-body::-webkit-scrollbar-thumb { background: #dcc87a; border-radius: 3px; }
.na-result-body::-webkit-scrollbar-thumb:hover { background: #c8a850; }

/* 占位提示 */
.na-result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #c8a050;
    min-height: 200px;
}
.na-placeholder-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.75;
    display: inline-block;
    animation: naIconFloat 3s ease-in-out infinite;
}
.na-placeholder-title { font-size: 18px; font-weight: 600; color: #a07030; margin-bottom: 8px; }
.na-placeholder-desc { font-size: 13px; color: #c0a060; margin: 3px 0; }

/* 加载中 */
.na-result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.na-loading-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.na-loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C9922B;
    animation: naDotBounce 1.4s infinite ease-in-out;
}
.na-loading-dots span:nth-child(1) { animation-delay: 0s; }
.na-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.na-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes naDotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}
.na-loading-text {
    font-size: 13px;
    color: #b89060;
    text-align: center;
}

/* 错误提示 */
.na-result-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 14px;
    text-align: center;
    padding: 20px;
}
.na-error-msg {
    color: #c0392b;
    font-size: 14px;
    font-weight: 500;
}
.na-retry-btn {
    padding: 7px 20px;
    border: 1.5px solid #e8c870;
    border-radius: 20px;
    background: linear-gradient(135deg, #fdf0cc, #fce0a0);
    color: #7B4F0E;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    box-shadow: 0 2px 6px rgba(201, 146, 43, 0.15);
}
.na-retry-btn:hover {
    background: linear-gradient(135deg, #fce0a0, #f8c870);
    box-shadow: 0 3px 10px rgba(201, 146, 43, 0.25);
    transform: translateY(-1px);
}

/* 输入校验高亮 + 抖动动画 */
.na-input.na-invalid,
.na-textarea.na-invalid {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15) !important;
    animation: naShake 0.35s ease-in-out;
}
@keyframes naShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}
/* 占位图标浮动动画 */
@keyframes naIconFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}
/* 内容卡片入场动画 */
@keyframes naCardEnter {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ---- 名字结果卡片网格 ---- */
.na-result-content { flex: 1; }

.na-names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.na-pet-grid, .na-nick-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.na-name-card {
    border: 1.5px solid #e0c878;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.na-name-card:hover {
    box-shadow: 0 4px 16px rgba(201, 146, 43, 0.2);
    border-color: #C9922B;
    transform: translateY(-2px);
}
.na-name-header {
    padding: 12px 14px 10px;
    background: linear-gradient(135deg, #fdf0cc 0%, #fce8a0 100%);
    border-bottom: 1px solid #e8d080;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
}
.na-full-name {
    font-size: 20px;
    font-weight: 700;
    color: #7B4F0E;
    letter-spacing: 2px;
    font-family: "STKaiti", "KaiTi", "楷体", "STSong", serif;
}
.na-pinyin {
    font-size: 11px;
    color: #a07030;
    font-style: italic;
}
.na-name-body {
    padding: 10px 14px;
}
.na-meaning-row {
    display: flex;
    gap: 8px;
    margin-bottom: 7px;
    font-size: 12px;
    line-height: 1.5;
    align-items: flex-start;
}
.na-meaning-label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #C9922B, #a06a15);
    border-radius: 3px;
    padding: 1px 5px;
    margin-top: 1px;
    white-space: nowrap;
}
.na-meaning-text {
    color: #4a3000;
    flex: 1;
}
.na-name-footer {
    padding: 8px 14px;
    background: #fdfaf0;
    border-top: 1px solid #f0e4b0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
}
.na-stroke-count { color: #9a7030; }
.na-auspicious-badge {
    color: #8B5E0A;
    font-weight: 600;
    font-size: 11px;
}

/* 复制按钮（名字卡片上） */
.na-copy-name-btn {
    padding: 3px 9px;
    border: 1px solid #dcc87a;
    border-radius: 4px;
    background: #fff;
    color: #8B5E0A;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.na-copy-name-btn:hover { background: #fef9ed; }

/* ---- 示例模态框 ---- */
.na-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    backdrop-filter: blur(2px);
}
.na-modal-overlay.active { display: block; }
.na-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(640px, 95vw);
    max-height: 80vh;
    background: #fffdf5;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    z-index: 10001;
    overflow: hidden;
    flex-direction: column;
}
.na-modal.active { display: flex; }
.na-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fdf0cc, #f8e090);
    border-bottom: 1px solid #e8d090;
}
.na-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #7B4F0E;
}
.na-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #8B5E0A;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}
.na-modal-close:hover { background: rgba(139,94,10,0.1); }
.na-modal-body {
    overflow-y: auto;
    padding: 16px;
    flex: 1;
}
.na-modal-body::-webkit-scrollbar { width: 5px; }
.na-modal-body::-webkit-scrollbar-track { background: transparent; }
.na-modal-body::-webkit-scrollbar-thumb { background: #dcc87a; border-radius: 3px; }
.na-modal-body::-webkit-scrollbar-thumb:hover { background: #c8a850; }
.na-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}
.na-example-card {
    border: 1.5px solid #e0c878;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.18s;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.na-example-card:hover {
    border-color: #C9922B;
    background: #fef9ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201,146,43,0.15);
}
.na-example-icon { font-size: 28px; }
.na-example-title { font-size: 13px; font-weight: 600; color: #7B4F0E; }
.na-example-type { font-size: 11px; color: #b89060; }

/* ---- 响应式 ---- */
@media (max-width: 899px) {
    .na-history-panel { display: none; }
    .na-input-panel { width: 280px; }
}
@media (max-width: 639px) {
    .na-main-content { flex-direction: column; }
    .na-input-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8d5a0;
        max-height: 50vh;
    }
    .na-type-grid { grid-template-columns: repeat(3, 1fr); }
    .na-names-grid { grid-template-columns: 1fr; }
    .na-toolbar { flex-wrap: wrap; height: auto; padding: 6px 8px; }
    .na-container { height: auto; min-height: 100vh; }
    body.dark .na-input-panel { border-bottom-color: #4a3500; }
}

/* ====================================================
   暗黑模式 - body.dark 前缀
   ==================================================== */
body.dark .na-container {
    background: #1a1200;
    border-color: #4a3500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
body.dark .na-toolbar {
    background: linear-gradient(135deg, #3d2400 0%, #6b4a0e 50%, #8b6820 100%);
}
body.dark .na-history-panel {
    background: #1e1600;
    border-color: #4a3500;
}
body.dark .na-history-header {
    background: linear-gradient(to bottom, #251a00, #1e1600);
    border-color: #4a3500;
}
body.dark .na-history-header h3 { color: #e8b84b; }
body.dark .na-history-count { color: #8b7040; }
body.dark .na-history-clear-btn {
    background: #2a0000;
    color: #ff6b6b;
}
body.dark .na-history-clear-btn:hover { background: #3a0808; }
body.dark .na-history-search { border-color: #4a3500; }
body.dark .na-history-search input {
    background: #1a1200;
    border-color: #5a4010;
    color: #e8d5a0;
}
body.dark .na-history-search input:focus { border-color: #C9922B; }
body.dark .na-history-search input::placeholder { color: #5a4020; }
body.dark .na-history-list::-webkit-scrollbar-thumb { background: #5a4010; }
body.dark .na-history-list::-webkit-scrollbar-thumb:hover { background: #7a5520; }
body.dark .na-history-empty { color: #7a6030; }
body.dark .na-history-item { border-color: #2e2000; }
body.dark .na-history-item:hover { background: #251800; }
body.dark .na-history-item.active { background: #2e2000; box-shadow: inset 3px 0 0 #3b82f6; }
body.dark .na-history-item-title { color: #e8d5a0; }
body.dark .na-history-item-type { color: #8b7040; }

body.dark .na-input-panel {
    background: #1a1200;
    border-color: #4a3500;
}
body.dark .na-panel-header {
    background: linear-gradient(to bottom, #251a00, #1e1600);
    border-color: #4a3500;
}
body.dark .na-panel-header h3 { color: #e8b84b; }
body.dark .na-panel-tip { color: #7a6030; }
body.dark .na-input-body::-webkit-scrollbar-thumb { background: #5a4010; }
body.dark .na-input-body::-webkit-scrollbar-thumb:hover { background: #7a5520; }
body.dark .na-type-label { color: #e8b84b; }
body.dark .na-type-btn {
    background: #1e1600;
    border-color: #4a3500;
    color: #c8a060;
}
body.dark .na-type-btn:hover {
    border-color: #C9922B;
    background: #251800;
    color: #e8b84b;
}
body.dark .na-type-btn.selected {
    border-color: #C9922B;
    background: linear-gradient(135deg, #2e2000, #3d2a00);
    color: #f0c870;
}
body.dark .na-form-label { color: #e8b84b; }
body.dark .na-input, body.dark .na-select, body.dark .na-textarea {
    background: #1e1600;
    border-color: #5a4010;
    color: #e8d5a0;
}
body.dark .na-input:focus, body.dark .na-select:focus, body.dark .na-textarea:focus {
    border-color: #C9922B;
    box-shadow: 0 0 0 3px rgba(201, 146, 43, 0.2);
}
body.dark .na-radio-btn {
    background: #1e1600;
    border-color: #5a4010;
    color: #c8a060;
}
body.dark .na-radio-btn:hover { background: #251800; border-color: #C9922B; }
body.dark .na-radio-btn.selected {
    background: linear-gradient(135deg, #2e2000, #3d2a00);
    border-color: #C9922B;
    color: #f0c870;
}
body.dark .na-wuxing-btn {
    background: #1e1600;
    border-color: #5a4010;
    color: #c8a060;
}
body.dark .na-wuxing-btn:hover { border-color: #C9922B; background: #251800; }
body.dark .na-wuxing-btn[data-elem="金"].selected { background: #2a2200; border-color: #d4af37; color: #f0d060; }
body.dark .na-wuxing-btn[data-elem="木"].selected { background: #0a1f0a; border-color: #4a8a4a; color: #70c070; }
body.dark .na-wuxing-btn[data-elem="水"].selected { background: #0a1a2e; border-color: #4a90d8; color: #70b8f0; }
body.dark .na-wuxing-btn[data-elem="火"].selected { background: #2a0a00; border-color: #d05030; color: #f07060; }
body.dark .na-wuxing-btn[data-elem="土"].selected { background: #1e1200; border-color: #b87a30; color: #d09a50; }
body.dark .na-counter-btn {
    background: #1e1600;
    border-color: #5a4010;
    color: #e8b84b;
}
body.dark .na-counter-btn:hover { background: #251800; }
body.dark .na-counter-val { color: #f0c870; }
body.dark .na-counter-hint { color: #c8a060; }
body.dark .na-tips-box {
    background: linear-gradient(135deg, #1e1600, #251800);
    border-color: #4a3500;
    color: #c8a060;
}
body.dark .na-tips-box p { color: #e8b84b; }

body.dark .na-result-panel { background: #1a1200; }
body.dark .na-result-header {
    background: linear-gradient(to bottom, #251a00, #1e1600);
    border-color: #4a3500;
}
body.dark .na-result-header h3 { color: #e8b84b; }
body.dark .na-result-body::-webkit-scrollbar-thumb { background: #5a4010; }
body.dark .na-result-body::-webkit-scrollbar-thumb:hover { background: #7a5520; }
body.dark .na-result-placeholder { color: #7a6030; }
body.dark .na-placeholder-title { color: #c8a060; }
body.dark .na-placeholder-desc { color: #7a6030; }
body.dark .na-loading-text { color: #9a8040; }
body.dark .na-loading-dots span { background: #E8B84B; }
body.dark .na-result-error { color: #ff8a8a; }
body.dark .na-error-msg { color: #ff8a8a; }
body.dark .na-retry-btn {
    background: linear-gradient(135deg, #2e2000, #3d2a00);
    border-color: #5a4010;
    color: #f0c870;
}
body.dark .na-retry-btn:hover {
    background: linear-gradient(135deg, #3d2a00, #4d3800);
}

body.dark .na-name-card {
    background: #1e1600;
    border-color: #4a3500;
}
body.dark .na-name-card:hover {
    border-color: #C9922B;
    box-shadow: 0 4px 16px rgba(201, 146, 43, 0.15);
}
body.dark .na-name-header {
    background: linear-gradient(135deg, #2e2000, #3d2a00);
    border-color: #5a4010;
}
body.dark .na-full-name { color: #f0c870; }
body.dark .na-pinyin { color: #c8a060; }
body.dark .na-meaning-row { color: #e8d5a0; }
body.dark .na-meaning-label { background: linear-gradient(135deg, #7B4F0E, #5a3500); }
body.dark .na-meaning-text { color: #d0b878; }
body.dark .na-name-footer {
    background: #1a1200;
    border-color: #3a2800;
}
body.dark .na-stroke-count { color: #9a8040; }
body.dark .na-auspicious-badge { color: #e8b84b; }
body.dark .na-copy-name-btn {
    background: #251800;
    border-color: #5a4010;
    color: #c8a060;
}
body.dark .na-copy-name-btn:hover { background: #2e2000; }

body.dark .na-type-badge { background: linear-gradient(135deg, #2e2000, #3d2a00); color: #f0c870; border-color: #5a4010; }
body.dark .na-btn-regenerate { background: #1e1600; border-color: #5a4010; color: #c8a060; }
body.dark .na-btn-regenerate:hover { background: #251800; }

body.dark .na-modal { background: #1e1600; }
body.dark .na-modal-header { background: linear-gradient(135deg, #2e2000, #3d2a00); border-color: #5a4010; }
body.dark .na-modal-header h3 { color: #f0c870; }
body.dark .na-modal-close { color: #c8a060; }
body.dark .na-modal-close:hover { background: rgba(200,160,96,0.1); }
body.dark .na-modal-body::-webkit-scrollbar-thumb { background: #5a4010; }
body.dark .na-modal-body::-webkit-scrollbar-thumb:hover { background: #7a5520; }
body.dark .na-example-card {
    background: #1a1200;
    border-color: #4a3500;
}
body.dark .na-example-card:hover {
    background: #251800;
    border-color: #C9922B;
}
body.dark .na-example-title { color: #e8b84b; }
body.dark .na-example-type { color: #7a6030; }

/* 暗黑模式 - 工具栏按鈕禁用态 */
body.dark .na-toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* 暗黑模式 - 生成按鈕 */
body.dark .na-btn-primary {
    background: rgba(248, 230, 160, 0.92) !important;
    color: #5a3500 !important;
}
body.dark .na-btn-primary:hover:not(:disabled) {
    background: #f8e6a0 !important;
}
