/* 모달 */
.back-home {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: #e8f2ff;  /* 연한 파스텔 하늘색 */
    border: 1px solid #bcd8ff;
    border-radius: 8px;
    font-size: 14px;
    color: #4a6fa1;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.back-home:hover {
    background: #d9eaff;
}
.game-modal {
    display: block;   /* ⭐ 페이지 로드 즉시 보여야 함 */
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 9999;   /* ⭐ 흰 화면 해결 */
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-dialog {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    position: relative;
}

.game-close {
    font-size: 26px;
    border: none;
    background: none;
    cursor: pointer;
}
/* 버튼 */
/* .game-open {
    margin: 20px;
    padding: 8px 20px;
    font-size: 16px;
    display:none;
} */
.game-restart {
    padding: 6px 12px;
    background: #e8f2ff;  /* 파스텔 하늘색 */
    border: 1px solid #bcd8ff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #4a6fa1;
    transition: 0.2s ease;
}

.game-restart:hover {
    background: #d9eaff;
}

/* 게임 플레이 영역 */
.game-area {
    position: relative;
    width: 500px;
    height: 220px;
    margin: 20px auto;
    background: #cfe7ff;  /* 파스텔 하늘색 */
    border: 2px solid #b3d4ff;
    border-radius: 12px;
    overflow: hidden;
}

/* 바닥 */
.game-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; 
    height: 45px;
    background: #b6e8a5;   /* 파스텔 초록 */
}

/* 플레이어 */
.game-player {
    position: absolute;
    left: 50px;
    bottom: 0px;
    width: 50px;
    z-index: 2;
}

.player-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* 장애물 */
.game-enemy {
    position: absolute;
    left: 500px;
    bottom: 40px;
    width: 35px;
    height: 45px;
    /* background: #ff8c8c; */
    /* border-radius: 6px; */
   
    /* box-shadow: 0 0 10px rgba(255, 103, 103, 0.4); */
}
.enemy-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
/* 메시지 */
#gameMessage {
    margin-top: 10px;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
}
.jump-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;

    padding: 10px 18px;
    font-size: 15px;

    background: #ffb36b;        /* 은은한 오렌지 파스텔 */
    color: white;
    border: none;
    border-radius: 10px;

    font-weight: 600;
    cursor: pointer;
    z-index: 50;
}