/* サイト全体の設定 */
body {
    background-color: #ffffff; /* 純粋な白 */
    color: #111; /* ほぼ黒の文字色 */
    font-family: 'Courier New', monospace, 'Avenir', sans-serif; 
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center; 
}

.container {
    max-width: 500px; 
    width: 100%;
    text-align: center;
}

/* ヘッダーデザイン */
header {
    padding: 30px 0;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

h1 {
    font-size: 24px;
    letter-spacing: 0.1em; 
    margin-bottom: 5px;
}

.description {
    color: #555;
    font-size: 14px;
}

/* ナビゲーションメニューのデザイン */
.main-nav {
    display: flex; 
    justify-content: center;
    margin: 25px 0 40px 0;
    padding: 0 10px;
    border-top: 1px solid #eee; 
    border-bottom: 1px solid #eee;
}

.main-nav a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    padding: 10px 15px;
    margin: 0 5px;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #111;
}

/* フィーチャーセクション（プロモ）のデザイン */
.featured-content {
    border: 1px solid #111; 
    background-color: transparent;
    padding: 25px;
    margin: 30px auto;
}

.album-art {
    width: 80%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    border-radius: 0; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.listen-button {
    background-color: transparent;
    border: 1px solid #111;
    color: #111;
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: normal;
    border-radius: 0;
    margin-top: 10px;
    transition: background-color 0.3s;
}
.listen-button:hover {
    background-color: #B0E0E6;
    border-color: #B0E0E6;
    color: #111;
}

/* YouTube動画をレスポンシブ対応させるためのCSS */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 の縦横比を維持 */
    margin-bottom: 20px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* リンクボタンのデザイン (SNSハブ) */
.link-list a {
    display: block; 
    width: 100%; 
    margin: 0 auto 10px auto; 
    padding: 12px;
    text-decoration: none;
    font-weight: normal;
    color: #111;
    border: 1px solid #111; 
    border-radius: 0; 
    background-color: transparent;
    transition: all 0.2s;
}

.link-list a:hover {
    background-color: #B0E0E6; 
    color: #111;
    border-color: #B0E0E6; 
    transform: none; 
    box-shadow: none;
}

/* セクションタイトルと余白の調整 */
.section-title {
    font-size: 20px;
    letter-spacing: 0.1em;
    padding-top: 40px;
    padding-bottom: 20px;
    border-top: 1px solid #eee; 
    margin-top: 50px;
}

/* Discographyのコンテンツエリア */
.discography-grid {
    margin-top: 20px;
}

/* Biographyのテキスト */
#biography {
    text-align: left; /* バイオグラフィーは左揃えにするのが読みやすい */
}

/* 言語切り替えボタンのデザイン */
.lang-switch {
    margin: 30px 0 20px 0;
    font-size: 12px;
}

.lang-switch a {
    text-decoration: none;
    color: #666;
    padding: 5px;
    transition: color 0.2s;
}

.lang-switch .active {
    font-weight: bold;
    color: #111; 
}

/* フッターデザイン */
footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 10px;
    color: #666;
}

JavaScript
// 1. 翻訳データ（オブジェクト）の作成
const translations = {
    // ヘッダー部分
    'h-artist-name': ['[アーティスト名]', '[Artist Name]'],
    'h-description': ['J-POP / Alternative / City Pop', 'J-POP / Alternative / City Pop'],
    
    // ナビゲーションメニュー
    'nav-info': ['Information', 'Information'], 
    'nav-disc': ['Discography', 'Discography'], 
    'nav-bio': ['Biography', 'Biography'], 
    'nav-sns': ['SNS', 'SNS'], 
    
    // セクションタイトル
    'd-title': ['Discography', 'Discography'],
    'b-title': ['Biography', 'Biography'],
    's-title': ['SNS / Contact', 'SNS / Contact'],

    // フィーチャーセクション
    'f-new-release-title': ['NEW RELEASE: [プロモーション中のアルバム名]', 'NEW RELEASE: [ALBUM TITLE IN ENGLISH]'],
    'f-description': ['最新作をリリース。ミニマルな美意識とオルタナティブなサウンドが融合。ストリーミングで今すぐチェック。', 'New work released. Minimal aesthetic meets alternative sound. Check it out on streaming now.'],
    'f-listen-button': ['今すぐ聴く 🎧', 'LISTEN NOW 🎧'],
    'b-content': ['[アーティスト名]は、東京を拠点に活動するシンガーソングライター。J-POPのメロディセンスとオルタナティブなサウンドメイキングを融合させ、感度の高いリスナーを魅了する。海外での評価も高まりつつある...', '[Artist Name] is a singer-songwriter based in Tokyo. Fusing J-POP melodies with alternative soundscapes, they captivate sensitive listeners. Their reputation is also growing internationally...'],
    'b-read-more': ['... 続きを読む', '... Read More'],
    
    // リンクボタンのテキスト
    'link-tiktok': ['🎵 TikTok', '🎵 TikTok'],
    'link-youtube': ['▶️ YouTube', '▶️ YouTube'],
    'link-x-twitter': ['🐦 X (Twitter)', '🐦 X (Twitter)'],
    'link-note': ['✍️ Note', '✍️ Note'],
    'link-instagram': ['✨ Instagram', '✨ Instagram'],
    'link-soundcloud': ['🎧 SoundCloud', '🎧 SoundCloud'],
    'link-bandcamp': ['🛒 Bandcamp', '🛒 Bandcamp'],
};


// 2. 言語切り替えロジックの定義
function setLanguage(langCode) {
    const langIndex = langCode === 'en' ? 1 : 0; 

    for (const id in translations) {
        const element = document.getElementById(id); 
        
        if (element && translations[id]) {
            element.textContent = translations[id][langIndex];
        }
    }
}


// 3. イベントリスナー（ボタンが押されたときの処理）の設定
document.addEventListener('DOMContentLoaded', () => {
    
    // 言語切り替えボタンの処理
    const langSwitches = document.querySelectorAll('.lang-switch a');
    
    langSwitches.forEach(switchButton => {
        switchButton.addEventListener('click', (event) => {
            event.preventDefault(); 
            const newLang = switchButton.getAttribute('data-lang');
            setLanguage(newLang); 

            langSwitches.forEach(btn => btn.classList.remove('active'));
            switchButton.classList.add('active');
        });
    });
    
    // ページ内リンクのスムーズスクロール機能
    const anchorLinks = document.querySelectorAll('.main-nav a');
    
    anchorLinks.forEach(link => {
        link.addEventListener('click', (event) => {
            event.preventDefault(); 
            const targetId = link.getAttribute('href'); 
            const targetElement = document.querySelector(targetId);
            
            if (targetElement) {
                // スムーズスクロールを実行 (JavaScriptの標準機能)
                window.scrollTo({
                    top: targetElement.offsetTop - 50, // 要素の上端に少し余白を持たせてスクロール
                    behavior: 'smooth'
                });
            }
        });
    });
    
    setLanguage('ja'); // 初回ロード時は日本語に設定
});

