/* --- テーマ設定 --- */
:root {
    --bg-color: #fffafb; /* 背景：薄いピンク */
    --grid-color: rgba(255, 182, 193, 0.4);
    --text-color: #5d4037;
    --accent-color: #ff8c94; /* 桜色アクセント */
    --nav-bg: linear-gradient(to right, #ff9a9e, #fad0c4); /* 帯のグラデーション */
    --paper-bg: rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a2e;
        --grid-color: rgba(255, 255, 255, 0.05);
        --text-color: #e0e0e0;
        --accent-color: #ff9a9e;
        --nav-bg: linear-gradient(to right, #2c3e50, #4ca1af); /* ダークモード用帯 */
        --paper-bg: rgba(20, 20, 40, 0.9);
    }
}

body {
    margin: 0;
    font-family: 'Zen Kurenaido', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 25px 25px;
    padding-top: 60px; /* ナビバーの分空ける */
}

/* 共通クラス */
.hidden { display: none !important; }
.content-section {
    max-width: 900px; margin: 3rem auto; padding: 2rem;
    background: var(--paper-bg); border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-height: 60vh; /* ページの高さを確保 */
}
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* ▼▼▼ ナビゲーションバー（帯デザイン） ▼▼▼ */
.nav-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: 50px;
    background: var(--nav-bg);
    color: #fff;
    display: flex; align-items: center; justify-content: center; /* 中央寄せ */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.nav-menu {
    display: flex; list-style: none; padding: 0; margin: 0;
    align-items: center;
}

.nav-item {
    padding: 0 20px;
    font-size: 1.1rem;
    font-weight: bold;
    position: relative;
    letter-spacing: 0.1em;
}

/* 区切り線（パイプ | ） */
.nav-item:not(:last-child)::after {
    content: "|";
    position: absolute; right: 0; top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    font-weight: normal;
}

.nav-link { color: #fff; display: block; }
.nav-link:hover { color: #ffe4e1; text-shadow: 0 0 5px #fff; }

/* ログアウトボタン（ナビ内右端へ） */
.logout-container {
    position: absolute; right: 20px;
}
.logout-btn {
    background: rgba(255,255,255,0.2); border: 1px solid #fff;
    color: #fff; padding: 5px 15px; border-radius: 20px;
    cursor: pointer; font-size: 0.8rem;
}
.logout-btn:hover { background: #fff; color: var(--accent-color); }


/* ▼▼▼ トップへ戻るボタン ▼▼▼ */
#back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    opacity: 0; visibility: hidden; /* 最初は隠す */
    transition: all 0.4s ease;
    z-index: 900;
}
#back-to-top.show {
    opacity: 1; visibility: visible; bottom: 30px;
}
#back-to-top:hover {
    transform: translateY(-5px); background: #ff7f50;
}

/* ▼ ゲート（index.html用） ▼ */
.gate-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
.gate-box {
    background: var(--paper-bg); padding: 3rem; border: 2px dashed var(--accent-color);
    text-align: center; border-radius: 10px;
}
input { padding: 10px; border: none; border-bottom: 2px solid var(--text-color); background: transparent; outline: none; text-align: center; font-size: 1.2rem; }
button.enter-btn { margin-top: 20px; padding: 8px 30px; background: var(--accent-color); color: #fff; border: none; border-radius: 30px; cursor: pointer; }

/* 桜などの落下エフェクト */
#falling-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.falling-item { position: absolute; top: -50px; animation: fall-sway 12s linear infinite; }
@keyframes fall-sway {
    0% { opacity: 0; transform: translateX(0) rotate(0deg); }
    10% { opacity: 1; }
    100% { opacity: 0; transform: translateY(100vh) translateX(100px) rotate(360deg); }
}

/* スマホ対応（ナビを少し小さく） */
@media (max-width: 600px) {
    .nav-item { padding: 0 10px; font-size: 0.9rem; }
    .logout-container { top: 60px; right: 10px; } /* スマホではナビの下にずらすなど */
}
/* ▼▼▼ 追加スタイル（ここから下を style.css の末尾に追記してください） ▼▼▼ */

/* イベントカード */
.event-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--grid-color);
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.tag {
    background: var(--accent-color);
    color: #fff;
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 5px;
}

/* タイムライン（履歴） */
.timeline {
    border-left: 2px solid var(--grid-color);
    padding-left: 20px;
    margin-left: 10px;
}
.timeline-item {
    margin-bottom: 30px;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px; top: 5px;
    width: 10px; height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}
.date {
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
}

/* 語録グリッド（カード並び） */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 幅に合わせて自動折り返し */
    gap: 20px;
    margin-top: 30px;
}
.quote-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--text-color);
    padding: 1.5rem;
    border-radius: 2px; /* 付箋紙のような角 */
    position: relative;
    transition: transform 0.3s;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1); /* 影をずらして手書き感 */
}
.quote-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.8);
}
.quote-text {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.quote-author {
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ダークモード時の微調整 */
@media (prefers-color-scheme: dark) {
    .event-card, .quote-card {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255,255,255,0.2);
    }
    .quote-card:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}