/* css/style.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary: #667eea; --secondary: #764ba2; --dark: #1a1a2e; --light: #f8f9fa; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); min-height: 100vh; color: #fff; }

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

/* 头部 */
.header { display: flex; justify-content: center; align-items: center; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 30px; }
.logo { font-size: 28px; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* 搜索区域 */
.search-section { background: rgba(255,255,255,0.05); backdrop-filter: blur(10px); border-radius: 20px; padding: 40px; margin-bottom: 30px; border: 1px solid rgba(255,255,255,0.1); }
.search-title { font-size: 24px; margin-bottom: 25px; text-align: center; }

/* 音源选择 */
.source-selector { display: flex; justify-content: center; gap: 10px; margin-bottom: 25px; }
.source-btn { padding: 8px 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; color: #fff; cursor: pointer; transition: all 0.3s; font-size: 14px; }
.source-btn.active { background: var(--primary); border-color: var(--primary); }
.source-btn:hover { background: var(--secondary); }

/* 搜索框 */
.search-box { display: flex; gap: 15px; max-width: 700px; margin: 0 auto; }
.search-input { flex: 1; padding: 15px 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; color: #fff; font-size: 16px; outline: none; transition: all 0.3s; }
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus { border-color: var(--primary); background: rgba(255,255,255,0.15); }
.search-btn { padding: 15px 30px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none; border-radius: 12px; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.search-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3); }

/* 歌曲列表 */
.results-section { background: rgba(255,255,255,0.05); backdrop-filter: blur(10px); border-radius: 20px; padding: 30px; border: 1px solid rgba(255,255,255,0.1); }
.results-title { font-size: 20px; margin-bottom: 20px; }
.song-list { display: grid; gap: 15px; }
.song-item { 
    background: rgba(255,255,255,0.05); 
    border-radius: 12px; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; /* 改为垂直布局以容纳音质按钮 */
    gap: 15px; 
    transition: all 0.3s; 
    border: 1px solid transparent; 
}
.song-item:hover { background: rgba(255,255,255,0.1); border-color: var(--primary); transform: translateX(5px); }

.song-info-row { display: flex; align-items: center; gap: 20px; }
.song-cover { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: linear-gradient(135deg, var(--primary), var(--secondary)); flex-shrink: 0; }
.song-info { flex: 1; min-width: 0; }
.song-title { font-size: 16px; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist { font-size: 14px; color: rgba(255,255,255,0.6); }
.song-album { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 3px; }

/* 每首歌独立的音质选择按钮组 (新增) */
.song-quality { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    padding: 10px; 
    background: rgba(0,0,0,0.2); 
    border-radius: 8px; 
}
.quality-btn { 
    font-size: 12px; 
    padding: 4px 12px; 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 12px; 
    background: rgba(255,255,255,0.05); 
    color: rgba(255,255,255,0.6); 
    cursor: pointer; 
    transition: all 0.2s; 
    user-select: none;
}
.quality-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.quality-btn.active { 
    background: var(--primary); 
    border-color: var(--primary); 
    color: #fff; 
    font-weight: bold; 
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* 操作按钮 */
.song-actions { display: flex; gap: 10px; justify-content: flex-end; }
.action-btn { padding: 8px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.3s; }
.btn-play { background: var(--primary); color: #fff; }
.btn-play:hover { background: var(--secondary); }
.btn-download { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.btn-download:hover { background: rgba(255,255,255,0.2); }

/* 加载状态 */
.loading { text-align: center; padding: 40px; color: rgba(255,255,255,0.6); }
.loading::after { content: ''; display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-left: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.no-results { text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.5); }

/* 响应式 */
@media (max-width: 768px) {
    .song-info-row { flex-direction: column; text-align: center; }
    .song-actions { justify-content: center; }
}
/* css/style.css */

/* ... (保留之前的所有CSS代码) ... */

/* ==================== 下载提示弹窗样式 (修改) ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: #1e293b;
    color: #fff;
    width: 90%;
    max-width: 420px;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
}

.modal-overlay.show .modal-box {
    transform: translateY(0);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

.modal-desc {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 文件名显示区域 (改为 Flex 布局，左字右按钮) */
.file-name-display {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0; /* 移除padding，让按钮贴边 */
    margin-bottom: 20px;
    display: flex; /* Flex 布局 */
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

/* 左侧文件名文本 */
.filename-text {
    padding: 12px 15px;
    flex: 1; /* 占据剩余空间 */
    font-family: 'JetBrains Mono', monospace, 'Courier New', monospace;
    font-size: 14px;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 文字过长显示省略号 */
}

/* 右侧复制小按钮 */
.btn-icon-copy {
    width: 45px;
    height: 100%;
    min-height: 44px; /* 保证高度 */
    background: #334155;
    border: none;
    border-left: 1px solid #475569;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.btn-icon-copy:hover {
    background: #475569;
    color: #fff;
}

/* 弹窗按钮组 */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

/* 确认下载按钮 */
.btn-confirm-download {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-confirm-download:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 关闭按钮 */
.btn-modal-close {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
