/* findstyles.css */
@import url('https://fonts.googleapis.com/css2?family=Dongle:wght@300&family=Gamja+Flower&family=Gowun+Dodum&display=swap');
body {
    display: flex;
    flex-direction: column;
    align-items: center; /* 수평 중앙 정렬 */
    justify-content: flex-start; /* 수직 시작 정렬 */
    min-height: 100vh;
    text-align: center;
    font-family: "Gowun Dodum", sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

h1 {
    margin: 20px 0;
    font-size: 2em;
}

#difficultySelection {
    margin: 20px;
    font: inherit;
}

#timer {
    margin-top: 10px;
    font-size: 1.5em;
}

#gameArea {
    position: relative;
    display: flex; /* Flexbox 사용 */
    align-items: center; /* 수직 중앙 정렬 */
    justify-content: center; /* 수평 중앙 정렬 */
    border: 2px solid #333;
    margin-top: 20px;
    width: 90vw; /* 화면 너비의 90% */
    max-width: 600px; /* 최대 너비 제한 */
    overflow: hidden; /* 넘치는 내용 숨기기 */
    background-color: #f9f9f9; /* 임시 배경색 추가 */
}

#gameImage {
    width: 100%;
    height: auto;
    display: block;
    /* border: 2px solid blue; 임시 테두리 추가 */
}

.found-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    background: transparent; /* 반투명 빨간색 */
    border: 2px solid red; /* 빨간색 테두리 */
    border-radius: 50%;
    pointer-events: none; /* 클릭 이벤트 전달 */
    z-index: 1000; /* 높은 z-index로 이미지 위에 표시 */
    opacity: 0.9; /* 불투명도 조절 */
}

#objectList {
    margin-top: 20px;
}

#objectList ul {
    list-style-type: none;
    padding: 0;
}

#objectList li {
    font-size: 1.2em;
    margin: 5px 0;
}

#nameModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 2px solid #333;
    z-index: 1000;
    width: 80%;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#nameModal input {
    padding: 10px;
    font-size: 1em;
    width: 80%;
    margin-bottom: 10px;
}

#nameModal button {
    padding: 10px 20px;
    font-size: 1em;
    margin: 5px;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* 랭킹 테이블 스타일링 */
#rankings {
    margin-top: 30px;
    width: 90vw;
    max-width: 600px;
}

#rankingsTable {
    width: 100%;
    border-collapse: collapse;
}

#rankingsTable th, #rankingsTable td {
    border: 1px solid #333;
    padding: 8px;
    text-align: center;
}

#rankingsTable th {
    background-color: #f2f2f2;
}

#rankingsTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }

    #difficultySelection {
        margin: 10px;
        font: inherit;
    }

    #objectList li {
        font-size: 1em;
    }

    #timer {
        font-size: 1.2em;
    }

    #nameModal {
        width: 90%;
        max-width: 250px;
    }

    .found-marker {
        width: 30px; /* 마커 크기 축소 */
        height: 30px;
    }
}
