/* ===== 全体のレイアウト ===== */
.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    
}

/* ===== タイトル (画像ロゴ用) ===== */
.game-logo {
    max-width: 400px;
    height: auto;
    margin-bottom: 10px;
   
}

/* ===== 説明テキスト ===== */
.instruction {
    font-size: 2.0rem;
    margin-bottom: 30px;
    
    font-weight: bold;
}

/* ===== ボタンエリア ===== */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;

    position: relative;
    border: 4px solid white;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(1px); }

/* 各ボタンのスタイル */
.btn-red {
    background-color: #ff3d3d;
    font-size: 2.0rem;
    color: #B40A0A;
    -webkit-text-stroke: 4px white;
    paint-order: stroke fill;
}
.btn-green {
    background-color: #78EF80;
    font-size: 2.0rem;
    color: #12991B;
    -webkit-text-stroke: 4px white;
    paint-order: stroke fill;
}
.btn-blue {
    background-color: #3498db;
    font-size: 2.0rem;
    color: #082BB8;
    -webkit-text-stroke: 4px white;
    paint-order: stroke fill;
}

/* ボタン横のキャラクター */
.btn .character {
    position: absolute;
    right: -25px;
    bottom: -15px;
    width: 100px;
    height: auto;
}
.btn-green .character {
    width: 200px;
    right: -85px;
    bottom: -20px;
}
.btn-blue .character {
    width: 100px;
    right: -40px;
    bottom: -20px;
}

/* ロゴを左上に移動させるためのスタイル */
.logo-top-left {
    position: fixed;
    top: 20px;
    left: 20px;
    max-width: 300px;
    margin: 0;
    z-index: 100;
}

/* ===== 試合開始アニメーション ===== */
#start-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}
#start-animation-overlay img {
    max-width: 80%;
    height: auto;
    transform: translateX(150%);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
#start-animation-overlay.active img { transform: translateX(0); }
#start-animation-overlay.exit img { transform: translateX(-150%); }

/* ===== ヘルプボタンのスタイル ===== */

.help-link-container {
    /* ボタンを画面の右上に固定します */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100; /* 他の要素より手前に表示 */
}

.help-link {
    display: flex;
    align-items: center;
    justify-content: center;

    /* 円のサイズ */
    width: 50px;
    height: 50px;
    
    /* 見た目 */
    background-color: rgba(255, 255, 255, 0.3); /* 少し透明な白 */
    color: white;
    border: 2px solid white;
    border-radius: 50%; /* 正円にする */
    text-decoration: none; /* リンクの下線を消す */
    
    /* 中の「？」のスタイル */
    font-size: 28px;
    font-weight: bold;
    
    /* アニメーション */
    transition: all 0.2s ease-in-out;
}

.help-link:hover {
    background-color: white;
    color: black;
    transform: scale(1.1); /* 少し大きくする */
}
@media (max-width: 728px) {
    
.game-logo {
      
       
        top: 200px;
    

        max-width: 90%; /* タイトルロゴがはみ出ないように */
    }
    .instruction{
        margin-top: 100px;
    }
       
    
}
/* 既存のtitle.cssの内容はそのままにして、以下のコードを末尾に追加してください */

/* 実績ボタン用のコンテナ（画面右下に配置） */

/* 既存のtitle.cssの内容はそのままにして、以下のコードを末尾に追加してください */
/* 既存のtitle.cssの内容はそのままにして、以下の実績ボタン関連のコードを末尾に追加・上書きしてください */

/* 実績ボタン用のコンテナ（右下に配置） */
.achievements-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
}

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★ ここが今回の変更点です ★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* 初期状態の丸い⚙ボタンのスタイルをご指定のヘルプボタン風に修正 */
#achievements-btn.btn-round {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3); /* 少し透明な白 */
    color: white;
    border: 2px solid white;
    border-radius: 50%; /* 正円にする */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: fixed;
    top: 2.5%;
    left: 93%;
}

/* 展開後のポップアップ風ボタンのスタイル（変更なし） */
#achievements-btn.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
    color: white;
    width: 250px;
    height: 80px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    padding: 0;
    transition: all 0.3s ease-in-out;
}

#achievements-btn:hover {
    opacity: 0.9;
    
}
/* ================================================= */
/* ====== 画面四隅のボタン関連スタイル (共通) ====== */
/* ================================================= */

/* 右上のボタンをまとめるエリア */
.top-right-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 15px; /* ボタン同士の間隔 */
}

/* 右下のボタンをまとめるエリア */
.bottom-right-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    display: flex;
    gap: 15px; /* ボタン同士の間隔 */
}

/* 丸いアイコンボタンの共通デザイン */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3); /* 少し透明な白 */
    color: white;
    border: 2px solid white;
    border-radius: 50%; /* 正円にする */
    text-decoration: none; /* リンクの下線を消す */
    font-size: 24px; /* アイコンのサイズ */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out; /* アニメーション */
}

/* マウスを乗せたときの共通デザイン */
.icon-btn:hover {
    background-color: white;
    color: black;
    transform: scale(1.1); /* 少し大きくする */
}
/* --- 設定メニュー関連のスタイル（新しいデザイン） --- */

/* メニューの見た目 */
#settings-menu {
    position: absolute;
    top: 60px; /* ボタンの少し下に表示 */
    right: 0;
    z-index: 110;
    
    /* 背景を半透明の白に変更 */
    background-color: rgba(255, 255, 255, 0.85); 
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);

    /* ★ボタンを横に並べるように変更 */
    display: flex;
    gap: 8px; 
}

/* このクラスが付いているときにメニューを非表示にする（変更なし） */
#settings-menu.hidden {
    display: none;
}

/* メニュー内のボタンのスタイル */
#settings-menu button {
    /* ボタンの見た目を画像に合わせる */
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #999;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap; /* ボタンのテキストが改行しないように */
    transition: background-color 0.2s;
}

#settings-menu button:hover {
    background-color: #dcdcdc;
}

/* --- 設定メニュー関連のスタイル（新しいデザイン） --- */

/* 設定ボタン自体の位置を決めるコンテナ */
.settings-container {
    position: relative; 
}

/* メニューの見た目 */
#settings-menu {
    /* ▼ 画面の真ん中に表示する設定 ▼ */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* 全ての要素の最前面に表示 */
    /* ▲ ここまで ▲ */

    width: 300px; /* メニューの横幅 */
    background-color: rgba(0, 0, 0, 0.85); /* 半透明の黒 */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);

    /* ▼ ボタンを縦に並べる設定 ▼ */
    display: flex;
    flex-direction: column;
    gap: 15px; 
    /* ▲ ここまで ▲ */
}

/* メニューが表示されるときの隠す/表示する設定 */
#settings-menu.hidden {
    display: none;
}

/* メニュー内のボタンのスタイル */
#settings-menu button {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.2s, transform 0.2s;
}

/* マウスを乗せたときのスタイル */
#settings-menu button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.02); /* 少しだけ拡大 */
}
/* クリック後（フォーカス時）にボタンの色が元に戻るようにする修正 */
/* クリック後（フォーカス時）に元のスタイルに戻す */
.icon-btn:focus {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.0); /* ★ 大きさを元に戻す指定を追加 */
}
/* フォーカスが当たっている状態でも、ホバーが効くようにする修正 */
.icon-btn:focus:hover {
    background-color: white;
    color: black;
    transform: scale(1.1);
}