header h1 { margin: .5rem;font-size: 1.8rem;}
footer p {margin: .5rem;font-size: .8rem;}

.title {
    font-size: 2em;
    margin-bottom: 20px;
}

.main-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 600px; width: 100%;
    margin: 0 auto; /* 가운데 정렬 */
}

.scoreboard {
    margin-bottom: 20px;
    font-size: 1.2em; /* 점수판 폰트 크기 */
}

.game-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 3열로 설정 */
    gap: 10px;
}

.card {
    width: 100%;
    padding-top: 100%; /* 비율을 유지하기 위한 패딩 */
    background-color: #ccc;
    position: relative;
    cursor: pointer;
}

.card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;height: 80%;
	left: 10%;top:10%;
    display: none;
}

.card.flipped img {
    display: block;
}

#restartButton, #startButton, #exitGameButton {
    display: none; /* 처음에는 숨김 */
    margin: 20px auto; /* 가운데 정렬 */
    padding: 10px 20px; /* 버튼 패딩 */
    font-size: 1.2em; /* 폰트 크기 */
    background-color: #007bff; /* 버튼 배경색 */
    color: white; /* 글자 색상 */
    border: none; /* 테두리 제거 */
    border-radius: 5px; /* 모서리 둥글게 */
    cursor: pointer; /* 커서 모양 변경 */
    transition: background-color 0.3s; /* 배경색 전환 효과 */
}
#startButton {
    display: inline-block; /* 처음에는 숨김 */
}

#restartButton:hover, #startButton:hover, #exitGameButton:hover {
    background-color: #0056b3; /* 호버 시 색상 변화 */
}

.score-container{padding-top: 2rem;}


@media screen and (orientation: portrait) {
    /* 세로모드(좌우로길때) */
}
@media screen and (orientation: landscape) {
    /* 가로모드(상하로길때) */
    /* header, footer {} */
    .container{display: flex;align-items: center;justify-content: center;max-width: 100%;}
    .game-container{width: 100%;display:none;}
    .score-container{width: 60%;display:flex;align-items: center;justify-content: center;flex-direction: column;}
}
