body { 
    line-height: 1.6;
    background: linear-gradient(to bottom, #ffffff 80%, #d8d8d8, #7d7d7d, #000000); /* 上白70%、下黒30% */
    background-attachment: fixed; /* 背景を固定 */
    background-size: cover; /* 背景画像が画面サイズに合わせて拡大・縮小される */
    color: #333;
    padding: 20px;
    font-family: 'Hiragino Mincho Pro', serif; /* 明朝体を優先的に指定 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh; /* ビューポートの高さに合わせる */
    overflow: hidden; /* コンテンツがはみ出ないように */
}

/* 基本リンクのスタイル */
a {
    color: #646464; /* 文字色を変更 */
    padding: 8px 16px; /* 内側の余白 */
    border-radius: 20px; /* 角を丸くする */
    font-weight: normal; /* 太字を解除 */
    transition: background-color 0.3s, color 0.3s; /* ホバー時の色変更をスムーズに */
}
/* カスタムリンク（背景付き） */
a.nav-link {
    color: #000; /* 文字色 */
    padding: 8px 16px; /* 内側の余白 */
    border-radius: 20px; /* 角を丸くする */
    transition: background-image 0.6s ease, color 0.3s, transform 0.3s; /* 背景のぼやけとアニメーション */
    text-decoration: none; /* 下線を消す */
    position: relative;
}

/* ホバー時のエフェクト */
a.nav-link:hover {
    color: #fff; /* 文字色を白に */
    background-image: radial-gradient(ellipse, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0) 80%); /* 強いぼやけ */
    transform: scale(1.05); /* 少し拡大する */
    text-decoration: none; /* 下線を消す */
}

/* ホバー時のリンク色 */
a:hover {
    color: #999;  /* ホバー時の文字色 */
    text-decoration: underline;  /* ホバー時に下線を表示 */
}

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    font-family: 'Hiragino Mincho Pro', serif; /* 明朝体を適用 */
    position: fixed; /* 固定 */
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 10; /* ヘッダーが他の要素より上に表示されるように */
}

header h1 {
    margin: 0;
    font-size: 2em;
    color: #333;
}

/* ヘッダーリンク */
header nav a {
    color: #454545;
    text-decoration: none;
    font-weight: normal;
    padding: 8px 16px;  /* 内側の余白 */
}

header nav a:hover {
    color: #fff; /* 文字色を白に */
    background-image: radial-gradient(ellipse, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0) 70%); /* 強いぼやけ */
    transform: scale(1.05); /* 少し拡大する */
    text-decoration: none; /* 下線を消す */
}


/* メインコンテンツ */
main {
    flex-grow: 1; /* メインコンテンツが残りのスペースを占める */
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    text-align: center; /* 中央揃え */
    overflow-y: auto; /* コンテンツ部分をスクロール可能に */
}

/* 画像の中央揃え */
.center-image {
    display: flex;
    justify-content: center;
    margin-top: 80px;
}

.center-image img {
    width: 30%;
    height: auto;
}



.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(80, 80, 80, 0.5); /* 背景を半透明の黒に */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

/* モーダルコンテンツ */
.modal-content {
    background-color: rgba(255, 255, 255, 0.9) !important; ; /* 背景を透明にする */
    padding: 20px 40px;
    border-radius: 12px;
    width: 500px; /* 固定幅 */
    height: 500px; /* 固定高さ */
    overflow-y: auto;
    position: relative;
    font-size: 0.85em;
    animation: fadeIn 0.3s ease;
}


/* モーダルを閉じるボタン */
.close {
    top: 10px; /* 上端からの距離 */
    right: 10px; /* 右端からの距離 */
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #acacac; /* ホバー時の色 */
}

/* モーダル内の画像 */
.modal-content img {
    display: block; /* 画像をブロック要素に */
    margin: auto; /* 左右中央配置 */
    max-width: 50%;
    height: auto;
    border-radius: 5px;
}

/* モーダルタイトル */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* 閉じるボタン */
.close {
    position: absolute;
    top: 10px; /* 上端からの距離 */
    right: 10px; /* 右端からの距離 */
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #acacac; /* ホバー時の色 */
}

/* 記事カード */
.article {
    width: 100%;
    border-radius: 10px;
    color: #000;
    padding: 10px;
    margin: 10px auto;
    box-sizing: border-box;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 0.9em;
    font-weight: bold;

}

/* 記事カードタイトル */
.article h2 {
    font-size: 0.9em;
    padding: 10px;
    border-radius: 5px;
    display: block;
    font-weight: normal;
}


/* 記事カードホバー時 */
.article:hover {
    color: #fff ; /* 文字色を白に */
    background-image: radial-gradient(ellipse, rgba(0, 0, 0, 0.7) 10%, rgba(0, 0, 0, 0) 25%); /* 強いぼやけ */
    transform: scale(1.05); /* 少し拡大する */
    text-decoration: none; /* 下線を消す */
}

/* 記事カード本文 */
.article p {
    font-size: 16px;
    line-height: 1.6;
    color: #f7f7f7;
}

/* フッター */
footer {
    color: #dcdcdc;
    font-size: 0.1em;
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
    opacity: 0.8;
    font-weight: normal;

}

/* フェードイン効果 */
.fade-in {
    opacity: 0; /* 最初は透明 */
    transition: opacity 1s ease-in-out; /* アニメーション効果 */
}

.fade-in.visible {
    opacity: 1; /* 表示状態 */
}

/* モーダルの外側 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 半透明の背景 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease; /* フェードイン・フェードアウトの効果 */
}

/* モーダルコンテンツ */
.modal-content {
    background-color: #ffffff; /* 背景は白 */
    padding: 20px;
    border-radius: 8px; /* 角を丸くする */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影を付けて浮かせる */
    max-width: 600px; /* 最大幅を設定 */
    max-height: 80vh; /* 高さの最大値 */
    overflow-y: auto; /* 内容が多い場合はスクロール */
    position: relative;
    animation: fadeIn 0.3s ease; /* アニメーション効果 */
}

/* モーダルを表示するフェードインアニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9); /* 少し小さく */
    }
    to {
        opacity: 1;
        transform: scale(1); /* 通常のサイズに */
    }
}

/* モーダルを閉じるボタン */

/* Webkit ブラウザ（Chrome, Safari）用 */
::-webkit-scrollbar {
    width: 2px;  /* 横スクロールバーの太さ */
}

/* スクロールバーのトラック（背景部分） */
::-webkit-scrollbar-track {
    background: #585858; /* 背景色 */
    border-radius: 10px;  /* 角を丸く */
}

/* スクロールバーのつまみ（ドラッグ部分） */
::-webkit-scrollbar-thumb {
    background: #888; /* つまみの色 */
    border-radius: 10px; /* 角を丸く */
}

/* ホバー時のスクロールバーのつまみ */
::-webkit-scrollbar-thumb:hover {
    background: #555; /* ホバー時の色 */
}

