/* 基本設定 */
:root {
    --primary-color: #87CEEB; /* スカイブルー */
    --background-color: #f0f8ff; /* アリスブルー */
    --text-color: #333;
    --header-text-color: #fff;
    --white-color: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', 'Arial', 'Hiragino Sans', 'Meiryo', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ヘッダー */
header {
    background-color: var(--primary-color);
    color: var(--header-text-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-title a {
    font-size: 1.5rem;
    font-weight: bold;
}

/* メニューボタン（ハンバーガー） */
.menu-toggle {
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--header-text-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* メニューボタンがアクティブになった時のアニメーション (X印) */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ナビゲーションメニュー */
nav {
    position: fixed;
    top: 0;
    right: -300px; /* 初期状態では画面外 */
    width: 250px;
    height: 100vh;
    background-color: rgba(135, 206, 235, 0.95); /* 少し透過 */
    padding-top: 80px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
}

nav.active {
    right: 0; /* アクティブになったら画面内に表示 */
}

nav ul {
    list-style: none;
}

nav ul li {
    text-align: center;
}

nav ul li a {
    display: block;
    padding: 1rem 2rem;
    color: var(--header-text-color);
    font-size: 1.2rem;
    transition: background-color 0.2s;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* メインコンテンツ */
.content {
    padding: 100px 20px 40px 20px; /* ヘッダーの高さ分を確保 */
    max-width: 1000px;
    margin: 0 auto;
}

/* トップページ用プロファイルセクション */
.profile-section {
    text-align: center;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* ここで要素を円形にします */
    object-fit: cover;
    border: 5px solid var(--white-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.profile-intro {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a img {
    width: 40px;
    height: 40px;
    transition: transform 0.2s;
}

.social-links a:hover img {
    transform: scale(1.1);
}

/* 下層ページ用セクション */
.page-section {
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* グリッドレイアウト（アバター、ワールド、ギャラリー用） */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-item {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.grid-item h3 {
    margin: 1rem;
    color: #444;
}

.grid-item p {
    margin: 0 1rem 1rem 1rem;
    font-size: 0.9rem;
}


/* フッター */
footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #777;
}

/* ===== ここから下を追記 ===== */

/* ギャラリー目次ページの月リンク */
.month-link-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.month-link {
    display: inline-block;
    background-color: var(--white-color);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    border: 2px solid var(--primary-color);
    font-weight: bold;
    text-align: center;
    transition: all 0.2s ease;
}

.month-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-2px);
}

/* 月別ページ内の「戻る」リンク */
.back-link {
    display: inline-block;
    margin-top: 3rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-decoration: underline;
}

.back-link:hover {
    text-decoration: none;
}

/* ===== ここから下を追記 ===== */

/* ギャラリーページ用のスタイル */
.year-section {
    margin-top: 3rem;
    text-align: left; /* 左揃えにする */
}

.year-section:first-of-type {
    margin-top: 1rem;
}

/* 年の見出し (2025年, 2024年) */
.year-section h3 {
    font-size: 1.8rem;
    color: #555;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1.5rem;
}

/* 月の見出し (9月, 8月...) */
.year-section h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
}

/* モーダル（ポップアップ）のスタイル */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed; /* 画面に固定 */
    z-index: 100; /* 他の要素の上に表示 */
    padding-top: 60px; /* 上部に少しスペースを確保 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* スクロール可能にする */
    background-color: rgba(0, 0, 0, 0.9); /* 半透明の黒い背景 */
    text-align: center;
}

/* モーダル（ポップアップ）のスタイル */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed; /* 画面に固定 */
    z-index: 100; /* 他の要素の上に表示 */
    padding-top: 80px; /* ★★★ この値を変更 ★★★ */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* スクロール可能にする */
    background-color: rgba(0, 0, 0, 0.9); /* 半透明の黒い背景 */
    text-align: center;
}

/* モーダル内の画像 */
.modal-content {
    margin: auto;
    display: block;
    max-width: 100%; /* 最大幅を画面の80%に設定 */
    max-height: 80vh; /* 最大高さをビューポートの80%に設定 */
    object-fit: contain; /* アスペクト比を維持して表示 */
    position: absolute; /* 絶対配置 */
    top: 50%; /* 親要素の上から50%の位置 */
    left: 50%; /* 親要素の左から50%の位置 */
    transform: translate(-50%, -50%); /* 要素自体のサイズを考慮して中心に移動 */
    animation-name: zoom;
    animation-duration: 0.6s;
}

/* 閉じるボタン */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* アニメーション */
@keyframes zoom {
    from {transform: translate(-50%, -50%) scale(0.1)}
    to {transform: translate(-50%, -50%) scale(1)}
}

/* ボタンコンテナ */
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* ボタン間のスペース */
    margin-top: 2rem; /* プロフィールからの上部余白 */
}

/* ボタンの共通スタイル */
.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px; /* 角を丸くする */
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--primary-color);
}

/* ホバー時のスタイル */
.button:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
    transform: translateY(-3px); /* 少し上に移動する */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* クリックを無効にするクラス */
.disabled-click {
    pointer-events: none;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9のアスペクト比 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}