/* --- 基本設定 --- */
:root {
    --bg-color: #1e1e2e; /* 背景色 */
    --surface-color: #313244; /* カードなどの背景色 */
    --text-color: #cdd6f4; /* 基本テキスト色 */
    --primary-color: #89b4fa; /* メインカラー (リンクなど) */
    --green-color: #a6e3a1; /* 参加ボタンの色 */
    --red-color: #f38ba8; /* メニューヘッダーなど */
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- コンテンツとフッターの配置調整 --- */
.content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1; /* この要素を伸ばしてフッターを押し下げる */
}

main {
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
    width: 90%;
    flex: 1; /* mainが残りのスペースを埋める */
}

/* --- ヘッダー --- */
header {
    text-align: center;
    padding: 40px 20px 20px 20px;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    color: var(--primary-color);
}

/* --- セクション(カード)のデザイン --- */
section {
    background: var(--surface-color);
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-left: 5px solid var(--primary-color);
}

h2, h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--surface-color);
    padding-bottom: 10px;
}

/* --- リンクとリスト --- */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #fff;
}

ul, ol {
    line-height: 1.8;
}

/* --- トップページ用ヒーローセクション --- */
.hero {
    text-align: center;
    border-left-color: var(--green-color);
}

.hero h2 {
    color: var(--green-color);
}

/* --- 参加ボタン --- */
.join-button {
    display: inline-block;
    background-color: var(--green-color);
    color: var(--bg-color);
    font-weight: bold;
    padding: 15px 35px;
    border-radius: 50px;
    margin-top: 20px;
    font-size: 1.1em;
    transition: transform 0.3s, box-shadow 0.3s;
}

.join-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(166, 227, 161, 0.3);
    color: var(--bg-color);
}

/* --- ハンバーガーメニュー --- */
.menu-trigger {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-trigger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    margin: 6px 0;
    transition: 0.4s;
}
.menu-trigger.active span:nth-of-type(1) {
    transform: translateY(9px) rotate(-45deg);
}
.menu-trigger.active span:nth-of-type(2) {
    opacity: 0;
}
.menu-trigger.active span:nth-of-type(3) {
    transform: translateY(-9px) rotate(45deg);
}


/* --- サイドナビゲーション --- */
.sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: var(--surface-color);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 1000;
    padding-top: 60px;
}
.sidenav.open {
    transform: translateX(0);
}

.sidenav-header {
    padding: 20px;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    color: var(--red-color);
}

.sidenav ul {
    list-style: none;
    padding: 0;
}

.sidenav ul li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    font-size: 1.2em;
}

.sidenav ul li a:hover {
    background-color: var(--primary-color);
    color: var(--surface-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    z-index: 999;
}
.overlay.active {
    opacity: 1;
    visibility: visible;
}


/* --- フッター --- */
footer {
    text-align: center;
    padding: 20px;
    background-color: #11111b;
    margin-top: auto; /* mainが伸びた分、下に配置される */
}

/* --- アニメーション --- */
.animated-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animated-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}