@charset "UTF-8";
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

h1 {
    margin: 0;
}

main {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.sidebar {
    width: 250px;
    margin-right: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: fit-content; /* 内容に合わせて高さを調整 */
}

.sidebar h2 {
    margin-top: 0;
    color: #555;
}

.filter-section {
    margin-bottom: 15px;
}

.filter-title {
    cursor: pointer;
    background-color: #e9e9e9;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.filter-options {
    /*max-heightはJavaScriptで設定するため削除
    max-height: 0;*/
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.filter-options.open {
    max-height: 200px; /* 十分な高さに設定 */
    padding-top: 10px;
}

.filter-options label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

#apply-filters {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 1em;
    margin-top: 15px;
}

#apply-filters:hover {
    background-color: #0056b3;
}

.music-list {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.music-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 15px;
    text-align: center;
}

.music-card h3 {
    margin-top: 0;
    color: #333;
}

.music-card .youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 アスペクト比 */
    height: 0;
    overflow: hidden;
    margin-bottom: 10px;
}

.music-card .youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.music-card button {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
}

.music-card button:hover {
    background-color: #218838;
}

.music-card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.music-card .download-count {
    font-weight: bold;
    color: #007bff;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #333;
    color: #fff;
    margin-top: 40px;
}

