body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

#game-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 600px;
}

.hidden {
    display: none;
}

/* 시작 화면 */
#start-screen h1 {
    color: #333;
}
.settings {
    margin: 15px 0;
}
.settings label {
    margin-right: 10px;
}
.settings select {
    padding: 8px;
    min-width: 150px;
}
#start-button, #submit-button, #restart-button {
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s;
}
#start-button:hover, #submit-button:hover, #restart-button:hover {
    background-color: #0056b3;
}


/* 게임 진행 화면 */
#game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
    color: #555;
}

#timer-display {
    font-size: 4em; /* 크고 굵게 */
    font-weight: bold;
    color: red; /* 빨간색 */
    margin-bottom: 20px;
}

#word-display {
    font-size: 1.8em;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* 단어가 많을 경우 줄바꿈 */
    gap: 10px; /* 단어 사이 간격 */
    margin-bottom: 20px;
    line-height: 1.6;
}
#word-display.hidden {
    display: none; /* display: flex 대신 none으로 변경 */
}


#input-area p {
    margin-bottom: 10px;
    color: #666;
}

#user-input {
    width: 80%;
    padding: 10px;
    font-size: 16px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#result-display {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
}

/* 타이머 공통 스타일 조정 */
#timer-display {
    font-size: 4em;
    font-weight: bold;
    margin-bottom: 20px;
    transition: color 0.3s ease; /* 색상 변경 시 부드러운 전환 */
}

/* 단어 표시 타이머 스타일 */
.display-timer {
    color: red; /* 빨간색 */
}

/* 입력 제한 시간 타이머 스타일 */
.input-timer-style {
    color: blue; /* 파란색 */
}

#word-display {
    font-size: 1.8em;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-height: 100px;
    display: flex; /* flex 유지 */
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
}
#word-display.hidden {
    display: none; /* 숨길 때는 none */
}


#input-area p {
    margin-bottom: 10px;
    color: #333; /* 기본 안내 문구 색상 */
}

/* 추가된 안내 문구 스타일 */
.input-guide {
    font-size: 0.9em;
    color: #666;
    margin-top: -5px; /* 위쪽 문구와의 간격 조정 */
    margin-bottom: 15px;
    line-height: 1.4;
}

#user-input {
    width: 80%;
    padding: 10px;
    font-size: 16px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#result-display {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
}

/* 피드백 메시지 스타일 */
#feedback-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 5px;
    font-size: 1.3em;
    font-weight: bold;
    transition: opacity 0.5s ease; /* 부드럽게 나타나고 사라지도록 */
}
#feedback-message.success {
    background-color: #d4edda; /* 연한 초록색 */
    color: #155724; /* 진한 초록색 */
    border: 1px solid #c3e6cb;
}
#feedback-message.failure {
    background-color: #f8d7da; /* 연한 빨간색 */
    color: #721c24; /* 진한 빨간색 */
    border: 1px solid #f5c6cb;
}
#feedback-message.hidden {
    display: none; /* 기본적으로 숨김 */
    opacity: 0;
}


/* 게임 오버 화면 */
#game-over-screen h1 {
    color: #dc3545;
}
#final-score {
    font-size: 1.5em;
    margin-bottom: 20px;
}