/* ========== 写一首歌 - 容器 ========== */
.song-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f5f3ff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(99, 62, 183, 0.08);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.song-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.song-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #6c3fc5 0%, #a855f7 50%, #ec4899 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(108, 63, 197, 0.4);
    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: 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: #6c3fc5;
    border-color: transparent;
    font-weight: 600;
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: #5b32a8;
}

.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);
}

/* ========== 主内容区 ========== */
.song-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f5f3ff;
}

/* ========== 左栏：历史记录 ========== */
.song-history-panel {
    width: 200px;
    background: #ffffff;
    border-right: 1px solid #e9d5ff;
    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, #faf5ff, #f3e8ff);
    border-bottom: 1px solid #e9d5ff;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6c3fc5;
}

.history-count {
    font-size: 11px;
    color: #a855f7;
    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 #e9d5ff;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #ddd6fe;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #faf5ff;
    color: #374151;
}

.history-search input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.12);
}

.history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
}

.history-empty {
    text-align: center;
    color: #a78bfa;
    font-size: 12px;
    padding: 24px 12px;
    line-height: 1.8;
}

.history-item {
    padding: 9px 10px;
    margin: 3px 0;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-item:hover {
    background: #f3e8ff;
    border-color: #c4b5fd;
    transform: translateX(2px);
}

.history-item.active {
    background: #ede9fe;
    border-color: #a855f7;
    box-shadow: 0 1px 4px rgba(168, 85, 247, 0.2);
}

.history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #fce7f3;
    color: #ec4899;
    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: #ec4899;
    color: white;
}

.history-item-theme {
    font-size: 12px;
    font-weight: 600;
    color: #4c1d95;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
    padding-right: 18px;
}

.history-item-meta {
    font-size: 11px;
    color: #7c3aed;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.history-item-badge {
    background: #ede9fe;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}

.history-item-time {
    font-size: 10px;
    color: #a78bfa;
    margin-top: 3px;
}

/* ========== 中栏：创作输入 ========== */
.song-input-panel {
    width: 360px;
    min-width: 300px;
    background: #ffffff;
    border-right: 1px solid #e9d5ff;
    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, #faf5ff, #f3e8ff);
    border-bottom: 1px solid #e9d5ff;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6c3fc5;
}

.panel-tip {
    font-size: 11px;
    color: #a78bfa;
}

.song-input-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

/* 表单组 */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-group-half {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
    margin-bottom: 7px;
}

.form-label-icon {
    font-size: 14px;
}

.form-required {
    color: #ec4899;
    font-size: 13px;
}

.form-optional {
    color: #a78bfa;
    font-size: 11px;
    font-weight: 400;
}

.song-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd6fe;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #faf5ff;
    color: #374151;
    min-height: 68px;
}

.song-textarea:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
    background: #fff;
}

.song-textarea::placeholder {
    color: #c4b5fd;
    font-size: 12px;
}

/* shake 校验动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.song-textarea.shake {
    animation: shake 0.4s ease;
    border-color: #ec4899 !important;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15) !important;
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: #a78bfa;
    margin-top: 3px;
}

.song-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd6fe;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    background: #faf5ff;
    color: #374151;
    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='%23a855f7' 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;
}

.song-select:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

/* 结构选项 */
.structure-options {
    display: flex;
    gap: 8px;
}

.structure-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border: 1.5px solid #ddd6fe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #faf5ff;
    text-align: center;
}

.structure-option:hover {
    border-color: #a855f7;
    background: #f3e8ff;
}

.structure-option.selected {
    border-color: #7c3aed;
    background: #ede9fe;
    box-shadow: 0 1px 4px rgba(124, 58, 237, 0.2);
}

.structure-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.structure-name {
    font-size: 12px;
    font-weight: 600;
    color: #4c1d95;
}

.structure-desc {
    font-size: 10px;
    color: #7c3aed;
    margin-top: 2px;
}

/* 提示框 */
.song-tips-box {
    background: linear-gradient(135deg, #fdf4ff, #faf5ff);
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #6b21a8;
    margin-top: 4px;
}

.song-tips-box p {
    margin: 0 0 8px;
    font-weight: 600;
    color: #4c1d95;
}

.song-tips-box ul {
    margin: 0;
    padding-left: 16px;
    line-height: 1.9;
}

.song-tips-box kbd {
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    border-radius: 3px;
    padding: 0 5px;
    font-size: 11px;
    color: #5b21b6;
    font-family: inherit;
}

/* ========== 右栏：生成结果 ========== */
.song-result-panel {
    flex: 1;
    min-width: 300px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.song-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #faf5ff, #f3e8ff);
    border-bottom: 1px solid #e9d5ff;
    flex-shrink: 0;
}

.song-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6c3fc5;
}

.result-meta-info {
    display: flex;
    gap: 6px;
    align-items: center;
}

.result-style-badge,
.result-mood-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.result-style-badge {
    background: #ede9fe;
    color: #6c3fc5;
}

.result-mood-badge {
    background: #fdf2f8;
    color: #be185d;
}

.song-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: #a78bfa;
    min-height: 200px;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #7c3aed;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 13px;
    color: #a78bfa;
    margin: 3px 0;
}

/* 加载动画（音乐波形） */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.music-wave {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    margin-bottom: 16px;
}

.music-wave span {
    display: block;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(to top, #7c3aed, #ec4899);
    animation: wave 1.2s ease-in-out infinite;
}

.music-wave span:nth-child(1) { height: 20px; animation-delay: 0s; }
.music-wave span:nth-child(2) { height: 35px; animation-delay: 0.15s; }
.music-wave span:nth-child(3) { height: 26px; animation-delay: 0.3s; }
.music-wave span:nth-child(4) { height: 38px; animation-delay: 0.45s; }
.music-wave span:nth-child(5) { height: 22px; animation-delay: 0.6s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
    50%       { transform: scaleY(1.2); opacity: 1; }
}

.loading-text {
    font-size: 14px;
    color: #7c3aed;
    font-weight: 500;
    margin: 0;
}

/* 结果内容 */
.result-content {
    flex: 1;
    min-height: 0;
    padding: 20px 24px;
    overflow-y: auto;
    line-height: 1.8;
    animation: resultFadeIn 0.35s ease;
}

@keyframes resultFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 歌词内容样式（由 AI 返回 HTML） */
.result-content .song-result {
    max-width: 640px;
    margin: 0 auto;
}

.result-content .song-title {
    font-size: 22px;
    font-weight: 800;
    color: #4c1d95;
    text-align: center;
    margin-bottom: 18px;
    letter-spacing: 2px;
    padding-bottom: 14px;
    position: relative;
}

.result-content .song-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    border-radius: 3px;
}

.result-content .song-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.result-content .song-style-tag {
    background: #ede9fe;
    color: #6c3fc5;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.result-content .song-mood-tag {
    background: #fdf2f8;
    color: #be185d;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.result-content .song-section {
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #faf5ff;
    border-radius: 10px;
    border-left: 4px solid #a855f7;
}

.result-content .song-section-label {
    font-size: 12px;
    font-weight: 700;
    color: #7c3aed;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: #ede9fe;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
}

.result-content .song-lyrics p {
    margin: 0 0 5px;
    font-size: 15px;
    color: #1f2937;
    line-height: 2;
    letter-spacing: 0.3px;
}

.result-content .song-note {
    font-size: 12px;
    color: #7c3aed;
    border-top: 1px dashed #e9d5ff;
    padding-top: 14px;
    margin-top: 8px;
    font-style: italic;
}

/* 错误提示 */
.result-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #dc2626;
    min-height: 200px;
    font-size: 14px;
    gap: 10px;
}

.result-error::before {
    content: '⚠️';
    font-size: 36px;
}

.result-error-retry {
    margin-top: 6px;
    padding: 8px 22px;
    background: linear-gradient(135deg, #6c3fc5, #a855f7);
    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, #5b32a8, #9333ea);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 63, 197, 0.3);
}

/* ========== 示例模态框 ========== */
.song-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(76, 29, 149, 0.35);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    backdrop-filter: blur(2px);
}

.song-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.song-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: 680px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(76, 29, 149, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.song-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.song-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #6c3fc5, #a855f7);
    color: #fff;
    flex-shrink: 0;
}

.song-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.song-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

.song-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.example-card {
    padding: 14px 16px;
    background: #faf5ff;
    border: 1.5px solid #e9d5ff;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-card:hover {
    border-color: #a855f7;
    background: #f3e8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.example-card-label {
    font-size: 14px;
    font-weight: 700;
    color: #4c1d95;
    margin-bottom: 6px;
}

.example-card-theme {
    font-size: 12px;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.5;
}

.example-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.example-card-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 8px;
    font-weight: 500;
}

.example-card-tag.style-tag {
    background: #ede9fe;
    color: #6c3fc5;
}

.example-card-tag.mood-tag {
    background: #fdf2f8;
    color: #be185d;
}

.example-card-tag.structure-tag {
    background: #f0fdf4;
    color: #15803d;
}

/* 示例弹窗加载占位 */
.example-loading {
    text-align: center;
    padding: 32px;
    color: #a78bfa;
    font-size: 13px;
}

/* ========== 自定义滚动条 ========== */
.history-list::-webkit-scrollbar,
.song-input-body::-webkit-scrollbar,
.result-content::-webkit-scrollbar,
.song-modal-body::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track,
.song-input-body::-webkit-scrollbar-track,
.result-content::-webkit-scrollbar-track,
.song-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb,
.song-input-body::-webkit-scrollbar-thumb,
.result-content::-webkit-scrollbar-thumb,
.song-modal-body::-webkit-scrollbar-thumb {
    background: #ddd6fe;
    border-radius: 4px;
    transition: background 0.2s;
}

.history-list::-webkit-scrollbar-thumb:hover,
.song-input-body::-webkit-scrollbar-thumb:hover,
.result-content::-webkit-scrollbar-thumb:hover,
.song-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* ========== 响应式布局 ========== */
@media (min-width: 640px) and (max-width: 899px) {
    .song-history-panel { display: none; }
    .song-input-panel { width: 320px; }
}

@media (max-width: 639px) {
    .song-main-content { flex-direction: column; }
    .song-history-panel { display: none; }
    .song-input-panel { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid #e9d5ff; max-height: 55%; }
    .song-result-panel { min-width: unset; }
    .form-row { flex-direction: column; gap: 8px; }
}

/* ========== 暗黑模式 ========== */
body.dark .song-container {
    background: #1a1025;
}

body.dark .song-toolbar {
    background: linear-gradient(135deg, #3b0764 0%, #581c87 50%, #831843 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark .song-main-content {
    background: #1a1025;
}

body.dark .song-history-panel,
body.dark .song-input-panel,
body.dark .song-result-panel {
    background: #12091e;
    border-color: #3b1f6e;
}

body.dark .history-panel-header,
body.dark .panel-header,
body.dark .song-result-header {
    background: linear-gradient(to bottom, #1e0d33, #170b2c);
    border-color: #3b1f6e;
}

body.dark .history-panel-header h3,
body.dark .panel-header h3,
body.dark .song-result-header h3 {
    color: #c4b5fd;
}

body.dark .panel-tip {
    color: #7c3aed;
}

body.dark .history-search input {
    background: #1a1025;
    border-color: #4c1d95;
    color: #e5e7eb;
}

body.dark .history-search input::placeholder {
    color: #6d28d9;
}

body.dark .history-list {
    background: #12091e;
}

body.dark .history-empty {
    color: #6d28d9;
}

body.dark .history-item {
    background: #1e0d33;
    border-color: #3b1f6e;
    color: #e5e7eb;
}

body.dark .history-item:hover {
    background: #2d1057;
    border-color: #7c3aed;
}

body.dark .history-item.active {
    background: #2d1057;
    border-color: #a855f7;
}

body.dark .history-item-theme {
    color: #d8b4fe;
}

body.dark .history-item-meta {
    color: #9f7aea;
}

body.dark .history-item-badge {
    background: #2d1057;
}

body.dark .history-item-time {
    color: #7c3aed;
}

body.dark .history-clear-btn {
    background: #1e0d33;
    border-color: #6b21a8;
    color: #e879f9;
}

body.dark .history-clear-btn:hover {
    background: #2d1057;
}

body.dark .song-input-body {
    background: #12091e;
}

body.dark .form-label {
    color: #c4b5fd;
}

body.dark .song-textarea {
    background: #1e0d33;
    border-color: #4c1d95;
    color: #e5e7eb;
}

body.dark .song-textarea:focus {
    border-color: #a855f7;
    background: #1e0d33;
}

body.dark .song-textarea::placeholder {
    color: #6d28d9;
}

body.dark .song-select {
    background-color: #1e0d33;
    border-color: #4c1d95;
    color: #e5e7eb;
    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='%23c4b5fd' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.dark .song-select option {
    background: #1e0d33;
}

body.dark .structure-option {
    background: #1e0d33;
    border-color: #4c1d95;
}

body.dark .structure-option:hover {
    background: #2d1057;
    border-color: #7c3aed;
}

body.dark .structure-option.selected {
    background: #2d1057;
    border-color: #a855f7;
}

body.dark .structure-name {
    color: #d8b4fe;
}

body.dark .structure-desc {
    color: #9f7aea;
}

body.dark .song-tips-box {
    background: linear-gradient(135deg, #1e0d33, #17082b);
    border-color: #3b1f6e;
    color: #9f7aea;
}

body.dark .song-tips-box p {
    color: #c4b5fd;
}

body.dark .song-tips-box kbd {
    background: #2d1057;
    border-color: #7c3aed;
    color: #d8b4fe;
}

body.dark .char-counter {
    color: #7c3aed;
}

body.dark .result-placeholder {
    color: #6d28d9;
}

body.dark .placeholder-title {
    color: #a855f7;
}

body.dark .placeholder-desc {
    color: #7c3aed;
}

body.dark .loading-text {
    color: #a855f7;
}

body.dark .result-content {
    background: #12091e;
}

body.dark .result-content .song-title {
    color: #e9d5ff;
}

body.dark .result-content .song-title::after {
    background: linear-gradient(90deg, #a855f7, #f472b6);
}

body.dark .result-content .song-style-tag {
    background: #2d1057;
    color: #d8b4fe;
}

body.dark .result-content .song-mood-tag {
    background: #3b0a2c;
    color: #f9a8d4;
}

body.dark .result-content .song-section {
    background: #1e0d33;
    border-left-color: #7c3aed;
}

body.dark .result-content .song-section-label {
    background: #2d1057;
    color: #c4b5fd;
}

body.dark .result-content .song-lyrics p {
    color: #e5e7eb;
    letter-spacing: 0.3px;
}

body.dark .result-content .song-note {
    color: #9f7aea;
    border-top-color: #3b1f6e;
}

body.dark .result-error {
    color: #fca5a5;
}

body.dark .result-error-retry {
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
}

body.dark .result-error-retry:hover {
    background: linear-gradient(135deg, #5b21b6, #8b5cf6);
}

body.dark .song-modal {
    background: #1a1025;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

body.dark .song-modal-header {
    background: linear-gradient(135deg, #3b0764, #6b21a8);
}

body.dark .song-modal-body {
    background: #1a1025;
}

body.dark .example-card {
    background: #1e0d33;
    border-color: #3b1f6e;
}

body.dark .example-card:hover {
    border-color: #7c3aed;
    background: #2d1057;
}

body.dark .example-card-label {
    color: #d8b4fe;
}

body.dark .example-card-theme {
    color: #d1d5db;
}

body.dark .example-card-tag.style-tag {
    background: #2d1057;
    color: #c4b5fd;
}

body.dark .example-card-tag.mood-tag {
    background: #3b0a2c;
    color: #f9a8d4;
}

body.dark .example-card-tag.structure-tag {
    background: #052e16;
    color: #6ee7b7;
}

/* 暗黑模式 - 示例加载占位 */
body.dark .example-loading {
    color: #7c3aed;
}

body.dark .result-style-badge {
    background: #2d1057;
    color: #d8b4fe;
}

body.dark .result-mood-badge {
    background: #3b0a2c;
    color: #f9a8d4;
}

/* 暗黑模式自定义滚动条 */
body.dark .history-list::-webkit-scrollbar-thumb,
body.dark .song-input-body::-webkit-scrollbar-thumb,
body.dark .result-content::-webkit-scrollbar-thumb,
body.dark .song-modal-body::-webkit-scrollbar-thumb {
    background: #4c1d95;
}

body.dark .history-list::-webkit-scrollbar-thumb:hover,
body.dark .song-input-body::-webkit-scrollbar-thumb:hover,
body.dark .result-content::-webkit-scrollbar-thumb:hover,
body.dark .song-modal-body::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}
