/* =============================================
   小说推荐 - novel_recommendation.css
   书卷棕金主题，三栏布局，暗黑模式
   ============================================= */

/* ========== 主容器 ========== */
.nr-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fdf8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(139, 90, 43, 0.10);
    transition: all 0.3s ease;
    border: 1px solid #e8d5b7;
}

/* 全屏模式 */
.nr-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;
}

/* ========== 顶部工具栏 ========== */
.nr-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 7px 12px;
    background: linear-gradient(135deg, #8b5a2b 0%, #6b3f1f 60%, #4a2c11 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(139, 90, 43, 0.40);
    flex-shrink: 0;
    min-height: 36px;
}

.nr-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;
}

.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: #6b3f1f;
    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, #fff8f0 0%, #fde8c8 100%);
    color: #6b3f1f;
    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: #4a2c11;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== 主内容区：三栏 ========== */
.nr-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fdf8f0;
}

/* ========== 左栏：历史记录 ========== */
.nr-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e8d5b7;
    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, #fffaf5 0%, #fdf3e6 100%);
    border-bottom: 1px solid #e8d5b7;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b3f1f;
}

.history-count {
    font-size: 11px;
    color: #c8a07a;
    font-weight: 400;
}

.history-clear-btn {
    background: #fff0e8;
    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 #e8d5b7;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e8d5b7;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fffaf5;
    color: #4a2c11;
}

.history-search input:focus {
    border-color: #8b5a2b;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.12);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: #fdf8f0;
}

.history-list::-webkit-scrollbar-thumb {
    background: #c8a07a;
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #8b5a2b;
}

.history-empty {
    text-align: center;
    color: #c8a07a;
    font-size: 12px;
    padding: 20px 10px;
}

.history-item {
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
    margin-bottom: 4px;
    position: relative;
}

.history-item:hover {
    background: #fdf3e6;
    border-color: #d4a872;
    border-left: 2px solid #c8a07a;
    padding-left: 8px;
}

.history-item.active {
    background: #fde8c8;
    border-color: #c8a07a;
    border-left: 2px solid #8b5a2b;
    padding-left: 8px;
}

.history-item-genre {
    font-size: 11px;
    color: #8b5a2b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.history-item-time {
    font-size: 10px;
    color: #c8a07a;
}

.history-item-del {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ef4444;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 3px;
}

.history-item:hover .history-item-del {
    opacity: 1;
}

/* ========== 中栏：输入表单 ========== */
.nr-input-panel {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e8d5b7;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 12px 16px 8px;
    border-bottom: 1px solid #e8d5b7;
    background: linear-gradient(to bottom, #fffaf5 0%, #fdf3e6 100%);
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: #4a2c11;
}

.panel-tip {
    font-size: 11px;
    color: #c8a07a;
}

.nr-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
}

.nr-input-body::-webkit-scrollbar {
    width: 4px;
}

.nr-input-body::-webkit-scrollbar-track {
    background: #fdf8f0;
}

.nr-input-body::-webkit-scrollbar-thumb {
    background: #c8a07a;
    border-radius: 2px;
}

.nr-input-body::-webkit-scrollbar-thumb:hover {
    background: #8b5a2b;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a2c11;
    margin-bottom: 6px;
}

.required-mark {
    color: #ef4444;
    font-size: 13px;
}

.label-tip {
    font-size: 11px;
    color: #c8a07a;
    font-weight: 400;
}

/* 类型标签 */
.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.genre-tag {
    padding: 4px 9px;
    border-radius: 14px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #e8d5b7;
    background: #fdf8f0;
    color: #6b3f1f;
    transition: all 0.2s;
    user-select: none;
    white-space: nowrap;
}

.genre-tag:hover {
    border-color: #8b5a2b;
    background: #fde8c8;
    transform: scale(1.05);
}

.genre-tag.active {
    background: #8b5a2b;
    border-color: #8b5a2b;
    color: #fff;
    box-shadow: 0 1px 4px rgba(139, 90, 43, 0.30);
}

/* 下拉框 */
.nr-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e8d5b7;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    background: #fdf8f0;
    color: #4a2c11;
    cursor: pointer;
    box-sizing: border-box;
}

.nr-select:focus {
    border-color: #8b5a2b;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.12);
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.radio-option {
    cursor: pointer;
    user-select: none;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-btn {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    border: 1px solid #e8d5b7;
    background: #fdf8f0;
    color: #6b3f1f;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option input[type="radio"]:checked + .radio-btn {
    background: #8b5a2b;
    border-color: #8b5a2b;
    color: #fff;
    box-shadow: 0 1px 4px rgba(139, 90, 43, 0.30);
}

.radio-btn:hover {
    border-color: #8b5a2b;
}

/* 文本框 */
.nr-textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e8d5b7;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    background: #fdf8f0;
    color: #4a2c11;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}

.nr-textarea:focus {
    border-color: #8b5a2b;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.12);
}

/* shake动画 */
@keyframes nrShake {
    0%, 100% { transform: translateX(0); }
    15%, 55%, 85% { transform: translateX(-5px); }
    35%, 70% { transform: translateX(5px); }
}

.nr-select.shake,
.nr-textarea.shake {
    animation: nrShake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ========== 右栏：推荐结果 ========== */
.nr-result-panel {
    flex: 1;
    min-width: 0;
    background: #fdf8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nr-result-panel .panel-header {
    border-bottom: 1px solid #e8d5b7;
    background: linear-gradient(to bottom, #fffaf5 0%, #fdf3e6 100%);
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.result-meta-genre {
    font-size: 11px;
    background: #fde8c8;
    color: #6b3f1f;
    border-radius: 10px;
    padding: 2px 8px;
    font-weight: 600;
}

.result-time {
    font-size: 11px;
    color: #c8a07a;
}

.nr-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
}

.nr-result-body::-webkit-scrollbar {
    width: 5px;
}

.nr-result-body::-webkit-scrollbar-track {
    background: #fdf8f0;
}

.nr-result-body::-webkit-scrollbar-thumb {
    background: #c8a07a;
    border-radius: 3px;
}

.nr-result-body::-webkit-scrollbar-thumb:hover {
    background: #8b5a2b;
}

/* 占位内容 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 280px;
    text-align: center;
    color: #c8a07a;
    padding: 20px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 14px;
    opacity: 0.75;
    animation: nrFloat 3s ease-in-out infinite;
}

@keyframes nrFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: #8b5a2b;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 12px;
    color: #c8a07a;
    margin: 4px 0;
    line-height: 1.6;
}

/* 加载状态 */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 280px;
    padding: 40px 20px;
    text-align: center;
}

.loading-books {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.book-dot {
    width: 9px;
    height: 20px;
    background: #8b5a2b;
    border-radius: 2px 2px 1px 1px;
    animation: bookBounce 1.4s ease-in-out infinite;
}

.book-dot:nth-child(1) { background: #8b5a2b; animation-delay: 0s; }
.book-dot:nth-child(2) { background: #a06d35; animation-delay: 0.2s; height: 24px; }
.book-dot:nth-child(3) { background: #c8a07a; animation-delay: 0.4s; height: 16px; }

@keyframes bookBounce {
    0%, 100% { transform: translateY(0) scaleY(1); }
    45% { transform: translateY(-12px) scaleY(0.88); }
    65% { transform: translateY(-6px) scaleY(0.96); }
}

.loading-text {
    font-size: 13px;
    color: #8b5a2b;
    margin: 0;
}

/* 结果内容 */
.nr-result-content {
    animation: fadeIn 0.5s ease;
    line-height: 1.75;
    color: #3a2209;
    font-size: 13.5px;
}

/* 错误状态 */
.nr-result-content--error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 280px;
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.nr-error-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.nr-error-title {
    font-size: 14px;
    font-weight: 600;
    color: #ef4444;
    margin: 0 0 8px;
}

.nr-error-hint {
    font-size: 12px;
    color: #c8a07a;
    margin: 0 0 14px;
}

.error-retry-btn {
    padding: 6px 18px;
    background: #fff8f0;
    border: 1px solid #e8d5b7;
    border-radius: 16px;
    color: #6b3f1f;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.error-retry-btn:hover {
    background: #fde8c8;
    border-color: #8b5a2b;
}

.nr-result-content h1,
.nr-result-content h2,
.nr-result-content h3 {
    color: #6b3f1f;
    margin: 14px 0 6px;
    font-weight: 700;
}

.nr-result-content h2 {
    font-size: 15px;
    border-left: 3px solid #8b5a2b;
    padding-left: 8px;
    margin-top: 18px;
}

.nr-result-content h3 {
    font-size: 13px;
}

.nr-result-content p {
    margin: 6px 0;
}

.nr-result-content ul,
.nr-result-content ol {
    padding-left: 18px;
    margin: 6px 0;
}

.nr-result-content li {
    margin-bottom: 4px;
}

.nr-result-content strong {
    color: #4a2c11;
    font-weight: 700;
}

.nr-result-content em {
    color: #8b5a2b;
    font-style: normal;
    font-weight: 600;
}

.nr-result-content blockquote {
    border-left: 3px solid #c8a07a;
    margin: 10px 0;
    padding: 8px 12px;
    background: #fdf3e6;
    border-radius: 0 6px 6px 0;
    color: #6b3f1f;
    font-style: italic;
}

.nr-result-content hr {
    border: none;
    border-top: 1px dashed #e8d5b7;
    margin: 14px 0;
}

.nr-result-content code {
    background: #fde8c8;
    color: #6b3f1f;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    letter-spacing: 0.2px;
}

/* ========== 示例模态框 ========== */
.nr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
}

.nr-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: 680px;
    max-width: 96vw;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(139, 90, 43, 0.20);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop 0.25s ease;
}

@keyframes modalPop {
    from { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.nr-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e8d5b7;
    background: linear-gradient(135deg, #8b5a2b 0%, #6b3f1f 100%);
    flex-shrink: 0;
}

.nr-modal-header h3 {
    margin: 0;
    font-size: 15px;
    color: #fff;
}

.nr-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nr-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.nr-modal-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 16px;
    overflow-y: auto;
}

.nr-modal-body::-webkit-scrollbar {
    width: 4px;
}

.nr-modal-body::-webkit-scrollbar-thumb {
    background: #c8a07a;
    border-radius: 2px;
}

.nr-modal-body::-webkit-scrollbar-thumb:hover {
    background: #8b5a2b;
}

.example-card {
    border: 1px solid #e8d5b7;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fffaf5;
}

.example-card:hover {
    border-color: #8b5a2b;
    background: #fdf3e6;
    box-shadow: 0 2px 10px rgba(139, 90, 43, 0.12);
    transform: translateY(-1px);
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.example-icon {
    font-size: 18px;
}

.example-title {
    font-size: 13px;
    font-weight: 700;
    color: #4a2c11;
}

.example-badge {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    background: #fde8c8;
    color: #8b5a2b;
    font-weight: 600;
    margin-left: auto;
}

.example-desc {
    font-size: 11px;
    color: #8b5a2b;
    line-height: 1.5;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .nr-history-panel {
        display: none;
    }
    .nr-input-panel {
        width: 280px;
    }
}

@media (max-width: 639px) {
    .nr-main-content {
        flex-direction: column;
        overflow-y: auto;
    }
    .nr-input-panel {
        width: 100%;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid #e8d5b7;
        max-height: 55vh;
    }
    .nr-result-panel {
        min-height: 40vh;
    }
    .nr-modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    body.dark .nr-input-panel {
        border-bottom-color: #3d2a14;
        border-right-color: transparent;
    }
}

/* ========== 暗黑模式 ========== */
body.dark .nr-container {
    background: #1a1208;
    border-color: #3d2a14;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark .nr-toolbar {
    background: linear-gradient(135deg, #3d2a14 0%, #2a1c0d 60%, #1a1208 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark .toolbar-btn {
    background: rgba(255, 255, 255, 0.10);
    color: #e8c99a;
}

body.dark .toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
}

body.dark .toolbar-btn-primary {
    background: linear-gradient(135deg, #4d3420 0%, #3d2a14 100%);
    color: #e8c99a;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .toolbar-btn-primary:hover:not(:disabled) {
    background: #5c3e28;
    color: #f5ddb5;
}

body.dark .nr-main-content {
    background: #1a1208;
}

body.dark .nr-history-panel {
    background: #1f1510;
    border-color: #3d2a14;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #241810 0%, #1f1510 100%);
    border-color: #3d2a14;
}

body.dark .history-panel-header h3 {
    color: #e8c99a;
}

body.dark .history-count {
    color: #7a5c3a;
}

body.dark .history-clear-btn {
    background: #2d1a14;
    color: #f87171;
}

body.dark .history-clear-btn:hover {
    background: #3d1a14;
}

body.dark .history-search {
    border-color: #3d2a14;
}

body.dark .history-search input {
    background: #241810;
    border-color: #3d2a14;
    color: #e8c99a;
}

body.dark .history-search input:focus {
    border-color: #8b5a2b;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.22);
}

body.dark .history-list::-webkit-scrollbar-track {
    background: #1a1208;
}

body.dark .history-list::-webkit-scrollbar-thumb {
    background: #4d3420;
}

body.dark .history-list::-webkit-scrollbar-thumb:hover {
    background: #6b4a28;
}

body.dark .history-empty {
    color: #5a3f22;
}

body.dark .history-item:hover {
    background: #2a1e10;
    border-color: #4d3420;
}

body.dark .history-item.active {
    background: #3d2a14;
    border-color: #6b4a28;
}

body.dark .history-item-genre {
    color: #c8a07a;
}

body.dark .history-item-time {
    color: #5a3f22;
}

body.dark .nr-input-panel {
    background: #1f1510;
    border-color: #3d2a14;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #241810 0%, #1f1510 100%);
    border-color: #3d2a14;
}

body.dark .panel-header h3 {
    color: #f0d8b0;
}

body.dark .panel-tip {
    color: #7a5c3a;
}

body.dark .nr-input-body::-webkit-scrollbar-track {
    background: #1a1208;
}

body.dark .nr-input-body::-webkit-scrollbar-thumb {
    background: #4d3420;
}

body.dark .nr-input-body::-webkit-scrollbar-thumb:hover {
    background: #6b4a28;
}

body.dark .form-group label {
    color: #e8c99a;
}

body.dark .genre-tag {
    border-color: #3d2a14;
    background: #241810;
    color: #c8a07a;
}

body.dark .genre-tag:hover {
    border-color: #8b5a2b;
    background: #3d2a14;
}

body.dark .genre-tag.active {
    background: #8b5a2b;
    border-color: #8b5a2b;
    color: #fff;
}

body.dark .nr-select {
    background: #241810;
    border-color: #3d2a14;
    color: #e8c99a;
    color-scheme: dark;
}

body.dark .nr-select:focus {
    border-color: #8b5a2b;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.22);
}

body.dark .radio-btn {
    border-color: #3d2a14;
    background: #241810;
    color: #c8a07a;
}

body.dark .radio-option input[type="radio"]:checked + .radio-btn {
    background: #8b5a2b;
    border-color: #8b5a2b;
    color: #fff;
}

body.dark .radio-btn:hover {
    border-color: #6b4a28;
}

body.dark .nr-textarea {
    background: #241810;
    border-color: #3d2a14;
    color: #e8c99a;
}

body.dark .nr-textarea:focus {
    border-color: #8b5a2b;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.22);
}

body.dark .nr-result-panel {
    background: #1a1208;
}

body.dark .nr-result-panel .panel-header {
    background: linear-gradient(to bottom, #241810 0%, #1f1510 100%);
    border-color: #3d2a14;
}

body.dark .result-meta-genre {
    background: #3d2a14;
    color: #e8c99a;
}

body.dark .result-time {
    color: #7a5c3a;
}

body.dark .nr-result-body::-webkit-scrollbar-track {
    background: #1a1208;
}

body.dark .nr-result-body::-webkit-scrollbar-thumb {
    background: #4d3420;
}

body.dark .nr-result-body::-webkit-scrollbar-thumb:hover {
    background: #6b4a28;
}

body.dark .placeholder-icon {
    opacity: 0.5;
}

body.dark .placeholder-title {
    color: #c8a07a;
}

body.dark .placeholder-desc {
    color: #5a3f22;
}

body.dark .book-dot {
    background: #c8a07a;
}

body.dark .loading-text {
    color: #c8a07a;
}

body.dark .nr-result-content {
    color: #e8c99a;
}

body.dark .nr-result-content h2 {
    color: #f0d8b0;
    border-left-color: #c8a07a;
}

body.dark .nr-result-content h3 {
    color: #e8c99a;
}

body.dark .nr-result-content strong {
    color: #f5ddb5;
}

body.dark .nr-result-content em {
    color: #c8a07a;
}

body.dark .nr-result-content blockquote {
    border-left-color: #6b4a28;
    background: #241810;
    color: #c8a07a;
}

body.dark .nr-result-content hr {
    border-top-color: #3d2a14;
}

body.dark .nr-result-content code {
    background: #3d2a14;
    color: #e8c99a;
}

body.dark .history-item:hover {
    border-left-color: #6b4a28;
}

body.dark .history-item.active {
    border-left-color: #c8a07a;
}

body.dark .nr-modal {
    background: #1f1510;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

body.dark .nr-modal-header {
    background: linear-gradient(135deg, #3d2a14 0%, #2a1c0d 100%);
    border-color: #4d3420;
}

body.dark .nr-modal-body {
    background: #1f1510;
}

body.dark .nr-modal-body::-webkit-scrollbar-track {
    background: #1f1510;
}

body.dark .nr-modal-body::-webkit-scrollbar-thumb {
    background: #4d3420;
}

body.dark .nr-modal-body::-webkit-scrollbar-thumb:hover {
    background: #6b4a28;
}

body.dark .example-card {
    border-color: #3d2a14;
    background: #241810;
}

body.dark .example-card:hover {
    border-color: #8b5a2b;
    background: #2a1e10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark .example-title {
    color: #f0d8b0;
}

body.dark .example-badge {
    background: #3d2a14;
    color: #c8a07a;
}

body.dark .example-desc {
    color: #7a5c3a;
}

/* 暗黑模式 - 错误状态 */
body.dark .nr-result-content--error .nr-error-title {
    color: #f87171;
}

body.dark .nr-result-content--error .nr-error-hint {
    color: #7a5c3a;
}

body.dark .error-retry-btn {
    background: #241810;
    border-color: #3d2a14;
    color: #e8c99a;
}

body.dark .error-retry-btn:hover {
    background: #3d2a14;
    border-color: #6b4a28;
}

/* ========== 打印样式 ========== */
@media print {
    .nr-toolbar,
    .nr-history-panel,
    .nr-input-panel {
        display: none !important;
    }
    .nr-container {
        height: auto !important;
        box-shadow: none;
        border: none;
    }
    .nr-result-body {
        overflow: visible;
    }
    .nr-result-content {
        overflow: visible;
    }
}
