/* MIDI 下载器样式 */

.midi-download-wrapper {
    padding: 15px;
    max-width: 100%;
}

.midi-download-title h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.midi-download-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.midi-download-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.midi-download-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.midi-download-btn {
    padding: 8px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.midi-download-btn:hover {
    background-color: #45a049;
}

.midi-download-status {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    min-height: 20px;
}

.midi-download-status.loading {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

.midi-download-status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.midi-download-status.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #e57373;
}

.midi-files-title h5 {
    margin: 15px 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.midi-refresh-btn {
    padding: 6px 15px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 10px;
}

.midi-refresh-btn:hover {
    background-color: #1976d2;
}

.midi-files-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.no-files {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.midi-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
    gap: 10px;
}

.midi-file-item:hover {
    background-color: #f0f0f0;
}

.midi-file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.midi-file-size {
    font-size: 12px;
    color: #666;
    min-width: 60px;
    text-align: right;
}

.midi-file-buttons {
    display: flex;
    gap: 5px;
}

.midi-file-buttons .btn {
    padding: 4px 12px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.midi-file-buttons .btn-success {
    background-color: #4CAF50;
    color: white;
}

.midi-file-buttons .btn-success:hover {
    background-color: #45a049;
}

.midi-file-buttons .btn-danger {
    background-color: #f44336;
    color: white;
}

.midi-file-buttons .btn-danger:hover {
    background-color: #da190b;
}

/* 滚动条样式 */
.midi-files-list::-webkit-scrollbar {
    width: 8px;
}

.midi-files-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.midi-files-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.midi-files-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============= MusicXML 转换按钮样式 ============= */

.midi-file-buttons .btn-info {
    background-color: #17a2b8;
    color: white;
}

.midi-file-buttons .btn-info:hover {
    background-color: #138496;
}

.midi-file-buttons .btn-primary {
    background-color: #007bff;
    color: white;
}

.midi-file-buttons .btn-primary:hover {
    background-color: #0056b3;
}

/* MusicXML 文件列表区域 */
.musicxml-files-title {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.musicxml-files-title h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.musicxml-files-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.musicxml-file-item {
    background-color: #f0f8ff;
    border-left: 3px solid #17a2b8;
}

.musicxml-file-item:hover {
    background-color: #e6f3ff;
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .midi-download-title h4,
    .midi-files-title h5,
    .musicxml-files-title h5 {
        color: #fff;
    }
    
    .midi-download-input {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
    
    .midi-files-list,
    .musicxml-files-list {
        border-color: rgba(255, 255, 255, 0.1);
        background-color: rgba(0, 0, 0, 0.2);
    }
    
    .midi-file-item {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .midi-file-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .musicxml-file-item {
        background-color: rgba(23, 162, 184, 0.1);
    }
    
    .musicxml-file-item:hover {
        background-color: rgba(23, 162, 184, 0.2);
    }
    
    .midi-file-name {
        color: #fff;
    }
    
    .midi-file-size {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .no-files {
        color: rgba(255, 255, 255, 0.5);
    }
}
