/* --- 基本設定 --- */
:root {
    --main-color: #1ABC9C; /* ターコイズ */
    --accent-color: #F39C12; /* オレンジ */
    --dark-color: #2c3e50; /* 濃いグレー */
    --light-color: #ecf0f1; /* 明るいグレー */
    --white-color: #ffffff;
    --java-color: #D35400; /* Java版の色 */
    --bedrock-color: #27AE60; /* 統合版の色 */
    --discord-color: #5865F2; /* Discordの色 */
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100vw; /* HTML要素がビューポートの幅に確実にフィットするように設定 */
    overflow-x: hidden; /* 水平方向のスクロールを隠す */
}

body {
    font-family: 'M PLUS Rounded 1c', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: #f8ffef; /* 全体の背景をより明るく */
    color: var(--dark-color);
    line-height: 1.8;
    width: 100vw; /* Body要素がビューポートの幅に確実にフィットするように設定 */
    overflow-x: hidden; /* 水平方向のスクロールを隠す */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

a {
    color: var(--main-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- ヘッダー --- */
header {
    background: rgba(255, 255, 255, 0.98); /* 背景をより不透明に */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* 影を追加 */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 24px;
    color: var(--main-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.logo:hover {
    color: var(--accent-color);
    text-decoration: none;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

header nav li {
    display: inline-block;
    margin-left: 30px;
}

header nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 700;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

header nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
    transform: translateY(-2px);
}

header nav a:hover::after {
    width: 100%;
}


/* --- ヒーローセクション --- */
#hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.9), rgba(243, 156, 18, 0.8)), 
                url('https://placehold.co/1920x1080/333333/ffffff?text=Tokonatsu+Paradise') no-repeat center center/cover;
    background-attachment: fixed; /* パララックス効果 */
    background-position: center; /* 背景画像の位置を中央に */
    padding: 0 20px;
    position: relative;
    overflow: hidden; /* 子要素のオーバーフローを隠す */
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1); /* わずかなオーバーレイ */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    border-radius: 15px;
    background: rgba(0,0,0,0.2); /* コンテンツ背景 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    letter-spacing: 2px;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-button {
    background: var(--accent-color);
    color: var(--white-color);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: inline-block;
    border: 2px solid transparent; /* ホバー時のボーダー用 */
}

.hero-button:hover {
    transform: translateY(-7px); /* 少し大きく動かす */
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
    background-color: #e68a00; /* 少し暗く */
    border-color: var(--white-color); /* ボーダーを表示 */
    text-decoration: none;
}

/* --- 下層ページヘッダー --- */
.page-header {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--light-color), #f0f0f0); /* グラデーション */
    text-align: center;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); /* 影を追加 */
}
.page-header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--dark-color);
    font-weight: 800;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}
.breadcrumb {
    margin-top: 10px;
    color: #777;
    font-size: 0.95rem;
}

/* --- コンテンツセクション --- */
.content-section {
    padding: 80px 0;
}

.content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 60px;
    font-weight: 800;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.content-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background-color: var(--main-color);
    border-radius: 5px;
}

.content-section h2 .section-title-en, .page-header h1 .section-title-en {
    display: block;
    font-size: 1rem;
    color: var(--main-color);
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: 1px;
}

#about p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* --- カードデザイン --- */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0; /* 薄いボーダー */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.15); /* 影を強調 */
}

/* --- 参加方法ページ専用スタイル --- */
.join-container.card {
    padding: 0;
    overflow: hidden;
}

.edition-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}
.tab-btn {
    flex-grow: 1;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    background-color: #f0f0f0;
    color: #777;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    border-top-left-radius: 15px; /* 角丸 */
    border-top-right-radius: 15px; /* 角丸 */
}
.tab-btn:hover {
    background-color: #e9e9e9;
}
.tab-btn.active {
    color: var(--dark-color);
    background-color: var(--white-color);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05); /* アクティブタブに影 */
}
.tab-btn#java-tab.active {
    border-bottom-color: var(--java-color);
}
.tab-btn#bedrock-tab.active {
    border-bottom-color: var(--bedrock-color);
}

.edition-content {
    display: none;
    padding: 30px;
}
.edition-content.active {
    display: block;
}

.edition-subtitle {
    text-align: center;
    margin: -10px 0 20px 0;
    font-weight: bold;
    color: #777;
}

.info-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}
.copy-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* 凹んだような影 */
}
.field-label {
    font-size: 0.9rem;
    color: #6c757d;
}
.field-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    word-break: break-all;
}
.copy-btn {
    background: var(--main-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.copy-btn:hover {
    background: #17a589;
    transform: translateY(-2px);
}
.copy-btn.copied {
    background-color: var(--bedrock-color);
}
.copy-btn .material-icons {
    font-size: 18px;
}

/* --- 参加手順のスタイル --- */
.steps-container {
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.steps-container h4 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}
.join-steps {
    padding-left: 0;
    list-style: none;
    counter-reset: steps-counter;
}
.join-steps li {
    counter-increment: steps-counter;
    position: relative;
    padding-left: 45px;
    margin-bottom: 25px;
}
.join-steps li::before {
    content: counter(steps-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--accent-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.join-steps p {
    margin: 0 0 10px 0;
}
.join-steps img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}


/* --- ルールカード --- */
.rule-card h3 {
    text-align: center;
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--dark-color);
}
.rule-card h3 .rule-icon {
    font-size: 2rem;
    vertical-align: middle;
}
.rule-card ul {
    list-style: none;
    padding-left: 0;
}
.rule-card li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.rule-card li::before {
    content: '✔';
    color: var(--main-color);
    margin-right: 10px;
    font-weight: bold;
}
.rule-card:last-child li::before {
    content: '✖';
    color: #e74c3c;
}

/* --- 開放期間カード --- */
.schedule-card {
    text-align: center;
}
.schedule-card h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
}
.schedule-icon {
    font-size: 2rem;
    vertical-align: middle;
    margin-right: 10px;
}
.schedule-period {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 800;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.date-start, .date-end {
    background: linear-gradient(135deg, var(--main-color), #2ecc71);
    color: var(--white-color);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.date-arrow {
    color: var(--dark-color);
    font-size: 2rem;
}
.schedule-note {
    font-size: 1.1rem;
    color: #777;
}

/* --- フッター --- */
footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

/* --- 寄付ページ専用スタイル --- */
.donate-card {
    padding: 30px;
}

.intro-text {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center; /* 中央寄せ */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.highlight-text {
    font-weight: bold;
    color: var(--main-color); /* メインカラーで強調 */
    background-color: #e6f7f5; /* 薄い背景色 */
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--main-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.donate-methods {
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex; /* Flexboxに変更 */
    justify-content: center; /* 中央揃え */
    gap: 30px; /* カード間の隙間 */
    flex-wrap: wrap; /* 画面幅が足りない場合に折り返す */
}

.method-card {
    background-color: var(--white-color); /* カード背景を白に */
    border-radius: 15px; /* 角丸を大きく */
    padding: 25px;
    border: 1px solid #ddd;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); /* 影を強調 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1; /* カードが均等に幅を占めるようにする */
    min-width: 280px; /* カードの最小幅を設定 */
    max-width: 350px; /* カードの最大幅を設定 (任意) */
}

.method-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.method-card.paypay-preferred {
    border-color: var(--accent-color); /* PayPayカードを強調 */
    background: linear-gradient(145deg, #fffaf0, #fff); /* わずかなグラデーションを白ベースに */
}

.method-card h4 {
    font-size: 1.6rem;
    color: var(--dark-color);
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
}

.paypay-logo {
    height: 30px; /* ロゴのサイズ調整 */
    vertical-align: middle;
}

.method-card p {
    font-size: 1rem;
    margin-bottom: 15px;
}

.attention-text {
    font-size: 0.9rem;
    color: #e74c3c; /* 赤色 */
    margin-bottom: 15px;
    font-weight: bold;
}

.contact-btn {
    background: var(--main-color);
    color: var(--white-color);
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    text-decoration: none; /* aタグの場合に下線を消す */
}

.contact-btn:hover {
    background-color: #17a589;
    transform: translateY(-3px);
    text-decoration: none; /* aタグの場合に下線を消す */
}

.contact-btn .material-icons,
.contact-btn .fab,
.contact-btn .fas { /* Font Awesomeアイコン用 */
    font-size: 20px;
}

.discord-btn {
    background-color: var(--discord-color); /* Discordカラー */
}

.discord-btn:hover {
    background-color: #4a54d4; /* Discordカラーの少し暗い色 */
}

.discord-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

.donate-notes {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px; /* 角丸を大きく */
    padding: 25px;
    margin-top: 30px;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.03); /* 凹んだような影 */
}

.donate-notes h3 {
    font-size: 1.4rem;
    color: var(--main-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 800;
}

.donate-notes ul {
    list-style: none;
    padding-left: 0;
}

.donate-notes li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.donate-notes li::before {
    content: '▪'; /* 黒い四角 */
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* --- ハンバーガーメニューアイコン --- */
.hamburger-menu {
    display: none; /* デフォルトでは非表示 */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 101; /* ナビゲーションより手前に */
    position: relative;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}


/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 15px; /* パディングを調整 */
    }

    /* --- ヘッダー --- */
    header .container {
        flex-direction: row; /* ロゴとハンバーガーを横並びに */
        justify-content: space-between;
        align-items: center;
    }

    header nav {
        position: fixed;
        top: 0;
        right: 0; /* Position it at the right edge */
        width: 70%; /* メニューの幅 */
        max-width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding-top: 80px; /* ヘッダーの高さ分開ける */
        z-index: 99;

        /* Hiding properties with transition */
        transform: translateX(100%); /* Hide it off-screen to the right */
        visibility: hidden; /* Hide it from screen readers and interaction */
        opacity: 0; /* Make it transparent */
        transition: transform 0.4s ease-out, visibility 0.4s ease-out, opacity 0.4s ease-out;
    }

    header nav.active {
        transform: translateX(0); /* Slide it into view */
        visibility: visible; /* Make it visible */
        opacity: 1; /* Make it opaque */
    }

    header nav ul {
        flex-direction: column;
        text-align: left;
        padding: 20px;
    }

    header nav li {
        display: block;
        margin: 0;
        margin-bottom: 15px; /* 項目間のスペース */
    }

    header nav a {
        display: block;
        padding: 10px 15px;
        font-size: 1.1rem; /* メニュー項目を大きく */
        color: var(--dark-color);
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }

    header nav a:hover {
        background-color: var(--light-color);
        text-decoration: none;
    }
    header nav a::after {
        display: none; /* モバイルでは下線アニメーションを非表示 */
    }


    .hamburger-menu {
        display: flex; /* モバイルでのみ表示 */
    }

    /* 全体の水平方向のスクロールを禁止 */
    body {
        overflow-x: hidden;
    }

    #hero {
        min-height: 60vh; /* モバイルでのヒーローセクションの高さ */
        background-size: cover; /* 背景画像をカバーに */
        background-position: center; /* 背景画像の位置を中央に */
    }
    #hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    #hero p {
        font-size: 0.95rem; /* フォントサイズを調整 */
    }
    .hero-button {
        padding: 12px 28px; /* パディングを調整 */
        font-size: 0.9rem; /* フォントサイズを調整 */
    }

    .content-section {
        padding: 40px 0; /* セクションのパディングを調整 */
    }
    .content-section h2, 
    .page-header h1 {
        font-size: 1.8rem;
        margin-bottom: 30px; /* マージンを調整 */
    }
    .content-section h2::after {
        width: 50px; /* 下線の幅を調整 */
        height: 3px; /* 下線の高さを調整 */
    }
    .content-section h2 .section-title-en, .page-header h1 .section-title-en {
        font-size: 0.8rem;
    }

    /* --- 開放期間カード --- */
    .schedule-period {
        flex-direction: column;
        gap: 15px;
    }
    .date-arrow {
        transform: rotate(90deg);
    }

    /* --- 参加方法ページ --- */
    .page-header {
        padding: 40px 0;
    }
    .tab-btn {
        font-size: 1rem;
        padding: 15px 10px;
    }
    .edition-content {
        padding: 20px;
    }
    .copy-field {
        flex-direction: column;
        align-items: stretch;
    }
    .copy-field .field-content {
        text-align: center;
    }
    .copy-btn {
        justify-content: center;
    }
    .join-steps li {
        padding-left: 40px;
    }
    .join-steps li::before {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    /* --- 寄付ページ --- */
    .donate-card {
        padding: 20px;
    }
    .intro-text {
        font-size: 1rem; /* フォントサイズを調整 */
    }
    .highlight-text {
        padding: 10px;
    }
    .donate-methods {
        flex-direction: column; /* 縦並びにする */
        align-items: center; /* 中央揃え */
        gap: 20px;
    }
    .method-card {
        width: 100%; /* フル幅にする */
        max-width: 350px; /* モバイルでの最大幅 */
    }
    .method-card h4 {
        font-size: 1.4rem;
    }
    .paypay-logo {
        height: 25px;
    }
    .contact-btn {
        padding: 12px 25px; /* パディングを調整 */
        font-size: 1rem; /* フォントサイズを調整 */
    }
    .donate-notes {
        padding: 20px;
    }
    .donate-notes h3 {
        font-size: 1.2rem;
    }
    .donate-notes li {
        font-size: 1rem; /* フォントサイズを調整 */
    }
}
