body {
    text-align: center;
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
}

#game-container {
    position: relative;
    width: 300px;
    height: 400px;
    background-color: #ddd;
    overflow: hidden;
    margin: 20px auto;
    border-radius: 10px;
    border: 2px solid #333;
}

#score-container {
    font-size: 24px;
    font-weight: bold;
    padding: 10px;
    background-color: #fff;
    width: 280px;
    margin: 10px auto;
    border-radius: 10px;
    border: 2px solid #333;
}

#game-canvas {
    background-color: #ffffff;
}

#button-container {
    margin-top: 10px;
}

#start-button {
    font-size: 20px;
    padding: 10px 20px;
    border: none;
    background-color: #ffcc00;
    cursor: pointer;
    border-radius: 10px;
    display: inline-block;
}

#start-button:hover {
    background-color: #ffdb4d;
}

#game-over-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

#character {
    position: absolute;
    width: 100px; /* 横幅は100px固定 */
    height: auto;  /* 高さは自動（アスペクト比維持） */
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.obstacle {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url("images/2.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    top: 0;
}
