@charset "utf-8";
/* CSS Document */

/* --- ボックスモデルの計算を直感的にする魔法のコード --- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ベース設定（Xのダークモードを意識した配色） */
body {
    margin: 0;
    padding: 0;
    background-color: #15202b; /* ダークグレー */
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- 修正箇所 --- */
.portal-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--container-bg);
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    
    position: relative; /* ★これを追加（子要素を絶対配置するための基準にする） */
}

/* --- 新規追加箇所（ボタンの配置とデザイン） --- */
.theme-switch-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10; /* バナー画像より手前に表示させる */
}

/* --- 新規追加箇所（ボタンの配置とデザイン） --- */
.header-menu-area {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10; /* バナー画像より手前に表示させる */
}

.theme-toggle-btn {
/* 背景色 ４９行 ５１行 ５３行 ６８行 ７５行 ８０行 */
/*    background: rgba(0, 0, 0, 0.4);  バナー画像の上でも見えるように半透明の背景 */
    background: rgba(0, 0, 0, 0.01); /* バナー画像の上でも見えるように半透明の背景 */
/*    border: 1px solid var(--border-color); */
    border: 1px solid rgba(0,0,0,0.00);
/*    border-radius: 50%; */
    border-radius: 30%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: #ffffff; /* アイコン自体の色 */
    backdrop-filter: blur(4px); /* 背景を少しぼかすと高級感が出ます（対応ブラウザのみ） */
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.theme-toggle-btn:hover {
/*    background: rgba(0, 0, 0, 0.7); */
	background: rgba(0, 0, 0, 0.0);
    transform: scale(1.05);
}

/* ライトテーマ時のボタン背景の微調整 */
body.light-theme .theme-toggle-btn {
/*    background: rgba(255, 255, 255, 0.6); */
    background: rgba(255, 255, 255, 0.4);
    color: #0f1419;
}
body.light-theme .theme-toggle-btn:hover {
/*    background: rgba(255, 255, 255, 0.9); */
    background: rgba(255, 255, 255, 0.6);
}

/* ヘッダーバナー */
.header-banner {
    height: 200px;
    background-color: #38444d; /* 画像がない場合のプレースホルダー色 */
    background-image: url('../img/mew_2024_banner.jpg');
    background-size: cover;
    background-position: center;
}

/* プロフィール領域と、Xライクなアイコンの重ね合わせ */
.profile-section {
    padding: 0 16px;
    position: relative;
}

/* 修正後 */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--container-bg); /* ★ここを変数に変更！ */
    margin-top: -60px;
    background-color: #555;
    object-fit: cover;
    transition: border-color 0.3s ease; /* ★色がフワッと変わるように追加 */
}

.profile-name {
    margin: 12px 0 4px 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.profile-bio {
    color: #8899a6;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* 外部リンク集のスタイリング */
.link-tree {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 30px;
    background-color: #1c2733; /* モノクロに近い標準色 */
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.brand-link:active {
    transform: scale(0.98);
}

.brand-link .icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* ★ホバー時のブランドカラー変化 */
.brand-link.patreon:hover { background-color: #FF424D; }
.brand-link.x-twitter:hover { background-color: #1DA1F2; } /* Xは黒ですが、ダークモード背景で目立たせるため青系や少し明るいグレー等に調整 */
.brand-link.instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.brand-link.fantia:hover { background-color: #E5002D; } /* 実際のブランドカラーに合わせて微調整してください */


/* エントランス領域（同意ボタン） */
.entrance-section {
    padding: 24px 16px;
    border-top: 1px solid #38444d;
    text-align: center;
}

.btn-entrance {
    background-color: #eff3f4; /* 白系の目立つボタン */
    color: #0f1419;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 16px 32px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
}

.btn-entrance:hover {
    background-color: #d7dbdc;
}

.cookie-note {
    font-size: 0.8rem;
    color: #8899a6;
    margin-top: 12px;
    line-height: 1.4;
}

/* ========================================= */
/* --- 言語によるテキストの表示切り替えロジック --- */
/* ========================================= */
/* デフォルト（日本語モード）の時は英語を隠す */
.text-en { display: none; }
.text-ja { display: inline-block; }

/* bodyに 'lang-en' クラスが付いた時（英語モード）は日本語を隠して英語を出す */
body.lang-en .text-ja { display: none !important; }
body.lang-en .text-en { display: inline-block !important; }

/* 注: ブロック要素（pタグ内など）の切り替え用のユーティリティ */
body.lang-en .block-ja { display: none !important; }
body.lang-en .block-en { display: block !important; }
.block-en { display: none; }




/* ========================================= */
/* ★追加：ポータル画面を高級にする装飾とアニメーション */
/* ========================================= */

/* 1. アバターアイコンに「触りたくなる」浮遊感を追加 */
.profile-avatar {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
.profile-avatar:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* 2. 入場ボタンを「プレミアム」なデザインに進化 */
.btn-entrance.premium-btn {
    background: linear-gradient(135deg, #1DA1F2, #0084b4); /* Xブルーの美しいグラデーション */
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.btn-entrance.premium-btn:hover {
    background: linear-gradient(135deg, #1a91da, #00739e);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 161, 242, 0.5);
}

.btn-entrance.premium-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(29, 161, 242, 0.3);
}

/* ボタンが静かに呼吸するようなハイライト（光の反射）アニメーション */
.btn-entrance.premium-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translateX(-100%);
    animation: buttonShine 6s infinite ease-in-out;
}

@keyframes buttonShine {
    0% { transform: rotate(30deg) translateX(-100%); }
    20%, 100% { transform: rotate(30deg) translateX(100%); }
}

/* 3. 注釈テキストをより洗練された「免責事項」風に */
.cookie-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 16px;
    letter-spacing: 0.5px; /* 文字間隔を少し開けて上品に */
}









/* ========================================= */
/* ★追加：ポータル画面を高級にする装飾とアニメーション */
/* ========================================= */

/* 1. アバターアイコンに「触りたくなる」浮遊感を追加 */
.profile-avatar {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
.profile-avatar:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* 2. 入場ボタンを「プレミアム」なデザインに進化 */
.btn-entrance.premium-btn {
    background: linear-gradient(135deg, #1DA1F2, #0084b4); /* Xブルーの美しいグラデーション */
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.btn-entrance.premium-btn:hover {
    background: linear-gradient(135deg, #1a91da, #00739e);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 161, 242, 0.5);
}

.btn-entrance.premium-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(29, 161, 242, 0.3);
}

/* ボタンが静かに呼吸するようなハイライト（光の反射）アニメーション */
.btn-entrance.premium-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translateX(-100%);
    animation: buttonShine 6s infinite ease-in-out;
}

@keyframes buttonShine {
    0% { transform: rotate(30deg) translateX(-100%); }
    20%, 100% { transform: rotate(30deg) translateX(100%); }
}




/* ========================================= */
/* ★追加：スマート・モーダルボタンの制御 */
/* ========================================= */

/* アバターとボタンをまとめる箱（中央寄せ） */
.avatar-and-menu-wrapper {
    position: relative;
    display: inline-block; /* 中身のサイズに合わせる */
    text-align: left;
    width: 100%;
}

/* 1. 初期状態：アバターの右端に追随 */
#smart-menu-container {
    position: absolute;
    bottom: 5px;       /* アバターの下の方に配置 */
    right: 0%;        /* 右を基準にし... */
    /*margin-right: -75px;  アバターの半径+少し外側にずらす */
    z-index: 60;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* バネのような滑らかな動き */
}

/* ボタンがアバターの横にある時は、背景を少し濃くして視認性を上げる */
#smart-menu-container .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.5); 
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    
    /* ★修正：透明な壁を貫通してクリックを強制的に最優先にする魔法 */
    position: relative;
    z-index: 1000;
    pointer-events: auto !important;
}
body.light-theme #smart-menu-container .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.8);
}

/* 2. アバターが見えなくなった時：画面右上にFix（固定） */
#smart-menu-container.menu-fixed {
    position: fixed;
    top: 15px;
    right: 15px;
    bottom: auto;
    margin-right: 0;
    /* 右上にいる時は、以前の半透明な美しいスタイルに戻す */
}
#smart-menu-container.menu-fixed .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.01);
    box-shadow: none;
}
body.light-theme #smart-menu-container.menu-fixed .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.4);
}

/* 3. さらに下にスクロールした時：隠す */
#smart-menu-container.menu-hidden {
    transform: translateY(-100px); /* 上にスライドして隠れる */
    opacity: 0;
    pointer-events: none;
}
