/* ========== 下载页面专属样式 ========== */
.download-card { background: #fff; border-radius: 24px; padding: 30px 28px; margin-bottom: 30px; box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 12px 28px rgba(0,0,0,0.08), 0 20px 40px -12px rgba(0,0,0,0.12); border: 1px solid rgba(255,255,255,0.8); }
.breadcrumb-nav { font-size: 0.9rem; margin-bottom: 20px; background: #f8f9fa; padding: 8px 15px; border-radius: 8px; }
.breadcrumb-nav a { color: #6366f1; text-decoration: none; }
.breadcrumb-nav a:hover { text-decoration: underline; }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; gap: 10px; }
.table-header h4 { white-space: nowrap; flex-shrink: 0; }
.header-controls { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap !important; }
.search-box { max-width: 200px; flex-shrink: 1; min-width: 0; }
.header-controls .btn, .header-controls a.btn { flex-shrink: 0; white-space: nowrap; }
.file-table { width: 100%; border-collapse: collapse; }
.file-table th, .file-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e9ecef; }
.file-table th { font-weight: 600; color: #475569; font-size: 0.85rem; }
.file-table tr:hover { background: #f8fafc; }
.file-table .file-name { color: #1e293b; text-decoration: none; word-break: break-all; }
.file-table .file-name:hover { color: #6366f1; }
.dir-link { font-weight: 600; color: #1e466e; display: flex; align-items: center; gap: 6px; text-decoration: none; }
.dir-link:hover { color: #6366f1; }
.file-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.file-icon.img { color: #10b981; } .file-icon.txt { color: #6366f1; } .file-icon.audio { color: #f59e0b; }
.file-icon.video { color: #ef4444; } .file-icon.archive { color: #8b5cf6; } .file-icon.exe { color: #06b6d4; }
.file-icon.default { color: #94a3b8; }
.btn-xs { padding: 3px 10px; font-size: 0.75rem; border-radius: 5px; white-space: nowrap; }
.file-name-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.file-name-actions .file-name { flex: 1 1 auto; min-width: 0; }
.operation-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; white-space: nowrap; }

/* 预览弹窗 */
#previewModal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.7); z-index:99999; align-items:center; justify-content:center; }
#previewModal.show { display:flex; }
#previewModal .preview-content { background:#fff; border-radius:16px; max-width:95vw; max-height:95vh; overflow:auto; box-shadow:0 20px 50px rgba(0,0,0,0.3); position:relative; padding:20px; display:flex; flex-direction:column; align-items:center; min-width:300px; min-height:200px; width: auto; }
#previewModal .preview-close { position:absolute; top:12px; right:16px; font-size:28px; color:#666; cursor:pointer; background:none; border:none; line-height:1; z-index:10; }
#previewModal .preview-close:hover { color:#000; }
.preview-image { max-width:100%; max-height:80vh; display:block; margin:0 auto; border-radius:8px; }
.preview-text { white-space:pre-wrap; word-break:break-all; font-family:monospace; font-size:0.9rem; background:#f8f9fa; padding:16px; border-radius:8px; max-height:70vh; overflow:auto; width:100%; }

/* 播放器 */
.player-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}
.player-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    padding: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.player-artwork {
    width: 140px; height: 140px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(99,102,241,0.3);
    flex-shrink: 0;
}
.player-artwork.hidden { display: none; }
.player-title { font-size: 1rem; font-weight: 600; color: #1e293b; margin-bottom: 16px; text-align: center; word-break: break-all; }
.controls { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 16px; }
.play-pause { background: #6366f1; color: #fff; border: none; border-radius: 50%; width: 44px; height: 44px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.1s; flex-shrink: 0; box-shadow: 0 4px 12px rgba(99,102,241,0.4); }
.play-pause:hover { background: #4f46e5; transform: scale(1.05); }
.progress-container { flex: 1; height: 6px; background: #e2e8f0; border-radius: 3px; cursor: pointer; position: relative; }
.progress-bar { height: 100%; background: #6366f1; border-radius: 3px; width: 0%; transition: width 0.15s; }
.time-display { font-size: 0.8rem; color: #64748b; white-space: nowrap; min-width: 70px; text-align: right; }
.loading-spinner { width: 30px; height: 30px; border: 3px solid #e2e8f0; border-top-color: #6366f1; border-radius: 50%; animation: spin 0.8s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 移动端适配 */
@media (max-width: 768px) {
    .download-card { padding: 15px 10px; border-radius: 16px; }
    .breadcrumb-nav { font-size: 0.75rem; padding: 6px 8px; }
    .table-header { flex-direction: column; align-items: stretch; }
    .table-header h4 { margin-bottom: 8px; }
    .header-controls { width: 100%; flex-wrap: wrap; gap: 6px; }
    .search-box { flex: 1 1 100%; max-width: 100%; }
    .header-controls .btn { flex: 1 1 auto; }
    .file-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .file-table thead { display: none; }
    .file-table tbody, .file-table tr, .file-table td { display: block; }
    .file-table tr { margin-bottom: 12px; border: 1px solid #e9ecef; border-radius: 10px; padding: 10px; background: #fff; }
    .file-table td { border-bottom: none; padding: 4px 0; }
    .file-table td:first-child { font-weight: 600; }
    .file-table td:not(:first-child) { display: flex; justify-content: space-between; align-items: center; }
    .file-table td:not(:first-child)::before {
        content: attr(data-label);
        font-weight: 600;
        color: #475569;
        font-size: 0.75rem;
        margin-right: 10px;
        white-space: nowrap;
    }
    .file-name-actions { justify-content: flex-start; }
    .operation-actions { justify-content: flex-end; flex-shrink: 0; }
    #previewModal .preview-content { max-width: 95vw; max-height: 95vh; padding: 15px; }
    .player-wrapper { max-width: 100%; }
    .player-card { padding: 16px; }
    .player-artwork { width: 100px; height: 100px; margin-bottom: 12px; }
    .player-artwork i { font-size: 2.5rem; }
    .controls { gap: 8px; }
    .play-pause { width: 38px; height: 38px; font-size: 14px; }
    .time-display { min-width: 60px; font-size: 0.75rem; }
}

/* 系统镜像图标颜色 */
.file-icon.system { color: #3b82f6; }  /* 蓝色光盘 */

/* ========== 迷你音乐播放器（右下角固定） ========== */
.mini-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 9999;
    min-width: 260px;
    max-width: 320px;
    border: 1px solid rgba(0,0,0,0.05);
}
.mini-player-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.mini-player-info {
    display: flex;
    justify-content: center;
}
.mini-player-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mini-play-btn {
    background: #6366f1;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mini-progress-container {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.mini-progress-bar {
    height: 100%;
    background: #6366f1;
    border-radius: 3px;
    width: 0%;
    transition: width 0.15s;
}
.mini-time-display {
    font-size: 0.75rem;
    color: #64748b;
    min-width: 35px;
    text-align: right;
}

