html {
    background-color: #010E1C;
    height: 100%;
}

body {
    font-family: 'Helvetica Neue', Arial, "M PLUS Rounded 1c", sans-serif;
    line-height: 1.6;
    color: #e0e0e0;

    background-color: transparent;
    max-width: 980px;
    margin: 40px auto;
    padding: 20px;

    /* 背景の設定 */
    background-size: auto;
    background-repeat: repeat;
    background-position: top left;
    background-attachment: fixed;
}


#bg-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.95) 100%);
pointer-events: none;
z-index: -100;
}

.menu-toggle {
    position: fixed;
    top: 20px;
    left: 25px;
    font-size: 28px;
    color: #F4B002;
    cursor: pointer;
    z-index: 2000;
    user-select: none;
    background: rgba(1, 14, 28, 0.8);
    padding: 10px 15px;
    border-radius: 6px;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -360px;
    width: 360px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    padding-top: 100px;
    transition: all 0.3s ease;
    z-index: 1500;
}

.side-menu.open {
    left: 0;
}

.side-menu ul {
    list-style: none;
    padding: 0;
}

.side-menu li {
    padding: 15px 20px;
}

.side-menu a {
    text-decoration: none;
    color: #F4B002;
    font-size: 20px;
}

.side-menu a.active-page {
    background-color: #B30404;
    color: #ffffff !important;
    font-weight: bold;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
}

/* ヘッダー・見出し */
.header-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
}

<h1> {
    color: #F4B002;
    border-bottom: 2px solid #F4B002;
    padding-bottom: 10px;
    text-align: center;
}

<h2> {
    color: #F4B002;
    border-left: 4px solid #F4B002;
    padding-left: 10px;
    margin-top: 30px;
}

.avatar-section {
    margin-top: 30px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.avatar-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 14px;
    border: 1.3px solid rgba(244, 176, 2, 0.5);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 8px rgba(244, 176, 2, 0.5);
}

.avatar-name {
    font-size: 18px;
    font-weight: bold;
    color: #F4B002;
    margin-bottom: 10px;
}

.avatar-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
}

.sns-icons-row img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border: 1px solid rgba(244, 176, 2, 0.2);
    transition: transform 0.2s ease;
}

.sns-icons-row img:hover {
    transform: scale(1.12);
}

/* ==========================================
 * フォトギャラリー グリッド＆カードデザイン
 * ========================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(244, 176, 2, 0.2);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(244, 176, 2, 0.6);
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ==========================================
 * モーダルライトボックス 3Dフリップアニメーション
 * ========================================== */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 14, 28, 0.9);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.photo-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 3D空間の定義 */
.overlay-card-container {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    perspective: 1500px;
}

/* 回転するカード本体 */
.overlay-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(0deg);
}

/* トリガーが引かれたら180度反転 */
.overlay-card.flipped {
    transform: rotateY(180deg);
}

.overlay-front, .overlay-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 表面（最初に見えている透明な側） */
.overlay-front {
    background: transparent;
    z-index: 2;
    transform: rotateY(0deg);
}

/* 裏面（ひっくり返って現れる写真） */
.overlay-back {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(244, 176, 2, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    padding: 10px;
    transform: rotateY(180deg);
}

.overlay-back img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* ==========================================
 * プロフィールの使用ソフト表示
 * ========================================== */
.software-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.software-icon {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(244, 176, 2, 0.2);
    transition: transform 0.2s ease;
}

.software-icon:hover {
    transform: scale(1.08);
}

/* スマホ向け（小さめ） */
@media (max-width: 820px) {
    .software-icon {
        width: 70px;
        height: 70px;
    }
}

/* ==========================================
 * スマホ向けレスポンシブ設定 (820px以下)
 * ========================================== */
@media (max-width: 820px) {
    .menu-toggle {
        left: 50%;
        transform: translateX(-50%);
        font-size: 30px;
    }

    .side-menu {
        width: 100%;
        left: 0;
        top: -100%;
        height: auto;
        padding-bottom: 40px;
        transition: top 0.3s ease;
    }

    .side-menu.open {
        top: 0;
        left: 0;
    }

    body {
        padding-top: 80px;
    }

    .avatar-grid {
        grid-template-columns: 1fr;
    }

    .sns-icons-row img {
        width: 50px;
        height: 50px;
    }

    /* スマホ用ギャラリー調整 */
    .photo-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .overlay-card-container {
        height: 60vh; /* スマホでは高さをやや控えめにして見やすく */
    }
}


/* ==========================================
 * 追加カスタマイズ：MODs用 縦長カードデザイン
 * ========================================== */
.mod-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
    justify-items: center;
}

.mod-card-container {
    width: 240px;       /* 横幅を少し引き締め */
    height: 350px;      /* 高さを高めにして縦長に変更 */
    cursor: pointer;
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.mod-card-container:hover {
    transform: translateY(-8px);
}

.mod-card-inner {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(244, 176, 2, 0.3);
    border-radius: 16px;
    padding: 20px 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease;
}

.mod-card-container:hover .mod-card-inner {
    border-color: rgba(244, 176, 2, 0.8);
}

/* 画像・アイコンの囲い */
.mod-icon-wrapper {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    border: 1px solid rgba(244, 176, 2, 0.1);
}

.mod-display-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

.mod-display-emoji {
    font-size: 3.2em;
}

/* ==========================================
 * 追加カスタマイズ：MODポップアップ個別スタイル
 * ========================================== */
.mod-popup-container {
    max-width: 780px !important;
    height: 85vh !important;
}

/* モーダルの表面（カードがフリップしながら巨大化する状態） */
.mod-overlay-front {
    background: transparent !important;
}

/* モーダルの裏面（詳細情報が浮かぶウィンドウ） */
.mod-overlay-back {
    background: #011428 !important; /* サイトより少し深い濃紺 */
    border: 2px solid #F4B002 !important;
    display: block !important; /* スクロール可能にするためblockに */
    padding: 35px 30px !important;
    box-sizing: border-box;
    overflow: hidden;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close-btn:hover {
    color: #F4B002;
}

/* 各コンテンツエリア */
.mod-detail-content {
    display: none;
    height: 100%;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* アクティブな詳細テキストだけ表示＆フェードイン */
.mod-detail-content.is-visible {
    display: flex;
    opacity: 1;
}

.modal-lead {
    font-size: 1.05em;
    color: #fff;
    margin: 15px 0 20px;
    background: rgba(255,255,255,0.04);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #B30404;
    text-align: center;
}

/* スクロールするリスト領域 */
.mod-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 10px;
}

.mod-list-scroll h3 {
    color: #F4B002;
    font-size: 1.15em;
    margin-top: 25px;
    border-bottom: 1px dashed rgba(244, 176, 2, 0.4);
    padding-bottom: 6px;
}

.mod-list-scroll ul {
    list-style: none;
    padding-left: 5px;
    margin-bottom: 15px;
}

.mod-list-scroll li {
    margin-bottom: 10px;
    font-size: 0.95em;
    line-height: 1.6;
}

.mod-list-scroll li strong {
    color: #ffdd67;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    font-family: monospace;
}

/* スクロールバー装飾 */
.mod-list-scroll::-webkit-scrollbar {
    width: 6px;
}
.mod-list-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}
.mod-list-scroll::-webkit-scrollbar-thumb {
    background: #F4B002;
    border-radius: 3px;
}

/* スマホ用レスポンシブ微調整 */
@media (max-width: 820px) {
    .mod-popup-container {
        height: 90vh !important;
    }
    .mod-overlay-back {
        padding: 40px 15px 20px !important;
    }
}

/* ==========================================
 * MODポップアップ：位置固定＆コンテンツ自動スクロール修正
 * ========================================== */
.mod-popup-container {
    max-width: 780px !important;
    width: 95% !important;
    /* 親の3D空間の高さは画面に収まる固定値にし、位置を中央にロックします */
    height: 80vh !important; 
    display: flex;
}

.mod-overlay-back {
    background: #011428 !important;
    border: 2px solid #F4B002 !important;
    padding: 30px 25px 20px !important;
    box-sizing: border-box;
    width: 100%;
    height: 100% !important; /* 3D枠いっぱいに広げる */
    overflow: hidden;
    display: flex;
    flex-direction: column; /* 上から順に綺麗に並べる */
}

/* スクロール領域：ここが文字量に合わせて自動で伸縮し、溢れたらスクロールします */
.mod-list-scroll {
    flex: 1 1 auto; /* 残りの高さをすべてこの領域に割り当てる */
    overflow-y: auto;
    padding-right: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center; /* Dynmapの文字中央寄せを維持 */
}

/* ボタンが下部で途切れないように少し余白を確保 */
.mod-list-scroll .buy-button {
    margin: 20px auto 10px;
}

/* スマホ向けレスポンシブ調整 */
@media (max-width: 820px) {
    .mod-popup-container {
        height: 85vh !important; /* スマホは少し縦を広げて画面を有効活用 */
        width: 92% !important;
    }
    .mod-overlay-back {
        padding: 40px 15px 15px !important; /* 閉じるボタンと被らないよう上をあける */
    }
}
/* ==========================================
 * 追加カスタム：マップ・Discord用の赤いボタン
 * ========================================== */
.red-button {
    display: inline-block;
    background-color: #B30404; /* サイドメニューのアクティブ時と同じかっこいい赤 */
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 35px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(179, 4, 4, 0.4);
    transition: all 0.2s ease;
    cursor: pointer;
}

.red-button:hover {
    background-color: #dc0404; /* ホバー時に少し明るく光る */
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(179, 4, 4, 0.6);
}

.red-button:active {
    transform: translateY(0);
}