/* 2. UX/UI 디자인: 어린이 타겟에 맞춘 밝은 색감과 큰 버튼 [2, 3] */
body {
    margin: 0;
    padding: 0;
    /* 파스텔톤 그라데이션 배경 [2] */
    background: linear-gradient(to bottom, #74ebd5, #ACB6E5);
    font-family: 'Verdana', sans-serif;
    overflow: hidden; /* 스크롤 방지 */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-container {
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-radius: 20px;
    overflow: hidden;
    background-color: white;
    border: 5px solid #fff;
}

/* 게임 위에 뜨는 안내 UI 레이어 */
#ui-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; /* 클릭 통과 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 점수판 디자인 */
.score-board {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 메시지 박스 (시작 화면, 게임 오버) */
#message-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    pointer-events: auto; /* 버튼 클릭 가능 */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    max-width: 80%;
}

h1 { margin: 0 0 15px 0; color: #ff6b6b; font-size: 32px; }
p { font-size: 18px; color: #555; line-height: 1.6; }

/* 버튼: 성인 엄지손톱 2배 크기로 크게 제작 [3] */
button {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 24px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: bold;
    transition: transform 0.2s;
}
button:hover { transform: scale(1.05); background-color: #ff4757; }

/* 디버깅용 웹캠 화면 (작게 표시) */
#webcam-debug {
    position: absolute;
    bottom: 10px; right: 10px;
    width: 160px; height: 120px;
    border: 3px solid white;
    border-radius: 10px;
    opacity: 0.8;
    transform: scaleX(-1); /* 거울 모드 */
}