/* 全ての要素に対する基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ボディの基本スタイル */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 20px;
    padding-top: 80px;
}

/* ヘッダーのデザイン */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    padding: 10px 20px; /* パディングを調整 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ヘッダー内の画像 */
header img {
    max-height: 50px; /* 画像の高さを調整 */
    height: auto;
    width: auto;
}

/* ナビゲーションのリスト */
nav ul {
    list-style: none;
    display: flex;
    margin-right: 20px;
}

/* ナビゲーションのリストアイテム */
nav ul li {
    margin-left: 20px;
}

/* ナビゲーションのリンク */
nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    transition: background 0.3s ease;
}

/* ナビゲーションのリンクホバー時 */
nav ul li a:hover {
    background-color: #555;
    border-radius: 5px;
}

/* タイトルロゴ */
.logo {
    text-align: center;
    margin: 100px 0; /* ヘッダー分のスペースを確保 */
}

/* タイトルロゴ */
.logo img {
    width: 50%;
    max-width: 50%;
    height: auto;
    object-fit: contain;
}

/* プロローグセクション */
.prologue {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    text-align: center;
    margin-bottom: 40px;
}

/* プロローグ画像 */
.prologue img {
    width: auto; /* 画像の幅を自動に */
    height: auto; /* 画像の高さを自動に */
    max-width: 100%; /* 画像の最大幅を100%に */
    max-height: 100%; /* 画像の最大高さを100%に */
    object-fit: contain; /* 画像をコンテナ内に収める */
    position: absolute;
    top: 0;
    left: 0;
}

/* 遊び方 */
.how-to-play {
    text-align: center;
    margin-bottom: 40px;
}

/* 遊び方の画像 */
.how-to-play img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

/* ゲームの進め方 */
.game-flow {
    text-align: center;
    margin-bottom: 40px;
}

/* ゲームの進め方の画像 */
.game-flow img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

/* エンディング */
.ending {
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

/* エンディングの画像 */
.ending img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

/* エンディング内のQRコードを縦並びにする */
.ending .qr-codes {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* QRコードの各項目 */
.ending .qr-codes div {
    margin-bottom: 20px;
}

/* レスポンシブデザイン - スマホ版のスタイル */
@media screen and (max-width: 768px) {
    /* スマホ版のヘッダー */
    header {
        flex-direction: column; /* ヘッダー内の要素を縦に並べる */
        align-items: flex-start;
        padding: 10px;
    }

    /* スマホ版のヘッダー見出し */
    header h1 {
        font-size: 18px;
        margin: 0 0 10px 0;
    }

    /* スマホ版のナビゲーション */
    nav ul {
        flex-direction: column; /* ナビゲーションのリンクを縦に並べる */
        margin-right: 0;
    }

    /* スマホ版のナビゲーションリストアイテム */
    nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }

    /* スマホ版のナビゲーションリンク */
    nav ul li a {
        font-size: 14px;
        padding: 8px 12px;
    }

    /* スマホ版のロゴ画像 */
    .logo img {
        max-width: 200px; /* ロゴサイズを小さめに */
    }

    /* スマホ版のセクション */
    .prologue, .how-to-play, .game-flow, .ending {
        margin-bottom: 20px;
    }

    /* スマホ版の遊び方とエンディング画像 */
    .how-to-play img, .game-flow img, .ending img {
        margin-bottom: 5px;
    }
}

/* レスポンシブデザイン - PC版のスタイル */
@media screen and (min-width: 769px) {
    /* PC向けのスタイル調整 */
    .prologue, .how-to-play, .game-flow, .ending {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* PC版のロゴ */
    .logo {
        margin: 50px 0;
    }
}

/* フッターを中央揃え */
footer {
    display: flex;
    flex-direction: column; /* 要素を縦に並べる */
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: none;
    color: #fff;
}

/* フッター内のリンク風表示 */
.view-link {
    cursor: pointer;
    color: #fff; /* リンクを白に変更 */
    text-decoration: underline;
    margin: 0 5px;
}

/* フッター内のリンクホバー時 */
.view-link:hover {
    color: #ddd; /* ホバー時に少し灰色がかった色に */
    text-decoration: none;
}

/* バージョン情報のスタイル */
#version-info {
    margin-top: 10px;
    font-size: 12px;
    color: #bbb; /* バージョン情報を少し目立たなくする */
}
