/* ========== 歌曲填词 - 主容器 ========== */
.slw-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #F0F4FF;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(79, 70, 229, 0.12);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.slw-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.slw-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #312E81 0%, #4F46E5 50%, #7C3AED 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.45);
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin-right: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.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);
    user-select: none;
}

.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.2);
}

.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: #4F46E5;
    border-color: transparent;
    font-weight: 600;
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: #312E81;
}

.toolbar-btn-cancel {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.5);
}

.toolbar-btn-cancel:hover {
    background: rgba(239, 68, 68, 1);
}

/* ========== 主内容区 ========== */
.slw-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #F0F4FF;
}

/* ========== 左栏：历史记录 ========== */
.slw-history-panel {
    width: 200px;
    background: #EEF2FF;
    border-right: 1px solid #C7D2FE;
    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, #EEF2FF, #E0E7FF);
    border-bottom: 1px solid #C7D2FE;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #312E81;
}

.history-count {
    font-size: 11px;
    color: #6366F1;
    margin-left: 4px;
    font-weight: 400;
}

.history-clear-btn {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
    font-size: 11px;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #FEE2E2;
    border-color: #DC2626;
}

.history-search {
    padding: 8px 10px;
    border-bottom: 1px solid #C7D2FE;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #C7D2FE;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #EEF2FF;
    color: #1E1B4B;
}

.history-search input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
}

.history-empty {
    text-align: center;
    color: #818CF8;
    font-size: 12px;
    padding: 24px 12px;
    line-height: 1.8;
}

.history-item {
    padding: 9px 10px;
    margin: 3px 0;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: fadeInItem 0.2s ease;
    user-select: none;
}

@keyframes fadeInItem {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-item:hover {
    background: #E0E7FF;
    border-color: #818CF8;
    transform: translateX(2px);
}

.history-item.active {
    background: #C7D2FE;
    border-color: #4F46E5;
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.2);
}

.history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    background: #DC2626;
    color: white;
}

.history-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #312E81;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
    padding-right: 18px;
}

.history-item-meta {
    font-size: 11px;
    color: #6366F1;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.history-item-badge {
    background: #E0E7FF;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    color: #4338CA;
}

.history-item-time {
    font-size: 10px;
    color: #818CF8;
    margin-top: 3px;
}

/* ========== 中栏：创作输入 ========== */
.slw-input-panel {
    width: 340px;
    min-width: 280px;
    background: #ffffff;
    border-right: 1px solid #C7D2FE;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #EEF2FF, #E0E7FF);
    border-bottom: 1px solid #C7D2FE;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #312E81;
}

.panel-tip {
    font-size: 11px;
    color: #818CF8;
}

.slw-input-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

/* 表单组 */
.form-group {
    margin-bottom: 14px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.form-group-half {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #312E81;
    margin-bottom: 6px;
}

.form-label-icon {
    font-size: 14px;
}

.form-required {
    color: #DC2626;
    font-size: 13px;
}

.form-optional {
    color: #818CF8;
    font-size: 11px;
    font-weight: 400;
}

.form-hint {
    font-size: 11px;
    color: #818CF8;
    margin-top: 4px;
}

.slw-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #C7D2FE;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #FAFAFE;
    color: #1E1B4B;
}

.slw-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.slw-input::placeholder {
    color: #A5B4FC;
    font-size: 12px;
}

.slw-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #C7D2FE;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #FAFAFE;
    color: #1E1B4B;
    resize: none;
    line-height: 1.6;
}

.slw-textarea:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.slw-textarea::placeholder {
    color: #A5B4FC;
    font-size: 12px;
}

/* shake 校验动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.slw-input.shake,
.slw-textarea.shake {
    animation: shake 0.4s ease;
    border-color: #DC2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: #818CF8;
    margin-top: 4px;
    transition: color 0.2s;
}

.char-counter.warn-limit {
    color: #D97706;
}

.char-counter.over-limit {
    color: #DC2626;
    font-weight: 600;
}

.slw-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #C7D2FE;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    background: #FAFAFE;
    color: #1E1B4B;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236366F1' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.slw-select:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* 提示框 */
.slw-tips-box {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border: 1px solid #C7D2FE;
    border-left: 3px solid #6366F1;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #3730A3;
    margin-top: 4px;
}

.slw-tips-box p {
    margin: 0 0 8px;
    font-weight: 600;
    color: #312E81;
}

.slw-tips-box ul {
    margin: 0;
    padding-left: 16px;
    line-height: 2;
}

.slw-tips-box kbd {
    background: #E0E7FF;
    border: 1px solid #C7D2FE;
    border-radius: 3px;
    padding: 0 5px;
    font-size: 11px;
    color: #4338CA;
    font-family: inherit;
}

/* ========== 右栏：生成结果 ========== */
.slw-result-panel {
    flex: 1;
    min-width: 300px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slw-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #EEF2FF, #E0E7FF);
    border-bottom: 1px solid #C7D2FE;
    flex-shrink: 0;
}

.slw-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #312E81;
}

.result-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-rewrite-btn {
    padding: 4px 10px;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    color: #4F46E5;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.result-rewrite-btn:hover {
    background: #E0E7FF;
    border-color: #6366F1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.result-meta-info {
    display: flex;
    gap: 6px;
    align-items: center;
}

.result-style-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    background: #EEF2FF;
    color: #4338CA;
    border: 1px solid #C7D2FE;
}

.result-mood-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 500;
    background: #F5F3FF;
    color: #6D28D9;
    border: 1px solid #DDD6FE;
}

.slw-result-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 占位提示 */
.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #818CF8;
    min-height: 200px;
}

/* 音符占位图标 */
.placeholder-note {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border: 2px solid #C7D2FE;
    animation: notePulse 3s ease-in-out infinite;
    color: #6366F1;
}

@keyframes notePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.25); }
    50%       { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
}

.placeholder-title {
    font-size: 17px;
    font-weight: 600;
    color: #4338CA;
    margin: 0 0 10px;
    letter-spacing: 1px;
}

.placeholder-desc {
    font-size: 13px;
    color: #818CF8;
    margin: 3px 0;
}

/* 加载动画（音波） */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.music-waves {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 40px;
    margin-bottom: 18px;
}

.music-waves span {
    display: block;
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(to top, #6366F1, #A78BFA);
    animation: musicWave 1.2s ease-in-out infinite;
}

.music-waves span:nth-child(1) { height: 20px; animation-delay: 0s; }
.music-waves span:nth-child(2) { height: 35px; animation-delay: 0.15s; }
.music-waves span:nth-child(3) { height: 28px; animation-delay: 0.3s; }
.music-waves span:nth-child(4) { height: 38px; animation-delay: 0.45s; }
.music-waves span:nth-child(5) { height: 22px; animation-delay: 0.6s; }

@keyframes musicWave {
    0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
    50%       { transform: scaleY(1); opacity: 1; }
}

.loading-text {
    font-size: 14px;
    color: #6366F1;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
}

/* 结果内容区 */
.result-content {
    flex: 1;
    min-height: 0;
    padding: 24px;
    overflow-y: auto;
    scroll-behavior: smooth;
    animation: resultFadeIn 0.4s ease;
    background: #FAFAFE;
}

@keyframes resultFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 歌词 HTML 内容样式 ========== */
.result-content .lyrics-result {
    max-width: 560px;
    margin: 0 auto;
}

.result-content .lyrics-title {
    font-size: 22px;
    font-weight: 700;
    color: #1E1B4B;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 14px;
}

.result-content .lyrics-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #7C3AED, #EC4899);
    border-radius: 2px;
}

.result-content .lyrics-meta {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.result-content .lyrics-meta-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.result-content .style-tag {
    background: #EEF2FF;
    color: #4338CA;
    border: 1px solid #C7D2FE;
}

.result-content .mood-tag {
    background: #F5F3FF;
    color: #6D28D9;
    border: 1px solid #DDD6FE;
}

.result-content .ref-tag {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.result-content .lyrics-section {
    margin-bottom: 22px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #E0E7FF;
    padding: 14px 18px;
    transition: all 0.2s;
}

.result-content .lyrics-section:hover {
    border-color: #A5B4FC;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.result-content .lyrics-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #6366F1;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E0E7FF;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-content .lyrics-section-label::before {
    content: '▍';
    font-size: 14px;
    color: #6366F1;
}

.result-content .chorus-label {
    color: #7C3AED;
}

.result-content .chorus-label::before {
    color: #7C3AED;
}

.result-content .bridge-label {
    color: #0EA5E9;
}

.result-content .bridge-label::before {
    color: #0EA5E9;
}

.result-content .interlude-label {
    color: #059669;
}

.result-content .interlude-label::before {
    color: #059669;
}

.result-content .lyrics-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-content .lyrics-line {
    font-size: 15px;
    color: #1E1B4B;
    line-height: 1.9;
    letter-spacing: 0.5px;
    padding: 2px 0;
    transition: all 0.15s;
}

.result-content .chorus-lines .lyrics-line {
    font-size: 16px;
    font-weight: 500;
    color: #312E81;
}

.result-content .lyrics-line:hover {
    transform: translateX(4px);
    color: #4F46E5;
}

.result-content .lyrics-note {
    font-size: 12px;
    color: #818CF8;
    font-style: italic;
    border-top: 1px dashed #C7D2FE;
    padding-top: 14px;
    margin-top: 8px;
    text-align: center;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* 错误提示 */
.result-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 200px;
}

.result-error-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-left: 4px solid #EF4444;
    background: #FEF2F2;
    border-radius: 0 8px 8px 0;
    max-width: 400px;
    width: 100%;
    box-sizing: border-box;
}

.result-error-icon {
    font-size: 26px;
    flex-shrink: 0;
    line-height: 1.3;
}

.result-error-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    flex: 1;
}

.result-error-msg {
    font-size: 14px;
    color: #4F46E5;
    line-height: 1.6;
}

.result-error-retry {
    padding: 7px 20px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.result-error-retry:hover {
    background: linear-gradient(135deg, #312E81, #4F46E5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* ========== 示例模态框 ========== */
.slw-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(49, 46, 129, 0.4);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    backdrop-filter: blur(2px);
}

.slw-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.slw-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    background: #fff;
    border-radius: 12px;
    z-index: 100002;
    width: 90%;
    max-width: 740px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(49, 46, 129, 0.22);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.slw-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.slw-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #312E81, #4F46E5);
    color: white;
    flex-shrink: 0;
}

.slw-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.slw-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.slw-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.slw-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    align-content: start;
}

.example-card {
    background: #FAFAFE;
    border: 1.5px solid #C7D2FE;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.example-card:hover {
    background: #EEF2FF;
    border-color: #6366F1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.example-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #312E81;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.example-card-ref {
    font-size: 12px;
    color: #4F46E5;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.example-card-theme {
    font-size: 11px;
    color: #6366F1;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.example-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.example-card-tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
}

.style-tag-card {
    background: #EEF2FF;
    color: #4338CA;
}

.mood-tag-card {
    background: #F5F3FF;
    color: #6D28D9;
}

.example-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #818CF8;
    padding: 30px;
    font-size: 13px;
}

/* ========== 滚动条 ========== */
.history-list::-webkit-scrollbar,
.slw-input-body::-webkit-scrollbar,
.result-content::-webkit-scrollbar,
.slw-modal-body::-webkit-scrollbar {
    width: 5px;
}

.history-list::-webkit-scrollbar-track,
.slw-input-body::-webkit-scrollbar-track,
.result-content::-webkit-scrollbar-track,
.slw-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb,
.slw-input-body::-webkit-scrollbar-thumb,
.result-content::-webkit-scrollbar-thumb,
.slw-modal-body::-webkit-scrollbar-thumb {
    background: #C7D2FE;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.slw-input-body::-webkit-scrollbar-thumb:hover,
.result-content::-webkit-scrollbar-thumb:hover,
.slw-modal-body::-webkit-scrollbar-thumb:hover {
    background: #818CF8;
}

/* ========== 暗黑模式 ========== */
body.dark .slw-container {
    background: #1A1730;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

body.dark .slw-toolbar {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4C1D95 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .slw-main-content {
    background: #1A1730;
}

body.dark .slw-history-panel {
    background: #1E1B4B;
    border-right-color: #312E81;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #1E1B4B, #252060);
    border-bottom-color: #312E81;
}

body.dark .history-panel-header h3 {
    color: #A5B4FC;
}

body.dark .history-count {
    color: #818CF8;
}

body.dark .history-clear-btn {
    background: #2D1B1B;
    border-color: #7F1D1D;
    color: #FCA5A5;
}

body.dark .history-clear-btn:hover {
    background: #3B1F1F;
    border-color: #DC2626;
}

body.dark .history-search {
    border-bottom-color: #312E81;
}

body.dark .history-search input {
    background: #252060;
    border-color: #312E81;
    color: #C7D2FE;
}

body.dark .history-search input:focus {
    border-color: #818CF8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

body.dark .history-empty {
    color: #6366F1;
}

body.dark .history-item {
    background: #252060;
    border-color: #312E81;
}

body.dark .history-item:hover {
    background: #2D2674;
    border-color: #6366F1;
}

body.dark .history-item.active {
    background: #312E81;
    border-color: #818CF8;
    box-shadow: 0 1px 4px rgba(129, 140, 248, 0.25);
}

body.dark .history-item-delete {
    background: #3B1F1F;
    color: #FCA5A5;
}

body.dark .history-item-delete:hover {
    background: #DC2626;
    color: #fff;
}

body.dark .history-item-title {
    color: #A5B4FC;
}

body.dark .history-item-badge {
    background: #312E81;
    color: #A5B4FC;
}

body.dark .history-item-time {
    color: #6366F1;
}

body.dark .history-list::-webkit-scrollbar-thumb {
    background: #312E81;
}

body.dark .history-list::-webkit-scrollbar-thumb:hover {
    background: #6366F1;
}

body.dark .slw-input-panel {
    background: #1E1B4B;
    border-right-color: #312E81;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #1E1B4B, #252060);
    border-bottom-color: #312E81;
}

body.dark .panel-header h3 {
    color: #A5B4FC;
}

body.dark .panel-tip {
    color: #6366F1;
}

body.dark .form-label {
    color: #A5B4FC;
}

body.dark .form-hint {
    color: #6366F1;
}

body.dark .slw-input {
    background: #252060;
    border-color: #312E81;
    color: #C7D2FE;
}

body.dark .slw-input:focus {
    border-color: #818CF8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
    background: #2D2674;
}

body.dark .slw-input::placeholder {
    color: #4338CA;
}

body.dark .slw-textarea {
    background: #252060;
    border-color: #312E81;
    color: #C7D2FE;
}

body.dark .slw-textarea:focus {
    border-color: #818CF8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
    background: #2D2674;
}

body.dark .slw-textarea::placeholder {
    color: #4338CA;
}

body.dark .char-counter {
    color: #6366F1;
}

body.dark .char-counter.warn-limit {
    color: #F59E0B;
}

body.dark .char-counter.over-limit {
    color: #F87171;
    font-weight: 600;
}

body.dark .slw-select {
    background-color: #252060;
    border-color: #312E81;
    color: #C7D2FE;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23818CF8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.dark .slw-select:focus {
    border-color: #818CF8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

body.dark .slw-tips-box {
    background: linear-gradient(135deg, #1E1B4B, #252060);
    border-color: #312E81;
    border-left-color: #6366F1;
    color: #A5B4FC;
}

body.dark .slw-tips-box p {
    color: #C7D2FE;
}

body.dark .slw-tips-box kbd {
    background: #312E81;
    border-color: #4338CA;
    color: #A5B4FC;
}

body.dark .slw-input-body::-webkit-scrollbar-thumb {
    background: #312E81;
}

body.dark .slw-input-body::-webkit-scrollbar-thumb:hover {
    background: #6366F1;
}

body.dark .slw-result-panel {
    background: #1E1B4B;
}

body.dark .slw-result-header {
    background: linear-gradient(to bottom, #1E1B4B, #252060);
    border-bottom-color: #312E81;
}

body.dark .slw-result-header h3 {
    color: #A5B4FC;
}

body.dark .result-rewrite-btn {
    background: #252060;
    border-color: #312E81;
    color: #A5B4FC;
}

body.dark .result-rewrite-btn:hover {
    background: #2D2674;
    border-color: #818CF8;
    box-shadow: 0 2px 6px rgba(129, 140, 248, 0.2);
}

body.dark .result-style-badge {
    background: #252060;
    color: #A5B4FC;
    border-color: #312E81;
}

body.dark .result-mood-badge {
    background: #2D1B4E;
    color: #C4B5FD;
    border-color: #4C1D95;
}

body.dark .result-placeholder {
    color: #6366F1;
}

body.dark .placeholder-note {
    background: linear-gradient(135deg, #1E1B4B, #252060);
    border-color: #312E81;
    color: #818CF8;
}

body.dark .placeholder-title {
    color: #818CF8;
}

body.dark .placeholder-desc {
    color: #6366F1;
}

body.dark .music-waves span {
    background: linear-gradient(to top, #818CF8, #C4B5FD);
}

body.dark .loading-text {
    color: #A5B4FC;
}

body.dark .result-content {
    background: #1A1730;
}

body.dark .result-content .lyrics-title {
    color: #C7D2FE;
}

body.dark .result-content .style-tag {
    background: #252060;
    color: #A5B4FC;
    border-color: #312E81;
}

body.dark .result-content .mood-tag {
    background: #2D1B4E;
    color: #C4B5FD;
    border-color: #4C1D95;
}

body.dark .result-content .ref-tag {
    background: #1A2E1A;
    color: #86EFAC;
    border-color: #166534;
}

body.dark .result-content .lyrics-section {
    background: #1E1B4B;
    border-color: #312E81;
}

body.dark .result-content .lyrics-section:hover {
    border-color: #6366F1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

body.dark .result-content .lyrics-section-label {
    color: #818CF8;
    border-bottom-color: #312E81;
}

body.dark .result-content .chorus-label {
    color: #A78BFA;
}

body.dark .result-content .bridge-label {
    color: #38BDF8;
}

body.dark .result-content .interlude-label {
    color: #34D399;
}

body.dark .result-content .lyrics-line {
    color: #C7D2FE;
}

body.dark .result-content .chorus-lines .lyrics-line {
    color: #A5B4FC;
}

body.dark .result-content .lyrics-line:hover {
    color: #818CF8;
}

body.dark .result-content .lyrics-title::after {
    background: linear-gradient(90deg, #4C1D95, #7E2553);
}

body.dark .result-content .lyrics-note {
    color: #6366F1;
    border-top-color: #312E81;
}

body.dark .result-error-inner {
    background: #2D1B1B;
    border-left-color: #EF4444;
}

body.dark .result-error-msg {
    color: #A5B4FC;
}

body.dark .result-error-retry {
    background: linear-gradient(135deg, #312E81, #4C1D95);
}

body.dark .result-error-retry:hover {
    background: linear-gradient(135deg, #1E1B4B, #312E81);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark .result-content::-webkit-scrollbar-thumb {
    background: #312E81;
}

body.dark .result-content::-webkit-scrollbar-thumb:hover {
    background: #6366F1;
}

body.dark .slw-modal-overlay {
    background: rgba(0, 0, 0, 0.65);
}

body.dark .slw-modal {
    background: #1E1B4B;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

body.dark .slw-modal-body {
    background: #1A1730;
}

body.dark .example-loading {
    color: #6366F1;
}

body.dark .example-card {
    background: #252060;
    border-color: #312E81;
}

body.dark .example-card:hover {
    background: #2D2674;
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

body.dark .example-card-label {
    color: #A5B4FC;
}

body.dark .example-card-ref {
    color: #818CF8;
}

body.dark .example-card-theme {
    color: #6366F1;
}

body.dark .style-tag-card {
    background: #252060;
    color: #A5B4FC;
}

body.dark .mood-tag-card {
    background: #2D1B4E;
    color: #C4B5FD;
}

body.dark .slw-modal-body::-webkit-scrollbar-thumb {
    background: #312E81;
}

body.dark .slw-modal-body::-webkit-scrollbar-thumb:hover {
    background: #6366F1;
}

/* ========== 响应式布局 ========== */
@media (max-width: 900px) {
    .slw-history-panel {
        display: none;
    }

    .slw-input-panel {
        width: 300px;
        min-width: 240px;
    }
}

@media (max-width: 639px) {
    .slw-main-content {
        flex-direction: column;
    }

    .slw-input-panel {
        width: 100%;
        min-width: unset;
        max-height: 45vh;
        border-right: none;
        border-bottom: 1px solid #C7D2FE;
    }

    .slw-result-panel {
        min-width: unset;
    }

    body.dark .slw-input-panel {
        border-right: none;
        border-bottom-color: #312E81;
    }
}
