* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    font-family: Arial, sans-serif;
    background-color: #f8d1d1;
    text-align: center;
}
.difficulty-container {
    background-color: #ff7b7b;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

h1 {
    color: #ff7b7b;
    font-size: 2.5rem;
   
}


.game-container {
    background-color: #fff;
    width: 600px;
    margin: 120px auto 0;
    padding: 40px;
    min-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}
.timeandscore{
    color: black;
    display: flex;   
    justify-content: space-between;/*两端对齐*/
    margin-bottom: 40px;
    font-size: 1.2rem;

}
.menu-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: 8px 16px;
    background-color: #ff7b7b;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

input {
    width: 80%;
    padding: 12px;
    font-size: 1.1rem;
    border: 2px solid #ff7b7b;
    border-radius: 4px;
    background-color: transparent;
    color: black;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);/*输入框固定在底部*/
}

/*.instruction {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #2b2828;
}*/

#word-display {
    font-size: 2.5rem;
    color: black;
    
}

.modal {
    display: none; /* 初始隐藏 */
    /* position: fixed; */
    text-align: center;
    background-color: #fff;
    width: 600px;
    margin: 120px auto 0;
    padding: 40px;
    min-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}
.modal-content {
    color: white;
}
#restart-button {
    background-color: white;
    color: black;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}
#restart-button:hover {
    background-color: #f8d1d1;
}

.gameover {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.gamerover-content {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gamerover-content h2 {
    color: #ff7b7b;
    margin-bottom: 20px;
    font-size: 2rem;
}

.gamerover-content p {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

#restart-button {
    background-color: #ff7b7b;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

#restart-button:hover {
    background-color: #ff5252;
}
