/* style.css */
body {
    background-color: #fff;
    background-image: linear-gradient(#e7e7e7 3px, transparent 3px), 
                      linear-gradient(90deg, #e7e7e7 3px, transparent 3px);
    background-size: 150px 150px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    animation: gridAnimation 60s linear infinite;
}

@keyframes gridAnimation {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 70% 100%;
    }
}

.container {
    position: absolute;
    top: 0;
    left: 0;
}

img {
    width: 300px; /* ここで幅を設定 */
    height: auto; /* 高さは自動で調整 */
    margin-top: -1040px;
    display: block;
}

header {
    position: relative; /* デフォルトの相対位置に戻す */
    margin-top: -1400px; /* ナビゲーションバーを少し上に持っていく */
    margin-left: -190px;
    padding: 0; /* 上下のパディングをリセット */
}

nav {
    display: flex; /* フレックスボックスを使用 */
    flex-direction: column; /* 縦方向に並べる */
    align-items: center; /* 中央揃え */
    margin: 0;
    padding: 0;
    list-style: none; /* デフォルトのリストスタイルを削除 */
}

nav ul {
    margin: 0;
    padding: 0;
}

nav li {
    margin: -20px 0; /* アイテム間の垂直間隔を設定 */
}

nav a {
    text-decoration: underline;
    color: rgb(0, 0, 255); /* テキストの色を設定 */
    font-size: 16px; /* フォントサイズを設定 */
    line-height: 2; /* 行間を調整 */
    display: block; /* リンクをブロック要素として表示 */
    padding: 10px; /* 内側のスペースを追加 */
    text-align: right;
    transition: color 0.3s ease; /* カラーの変化にアニメーションを追加 */
}

/* マウスオーバー時のスタイル */
nav a:hover {
    color: #ff2aca; /* マウスオーバー時のテキストカラー */
}

.video-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px; /* 動画の間に隙間を追加 */
    width: 100vmin; /* ビューポートの幅と高さの最小値を基準にする */
    height: 100vmin;
    margin-top: 40px; /* ページの上部にスペースを追加 */
    margin-left: 20px;
    margin-bottom: 1100px;
}

.content {
    /* 他のコンテンツのスタイルをここに追加 */
}

/* メディアクエリを使用して、スマートフォン向けのスタイルを追加 */
@media screen and (max-width: 768px) {
    body {
        background-size: 100px 100px; /* 背景のサイズを調整 */
        justify-content: flex-start; /* 中央揃えから上揃えに変更 */
        align-items: flex-start; /* 上揃えに変更 */
        padding: 20px; /* スマートフォン用のパディングを追加 */
        flex-direction: column; /* 縦方向に並べる */
    }

    .container {
        display: flex; /* フレックスボックスを使用 */
        justify-content: center; /* 中央揃え */
        align-items: center; /* 縦方向の中央揃え */
        flex-direction: column; /* 縦方向に並べる */
        position: relative; /* 相対位置に戻す */
        top: 20px;
        left: 0;
        width: 100%; /* コンテナの幅を100%に調整 */
    }

    img {
        width: auto; /* 幅を100%に調整 */
        height: 50vmin;
        margin-top: -0; /* マージンをリセット */
    }

    header {
        display: none; /* メニューバーを非表示にする */
        position: relative; /* 相対位置に戻す */
        margin-top: 20px;
        margin-left: auto; /* 左側のマージンを自動に設定 */
        margin-right: auto; /* 右側のマージンを自動に設定 */
        padding: 0;
        width: max-content; /* コンテンツの幅に合わせる */
    }

    nav {
        flex-direction: row; /* 横方向に並べる */
        justify-content: space-around; /* アイテム間にスペースを均等に配置 */
        width: 100%;
    }

    nav li {
        margin: 0; /* マージンをリセット */
    }

    nav a {
        font-size: 14px; /* フォントサイズを小さく */
        padding: 5px; /* パディングを小さく */
        text-align: center; /* テキストを中央揃え */
    }

    .video-container {
        grid-template-columns: 1fr; /* 1列のレイアウトに変更 */
        grid-template-rows: auto; /* 高さを自動調整 */
        width: 80vmin; /* 幅をビューポートの80%に設定 */
        height: 80vmin; /* 高さを自動調整 */
        margin-top: 200px; /* 上部にスペースを追加 */
        margin-left: 10px; /* 左のマージンをリセット */
        margin-bottom: 20px;
        display: flex; /* フレックスボックスを使用 */
        flex-direction: column; /* 縦方向に並べる */
        align-items: center; /* 中央揃え */
    }

    .video-wrapper {
        padding-top: 56.25%; /* 16:9のアスペクト比を維持 */
    }

    .video-overlay h3 {
        font-size: 2rem; /* タイトルのフォントサイズを小さく */
    }

    .video-overlay .small-text {
        font-size: 0.7rem; /* 小さなテキストのサイズを小さく */
    }

    /* メニューバーのレスポンシブ対応 */
    #nav-menu {
        display: block; /* スマートフォンで表示する */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: #fff;
        z-index: 1000;
        padding: 10px;
    }

    #nav-menu ul {
        display: flex; /* フレックスボックスを使用 */
        flex-direction: column; /* 縦方向に並べる */
        align-items: center; /* 中央揃え */
        padding: 0;
    }

    #nav-menu li {
        margin: 10px 0; /* アイテム間の間隔を調整 */
    }

    #nav-menu a {
        font-size: 18px; /* フォントサイズを調整 */
        padding: 10px; /* パディングを調整 */
        text-align: center; /* テキストを中央揃え */
    }
}

