/* style.css */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
    font-family: 'Malgun Gothic', sans-serif;
    user-select: none;
    /* 드래그 방지 */
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    /* 캔버스 바깥 영역 숨김 */
}

#game-canvas {
    display: block;
    background-color: #87CEEB;
    /* 하늘색 배경 */
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* UI 레이어 뒤의 캔버스 클릭 가능하게 */
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    /* 화면 활성화 시 클릭 가능하게 */
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.screen h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.screen p {
    font-size: 20px;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

.action-btn {
    padding: 15px 30px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background-color: #ff4081;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
    transition: transform 0.2s, background-color 0.2s;
}

.action-btn:hover {
    transform: scale(1.05);
    background-color: #f50057;
}

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