/* ========================================
   顺口溜 rhyme_slogan.css
   主题色：活力橙 #f97316 / 暖黄 #fbbf24
   ======================================== */

/* ========== 容器 ========== */
.rs-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fff9f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.08);
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

/* 全屏模式 */
.rs-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.rs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 45%, #fbbf24 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.4);
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-group--right {
    margin-left: auto;
}

.toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-right: 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toolbar-btn {
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    transition: all 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    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: rgba(255, 255, 255, 0.95);
    color: #ea580c;
    border-color: transparent;
    font-weight: 600;
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: #c2410c;
}

.toolbar-btn-cancel {
    background: rgba(239, 68, 68, 0.85);
    border-color: rgba(239, 68, 68, 0.5);
}

.toolbar-btn-cancel:hover {
    background: rgba(239, 68, 68, 1);
}

/* ========== 主内容区 ========== */
.rs-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fff9f0;
}

/* ========== 左栏：历史记录 ========== */
.rs-history-panel {
    width: 200px;
    background: #ffffff;
    border-right: 1px solid #fed7aa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fff7ed, #ffedd5);
    border-bottom: 1px solid #fed7aa;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #ea580c;
}

.history-count {
    font-size: 11px;
    color: #f97316;
    margin-left: 4px;
    font-weight: 400;
}

.history-clear-btn {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    color: #ec4899;
    font-size: 11px;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fce7f3;
    border-color: #ec4899;
}

.history-search {
    padding: 8px 10px;
    border-bottom: 1px solid #fed7aa;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #fdba74;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fff7ed;
    color: #374151;
}

.history-search input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.12);
}

.history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list::-webkit-scrollbar-thumb { background: #fdba74; border-radius: 4px; }
.history-list::-webkit-scrollbar-thumb:hover { background: #f97316; }

.history-empty {
    text-align: center;
    color: #fb923c;
    font-size: 12px;
    padding: 24px 12px;
    line-height: 1.8;
}

.rs-history-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    border: 1px solid transparent;
    transition: all 0.18s;
    background: transparent;
}

.rs-history-item:hover {
    background: #fff7ed;
    border-color: #fed7aa;
}

.rs-history-item.active {
    background: #ffedd5;
    border-color: #f97316;
}

.rs-history-item .hi-topic {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.rs-history-item .hi-meta {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.rs-history-item .hi-badge {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #ffedd5;
    color: #ea580c;
    border: 1px solid #fed7aa;
    white-space: nowrap;
}

.rs-history-item .hi-time {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 3px;
}

/* ========== 中栏：创作输入 ========== */
.rs-input-panel {
    width: 300px;
    background: #ffffff;
    border-right: 1px solid #fed7aa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-header {
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fff7ed, #ffedd5);
    border-bottom: 1px solid #fed7aa;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: #ea580c;
}

.panel-tip {
    font-size: 11px;
    color: #9ca3af;
}

.rs-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.rs-input-body::-webkit-scrollbar { width: 4px; }
.rs-input-body::-webkit-scrollbar-track { background: transparent; }
.rs-input-body::-webkit-scrollbar-thumb { background: #fdba74; border-radius: 4px; }
.rs-input-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-label-icon {
    font-size: 14px;
}

.form-required {
    color: #ef4444;
    font-size: 12px;
}

.form-optional {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 400;
}

.rs-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #fed7aa;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fffaf5;
    color: #1f2937;
    font-family: inherit;
}

.rs-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    background: #fff;
}

.rs-input.shake {
    animation: rsShake 0.4s ease;
}

@keyframes rsShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.rs-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #fed7aa;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fffaf5;
    color: #1f2937;
    font-family: inherit;
    line-height: 1.5;
}

.rs-textarea:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    background: #fff;
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.rs-select {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #fed7aa;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    background: #fffaf5;
    color: #1f2937;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23f97316'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.rs-select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* 数量选择 */
.count-options {
    display: flex;
    gap: 6px;
}

.count-option {
    flex: 1;
    padding: 7px 0;
    text-align: center;
    border: 1.5px solid #fed7aa;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    background: #fffaf5;
    user-select: none;
}

.count-option:hover {
    border-color: #f97316;
    color: #f97316;
    background: #fff7ed;
}

.count-option.selected {
    border-color: #f97316;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #ea580c;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(249, 115, 22, 0.2);
}

/* 提示区域 */
.rs-tips-box {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 4px;
}

.rs-tips-box p {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: #ea580c;
}

.rs-tips-box ul {
    margin: 0;
    padding-left: 16px;
    list-style: none;
}

.rs-tips-box ul li {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.8;
    position: relative;
    padding-left: 2px;
}

.rs-tips-box ul li::before {
    content: "▸";
    color: #f97316;
    margin-right: 4px;
}

kbd {
    display: inline-block;
    padding: 1px 5px;
    font-size: 10px;
    font-family: monospace;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    color: #374151;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* ========== 右栏：结果展示 ========== */
.rs-result-panel {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rs-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fff7ed, #ffedd5);
    border-bottom: 1px solid #fed7aa;
    flex-shrink: 0;
}

.rs-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #ea580c;
}

.result-meta-info {
    display: flex;
    gap: 6px;
    align-items: center;
}

.result-style-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #ffedd5;
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-weight: 500;
}

.result-count-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fde68a;
    font-weight: 500;
}

.rs-result-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.rs-result-body::-webkit-scrollbar { width: 5px; }
.rs-result-body::-webkit-scrollbar-track { background: transparent; }
.rs-result-body::-webkit-scrollbar-thumb { background: #fdba74; border-radius: 4px; }
.rs-result-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

/* 占位提示 */
.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
}

.placeholder-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 8px;
}

.rs-float-icon {
    animation: rsFloat 3s ease-in-out infinite;
}

@keyframes rsFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.placeholder-desc {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.6;
}

/* 加载动画 */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
}

.rhyme-wave {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 36px;
}

.rhyme-wave span {
    display: inline-block;
    width: 5px;
    height: 100%;
    border-radius: 3px;
    background: #f97316;
    animation: rsWaveBounce 1.1s ease-in-out infinite;
    transform-origin: bottom;
}

.rhyme-wave span:nth-child(1) { animation-delay: 0s;    background: #f97316; }
.rhyme-wave span:nth-child(2) { animation-delay: 0.18s; background: #fb923c; }
.rhyme-wave span:nth-child(3) { animation-delay: 0.36s; background: #fbbf24; }
.rhyme-wave span:nth-child(4) { animation-delay: 0.18s; background: #fb923c; }
.rhyme-wave span:nth-child(5) { animation-delay: 0s;    background: #f97316; }

@keyframes rsWaveBounce {
    0%, 100% { transform: scaleY(0.25); opacity: 0.6; }
    50%       { transform: scaleY(1);    opacity: 1;   }
}

.loading-text {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
    animation: rsPulse 1.5s ease-in-out infinite;
}

@keyframes rsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 结果内容 */
.result-content {
    animation: rsFadeIn 0.4s ease;
}

@keyframes rsFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 顺口溜卡片 */
.rhyme-result {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rhyme-item {
    background: linear-gradient(135deg, #fff9f0 0%, #fffbeb 100%);
    border: 1px solid #fed7aa;
    border-top: 3px solid #f97316;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}

.rhyme-item:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.rhyme-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 8px;
    flex-wrap: wrap;
}

.rhyme-title {
    font-size: 16px;
    font-weight: 700;
    color: #ea580c;
    letter-spacing: 0.5px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rhyme-title::before {
    content: "🎵";
    font-size: 13px;
    flex-shrink: 0;
}

.rhyme-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fde68a;
    white-space: nowrap;
    font-weight: 500;
}

.rhyme-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.rhyme-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.7);
    border-left: 3px solid #f97316;
    border-radius: 0 6px 6px 0;
    transition: all 0.15s;
}

.rhyme-line:hover {
    background: rgba(255,255,255,0.95);
    border-left-color: #ea580c;
    transform: translateX(2px);
}

.line-num {
    font-size: 11px;
    color: #f97316;
    font-weight: 600;
    min-width: 18px;
    flex-shrink: 0;
}

.line-text {
    font-size: 15px;
    color: #1f2937;
    line-height: 1.5;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.rhyme-note {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
    padding: 6px 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 5px;
    border: 1px dashed #fed7aa;
}

/* 结果头部操作区 */
.rs-result-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 换一批 / 重新生成按钮 */
.rs-regenerate-btn {
    font-size: 11px;
    padding: 3px 10px;
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-radius: 5px;
    color: #ea580c;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.rs-regenerate-btn:hover {
    background: #ffedd5;
    border-color: #f97316;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.2);
}

/* 每首卡片的独立复制按钮 */
.rhyme-copy-btn {
    font-size: 11px;
    padding: 3px 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.rhyme-copy-btn:hover {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #ea580c;
}


/* 错误提示 */
.result-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 16px 18px;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.error-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.error-msg {
    line-height: 1.7;
}

.error-retry-btn {
    align-self: flex-start;
    font-size: 12px;
    padding: 5px 14px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 5px;
    color: #dc2626;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.error-retry-btn:hover {
    background: #fee2e2;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

/* ========== 浮动提示 ========== */
.rs-tip-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.rs-tip-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 示例模态框 ========== */
.rs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.rs-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.rs-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%) scale(0.96);
    z-index: 10001;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: min(620px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
}

.rs-modal.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.rs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #fed7aa;
    background: linear-gradient(to right, #fff7ed, #fffbeb);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.rs-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #ea580c;
}

.rs-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.rs-modal-close:hover {
    background: #fef2f2;
    color: #ef4444;
}

.rs-modal-body {
    overflow-y: auto;
    padding: 16px;
    flex: 1;
}

.rs-modal-body::-webkit-scrollbar { width: 5px; }
.rs-modal-body::-webkit-scrollbar-track { background: transparent; }
.rs-modal-body::-webkit-scrollbar-thumb { background: #fdba74; border-radius: 4px; }
.rs-modal-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.example-card {
    padding: 12px 14px;
    border: 1.5px solid #fed7aa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fffaf5;
    text-align: center;
}

.example-card:hover {
    border-color: #f97316;
    background: #fff7ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.example-card .ec-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.example-card .ec-topic {
    font-size: 11px;
    color: #ea580c;
    margin-bottom: 3px;
    font-weight: 500;
}

.example-card .ec-style {
    font-size: 10px;
    color: #9ca3af;
}

/* ========================================
   暗黑模式 body.dark
   ======================================== */
body.dark .rs-container {
    background: #1a1a2e;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

body.dark .rs-main-content {
    background: #1a1a2e;
}

body.dark .rs-history-panel {
    background: #16213e;
    border-right-color: #3d3d5c;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #1e1e3f, #16213e);
    border-bottom-color: #3d3d5c;
}

body.dark .history-panel-header h3 {
    color: #fb923c;
}

body.dark .history-count {
    color: #f97316;
}

body.dark .history-clear-btn {
    background: #2d1f2e;
    border-color: #4a2040;
    color: #f472b6;
}

body.dark .history-clear-btn:hover {
    background: #3d1f3d;
    border-color: #f472b6;
}

body.dark .history-search {
    border-bottom-color: #3d3d5c;
}

body.dark .history-search input {
    background: #1e1e3f;
    border-color: #3d3d5c;
    color: #e5e7eb;
}

body.dark .history-search input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
}

body.dark .history-list::-webkit-scrollbar-thumb { background: #4a4a6e; }
body.dark .history-list::-webkit-scrollbar-thumb:hover { background: #f97316; }

body.dark .history-empty {
    color: #6b7280;
}

body.dark .rs-history-item:hover {
    background: #1e1e3f;
    border-color: #4a4a6e;
}

body.dark .rs-history-item.active {
    background: #2a1a0e;
    border-color: #f97316;
}

body.dark .rs-history-item .hi-topic {
    color: #e5e7eb;
}

body.dark .rs-history-item .hi-badge {
    background: #2a1a0e;
    color: #fb923c;
    border-color: #4a3020;
}

body.dark .rs-history-item .hi-time {
    color: #4b5563;
}

body.dark .rs-input-panel {
    background: #16213e;
    border-right-color: #3d3d5c;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #1e1e3f, #16213e);
    border-bottom-color: #3d3d5c;
}

body.dark .panel-header h3 {
    color: #fb923c;
}

body.dark .panel-tip {
    color: #6b7280;
}

body.dark .rs-input-body::-webkit-scrollbar-thumb { background: #4a4a6e; }
body.dark .rs-input-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

body.dark .form-label {
    color: #e5e7eb;
}

body.dark .rs-input {
    background: #1a1a2e;
    border-color: #3d3d5c;
    color: #e5e7eb;
}

body.dark .rs-input:focus {
    border-color: #f97316;
    background: #1e1e3f;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

body.dark .rs-textarea {
    background: #1a1a2e;
    border-color: #3d3d5c;
    color: #e5e7eb;
}

body.dark .rs-textarea:focus {
    border-color: #f97316;
    background: #1e1e3f;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

body.dark .char-counter {
    color: #4b5563;
}

body.dark .rs-select {
    background-color: #1a1a2e;
    border-color: #3d3d5c;
    color: #e5e7eb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23f97316'/%3E%3C/svg%3E");
}

body.dark .rs-select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

body.dark .count-option {
    background: #1a1a2e;
    border-color: #3d3d5c;
    color: #9ca3af;
}

body.dark .count-option:hover {
    border-color: #f97316;
    color: #fb923c;
    background: #2a1a0e;
}

body.dark .count-option.selected {
    border-color: #f97316;
    background: linear-gradient(135deg, #2a1a0e, #1f1a0a);
    color: #fb923c;
    box-shadow: 0 1px 4px rgba(249, 115, 22, 0.25);
}

body.dark .rs-tips-box {
    background: linear-gradient(135deg, #1e1e0a, #1a1a0e);
    border-color: #3d3010;
}

body.dark .rs-tips-box p {
    color: #fb923c;
}

body.dark .rs-tips-box ul li {
    color: #9ca3af;
}

body.dark kbd {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

body.dark .rs-result-panel {
    background: #16213e;
}

body.dark .rs-result-header {
    background: linear-gradient(to bottom, #1e1e3f, #16213e);
    border-bottom-color: #3d3d5c;
}

body.dark .rs-result-header h3 {
    color: #fb923c;
}

body.dark .result-style-badge {
    background: #2a1a0e;
    color: #fb923c;
    border-color: #4a3020;
}

body.dark .result-count-badge {
    background: #1f1a0a;
    color: #d97706;
    border-color: #3d3010;
}

body.dark .rs-result-body::-webkit-scrollbar-thumb { background: #4a4a6e; }
body.dark .rs-result-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

body.dark .placeholder-title {
    color: #6e7681;
}

body.dark .placeholder-desc {
    color: #484f58;
}

body.dark .rhyme-item {
    background: linear-gradient(135deg, #1e1e0a, #1a1a12);
    border-color: #3d3010;
    border-top-color: #f97316;
}

body.dark .rhyme-item:hover {
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.18);
}

body.dark .rhyme-title {
    color: #fb923c;
}

body.dark .rhyme-badge {
    background: #1f1a0a;
    color: #d97706;
    border-color: #3d3010;
}

body.dark .rhyme-line {
    background: rgba(255,255,255,0.04);
    border-left-color: #f97316;
}

body.dark .rhyme-line:hover {
    background: rgba(255,255,255,0.08);
    border-left-color: #fb923c;
}

body.dark .line-num {
    color: #f97316;
}

body.dark .line-text {
    color: #e5e7eb;
}

body.dark .rhyme-note {
    color: #6b7280;
    background: rgba(255,255,255,0.03);
    border-color: #3d3010;
}

body.dark .result-error {
    background: #2a0a0a;
    border-color: #5c1a1a;
    border-left-color: #ef4444;
    color: #f87171;
}

body.dark .error-retry-btn {
    background: #3a1010;
    border-color: #7c2020;
    color: #fca5a5;
}

body.dark .error-retry-btn:hover {
    background: #4a1515;
    border-color: #ef4444;
}

body.dark .rs-regenerate-btn {
    background: #2a1a0e;
    border-color: #4a3020;
    color: #fb923c;
}

body.dark .rs-regenerate-btn:hover {
    background: #3a2510;
    border-color: #f97316;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
}

body.dark .rhyme-copy-btn {
    background: #1e1e3f;
    border-color: #3d3d5c;
    color: #9ca3af;
}

body.dark .rhyme-copy-btn:hover {
    background: #2a1a0e;
    border-color: #f97316;
    color: #fb923c;
}

body.dark .rs-modal {
    background: #16213e;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

body.dark .rs-modal-header {
    background: linear-gradient(to right, #1e1e3f, #16213e);
    border-bottom-color: #3d3d5c;
}

body.dark .rs-modal-header h3 {
    color: #fb923c;
}

body.dark .rs-modal-close:hover {
    background: #2a0a0a;
    color: #f87171;
}

body.dark .rs-modal-body::-webkit-scrollbar-thumb { background: #4a4a6e; }
body.dark .rs-modal-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

body.dark .example-card {
    background: #1e1e0a;
    border-color: #3d3010;
}

body.dark .example-card:hover {
    border-color: #f97316;
    background: #2a1a0e;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

body.dark .example-card .ec-label {
    color: #e5e7eb;
}

body.dark .example-card .ec-topic {
    color: #fb923c;
}

body.dark .example-card .ec-style {
    color: #6b7280;
}

/* ========== 响应式 ========== */
@media (max-width: 639px) {
    .rs-main-content {
        flex-direction: column;
    }

    .rs-history-panel {
        width: 100%;
        height: 160px;
        border-right: none;
        border-bottom: 1px solid #fed7aa;
    }

    .rs-input-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #fed7aa;
    }

    .rs-result-panel {
        min-height: 300px;
    }

    body.dark .rs-history-panel {
        border-right: none;
        border-bottom: 1px solid #3d3d5c;
    }

    body.dark .rs-input-panel {
        border-right: none;
        border-bottom: 1px solid #3d3d5c;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
