/* =============================================
   产品命名 - product_naming.css
   金色琥珀品牌主题，三栏布局
   ============================================= */

/* ========== 主容器 ========== */
.pn-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fffbf0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(217, 119, 6, 0.10);
    transition: all 0.3s ease;
    border: 1px solid #fde68a;
}

/* 全屏模式 */
.pn-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;
}

/* ========== 顶部工具栏 ========== */
.pn-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 7px 12px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 60%, #92400e 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.40);
    flex-shrink: 0;
    min-height: 36px;
}

.pn-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: #92400e;
    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, #fef9c3 0%, #fde68a 100%);
    color: #92400e;
    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: #78350f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== 抖动动画 ========== */
@keyframes pnShake {
    0%, 100% { transform: translateX(0); }
    15%, 55%, 85% { transform: translateX(-5px); }
    35%, 70%  { transform: translateX(5px); }
}

.pn-input.shake,
.pn-select.shake,
.pn-textarea.shake {
    animation: pnShake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ========== 主内容区：三栏 ========== */
.pn-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fffbf0;
}

/* ========== 左栏：历史记录 ========== */
.pn-history-panel {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fde68a;
    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, #fffdf5 0%, #fef9e7 100%);
    border-bottom: 1px solid #fde68a;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
}

.history-count {
    font-size: 11px;
    color: #f59e0b;
    font-weight: 400;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fde8e8;
}

.history-search {
    padding: 8px;
    border-bottom: 1px solid #fde68a;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #fde68a;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fffdf5;
}

.history-search input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.history-empty {
    text-align: center;
    padding: 24px 12px;
    color: #d1d5db;
    font-size: 12px;
}

.history-item {
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid #fef9e7;
    transition: background 0.15s;
    position: relative;
}

.history-item:hover {
    background: #fffbf0;
}

.history-item.active {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #78350f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.history-item-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.history-item-del {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.15s;
}

.history-item:hover .history-item-del {
    opacity: 1;
    color: #ef4444;
}

/* 历史记录滚动条 */
.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: #fcd34d;
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

/* ========== 中栏：输入面板 ========== */
.pn-input-panel {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fde68a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 12px 16px 10px;
    border-bottom: 1px solid #fde68a;
    background: linear-gradient(to bottom, #fffdf5 0%, #fef9e7 100%);
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
}

.panel-tip {
    font-size: 11px;
    color: #b45309;
    opacity: 0.75;
}

.pn-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.pn-input-body::-webkit-scrollbar {
    width: 4px;
}

.pn-input-body::-webkit-scrollbar-track {
    background: transparent;
}

.pn-input-body::-webkit-scrollbar-thumb {
    background: #fcd34d;
    border-radius: 2px;
}

.pn-input-body::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

/* ===== 表单元素 ===== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 5px;
}

.required-mark {
    color: #ef4444;
    margin-left: 2px;
}

.label-tip {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

.pn-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #fde68a;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    background: #fffdf5;
    resize: vertical;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.pn-textarea:focus {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.pn-textarea::placeholder {
    color: #d1b28a;
    font-size: 12px;
}

.pn-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #fde68a;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fffdf5;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.pn-input:focus {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.pn-input::placeholder {
    color: #d1b28a;
    font-size: 12px;
}

.pn-select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #fde68a;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fffdf5;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    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 d='M1 1l4 4 4-4' stroke='%23f59e0b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.pn-select:focus {
    border-color: #f59e0b;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

/* 字符计数器 */
.char-counter {
    text-align: right;
    font-size: 11px;
    color: #b45309;
    margin-top: 3px;
    opacity: 0.7;
}

.char-counter.warn {
    color: #ef4444;
    opacity: 1;
    font-weight: 600;
}

/* 双列布局 */
.form-row {
    display: flex;
    gap: 10px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

/* 数量选择组 */
.count-group {
    display: flex;
    gap: 8px;
}

.count-option {
    cursor: pointer;
}

.count-option input[type="radio"] {
    display: none;
}

.count-btn {
    display: inline-block;
    padding: 5px 16px;
    border: 1.5px solid #fde68a;
    border-radius: 20px;
    font-size: 12px;
    color: #92400e;
    background: #fffdf5;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.count-option input[type="radio"]:checked + .count-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #d97706;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
}

.count-btn:hover {
    border-color: #f59e0b;
    background: #fef9e7;
}

/* ========== 右栏：结果面板 ========== */
.pn-result-panel {
    flex: 1;
    background: #fffbf0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.result-meta-subject {
    font-size: 11px;
    background: #fef9c3;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid #fde68a;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-time {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}

/* 结果字数统计标签 */
.result-char-count {
    font-size: 11px;
    color: #b45309;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #fde68a;
    white-space: nowrap;
    flex-shrink: 0;
}

.pn-result-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pn-result-body::-webkit-scrollbar {
    width: 5px;
}

.pn-result-body::-webkit-scrollbar-track {
    background: transparent;
}

.pn-result-body::-webkit-scrollbar-thumb {
    background: #fcd34d;
    border-radius: 3px;
}

.pn-result-body::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

/* 占位区域 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px 20px;
    text-align: center;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 16px;
    animation: pnFloat 3s ease-in-out infinite;
}

@keyframes pnFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: #b45309;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 4px;
    line-height: 1.6;
}

/* 加载中 */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px 20px;
}

.loading-brand {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation: pnBounce 1.4s ease-in-out infinite;
}

.brand-dot:nth-child(2) { animation-delay: 0.2s; }
.brand-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pnBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1.1); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: #b45309;
    animation: pnFade 1.5s ease-in-out infinite;
}

@keyframes pnFade {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 结果内容 */
.pn-result-content {
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.75;
    color: #374151;
    animation: pnSlideIn 0.35s ease-out;
}

@keyframes pnSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Markdown 渲染样式 */
.pn-result-content h2 {
    font-size: 16px;
    font-weight: 700;
    color: #78350f;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #fde68a;
}

.pn-result-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    margin: 16px 0 8px;
    background: linear-gradient(135deg, #fef9c3, #fef3c7);
    padding: 8px 14px;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
}

.pn-result-content ul {
    margin: 8px 0 12px;
    padding-left: 0;
    list-style: none;
}

.pn-result-content ul li {
    padding: 5px 12px 5px 0;
    color: #4b5563;
    border-bottom: 1px dashed #fde68a;
    font-size: 13.5px;
}

.pn-result-content ul li:last-child {
    border-bottom: none;
}

.pn-result-content ul li::before {
    content: '▸';
    color: #f59e0b;
    font-weight: 700;
    margin-right: 6px;
    font-size: 12px;
}

.pn-result-content strong {
    color: #92400e;
    font-weight: 700;
}

.pn-result-content hr {
    border: none;
    border-top: 1px solid #fde68a;
    margin: 16px 0;
}

.pn-result-content p {
    margin: 6px 0;
    line-height: 1.75;
}

/* 错误状态：与 placeholder/loading 保持一致的 flex 居中布局 */
.pn-result-content--error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    border: 1px solid #fecaca;
    background: #fff5f5;
    border-radius: 8px;
    padding: 40px 20px;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    margin: 16px;
    box-sizing: border-box;
}

/* 错误重试按鈕 */
.error-retry-btn {
    margin-top: 12px;
    padding: 6px 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.error-retry-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
    transform: translateY(-1px);
}

/* 结果区标题行（换一批按鈕行） */
.result-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.result-title-row h3 {
    margin: 0;
}

/* 换一批按鈕 */
.rebatch-btn {
    padding: 3px 10px;
    background: linear-gradient(135deg, #fef9c3, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.rebatch-btn:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.30);
    transform: translateY(-1px);
}

.rebatch-btn:active {
    transform: translateY(0);
}


.pn-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.pn-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: min(720px, 95vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.pn-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.pn-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #fde68a;
    background: linear-gradient(135deg, #fef9c3, #fef3c7);
    flex-shrink: 0;
}

.pn-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #78350f;
}

.pn-modal-close {
    background: none;
    border: none;
    font-size: 14px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.pn-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.pn-modal-body {
    overflow-y: auto;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.pn-modal-body::-webkit-scrollbar {
    width: 5px;
}

.pn-modal-body::-webkit-scrollbar-thumb {
    background: #fcd34d;
    border-radius: 3px;
}

/* 示例卡片 */
.example-card {
    border: 1.5px solid #fde68a;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fffdf5;
    position: relative;
    overflow: hidden;
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.example-card:hover {
    border-color: #f59e0b;
    background: #fef9e7;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
    transform: translateY(-2px);
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.example-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.example-title {
    font-size: 13px;
    font-weight: 700;
    color: #78350f;
}

.example-badge {
    font-size: 10px;
    padding: 1px 7px;
    background: #fef3c7;
    color: #d97706;
    border-radius: 10px;
    border: 1px solid #fde68a;
    font-weight: 600;
    margin-left: auto;
}

.example-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin-left: 28px;
}

/* ========== 暗黑模式 ========== */
body.dark .pn-container {
    background: #1c1710;
    border-color: #4a3a0a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

body.dark .pn-toolbar {
    background: linear-gradient(135deg, #92400e 0%, #78350f 60%, #451a03 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark .pn-main-content {
    background: #1c1710;
}

body.dark .pn-history-panel {
    background: #1e1a12;
    border-right-color: #4a3a0a;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #241f14 0%, #1e1a12 100%);
    border-bottom-color: #4a3a0a;
}

body.dark .history-panel-header h3 {
    color: #fcd34d;
}

body.dark .history-search {
    border-bottom-color: #4a3a0a;
}

body.dark .history-search input {
    background: #241f14;
    border-color: #4a3a0a;
    color: #e5d5a0;
}

body.dark .history-search input::placeholder {
    color: #6b5a2a;
}

body.dark .history-search input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.20);
}

body.dark .history-item {
    border-bottom-color: #2a2210;
}

body.dark .history-item:hover {
    background: #2a2210;
}

body.dark .history-item.active {
    background: #2e2308;
    border-left-color: #f59e0b;
}

body.dark .history-item-title {
    color: #fcd34d;
}

body.dark .history-item-meta {
    color: #6b7280;
}

body.dark .history-list::-webkit-scrollbar-thumb {
    background: #78350f;
}

body.dark .history-list::-webkit-scrollbar-track {
    background: #1e1a12;
}

body.dark .history-list::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

body.dark .pn-input-panel {
    background: #1e1a12;
    border-right-color: #4a3a0a;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #241f14 0%, #1e1a12 100%);
    border-bottom-color: #4a3a0a;
}

body.dark .panel-header h3 {
    color: #fcd34d;
}

body.dark .panel-tip {
    color: #b45309;
}

body.dark .pn-input-body::-webkit-scrollbar-thumb {
    background: #78350f;
}

body.dark .pn-input-body::-webkit-scrollbar-track {
    background: #1e1a12;
}

body.dark .pn-input-body::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

body.dark .form-group label {
    color: #fcd34d;
}

body.dark .pn-textarea,
body.dark .pn-input,
body.dark .pn-select {
    background: #241f14;
    border-color: #4a3a0a;
    color: #e5d5a0;
}

body.dark .pn-textarea::placeholder,
body.dark .pn-input::placeholder {
    color: #5a4820;
}

body.dark .pn-textarea:focus,
body.dark .pn-input:focus,
body.dark .pn-select:focus {
    border-color: #f59e0b;
    background: #2a2210;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

body.dark .pn-select {
    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 d='M1 1l4 4 4-4' stroke='%23f59e0b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-color: #241f14;
    color-scheme: dark;
}

body.dark .pn-select option {
    background: #1e1a12;
    color: #e5d5a0;
}

body.dark .count-btn {
    border-color: #4a3a0a;
    background: #241f14;
    color: #fcd34d;
}

body.dark .count-btn:hover {
    background: #2e2308;
    border-color: #f59e0b;
}

body.dark .count-option input[type="radio"]:checked + .count-btn {
    background: linear-gradient(135deg, #b45309, #92400e);
    border-color: #b45309;
    color: #fef9c3;
}

body.dark .char-counter {
    color: #b45309;
}

body.dark .pn-result-panel {
    background: #1c1710;
}

body.dark .pn-result-body::-webkit-scrollbar-thumb {
    background: #78350f;
}

body.dark .pn-result-body::-webkit-scrollbar-track {
    background: #1c1710;
}

body.dark .pn-result-body::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

body.dark .placeholder-title {
    color: #fcd34d;
}

body.dark .placeholder-desc {
    color: #6b5a2a;
}

body.dark .loading-text {
    color: #fcd34d;
}

body.dark .pn-result-content {
    color: #e5d5a0;
}

body.dark .pn-result-content h2 {
    color: #fcd34d;
    border-bottom-color: #4a3a0a;
}

body.dark .pn-result-content h3 {
    color: #fcd34d;
    background: linear-gradient(135deg, #241f14, #2a2210);
    border-left-color: #f59e0b;
}

body.dark .pn-result-content ul li {
    color: #d5c080;
    border-bottom-color: #3a2e0a;
}

body.dark .pn-result-content ul li::before {
    color: #fcd34d;
}

body.dark .pn-result-content strong {
    color: #fcd34d;
}

body.dark .pn-result-content hr {
    border-top-color: #4a3a0a;
}

body.dark .pn-result-content p {
    color: #d5c080;
}

body.dark .pn-result-content--error {
    background: #2a1010;
    border-color: #7f1d1d;
    color: #fca5a5;
}

body.dark .result-meta-subject {
    background: #2e2308;
    color: #fcd34d;
    border-color: #4a3a0a;
}

body.dark .result-char-count {
    background: #2e2308;
    color: #fcd34d;
    border-color: #4a3a0a;
}

body.dark .rebatch-btn {
    background: linear-gradient(135deg, #2a2210, #2e2308);
    border-color: #4a3a0a;
    color: #fcd34d;
}

body.dark .rebatch-btn:hover {
    background: linear-gradient(135deg, #3a3010, #4a3a0a);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.20);
}

body.dark .error-retry-btn {
    background: linear-gradient(135deg, #b45309, #92400e);
}

body.dark .error-retry-btn:hover {
    background: linear-gradient(135deg, #92400e, #78350f);
}

body.dark .pn-modal {
    background: #1e1a12;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark .pn-modal-header {
    background: linear-gradient(135deg, #2a2210, #241f14);
    border-bottom-color: #4a3a0a;
}

body.dark .pn-modal-header h3 {
    color: #fcd34d;
}

body.dark .pn-modal-close:hover {
    background: #3a1010;
    color: #fca5a5;
}

body.dark .pn-modal-body::-webkit-scrollbar-thumb {
    background: #78350f;
}

body.dark .example-card {
    background: #241f14;
    border-color: #4a3a0a;
}

body.dark .example-card:hover {
    background: #2a2210;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

body.dark .example-title {
    color: #fcd34d;
}

body.dark .example-badge {
    background: #2e2308;
    color: #f59e0b;
    border-color: #4a3a0a;
}

body.dark .example-desc {
    color: #9ca3af;
}

body.dark .history-empty {
    color: #4a3a0a;
}

/* ========== 打印样式 ========== */
@media print {
    .pn-toolbar,
    .pn-history-panel,
    .pn-input-panel,
    .pn-modal-overlay,
    .pn-modal {
        display: none !important;
    }

    .pn-container {
        height: auto !important;
        min-height: unset;
        box-shadow: none;
        border: none;
        border-radius: 0;
    }

    .pn-main-content {
        overflow: visible;
    }

    .pn-result-panel {
        flex: 1;
        overflow: visible;
    }

    .pn-result-body {
        overflow: visible;
        flex-direction: column;
    }

    .pn-result-content {
        overflow: visible;
        padding: 0;
    }
}

/* ========== 响应式布局 ========== */
@media (max-width: 900px) {
    .pn-history-panel {
        display: none;
    }

    .pn-input-panel {
        width: 320px;
    }
}

@media (max-width: 680px) {
    .pn-main-content {
        flex-direction: column;
    }

    .pn-input-panel {
        width: 100%;
        flex-shrink: 0;
        height: 55%;
        border-right: none;
        border-bottom: 1px solid #fde68a;
    }

    .pn-result-panel {
        height: 45%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .pn-toolbar {
        padding: 6px 10px;
    }

    .toolbar-title {
        display: none;
    }
}
