/* Reset some default styles to avoid inconsistencies */
body, h1, p, label, select, input {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f1f1f1;
    color: #333;
}

/* Utility Classes */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.text-center {
    text-align: center;
}

/* Header */
header {
    margin-bottom: 30px;
}

.header-title {
    font-size: 48px;
    font-weight: bold;
    color: #663399;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Difficulty Selection */
#settings-form {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

label {
    font-size: 18px;
    font-weight: bold;
    color: #444;
    display: block;
    margin-bottom: 5px;
}

#difficulty {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    background-color: #f5f5f5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #444;
}

/* Typing Area */
#word {
    font-size: 72px;
    text-align: center;
    margin: 30px 0;
    color: #4CAF50;
    letter-spacing: 4px;
}

#text {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    border: none;
    border-bottom: 3px solid #3498db;
    outline: none;
    background-color: #f8f8f8;
    transition: border-color 0.3s ease-in-out;
    color: #444;
    text-align: center;
    margin-bottom: 20px; /* Add margin to prevent input from sticking to the text below */
}

#text:focus {
    border-color: #4CAF50;
}

/* Timer and Score */
#time_container, #score_container {
    font-size: 18px;
    margin-top: 20px;
    color: #3498db;
}

/* End Game Message */
#end-game-container {
    text-align: center;
    font-size: 28px;
    margin-top: 40px;
    color: #e67e22;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 15px 40px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background-color: #f39c12;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.button:hover {
    background-color: #e67e22;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.6s ease-in-out;
}
