/**
 * g-page-v2 ゲームページ用 CSS
 *
 * 旧 g-page の page/page-game.php に inline 書きされていたゲームメニュー＆ローディング
 * のスタイルを抽出。
 */

.game-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px;
    color: var(--gpv2-text, #222);
}

.game-page .page-header {
    margin: 0 0 16px;
}

.game-page .page-title {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.game-page .page-lead {
    font-size: 0.95rem;
    color: var(--gpv2-text-muted, #555);
    margin: 0;
}

/* ========================================
 *  ゲームホスト
 * ======================================== */
.page-game-host {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #050c14;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#page-game-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    overflow: hidden;
}

/* ========================================
 *  ゲーム選択メニュー
 * ======================================== */
.game-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 600px;
    padding: 24px 16px;
    box-sizing: border-box;
    background: radial-gradient(ellipse at center, #0d1b2a 0%, #050c14 100%);
}

.game-menu__title {
    font-size: clamp(18px, 4vw, 28px);
    font-weight: bold;
    color: #7ecff5;
    letter-spacing: 6px;
    margin: 0 0 28px;
    text-shadow: 0 0 20px rgba(126, 207, 245, 0.5);
}

.game-menu__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 640px;
}

.game-menu__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.12);
    border-top-color: rgba(255,255,255,0.22);
    border-left: 3px solid var(--card-color, #444);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    color: inherit;
    font-family: inherit;
}

.game-menu__card:not(.game-menu__card--disabled):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 12px var(--card-color, #444);
    background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
}

.game-menu__card--disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.game-menu__icon {
    font-size: 36px;
    line-height: 1;
}

.game-menu__name {
    font-size: 13px;
    font-weight: bold;
    color: #e0e8f0;
    letter-spacing: 1px;
}

.game-menu__desc {
    font-size: 11px;
    color: #6a8aa0;
    text-align: center;
}

.game-menu__badge {
    font-size: 10px;
    color: #7ecff5;
    border: 1px solid #7ecff5;
    border-radius: 3px;
    padding: 1px 5px;
}

/* ========================================
 *  ローディング
 * ======================================== */
.game-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 600px;
    gap: 16px;
    background: #050c14;
    color: #7ecff5;
    font-size: 14px;
    letter-spacing: 2px;
}

.game-loading__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(126, 207, 245, 0.2);
    border-top-color: #7ecff5;
    border-radius: 50%;
    animation: gpv2-game-spin 0.8s linear infinite;
}

@keyframes gpv2-game-spin {
    to { transform: rotate(360deg); }
}

.game-loading__btn {
    margin-top: 8px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid #7ecff5;
    border-radius: 4px;
    color: #7ecff5;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.game-loading__btn:hover {
    background: rgba(126, 207, 245, 0.1);
}

/* ========================================
 *  ゲーム中: メニュー戻りボタン
 * ======================================== */
.game-back-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 9999;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.game-back-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}
