body { 
    margin: 0; 
    padding: 0; 
    overflow: hidden; 
    background-color: #0b192c; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    touch-action: none; 
}

#game-container { 
    position: relative; 
    width: 100vw; 
    /* 모바일 브라우저의 뷰포트 높이 문제를 해결하기 위한 설정 */
    height: 100dvh; 
    display: flex;
    flex-direction: column;
}

canvas { 
    display: block; 
    width: 100%;
    /* 하단 컨트롤 영역을 제외한 나머지 공간 차지 */
    flex-grow: 1; 
}

#score-board { 
    position: absolute; 
    top: 10px; 
    left: 20px; 
    font-size: 24px; 
    font-weight: bold; 
    color: white; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); 
    z-index: 10; 
}

/* 하단 조작 버튼 영역 스타일 */
#controls {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: #1a252c;
    height: 60px; /* 버튼 영역 높이 고정 */
}

.control-btn {
    width: 45%;
    height: 100%;
    margin: 0;
    font-size: 18px;
    background-color: #34495e;
    color: white;
    border-radius: 8px;
    border: 2px solid #2c3e50;
    user-select: none; /* 텍스트 선택 방지 */
}

.control-btn:active {
    background-color: #2980b9;
    border-color: #2980b9;
}

#game-over { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    text-align: center; 
    background: rgba(0, 0, 0, 0.9); 
    padding: 30px; 
    border-radius: 10px;
    color: white;
    width: 80%; 
    max-width: 300px;
    z-index: 100;
}

#game-over h2 {
    margin-top: 0;
    color: #e74c3c;
    font-size: 28px;
}

.hidden { 
    display: none; 
}

#restart-btn { 
    padding: 15px 30px; 
    font-size: 18px; 
    font-weight: bold;
    cursor: pointer; 
    border: none; 
    border-radius: 8px; 
    background-color: #e74c3c; 
    color: white; 
    margin-top: 20px;
    width: 100%;
}
