/* Bilibili 音频下载器 - 全新 UI 预览样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 核心主色 - B站蓝 */
    --primary: #00a1d6;
    --primary-dark: #0087b8;
    --primary-light: #e6f7ff;

    /* 强调色系 - 温暖活力 */
    --accent-pink: #ff6b9d;
    --accent-orange: #ff9f43;
    --accent-purple: #a55eea;
    --accent-cyan: #36cfc9;

    /* 状态色 */
    --success: #52c41a;
    --error: #ff4d4f;
    --warning: #faad14;

    /* 背景色 - 多层次深色 */
    --bg-main: #0a0a14;
    --bg-card: #12121f;
    --bg-card-hover: #1a1a2e;
    --bg-input: #0d0d1a;
    --bg-elevated: #1e1e32;

    /* 文字层级 */
    --text-title: #ffffff;
    --text-body: #b8b8cc;
    --text-muted: #6b6b80;
    --text-secondary: #8b8b9e;

    /* 边框与分割 */
    --border: #2d2d44;
    --border-light: #3d3d5c;

    /* 渐变与光效 */
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient: linear-gradient(135deg, #00a1d6 0%, #36cfc9 100%);
    --pink-gradient: linear-gradient(135deg, #ff6b9d 0%, #ff9f43 100%);
    --glow-primary: 0 0 30px rgba(0, 161, 214, 0.3);
    --glow-accent: 0 0 30px rgba(255, 107, 157, 0.4);
    --glow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* 间距系统 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 28px;

    /* 圆角系统 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif;
    background: var(--bg-main);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(0, 161, 214, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 0%, rgba(102, 126, 234, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 50%, rgba(255, 107, 157, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 100% 50%, rgba(165, 94, 234, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 100%, rgba(54, 207, 201, 0.06) 0%, transparent 50%);
    color: var(--text-title);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* 预览标签 */
.preview-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    z-index: 1000;
    animation: pulse 2s ease-in-out infinite;
}

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

/* 头部 */
header {
    text-align: center;
    margin-bottom: 50px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.6));
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #b8b8cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 2px;
}

/* 两栏布局 */
.main-layout {
    display: flex;
    gap: 28px;
}

.left-column {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* 与 .right-column 一致：不加会被内容的 min-content 撑宽，导致搜索时整页变宽 */
    min-width: 0;
}

.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* 下载区域 */
.download-section,
.player-section,
.playlist-section,
.files-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl);
    border: 1px solid var(--border);
    box-shadow: var(--glow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.download-section::before,
.player-section::before,
.playlist-section::before,
.files-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.input-wrapper {
    display: flex;
    gap: 12px;
    position: relative;
}

.input-wrapper input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-title);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 161, 214, 0.15), 0 4px 12px rgba(0, 161, 214, 0.1);
}

.input-wrapper input:focus::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { width: 0; opacity: 0; }
    to { width: 60%; opacity: 1; }
}

.input-wrapper button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.input-wrapper button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.input-wrapper button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 161, 214, 0.4);
}

.input-wrapper button:hover::before {
    left: 100%;
}

.input-wrapper button:active {
    transform: translateY(0) scale(0.98);
}

.input-wrapper button .icon {
    width: 20px;
    height: 20px;
}

/* 进度条 */
.progress-container {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: rgba(0, 161, 214, 0.08);
    border: 1px solid rgba(0, 161, 214, 0.2);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px 0 0 4px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.progress-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#progressPercent {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 161, 214, 0.5);
}

.progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    animation: glowMove 2s linear infinite;
}

@keyframes glowMove {
    0% { transform: translateX(-60px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(200px); opacity: 0; }
}

/* 结果显示 */
.result-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(82, 196, 26, 0.1);
    border: 1px solid rgba(82, 196, 26, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.success-icon {
    width: 44px;
    height: 44px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
}

.success-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.success-content span {
    color: var(--success);
    font-weight: 600;
}

.success-content a {
    padding: 10px 20px;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

.success-content a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
}

/* 错误显示 */
.error-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 77, 79, 0.1);
    border: 1px solid rgba(255, 77, 79, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--error);
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: break-word;
}

.error-icon {
    width: 24px;
    height: 24px;
    background: var(--error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

#errorText {
    flex: 1;
    line-height: 1.4;
}

/* 播放器区域 */
.download-section:hover,
.player-section:hover,
.playlist-section:hover,
.files-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 161, 214, 0.1);
    border-color: var(--border-light);
}

/* 唱片机效果 */
.player-vinyl {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
}

.vinyl-record {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #1a1a2e 0%, #0a0a14 70%);
    box-shadow:
        0 0 0 4px #1a1a2e,
        0 0 0 8px #2d2d44,
        0 0 30px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    animation: rotate 8s linear infinite;
    animation-play-state: paused;
    border: 1px solid rgba(255,255,255,0.05);
}

.vinyl-record.playing {
    animation-play-state: running;
}

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

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

/* 唱片反光效果（仅保留高光，不叠加同心圆纹路） */
.vinyl-record::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%),
        linear-gradient(225deg, rgba(255,255,255,0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: 1;
}

/* 原唱片凹槽内圈描边，已移除以避免封面图上出现环状纹路 */

.player-info {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.player-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    margin: 0 auto;
}

.player-artist {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* 进度条 */
.player-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    pointer-events: none;
}

.progress-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: transform 0.2s;
}

.progress-track:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1.2);
}

/* 控制按钮 */
.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.player-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--text-title);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.player-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.player-btn:active::after {
    width: 100px;
    height: 100px;
}

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

.player-btn:hover {
    background: var(--border-light);
    transform: scale(1.08);
    border-color: var(--primary);
}

.player-btn.play-btn {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.player-btn.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.player-btn.play-btn:active {
    transform: scale(1.02);
}

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

/* 音量控制 */
.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 200px;
}

.volume-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.volume-track {
    flex: 1;
    height: 4px;
    background: #2d2d44;
    border-radius: 2px;
    position: relative;
}

.volume-level {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.volume-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* 歌词面板 */
.lyrics-section {
    width: 100%;
    max-width: 320px;
    margin-top: 6px;
}

.lyrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    user-select: none;
}

.lyrics-collapse-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.lyrics-collapse-btn:hover {
    color: var(--text-title);
}

.lyrics-collapse-btn svg {
    transition: transform 0.3s ease;
}

.lyrics-collapse-btn.collapsed svg {
    transform: rotate(180deg);
}

.lyrics-content {
    max-height: 240px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    padding: 10px 4px;
    transition: max-height 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

.lyrics-content.collapsed {
    max-height: 0;
    padding: 0;
    border-top: none;
    overflow: hidden;
}

.lyric-line {
    text-align: center;
    padding: 6px 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    opacity: 0.55;
    transition: color 0.3s, opacity 0.3s, transform 0.3s, text-shadow 0.3s;
}

.lyric-line.active {
    color: #667eea;
    font-weight: 600;
    opacity: 1;
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.45);
}

.lyric-line.done {
    opacity: 0.3;
}

/* 通用卡片样式 */
.playlist-section,
.files-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 20px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-title);
}

.section-icon {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.toggle-icon {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

/* 歌单样式 */
.playlist-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.playlist-header input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-title);
    font-size: 14px;
    transition: all 0.25s;
}

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

.playlist-header input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 161, 214, 0.1);
}

.playlist-header button {
    width: 44px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.playlist-header button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 161, 214, 0.4);
}

.playlist-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.playlist-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.03) 100%);
    pointer-events: none;
}

.playlist-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
    border-color: var(--border-light);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.1);
}

.playlist-cover {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.playlist-cover svg {
    width: 22px;
    height: 22px;
    color: white;
}

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

.playlist-name {
    font-weight: 500;
    color: var(--text-title);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.playlist-toggle {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 歌单详情展开动画 */
.playlist-detail {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.playlist-detail.expanded {
    max-height: none;
    height: auto;
    max-height: 60vh;
    overflow-y: auto;
    opacity: 1;
    margin-top: var(--space-sm);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
}

/* 文件列表 */
.files-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.select-all input {
    cursor: pointer;
    accent-color: var(--primary);
}

.add-playlist-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.add-playlist-btn:hover {
    background: var(--primary);
    color: white;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 70px;
    box-sizing: border-box;
}

.file-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-item:hover {
    background: var(--bg-card-hover);
    border-left-color: var(--primary);
    transform: translateX(4px);
}

.file-item:hover::before {
    transform: scaleY(1);
}

.file-item.active {
    background: linear-gradient(135deg, rgba(0, 161, 214, 0.15) 0%, rgba(54, 207, 201, 0.1) 100%);
    border-color: rgba(0, 161, 214, 0.4);
    border-left-color: var(--primary);
}

.file-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.file-cover {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.file-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.file-details {
    overflow: hidden;
}

.file-name {
    font-weight: 500;
    color: var(--text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    line-height: 1.3;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* 歌单内歌曲 - 使用与文件列表一致的样式 */
.playlist-song-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
}

.playlist-song-item:hover {
    background: var(--bg-card-hover);
    border-left-color: var(--primary);
    transform: translateX(4px);
}

.playlist-song-item .song-cover {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.playlist-song-item .song-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-song-item .song-remove {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.playlist-song-item:hover .song-remove {
    opacity: 1;
}

.playlist-song-item .song-remove:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.file-icon {
    font-size: 1.4rem;
    color: var(--primary);
}

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

.file-name {
    font-weight: 500;
    color: var(--text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.file-actions a,
.file-actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-actions a {
    background: var(--primary);
    color: white;
}

.file-actions a.play-action {
    background: var(--success);
}

.file-actions button {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
    cursor: pointer;
}

.file-actions a:hover,
.file-actions button:hover {
    transform: scale(1.15);
}

.file-actions a:active,
.file-actions button:active {
    transform: scale(0.95);
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 搜索功能区域 */
.search-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    overflow: hidden;
}

/* 搜视频 / 搜作者：直接触发搜索的按钮，与输入框同一行。
   选择器需比上面的 .search-input-group button 更具体，
   否则会被其 width/height:44px 的方形图标按钮样式压成方块。 */
.search-input-group .search-mode-btn {
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 0 14px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.search-input-group .search-mode-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-title);
    transform: none;
    box-shadow: none;
}

.search-input-group .search-mode-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.search-input-group .search-mode-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.search-load-more {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-load-more:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.search-load-more:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.search-load-more.loading {
    position: relative;
    color: transparent;
}

.search-load-more.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid var(--text-muted);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.search-input-group {
    display: flex;
    gap: 8px;
    box-sizing: border-box;
}

.search-input-group input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-title);
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

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

.search-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 161, 214, 0.15), 0 4px 12px rgba(0, 161, 214, 0.1);
}

.search-input-group button {
    width: 44px;
    height: 44px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-group button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 161, 214, 0.3);
}

.search-input-group button:active {
    transform: scale(0.98);
}

.search-results {
    margin-top: 12px;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    box-sizing: border-box;
    width: 100%;
}

.search-results.has-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-loading,
.search-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    box-sizing: border-box;
    width: 100%;
}

/* 作者搜索回退模式提示：结果不完整，如实告知 */
.search-partial-tip {
    padding: 8px 10px;
    margin-bottom: 4px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #d9a441;
    background: rgba(217, 164, 65, 0.08);
    border: 1px solid rgba(217, 164, 65, 0.28);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    width: 100%;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    min-width: 0;
    box-sizing: border-box;
}

.search-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 0 20px rgba(0, 161, 214, 0.15);
}

.search-item-cover {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

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

.search-item-title {
    font-weight: 500;
    color: var(--text-title);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.search-item-download {
    padding: 6px 12px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    white-space: nowrap;
}

.search-item-download:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 161, 214, 0.4);
}

/* 模态框样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-title);
}

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

.modal-close:hover {
    background: var(--bg-elevated);
    color: var(--text-title);
}

.modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.modal-playlist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 8px;
}

.modal-playlist-item:last-child {
    margin-bottom: 0;
}

.modal-playlist-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateX(4px);
}

.modal-playlist-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.modal-playlist-info {
    flex: 1;
    min-width: 0;
}

.modal-playlist-name {
    font-weight: 500;
    color: var(--text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-playlist-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.modal-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #3d3d5c;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4d4d6c;
}

/* 响应式 */
@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }
    .left-column {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px 16px;
    }
    header h1 {
        font-size: 1.6rem;
    }
    .input-wrapper {
        flex-direction: column;
    }
    .input-wrapper button {
        justify-content: center;
    }
    .player-vinyl {
        width: 150px;
        height: 150px;
    }
}