body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f6f2ef; /* 背景色を追加 */

}

#result {
    margin-top: 20px;
    margin-bottom: 40px; /* 余白を追加 */

}

img {
    width: 60%;
    max-width: 1000px;
}

/* ヘッダー画像 */
header img {
    width: 100%;
    max-height: 300px; /* 高さを制限 */
    object-fit: cover; /* 画像をトリミングしてバランスよく表示 */
    margin-top: 50px; /* `top-header` の高さ + 余白分 */
}

/* フォーム全体のレイアウト */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 15px 0;
}

/* 各セレクトボックスのグループ */
.select-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
}

/* ラベル */
.select-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

/* セレクトボックス */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    background-color: white;
    border: 1px solid #dedad7;
    color: #333;
    font-size: 16px;
    font-weight: normal;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
    
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="%238f8c89"><path d="M7 10l5 5 5-5H7z"></path></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 30px;
    
    width: 100%;
}

/* セレクトボックスのホバー & フォーカス */
select:hover {
    border-color: #a19b97;
}

select:focus {
    border-color: #ff6600;
    box-shadow: 0px 0px 8px rgba(255, 102, 0, 0.5);
}

/* 🎵 再生ボタン */
button {
    background-color: #ff6600;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.1s;
}

button:hover {
    background-color: #e65c00;
}

/* 🎼 MIDI ダウンロードボタン */
.midi-button {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 20px;
    background-color: #0073e6;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: 0.3s;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.midi-button:hover {
    background-color: #005bb5;
    box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.3);
}




/* 拡大表示のためのオーバーレイ */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* 背景を半透明の黒にする */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 拡大画像 */
.modal img {
    max-width: 90%;
    max-height: 90%;
    transition: transform 0.3s ease-in-out;
}

/* 拡大時のアニメーション */
.modal.show img {
    transform: scale(1.1);
}




/* ページ全体のレイアウトを調整 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}




/* フッターのデザイン */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    margin-top: auto; /* これでフッターが常に一番下に配置される */
}



.footer-links {
    margin-bottom: 5px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    transition: 0.3s;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #ff6600;
}

.copyright {
    margin: 0;
    font-size: 12px;
}





/* 新しいヘッダー（フッターと同じデザイン） */
.top-header {
    position: fixed;  /* 画面の上部に固定 */
    top: 0;           /* 上端に配置 */
    left: 0;          /* 左端に配置 */
    width: 100%;      /* 横幅を100%にする */
    background-color: #333;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 20px;
    font-size: 14px;
    z-index: 1000;    /* 他の要素より前面に表示 */
}


/* 左側のロゴ＋サイト名 */
.header-left {
    display: flex;
    align-items: center;
}

/* ロゴとテキストを横並び */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none; /* リンクの下線を消す */
    color: white; /* テキストを白に */
}

/* ロゴ画像 */
.logo-container img {
    height: 30px; /* ロゴの高さ（調整可） */
    width: auto;
    display: block;
}

/* サイト名（ロゴの隣のテキスト） */
.site-title {
    font-size: 16px;
    font-weight: 400;
    margin-left: 10px; /* ロゴとの間隔 */
}

/* 右側のメニューボタン */
.header-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* ボタンを右端に寄せすぎない */
    margin-right: 10px; /* 右側に余白を確保 */
}

/* メニューボタン */
.menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px; /* ボタン内の余白を調整 */
    margin-right: 20px; /* 右側の余白を追加 */
    transition: 0.3s;
    display: flex; /* アイコンを中央揃え */
    align-items: center;
    justify-content: center;
}



/* 「≡」の部分だけオレンジに変更 */
.menu-button span {
    display: inline-block;
}

/* ホバー時に「≡」だけをオレンジにする */
.menu-button span:hover {
    color: #ff6600;
}







/* ドロップダウンメニュー */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 20px; /* 右端ギリギリではなく、少しだけ余白を確保 */
    top: 35px;
    min-width: 250px; /* メニューの幅を適切に確保 */
    background: white;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    overflow: hidden;
    z-index: 1000;
}

/* メニューのリンク */
.dropdown-menu a {
    display: block;
    padding: 12px 15px; /*  内側の余白を広げて、ゆとりを持たせる */
    font-size: 14px; /*  文字サイズを少し大きく */
    text-decoration: none;
    color: #333;
    transition: 0.3s;
    text-align: left; /* 左揃えに変更 */
}

.dropdown-menu a:hover {
    background: #ff6600;
    color: white;
}









/* アフェリエイトのバナー広告 */

a[href*="a8.net"] > img {
    width: 468px !important;
    height: 60px !important;
    max-width: 468px !important;
    max-height: 60px !important;
    object-fit: contain;
}





a[href*="accesstrade.net"] > img {
    width: 200px !important;
    height: 200px !important;
    max-width: 200px !important;
    max-height: 200px !important;
    object-fit: contain;
}





/* クリック範囲を画像のみに制限 */
/* リンクを中央寄せ＆クリック範囲を画像のみに制限 */
a[href*="a8.net"],
a[href*="accesstrade.net"] {
    display: inline-block;
    margin: 30px auto;
    line-height: 0;
    text-align: center;
}

/* 画像を中央に表示し、アスペクト比を維持 */
a[href*="a8.net"] > img {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 468px;
    aspect-ratio: 468 / 60;
    object-fit: contain;
}

a[href*="accesstrade.net"] > img {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1; /* 200x200の正方形広告の場合 */
    object-fit: contain;
}














/* スマホ対応 */
@media (max-width: 600px) {
    img {
        width: 80%;
    }
    
    .midi-button {
        width: 60%;
        font-size: 18px;
    }

    .select-group {
        width: 40%;
    }

    select {
        font-size: 18px;
        padding: 12px;
    }


}




/* スマホでバナーが画面に収まるように */
@media (max-width: 600px) {
    a[href*="a8.net"] > img {
        width: auto !important;
        height: auto !important;
        max-width: 90% !important;
    }

    a[href*="accesstrade.net"] > img {
        width: auto !important;
        height: auto !important;
        max-width: 100% !important;
    }
}





    footer {
        padding: 6px 0;
        font-size: 12px;
    }









}
