/* 기본 스타일 초기화 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f3e8; /* 부드러운 배경색 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.game-container {
    width: 95%; /* 모바일에서 넓게 사용 */
    max-width: 600px; /* 최대 폭 지정 */
    padding: 20px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.title {
    color: #e53935; /* 사과색 */
    font-size: 1.8em;
    margin-bottom: 10px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50; /* 풀잎색 */
}

/* 캔버스 래퍼: 캔버스가 반응형으로 크기를 조절할 수 있도록 합니다. */
.canvas-wrapper {
    width: 100%;
    /* 캔버스의 가로 세로 비율을 유지하려면 이 방식이 유용합니다. */
    padding-top: 100%; /* 너비와 같은 높이 (정사각형 캔버스) */
    position: relative;
    border: 5px solid #ffcc00; /* 노란색 테두리 */
    border-radius: 10px;
    background-color: #e8f5e9; /* 연한 녹색 캔버스 배경 */
}

#appleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 캔버스 드래그 시 기본 동작 방지 */
    user-select: none;
    touch-action: none;
}

.game-button {
    padding: 10px 20px;
    font-size: 1.2em;
    margin-top: 15px;
    cursor: pointer;
    background-color: #ff9800; /* 주황색 버튼 */
    color: white;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.game-button:hover {
    background-color: #fb8c00;
}

/* 팝업 스타일 */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.popup.hidden {
    display: none;
}

.popup > div {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}