@charset "utf-8";
/* CSS Document: Portal Page Specific Styles (index.php) */

/* ========================================= */
/* 1. リンクツリー（一列のスマートアイコン） */
/* ========================================= */
.social-links-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(4px);
}

body.light-theme .social-icon {
    background-color: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ★変更前：上に6px移動して、少し拡大していた */
/*
.social-icon:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}
*/

/* ★変更後：上への移動をなくし、少しだけフワッと大きくするのみ */
.social-icon:hover {
    transform: scale(1.1); /* 拡大率はお好みで 1.05 〜 1.15 の間で調整してみてください */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* ホバー時のブランドカラー発色 */
.social-icon.patreon:hover { background-color: #FF424D; color: #fff; border-color: #FF424D; }
.social-icon.pixiv:hover { background-color: #0096FA; color: #fff; border-color: #0096FA; }
.social-icon.x-twitter:hover { background-color: #1DA1F2; color: #fff; border-color: #1DA1F2; }
.social-icon.bluesky:hover { background-color: #0085FF; color: #fff; border-color: #0085FF; } /* ★Blueskyブルーを追加 */
.social-icon.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; border-color: transparent; }
.social-icon.youtube:hover { background-color: #FF0000; color: #fff; border-color: #FF0000; }
.social-icon.fantia:hover { background-color: #E5002D; color: #fff; border-color: #E5002D; }

/* ========================================= */
/* ★追加：SVGマスク（外部画像を読み込んで色を変える魔法） */
/* ========================================= */
.svg-mask {
    display: inline-block;
    width: 24px;
    height: 24px;
    /* ↓ 型抜きされる「生地の色」。親要素（.social-icon）の文字色を自動で引き継ぎます */
    background-color: currentColor; 
    
    /* マスクの共通設定（画像がピッタリ収まるようにする） */
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* 各アイコンの外部ファイルへのパスを指定 */
/* ※パスは portal.css から見た相対パス（ ../../img/... 等）に調整してください */
.mask-patreon {
    -webkit-mask-image: url('../img/01_patreon.svg');
    mask-image: url('../img/01_patreon.svg');
}

.mask-pixiv {
    -webkit-mask-image: url('../img/01_pixiv.svg');
    mask-image: url('../img/01_pixiv.svg');
}

.mask-x {
    -webkit-mask-image: url('../img/01_x.svg');
    mask-image: url('../img/01_x.svg');
}

.mask-instagram {
    -webkit-mask-image: url('../img/01_instagram.svg');
    mask-image: url('../img/01_instagram.svg');
}

.mask-youtube {
    -webkit-mask-image: url('../img/01_youtube.svg');
    mask-image: url('../img/01_youtube.svg');
}

.mask-bluesky {
    -webkit-mask-image: url('../img/01_bluesky.svg');
    mask-image: url('../img/01_bluesky.svg');
}










/* ========================================= */
/* 2. エントランス領域（プレミアムなゲートウェイ） */
/* ========================================= */
.entrance-section {
    /* 事務的なボーダーラインを削除し、シームレスに繋げる */
    padding: 40px 16px 20px 16px;
    text-align: center;
    position: relative;
    z-index: 100; /* ★ここを10から100に変更！王冠(50)のさらに上を行きます */
}

/* ボタンをさらに美しく、少し横幅を絞って上品に */
.btn-entrance.premium-btn {
    background: linear-gradient(135deg, #1DA1F2, #0084b4);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: bold;
    padding: 18px 0;
    width: 90%;          /* 画面端までいかず、少し余白を持たせる */
    max-width: 400px;    /* PCで見ても間延びしないサイズ */
    margin: 0 auto;      /* 中央寄せ */
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(29, 161, 242, 0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ホバーでさらに浮き上がる */
.btn-entrance.premium-btn:hover {
    background: linear-gradient(135deg, #1a91da, #00739e);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(29, 161, 242, 0.5);
}

.btn-entrance.premium-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 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.15) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translateX(-100%);
    animation: buttonShine 5s infinite ease-in-out; /* 光る間隔を少し早めに */
}

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

/* 注釈テキストを上品に */
.cookie-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 16px;
    letter-spacing: 0.5px;
}





/* ========================================= */
/* ★追加：キャラクターショーケース（Interactive Cards） */
/* ========================================= */

.character-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 常に2列のグリッド */
    gap: 16px;
    margin-bottom: 20px;
}

.char-card {
    position: relative;
    height: 200px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    cursor: pointer;
    
    /* 初期状態：モノクロ ＆ 少し暗くして背景に溶け込ませる */
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ホバー時の魔法：フルカラーになり、手前に浮き上がる */
.char-card:hover {
    filter: grayscale(0%) brightness(1.1);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 2;
}

/* テキストを読みやすくするための下部グラデーション */
.char-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 60%;
    background: linear-gradient(to top, rgba(15, 20, 25, 0.9) 0%, rgba(15, 20, 25, 0) 100%);
    transition: opacity 0.3s ease;
}

/* 文字情報の設定 */
.char-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    text-align: left;
    pointer-events: none; /* テキスト部分がマウス判定の邪魔をしないように */
}

.char-school {
    display: block;
    font-size: 0.65rem;
    color: #1DA1F2; /* ブランドカラーで学校名を小さく */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
    opacity: 0.8;
}

.char-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.char-role {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: #8899a6;
    font-style: italic;
}

/* スマホ表示時の微調整（文字が大きくなりすぎないように） */
@media screen and (max-width: 400px) {
    .char-card { height: 160px; }
    .char-name { font-size: 1rem; }
}





/* --- ダイレクトリンクのホバー演出 --- */
.direct-gallery-link:hover span {
    opacity: 1 !important;
    color: #1DA1F2 !important;
    text-decoration: underline;
}

/* --- サブキャラクターグリッド（3列） --- */
.sub-character-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

.sub-char-card {
    position: relative;
    height: 120px; /* メインより一回り小さくして、序列を表現 */
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    cursor: pointer;
    filter: grayscale(100%) brightness(0.6);
    transition: all 0.4s ease;
}

.sub-char-card:hover {
    filter: grayscale(0%) brightness(1.1);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.sub-char-info {
    position: absolute;
    bottom: 8px;
    left: 8px;
    text-align: left;
    pointer-events: none;
}

.sub-char-name {
    margin: 0;
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ========================================= */
/* 3. 認証バッジ（金）の専用カラー */
/* ========================================= */
.verified-badge.badge-gold {
    color: #ce973e; /* 少し落ち着いた高級感のあるゴールド */
}







/* ========================================= */
/* ★追加：キャラクター愛の可視化（Love Count） */
/* ========================================= */
.char-love-count {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
    transition: all 0.3s ease;
    pointer-events: none; /* カード自体のクリックを邪魔しない */
}

/* サブキャラ用は少しだけ小さく調整 */
.char-love-count.sub {
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    padding: 2px 8px;
}

/* ホバーした瞬間に「愛」が発光する演出 */
.char-card:hover .char-love-count,
.sub-char-card:hover .char-love-count {
    color: #F91880; /* X(Twitter)のLikeカラー */
    background: rgba(249, 24, 128, 0.1);
    border-color: rgba(249, 24, 128, 0.3);
    transform: scale(1.1);
    opacity: 1;
}




/* ========================================= */
/* ★追加：ランキング1位の称号（王冠） */
/* ========================================= */
.char-crown {
    position: absolute;
    top: -12px;  /* カードの上枠から少しはみ出させる */
    left: -8px;  /* 左枠からも少しはみ出させる */
    font-size: 1.8rem;
    z-index: 20; /* 最前面に配置 */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transform: rotate(-15deg); /* 少し斜めにするのがオシャレのコツ */
    animation: crownFloat 3s infinite ease-in-out;
    pointer-events: none;
}

/* 王冠にわずかな浮遊感を与えるアニメーション */
@keyframes crownFloat {
    0%, 100% { transform: rotate(-15deg) translateY(0); }
    50% { transform: rotate(-10deg) translateY(-5px); }
}

/* サブキャラが1位になった場合のサイズ調整 */
.sub-char-card .char-crown {
    font-size: 1.4rem;
    top: -10px;
    left: -6px;
}




/* --- カード本体：切り抜きを解除し、王冠の土台にする --- */
.char-card, .sub-char-card {
    position: relative;
    background: none !important; /* 背景は inner に任せる */
    border: none !important;     /* 枠線も inner に任せる */
    overflow: visible !important; /* 王冠を外に見せる */
    cursor: pointer;
}

/* ========================================= */
/* ★追加：外側の二重アニメーションを完全に封印する魔法 */
/* ========================================= */
.char-card, .sub-char-card,
.char-card:hover, .sub-char-card:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* --- 内側の箱：ここで画像やオーバーレイを丸く切り抜く --- */
.char-inner, .sub-char-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    overflow: hidden; /* ★ここで画像やグラデーションを閉じ込める */
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ホバー時のエフェクト対象を inner に変更 */
.char-card:hover .char-inner,
.sub-char-card:hover .sub-char-inner {
    filter: grayscale(0%) brightness(1.1);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 王冠の位置微調整：より「載っている」感を出す */
.char-crown {
    position: absolute;
    top: -20px;  /* さらに少し上に持ち上げて、枠外へはみ出させる */
    left: -10px;
    font-size: 2.2rem; /* 少し大きくして存在感をアップ */
    z-index: 50; 
    /* ...以下アニメーション設定は維持... */
}


/* --- サブキャラカード本体：動きを完全に停止（王冠の土台に専念） --- */
.sub-char-card {
    position: relative;
    background: none !important;
    border: none !important;
    overflow: visible !important; /* 王冠を表示 */
    cursor: pointer;
    transform: none !important;  /* ★外側は動かさない */
}

/* --- サブキャラの内側の箱：動きをマイルドに調整 --- */
.sub-char-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
    filter: grayscale(100%) brightness(0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ★修正：サブキャラ専用のホバー。移動を -3px 程度に抑え、拡大も控えめに */
.sub-char-card:hover .sub-char-inner {
    filter: grayscale(0%) brightness(1.1);
    transform: translateY(-3px) scale(1.01); /* 元の半分くらいの動き */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- おまけ：サブキャラ用のいいね数バッジのサイズ微調整 --- */
.sub-char-card .char-love-count {
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    padding: 2px 8px;
}