body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #e0f7fa;
    /* 연한 잔디느낌도 섞인 스카이블루 */
    font-family: 'Malgun Gothic', sans-serif;
    color: white;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 26px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
}

#money-box {
    color: #ffd54f;
}

#inventory {
    color: #81c784;
}

#shop-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    color: black;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    width: 320px;
}

#shop-panel h2 {
    margin-top: 0;
    color: #e91e63;
    text-align: center;
}

.egg-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #fdfdfd;
    border: 2px dashed #ffab40;
    border-radius: 10px;
}

.egg-icon {
    font-size: 40px;
}

.btn {
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

.btn:hover {
    background: #388e3c;
    transform: scale(1.05);
}

.btn:active {
    transform: scale(0.95);
}

#back-home-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #d32f2f;
    padding: 15px 25px;
    font-size: 20px;
    pointer-events: auto;
}

#back-home-btn:hover {
    background: #b71c1c;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
    pointer-events: auto;
}

.flash-text {
    font-size: 60px;
    color: #ff9800;
    text-shadow: 0 0 20px #ff5722;
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    0% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.egg-shake {
    font-size: 150px;
    margin-top: 40px;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-5deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(5deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(5deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-5deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-5deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(5deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-5deg);
    }
}