/* ユーザー画面カスタムスタイル（Viteビルド不要・即時反映用） */

/* PC/SP で対応するヘッダー画像だけを表示する（ページ固有CSSが効かないイベントページ等のフォールバック） */
/* 基本: SP 画像のみ表示 */
.pc-mainimg {
    display: none;
}
.sp-mainimg {
    display: block;
    width: 100%;
}

/* PC幅以上: PC 画像のみ表示 */
@media (min-width: 768px) {
    .pc-mainimg {
        display: block;
        width: 100%;
        max-width: 1180px;
        margin: auto;
    }
    .sp-mainimg {
        display: none;
    }
}

/* BJ イベント: コインテーブルのコインアイコン */
.coin-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
}

/* チケットアイコン */
.ticket-icon {
    display: inline-block;
    width: 56px;
    height: auto;
    vertical-align: middle;
    margin-right: 4px;
}

/* BJ イベント: 全体を白ベース(0.8透過)・文字黒に */
#event-page {
    color: #000 !important;
    font-size: calc(1em + 1px);
}
#event-page [v-cloak] { display: none; }
#event-page .event-section {
    background: rgba(255, 179, 233, 0.85) !important;
    color: #000;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
#event-page .event-section p {
    color: #000 !important;
}
#event-page .event-h2 {
    color: #ff1493;
    font-size: 1.2em;
    margin-bottom: 10px;
}
#event-page .event-table {
    width: 100%;
    border-collapse: collapse;
}
#event-page .event-table th {
    color: #e91e63 !important;
    border-color: #ccc;
    padding: 8px;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
    text-align: left;
}
#event-page .event-table td {
    color: #000 !important;
    border-color: #ccc;
    padding: 8px;
    border-bottom: 1px solid #ccc;
}
/* 上位ランク: 王冠アイコン */
#event-page .event-table .rank-row .rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1;
}
#event-page .event-table .rank-medal-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
#event-page .event-table .rank-row td {
    vertical-align: middle;
}
#event-page .event-table .rank-row td:first-child {
    white-space: nowrap;
    min-width: 72px;
    text-align: center;
}
#event-page .event-table .rank-row .rank-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 2em;
}
#event-page .event-table .rank-1 td {
    font-size: 1.25em;
    font-weight: bold;
    color: #111 !important;
}
#event-page .event-table .rank-2 td {
    font-size: 1.1em;
    font-weight: bold;
    color: #222 !important;
}
#event-page .event-table .rank-3 td {
    font-size: 1.05em;
    font-weight: bold;
    color: #333 !important;
}

/* コイン交換モーダル */
#event-page .coin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
#event-page .coin-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    min-width: 280px;
    max-width: 90vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #000;
    text-align: center;
}
#event-page .coin-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #e91e63;
    margin-bottom: 14px;
}
#event-page .coin-modal-body {
    margin-bottom: 20px;
    line-height: 1.6;
}
#event-page .coin-modal-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}
#event-page .coin-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
#event-page .coin-modal-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #e91e63;
}
#event-page .coin-modal-btn--primary {
    background: #e91e63;
    color: #fff;
}
#event-page .coin-modal-btn--cancel {
    background: #fff;
    color: #e91e63;
}
#event-page .coin-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ランキングローディング */
.ranking-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #000;
}
.ranking-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(233, 30, 99, 0.3);
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: ranking-spin 0.8s linear infinite;
}
@keyframes ranking-spin {
    to { transform: rotate(360deg); }
}
/* グレー系(#aaa, #ccc) を黒に、黄/ゴールド系を濃いピンクに統一 */
#event-page [style*="color: #aaa"],
#event-page [style*="color:#aaa"],
#event-page [style*="color: #ccc"],
#event-page [style*="color:#ccc"] {
    color: #000 !important;
}
#event-page [style*="color: gold"],
#event-page [style*="color:gold"],
#event-page [style*="color: #ffcb6b"],
#event-page [style*="color:#ffcb6b"],
#event-page [style*="color: #fdff28"] {
    color: #d6006b !important;
}
/* 視認性の低い淡い見出し色を濃色に */
#event-page [style*="color: #ff9999"],
#event-page [style*="color:#ff9999"] {
    color: #c23030 !important;
}
#event-page [style*="color: #99ccff"],
#event-page [style*="color:#99ccff"] {
    color: #1f4fbf !important;
}

/* カレンダー: 年月選択バーの上に隙間 */
#calendar .head {
    margin-top: 10px;
}

/* キャスト向け報酬テーブル: 順位列のフォントを強調 */
.cast-reward-table td:first-child {
    font-size: calc(1em + 2px);
    font-weight: 600;
}

/* ポイント購入ボタン: PC版チャット内の位置調整 */
.chat .roomstatus .chat-buypoint-talk {
    margin-top: 2px;
}

/* モバイル: ポイント行を横幅いっぱいに広げる */
.chat .roomstatus .chatbg-roomstatus.dom-point {
    width: 100%;
}

/* モバイル: VLPt購入ボタンの行は固定高さを解除（ボタンがはみ出て下要素と重なるのを防ぐ） */
.chat .roomstatus:has(.chat-buypoint-talk-l) {
    height: auto;
    padding-bottom: 4px;
}

/* イベントランキング枠: サンプルボイスと揃えて薄ピンクに、外側の茶枠を撤去 */
.char-ranking .ttl-sky-light .inner {
    background: linear-gradient(to right, #fd7cb6, #f5a6c8) !important;
}
.char-ranking .box-fraborder-color-pink {
    border-color: #fd7cb6 !important;
}
/* ゲージ外側の黒枠/半透明黒背景を撤去 */
.box-intimacies .gauge-area,
.box-intimacies-pc .gauge-area,
.box-intimacies-sp .gauge-area {
    border: none !important;
    background: transparent !important;
}
/* ゲージ base の背景をグレーから薄灰に */
.box-intimacies .gauge-area .base,
.box-intimacies-pc .gauge-area .base,
.box-intimacies-sp .gauge-area .base {
    background-color: #eee !important;
}
/* 獲得Exp 行のフォントサイズ */
.char-ranking .box-fraborder-color-pink .point {
    font-size: 14px !important;
}
/* イベント限定親密度の横に表示する小さなイベント名 */
.char-ranking .ttl-sky-light .inner .event-title-sub {
    font-size: 11px;
    margin-left: 8px;
    font-weight: normal;
    opacity: 0.85;
}
@media (max-width: 767px) {
    .char-ranking .ttl-sky-light .inner .event-title-sub {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* 残り時間ゲージ: 右端のラベル（5分/1分） */
.chat .pointstatus .rest_gauge_label {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%);
    font-weight: bold;
    color: #c23030;
    font-size: 0.9em;
    z-index: 2;
    margin-left: auto;
}

/* 残り時間ゲージ：端から端まで光沢が流れるアニメーション */
.chat .pointstatus .rest_bar {
    overflow: hidden;
    transition: width 0.6s ease-out, background-color 0.5s ease;
}
.chat .pointstatus .rest_bar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: linear-gradient(to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0) 100%);
    transform: translateX(100%);
    animation: rest_bar_flow 8s linear infinite;
}
@keyframes rest_bar_flow {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* イベント限定親密度: Exp 増加時の shine sweep */
.gauge-area {
    position: relative;
}
.gauge-area .gauge {
    position: relative;
    overflow: hidden;
}
@keyframes gauge-shine {
    0%   { transform: translateX(-100%); opacity: 1; }
    100% { transform: translateX(200%); opacity: 0; }
}
.gauge-area .gauge.shine::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: linear-gradient(90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0) 100%);
    animation: gauge-shine 0.6s ease-out forwards;
    pointer-events: none;
}

/* +N Exp フローティング */
@keyframes exp-float {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-28px); }
}
.exp-float-badge {
    position: absolute;
    right: 8px;
    top: -6px;
    font-size: 12px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    animation: exp-float 1.2s ease-out forwards;
    pointer-events: none;
    z-index: 5;
}
