* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    width: 800px;
    height: 400px;
    background: #87CEEB;
    border: 3px solid #333;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.game-area {
    width: 100%;
    height: calc(100% - 50px);
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
}

.player {
    width: 40px;
    height: 40px;
    background: #FF6B6B;
    border-radius: 50%;
    position: absolute;
    bottom: 60px;
    left: 50px;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
}

.player::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 12px;
    width: 16px;
    height: 16px;
    background: #333;
    border-radius: 50%;
}

.player::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 15px;
    width: 10px;
    height: 5px;
    background: #333;
    border-radius: 50%;
}

.obstacle {
    width: 30px;
    height: 60px; /* デフォルト値、JavaScriptで動的に変更 */
    background: #8B4513;
    position: absolute;
    bottom: 60px;
    right: -30px;
    border-radius: 5px;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.obstacle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 5px;
    width: 20px;
    height: 10px;
    background: #228B22;
    border-radius: 5px;
}

/* 地面の障害物（飛び越えるタイプ） */
.ground-obstacle {
    background: #8B4513;
}

.ground-obstacle::before {
    background: #228B22;
}

/* 空中の障害物（ジャンプしてはいけないタイプ） */
.air-obstacle {
    background: #DC143C;
}

.air-obstacle::before {
    background: #FF4500;
}

.ground {
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, #8B4513, #A0522D);
    position: absolute;
    bottom: 0;
    border-top: 2px solid #654321;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.start-screen, .game-over-screen {
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid #FFD700;
}

.start-screen h1, .game-over-screen h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.start-screen p, .game-over-screen p {
    font-size: 18px;
    margin-bottom: 15px;
    line-height: 1.5;
}

button {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #FF8E53, #FF6B6B);
}

button:active {
    transform: translateY(0);
}

.jumping {
    animation: jump 0.8s ease-out;
}

@keyframes jump {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-100px);
    }
    100% {
        transform: translateY(0);
    }
}

.obstacle-moving {
    animation: moveLeft 2s linear infinite;
}

@keyframes moveLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-830px);
    }
}

.hidden {
    display: none !important;
}

/* スコアポップアップアニメーション */
@keyframes scorePopup {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(1);
    }
}

 