/* ============================================
   Suno Style Generator - 风格化界面
   ============================================ */

:root {
    /* 主色调 - 深邃的紫罗兰与温暖的琥珀 */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    
    /* 背景色 - 深色主题 */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: rgba(26, 26, 36, 0.8);
    --bg-card-hover: rgba(32, 32, 44, 0.9);
    
    /* 文字色 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* 边框与分割 */
    --border: rgba(139, 92, 246, 0.2);
    --border-light: rgba(255, 255, 255, 0.08);
    
    /* 状态色 */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-card: linear-gradient(145deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* 字体 */
    --font-display: 'Outfit', 'Noto Sans SC', sans-serif;
    --font-body: 'Noto Sans SC', 'Outfit', sans-serif;
    
    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============ App Container ============ */
.app {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ Background Decoration ============ */
.bg-decoration {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
    top: 50%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(10px, 30px) scale(1.02); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* ============ Header ============ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: white;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary-light);
    background: rgba(139, 92, 246, 0.15);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 0.5rem;
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-light);
}

.user-info-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    cursor: default;
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), #f5a623);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.user-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav-btn-logout {
    background: transparent;
    padding: 0.5rem;
}

.nav-btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    box-shadow: none;
}

.nav-btn-logout svg {
    color: var(--text-secondary);
}

.nav-btn-logout:hover svg {
    color: var(--error);
}

/* ============ Main Content ============ */
.main {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============ Sections ============ */
.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* ============ Generator Grid ============ */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .generator-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ Panel ============ */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.panel:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: var(--shadow-glow);
}

.panel-header {
    padding: 1.25rem 1.5rem;
    background: var(--gradient-card);
    border-bottom: 1px solid var(--border-light);
}

.panel-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-title .icon {
    font-size: 1.5rem;
}

.panel-content {
    padding: 1.5rem;
}

/* ============ Style Categories ============ */
.style-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.style-category {
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.style-category:hover {
    background: var(--bg-card-hover);
    border-color: var(--border);
    transform: translateY(-2px);
}

.style-category.selected {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.category-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.category-name-en {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============ Style Tags ============ */
.style-tags-wrapper {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.tags-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.style-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.style-tag:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.style-tag.selected {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--accent);
    color: var(--accent-light);
}

/* ============ Style Mode Tabs ============ */
.style-mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.style-mode-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.style-mode-tab:hover {
    color: var(--text-secondary);
    background: rgba(139, 92, 246, 0.1);
}

.style-mode-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.style-mode-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ Scene Presets ============ */
.scene-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scene-preset {
    padding: 0.5rem 0.8rem;
    background: linear-gradient(135deg, var(--bg-tertiary), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--border-light);
    border-radius: 100px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.scene-preset:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.scene-preset.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* ============ Advanced Style Options ============ */
.advanced-style-options {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-style-toggle .toggle-icon {
    transition: transform var(--transition-fast);
    font-size: 0.7rem;
}

.advanced-style-toggle.open .toggle-icon {
    transform: rotate(90deg);
}

.advanced-style-options {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.8) 0%, rgba(25, 20, 40, 0.6) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.style-option-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

.style-option-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.style-option-group:first-child {
    padding-top: 0;
}

.style-option-group .input-label {
    flex-shrink: 0;
    width: 110px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    padding-top: 0.35rem;
}

.style-option-group .input-label .optional {
    display: block;
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 0.15rem;
}

.style-option-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    flex: 1;
}

.style-chip {
    padding: 0.4rem 0.85rem;
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.style-chip:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.style-chip.active {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.style-option-chips.multi-select .style-chip.active {
    background: linear-gradient(135deg, var(--accent) 0%, #f472b6 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

/* 响应式：小屏幕标签换行 */
@media (max-width: 640px) {
    .style-option-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .style-option-group .input-label {
        width: auto;
        padding-top: 0;
    }
    
    .style-option-group .input-label .optional {
        display: inline;
        margin-left: 0.25rem;
    }
}

/* ============ Tiny Button ============ */
.btn-tiny {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 0.5rem;
}

.btn-tiny:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============ Style Prompt Editor ============ */
.style-prompt-editor {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.style-prompt-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--primary-light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    transition: all var(--transition-fast);
}

.style-prompt-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
}

.style-prompt-textarea::placeholder {
    color: var(--text-muted);
}

/* ============ Style Preview (deprecated, kept for compatibility) ============ */
.style-preview {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.preview-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-content {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--primary-light);
    word-break: break-word;
}

/* ============ URL Input Zone ============ */
.url-input-zone {
    margin-bottom: 1.5rem;
}

.audio-url-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.audio-url-row .input-field {
    flex: 1;
    min-width: 0;
}

.preview-audio-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.preview-audio-btn:not(:disabled):hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.preview-audio-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.preview-audio-btn.playing {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(139, 92, 246, 0.15);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.preview-audio-btn.playing .icon-play { display: none; }
.preview-audio-btn.playing .icon-pause { display: block !important; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ============ Removed Upload Zone - Use Song Library Instead ============ */

.btn-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ============ Form Group ============ */
.form-group {
    margin-bottom: 1.25rem;
}

.checkbox-group {
    margin-top: 1.5rem;
}

/* 选项行（纯音乐 + 演唱者选择） */
.options-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.singer-gender-select,
.generation-times-select {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.input-label-inline {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.select-field {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    transition: all var(--transition-fast);
}

.select-field:hover {
    border-color: var(--border);
}

.select-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* ============ Advanced Parameters ============ */
.advanced-params-section {
    margin-top: 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.advanced-params-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.advanced-params-header:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.advanced-params-header .toggle-icon {
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
}

.advanced-params-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-version-select {
    padding: 0.15rem 0.4rem;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    color: var(--accent-primary, #a78bfa);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.3rem center;
    padding-right: 1.2rem;
}

.model-version-select:hover {
    border-color: var(--accent-primary, #a78bfa);
    background-color: rgba(139, 92, 246, 0.18);
}

.model-version-select:focus {
    outline: none;
    border-color: var(--accent-primary, #a78bfa);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.model-version-select option {
    background: var(--bg-primary, #1a1a2e);
    color: var(--text-primary, #e2e8f0);
}

.advanced-params-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.advanced-params-reset:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.08);
}

.advanced-params-reset svg {
    flex-shrink: 0;
}

.advanced-params-header.expanded .toggle-icon {
    transform: rotate(90deg);
}

.advanced-params-content {
    padding: 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.param-slider-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.param-slider-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.param-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.param-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--primary-light);
    min-width: 2.5rem;
    text-align: right;
}

.param-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.param-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.param-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.negative-tags-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.negative-tags-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.negative-tags-input::placeholder {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-generate {
    width: 100%;
    padding: 1.25rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md), 0 0 30px rgba(139, 92, 246, 0.3);
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(139, 92, 246, 0.4);
}

.btn-generate:active:not(:disabled) {
    transform: translateY(0);
}

.btn-generate .btn-icon {
    font-size: 1.25rem;
}

.btn-refresh {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
}

.btn-refresh:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-refresh svg {
    width: 18px;
    height: 18px;
}

/* ============ Tasks Section ============ */
.section-tasks {
    margin-top: 4rem;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ============ Task Card ============ */
.task-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.task-card:hover {
    border-color: var(--border);
    background: var(--bg-card-hover);
}

.task-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-status-indicator.pending { background: var(--text-muted); animation: pulse 2s infinite; }
.task-status-indicator.uploading { background: var(--info); animation: pulse 1s infinite; }
.task-status-indicator.processing { background: var(--primary); animation: pulse 0.8s infinite; }
.task-status-indicator.retrying { background: var(--warning); animation: pulse 0.5s infinite; }
.task-status-indicator.completed { background: var(--success); }
.task-status-indicator.failed { background: var(--error); }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.task-info {
    flex: 0 0 480px;  /* 固定宽度 */
    min-width: 0;
    max-width: 480px;
}

.task-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.task-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.task-status-text {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.task-status-text.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.task-status-text.processing,
.task-status-text.pending,
.task-status-text.uploading {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
}

.task-status-text.failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.task-retry,
.task-key-shift {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
}

.task-lyrics-obfuscation {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.task-persona-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
    white-space: nowrap;
}

.task-style {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    word-break: break-word;
    
    /* 限制最多显示4行，超出用省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* 鼠标悬停时的提示 */
    cursor: default;
    position: relative;
}

/* 鼠标悬停时显示完整内容 */
.task-style:hover {
    -webkit-line-clamp: unset;
    overflow: visible;
    background: var(--bg-card);
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.task-error {
    font-size: 0.7rem;
    color: var(--error);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.task-player {
    margin-top: 0.75rem;
}

.task-player audio {
    width: 100%;
    height: 40px;
    border-radius: var(--radius-sm);
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-task {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-download {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.btn-download:hover {
    background: rgba(16, 185, 129, 0.3);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--text-muted);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ============ Footer ============ */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-light);
}

/* ============ Toast Notifications ============ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.toast.info {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.1);
}

/* STEM 分轨进度提示 */
.toast.stems-progress-toast {
    padding: 1rem 1.5rem;
    min-width: 280px;
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.15);
}

.stems-progress-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stems-progress-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: rgba(168, 85, 247, 1);
    animation: stemsSpin 2s linear infinite;
}

.stems-progress-icon svg {
    width: 100%;
    height: 100%;
}

.stems-progress-text {
    flex: 1;
    min-width: 0;
}

.stems-progress-message {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stems-progress-bar {
    height: 4px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.stems-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(168, 85, 247, 1), rgba(236, 72, 153, 1));
    border-radius: 2px;
    transition: width 0.3s ease;
}

@keyframes stemsSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* STEM 分轨下载面板 */
.stems-download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stems-download-overlay.active {
    opacity: 1;
}

.stems-download-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    min-width: 320px;
    max-width: 90vw;
    opacity: 0;
    transition: all 0.3s ease;
}

.stems-download-panel.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.stems-download-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.stems-download-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stems-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.stems-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.stems-download-body {
    padding: 1.5rem;
}

.stems-download-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 1.25rem 0;
}

.stems-download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.stems-download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.stems-download-btn svg {
    width: 32px;
    height: 32px;
}

.stems-download-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

.stems-download-btn.instrumental {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
    color: rgb(96, 165, 250);
}

.stems-download-btn.instrumental:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.stems-download-btn.vocal {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.05));
    border-color: rgba(236, 72, 153, 0.3);
    color: rgb(244, 114, 182);
}

.stems-download-btn.vocal:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(236, 72, 153, 0.1));
    border-color: rgba(236, 72, 153, 0.5);
    transform: translateY(-2px);
}

.stems-download-btn.downloaded {
    opacity: 0.7;
    cursor: default;
}

.stems-download-btn:disabled {
    cursor: wait;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ============ Audio Results Grid ============ */
.audio-results {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0;
    margin-left: auto;
    align-self: center;
}

.audio-card {
    width: 85px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    position: relative;
}

/* 点赞歌曲流动边框效果 - 增强版 */
.audio-card.liked {
    border: none;
    transform: scale(1.02);
    animation: likedPulse 3.5s ease-in-out infinite;
    z-index: 5;  /* 确保点赞卡片在其他卡片之上，红心不被遮挡 */
}

.audio-card.liked::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--radius-sm) + 3px);
    background: linear-gradient(
        90deg,
        #ff0844 0%,
        #ffb199 15%,
        #ff0844 30%,
        #ff6b6b 45%,
        #ffd93d 60%,
        #6bcb77 75%,
        #4d96ff 90%,
        #ff0844 100%
    );
    background-size: 300% 100%;
    animation: flowingBorder 2s linear infinite;
    z-index: -1;
    filter: blur(1px);
}

/* 发光层 */
.audio-card.liked::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: calc(var(--radius-sm) + 6px);
    background: linear-gradient(
        90deg,
        rgba(255, 8, 68, 0.5),
        rgba(255, 215, 0, 0.5),
        rgba(0, 255, 127, 0.5),
        rgba(0, 191, 255, 0.5),
        rgba(255, 8, 68, 0.5)
    );
    background-size: 300% 100%;
    animation: flowingBorder 2s linear infinite;
    z-index: -2;
    filter: blur(8px);
    opacity: 0.6;
}

@keyframes flowingBorder {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes likedPulse {
    0%, 100% { 
        transform: scale(1.02);
        box-shadow: 0 0 15px rgba(255, 8, 68, 0.35);
    }
    50% { 
        transform: scale(1.04);
        box-shadow: 0 0 25px rgba(255, 8, 68, 0.5);
    }
}

/* 点赞标记角标默认隐藏 */
.audio-like-badge {
    display: none;
}

/* 点赞标记角标 - 增强版 */
.audio-card.liked .audio-like-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ff0844 0%, #ff4d6d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 8, 68, 0.6), 0 0 15px rgba(255, 8, 68, 0.4);
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

.audio-card.liked .audio-like-badge svg {
    width: 12px;
    height: 12px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.audio-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.audio-card.playing {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.audio-card-cover {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    overflow: hidden;
}

.audio-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.audio-card:hover .audio-card-cover img {
    transform: scale(1.05);
}

/* 没有封面时的默认渐变背景 */
.audio-card-cover.no-cover {
    background: linear-gradient(135deg, 
        #1a1a2e 0%, 
        #16213e 25%, 
        #0f3460 50%, 
        #533483 75%, 
        #e94560 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.audio-card-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
}

.audio-card-cover-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 歌曲信息叠加在图片底部 */
.audio-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.35rem 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
}

.audio-card-title {
    font-weight: 600;
    font-size: 0.7rem;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.audio-card-duration {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.audio-card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.audio-card:hover .audio-card-play-overlay {
    opacity: 1;
}

.audio-card-play-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.5);
}

.audio-card-play-btn svg {
    width: 14px;
    height: 14px;
    margin-left: 2px;
}

.audio-card.playing .audio-card-play-overlay {
    opacity: 1;
}

.audio-card.playing .audio-card-play-btn {
    background: var(--accent);
}

/* ============ Global Player ============ */
/* ── 歌词面板 ── */

.lyrics-panel {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    height: 0;
    max-height: 0;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 2999;
    overflow: hidden;
    transition: max-height 0.35s ease, height 0.35s ease;
}

.lyrics-panel.open {
    height: 280px;
    max-height: 280px;
}

.lyrics-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lyrics-panel-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lyrics-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.lyrics-panel-close:hover {
    color: var(--text-primary);
}

.lyrics-panel-content {
    height: calc(100% - 36px);
    overflow-y: auto;
    padding: 1rem 2rem;
    scroll-behavior: smooth;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 15%,
        black 85%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 15%,
        black 85%,
        transparent 100%
    );
}

.lyrics-panel-content::-webkit-scrollbar {
    width: 4px;
}

.lyrics-panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.lyrics-line {
    text-align: center;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: default;
    line-height: 1.6;
}

.lyrics-line.lrc {
    cursor: pointer;
}

.lyrics-line.lrc:hover {
    color: var(--text-secondary);
}

.lyrics-line.active {
    color: var(--primary-light);
    font-size: 1.05rem;
    font-weight: 600;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.lyrics-empty,
.lyrics-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 3rem 0;
    font-style: italic;
}

.player-lyrics-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.player-lyrics-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.player-lyrics-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    z-index: 3000;  /* 高于模态框 z-index: 2000 */
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.global-player.active {
    transform: translateY(0);
}

.player-cover {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    position: relative;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.player-cover-placeholder svg {
    width: 28px;
    height: 28px;
}

.player-cover img:not([src=""]) + .player-cover-placeholder {
    display: none;
}

.player-info {
    flex: 0 0 180px;
    min-width: 0;
}

.player-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-style {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.player-btn svg {
    width: 20px;
    height: 20px;
}

.player-play {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
}

.player-play:hover {
    background: var(--primary-light);
    color: white;
    transform: scale(1.05);
}

.player-play svg {
    width: 24px;
    height: 24px;
}

.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.progress-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Consolas', monospace;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.progress-bar:hover .progress-fill::after {
    opacity: 1;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

/* 播放器点赞按钮 */
.player-like {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

.player-like-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.player-like-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    transform: scale(1.1);
}

.player-like-btn.liked {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.player-like-btn.liked:hover {
    background: rgba(239, 68, 68, 0.3);
}

.player-like-btn svg {
    width: 18px;
    height: 18px;
}

.player-like-btn.liked .icon-heart-outline {
    display: none;
}

.player-like-btn.liked .icon-heart-filled {
    display: block !important;
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 播放器下载按钮 */
.player-download {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
    position: relative;
}

.player-download-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.player-download-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    color: var(--text-primary);
}

.player-download-btn svg {
    width: 16px;
    height: 16px;
}

.player-download-btn .dropdown-arrow {
    width: 12px;
    height: 12px;
    margin-left: 0.2rem;
    transition: transform var(--transition-fast);
}

.player-download.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* 下载菜单 */
.download-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    min-width: 140px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
}

.player-download.open .download-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.download-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.download-menu-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.download-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.download-menu-item + .download-menu-item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* 有播放器时给 body 添加底部 padding */
body.has-player {
    padding-bottom: 80px;
}

body.has-player .footer {
    margin-bottom: 80px;
}

/* toast 在顶部，不受播放器影响 */

/* ============ Task Card 改进 ============ */
.task-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.task-card-body {
    flex: 1;
}

.task-card .audio-results {
    flex: 1;
    flex-shrink: 0;
    min-width: 0;
}

/* 删除任务按钮 */
.task-hide-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    color: var(--error);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.task-hide-btn svg {
    width: 12px;
    height: 12px;
}

.task-card:hover .task-hide-btn {
    opacity: 1;
}

.task-hide-btn:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
    transform: scale(1.1);
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .main {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .style-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .task-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-info {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }
    
    .task-actions {
        width: 100%;
        margin-top: 1rem;
    }
    
    .task-actions .btn {
        flex: 1;
    }
    
    .global-player {
        height: auto;
        flex-wrap: wrap;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .player-info {
        flex: 1;
        order: 1;
    }
    
    .player-cover {
        order: 0;
        width: 48px;
        height: 48px;
    }
    
    .player-controls {
        order: 2;
    }
    
    .player-progress {
        width: 100%;
        order: 3;
    }
    
    .player-volume {
        display: none;
    }
    
    .player-download-btn span {
        display: none;
    }
    
    .player-download-btn {
        padding: 0.5rem;
    }
    
    .audio-results {
        flex-wrap: wrap;
        justify-content: flex-start;
        max-width: 280px;
        margin-left: 0;
    }
    
    .audio-card {
        width: 80px;
    }
    
    .task-card {
        flex-direction: column;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .nav-btn {
        padding: 0.5rem;
    }
}

/* ============ Modal ============ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-large {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--gradient-card);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-actions .btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
}

.modal-actions .btn svg {
    width: 16px;
    height: 16px;
}

/* 添加歌曲按钮特殊样式 */
#addSongBtn {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

#addSongBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* ============ Song Library ============ */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-bar .input-field {
    flex: 1;
}

.btn-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.btn-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.song-item:hover {
    border-color: var(--border);
    background: var(--bg-card-hover);
}

.song-item-cover {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.song-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-item-cover svg {
    width: 28px;
    height: 28px;
    opacity: 0.5;
}

.song-item-info {
    flex: 1;
    min-width: 0;
}

.song-item-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.song-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.song-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* 歌曲列表加载状态 */
.song-list-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.song-list-loading .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 歌曲列表底部提示 */
.song-list-end {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-light);
    margin-top: 0.5rem;
}

/* 加载触发器（不可见） */
.song-list-load-trigger {
    height: 1px;
    visibility: hidden;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-primary:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-primary.loading {
    position: relative;
    pointer-events: none;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btnSpin 0.8s linear infinite;
}

@keyframes btnSpin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-use {
    background: var(--gradient-accent);
    color: white;
}

.btn-use:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* ============ Song Edit Form ============ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.required {
    color: var(--error);
}

.textarea-large {
    min-height: 180px;
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.upload-placeholder svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.selected-file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
}

.selected-file-info .file-name {
    color: var(--success);
    font-weight: 500;
}

.btn-remove-file {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.existing-audio {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.audio-label {
    color: var(--text-secondary);
}

.audio-name {
    color: var(--info);
    font-weight: 500;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* ============ Nav Button ============ */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
}

/* ============ dragover state ============ */
.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

/* ============ Music Auto Complete ============ */
.auto-complete-section {
    position: relative;
}

.auto-complete-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.form-group-btn {
    padding-bottom: 0;
}

.btn-search-music {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    height: 48px;
}

.btn-search-music:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-search-music:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-search-music svg {
    width: 18px;
    height: 18px;
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    border: none;
}

.btn-accent:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* 搜索结果 */
.music-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 350px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--gradient-card);
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-close-sm {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.btn-close-sm:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.search-results-list {
    max-height: 280px;
    overflow-y: auto;
}

.music-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.music-result-item:last-child {
    border-bottom: none;
}

.music-result-item:hover {
    background: var(--bg-tertiary);
}

.music-result-cover {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.music-result-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-result-cover svg {
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

.music-result-info {
    flex: 1;
    min-width: 0;
}

.music-result-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-result-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.music-result-album {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    .auto-complete-section .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-search-music {
        width: 100%;
        justify-content: center;
    }
}

/* ============ 分页组件 ============ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }
}

/* ============ Persona 虚拟歌手 ============ */

.player-persona {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

.player-persona-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.player-persona-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    color: var(--primary);
    transform: scale(1.1);
}

.player-persona-btn svg {
    width: 18px;
    height: 18px;
}

/* Persona 选择器（生成表单中） */
.persona-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.persona-select .select-field {
    min-width: 120px;
}

/* Persona 创建弹窗 */
.modal-persona {
    max-width: 520px;
}

.vocal-range-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.vocal-range-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vocal-range-input label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.vocal-range-input .input-sm {
    width: 80px;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
}

.vocal-range-input .unit {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.vocal-range-hint {
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.persona-source-info {
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.persona-source-info .source-label {
    color: var(--text-muted);
    margin-right: 0.25rem;
}

@media (max-width: 768px) {
    .player-persona {
        margin-left: 0.25rem;
    }
    .persona-select {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ============ 账号策划面板 ============ */

.planner-panel {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.planner-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.planner-select {
    width: 100%;
    height: 42px;
    padding: 0 0.75rem;
}

.planner-template-preview {
    padding: 0.75rem 0.875rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.planner-template-preview strong {
    color: var(--text-primary);
    font-weight: 600;
}

.planner-template-preview .ptp-row {
    margin-top: 0.25rem;
}
.planner-template-preview .ptp-row:first-child {
    margin-top: 0;
}

.planner-generate-btn {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.planner-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.planner-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.planner-generate-btn.loading {
    pointer-events: none;
}

.motivation-input-wrapper {
    position: relative;
}

.motivation-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin-top: 2px;
}

.motivation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 0.85rem;
}

.motivation-item:hover {
    background: var(--bg-card-hover);
}

.motivation-item.motivation-empty {
    cursor: default;
    color: var(--text-muted);
    font-style: italic;
    justify-content: center;
}

.motivation-text {
    flex: 1;
    color: var(--text-primary);
}

.motivation-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.planner-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.planner-result {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.875rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
}

.planner-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.planner-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.planner-result-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.planner-brief {
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-secondary);
    padding: 0.625rem 0.75rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    border-left: 2px solid #8b5cf6;
}

.planner-sections {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.planner-sections::-webkit-scrollbar {
    width: 4px;
}
.planner-sections::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.planner-section-item {
    padding: 0.5rem 0.625rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.75rem;
}

.planner-section-item .pst-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.planner-section-item .pst-type {
    font-weight: 600;
    color: #a78bfa;
}

.planner-section-item .pst-arrangement {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: right;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.planner-section-item .pst-content {
    color: var(--text-secondary);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.planner-result-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.planner-apply-btn {
    height: 34px;
    padding: 0 0.875rem;
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.planner-apply-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    color: #fff;
}

.planner-applied-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
}

/* ============ AI 策划聊天样式 (已废弃，保留兼容) ============ */

.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 4px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

/* 欢迎消息 */
.ai-chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
    gap: 0.75rem;
}

.ai-avatar {
    font-size: 2.5rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 50%;
}

.ai-welcome-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* 聊天气泡 */
.ai-chat-bubble {
    display: flex;
    gap: 0.5rem;
    max-width: 88%;
    animation: chatFadeIn 0.25s ease;
}

@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-chat-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-chat-assistant {
    align-self: flex-start;
}

.ai-avatar-small {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-bubble-content {
    padding: 0.625rem 0.875rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    line-height: 1.6;
    word-break: break-word;
}

.ai-chat-user .ai-bubble-content {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-chat-assistant .ai-bubble-content {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

/* 思考中动画 */
.ai-chat-thinking .ai-bubble-content {
    color: var(--text-muted);
}

.thinking-dots span {
    animation: thinkingBounce 1.2s infinite;
    display: inline-block;
    font-size: 1.2em;
    font-weight: bold;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* 操作按钮 */
.ai-chat-action {
    align-self: flex-start;
    margin-left: 2.25rem;
    animation: chatFadeIn 0.25s ease;
}

.ai-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

/* 输入区域 */
.ai-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}

.ai-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    resize: none;
    min-height: 36px;
    max-height: 100px;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.ai-chat-input::placeholder {
    color: var(--text-muted);
}

.ai-chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255,255,255,0.03);
}

.ai-chat-send-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.ai-chat-send-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.ai-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-chat-send-btn:disabled:hover {
    background: var(--primary);
    transform: none;
}

@media (max-width: 768px) {
    .ai-chat-container {
        height: 350px;
    }
}

