/**
 * ゲーム選択メニュー スタイルシート
 * アテナ様のデザインに合わせた紫系グラデーション
 */

/* ========================================
   モーダルオーバーレイ
   ======================================== */
.game-selection-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-selection-modal-overlay.active {
    opacity: 1;
}

/* ========================================
   モーダル本体
   ======================================== */
.game-selection-modal {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease-out;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ========================================
   モーダルヘッダー
   ======================================== */
.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.game-modal-header h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.game-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-size: 32px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.game-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ========================================
   ゲームグリッド
   ======================================== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* ========================================
   ゲームカード
   ======================================== */
.game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.8);
}

.game-card.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.8);
}

.game-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ゲームアイコン */
.game-icon {
    font-size: 64px;
    margin-bottom: 15px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.game-card h3 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

/* ゲームステータス */
.game-status {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.game-status span {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.difficulty {
    color: #e74c3c;
}

.best-score,
.win-rate {
    color: #667eea;
    font-weight: bold;
}

/* ゲーム説明 */
.game-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* アテナ様のコメント */
.athena-comment {
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.3), rgba(255, 182, 193, 0.3));
    border-left: 4px solid #ff69b4;
    padding: 12px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 13px;
    color: #d63384;
    font-weight: 500;
    text-align: left;
    position: relative;
}

.athena-comment::before {
    content: '💬';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 20px;
}

/* プレイボタン */
.game-play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    width: 100%;
}

.game-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #6a3f8f 100%);
}

.game-play-btn:active {
    transform: translateY(0);
}

.game-card.coming-soon .game-play-btn {
    display: none;
}

/* Coming Soon表示 */
.coming-soon-note {
    font-size: 13px;
    color: #888;
    font-style: italic;
    margin-top: 10px;
}

/* ========================================
   ゲーム全画面コンテナ（オセロ用）
   ======================================== */
.game-fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-fullscreen-container.active {
    opacity: 1;
}

/* ゲームヘッダー */
.game-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.game-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.game-header h2 {
    color: white;
    margin: 0;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ゲームコンテンツ */
.game-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット */
@media (max-width: 768px) {
    .game-selection-modal {
        padding: 20px;
        width: 95%;
    }

    .game-modal-header h2 {
        font-size: 22px;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .game-card {
        padding: 20px;
    }

    .game-icon {
        font-size: 48px;
    }

    .game-card h3 {
        font-size: 20px;
    }
}

/* スマートフォン */
@media (max-width: 480px) {
    .game-selection-modal {
        padding: 15px;
        max-height: 95vh;
    }

    .game-modal-header {
        margin-bottom: 20px;
    }

    .game-modal-header h2 {
        font-size: 18px;
    }

    .game-modal-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .game-card {
        padding: 15px;
    }

    .game-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }

    .game-card h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .game-status {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .game-play-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .game-header {
        padding: 10px 15px;
        flex-wrap: wrap;
    }

    .game-back-btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .game-header h2 {
        font-size: 18px;
    }
}

/* ========================================
   スクロールバースタイル
   ======================================== */
.game-selection-modal::-webkit-scrollbar {
    width: 10px;
}

.game-selection-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.game-selection-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.game-selection-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
