body {
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

#game-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Canvasをレスポンシブに */
#gameCanvas {
    background-color: #7cdaff;
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 800px;
    transition: background-color 2s ease-in-out;
}

/* トップ画面の透明PNGをcanvasの上に */
#top-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 10;
    pointer-events: none;
}

#top-image.hidden {
    display: none;
}

@keyframes skyChange {
    0%, 100% {
        background-color: #7cdaff;
    }
    35% {
        background-color: #ff8f62;
    }
    50% {
        background-color: #1a1414;
    }
    85% {
        background-color: #ffc267;
    }
}

#jump-btn {
    margin-top: 3rem;
    display: inline-block;
    border-radius: 60px;
    font-size: 140%;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    padding: 12px 12px;
    background: #ffb8e0;
    color: #ffffff;
    line-height: 1em;
    transition: .2s;
    border: 2px solid #ffa3d7;
    text-decoration: none;
}

#button-container {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#action-btn {
    position: absolute;
    bottom: 4%;
    right: 2.5%;
    width: 10%;
    height: 16%;
    max-width: 80px;
    max-height: 80px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 50%;
    background-color: #145bff;
    color: white;
    font-size: clamp(10px, 2vw, 14px);
    font-weight: bold;
    font-family: 'BananaFont', sans-serif;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#action-btn:hover {
    background-color: #0f48c9;
}

#action-btn:active {
    background-color: #0b3799;
    transform: scale(0.92);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

canvas {
    background-repeat: no-repeat;
    background-position: center;
}

/* タブレット対応 */
@media screen and (max-width: 768px) {
    
    #action-btn {
        bottom: 3%;
        right: 3%;
        width: 12%;
        height: 18%;
    }
}

/* スマートフォン対応 */
@media screen and (max-width: 480px) {
    
    #action-btn {
        bottom: 5%;
        right: 5%;
        width: 15%;
        height: 15%;
        min-width: 60px;
        min-height: 60px;
        font-size: 11px;
    }
}