/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.game-container {
    text-align: center;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 300px;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode .game-container {
    background-color: #1e1e1e;
    color: #ffffff;
}

h1 {
    font-size: 32px;
    color: #4caf50;
    margin-bottom: 10px;
    transition: color 0.3s;
}

body.dark-mode h1 {
    color: #81c784;
}

.description {
    font-size: 16px;
    margin-bottom: 20px;
    color: #555;
    transition: color 0.3s;
}

body.dark-mode .description {
    color: #aaaaaa;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.guess-input {
    width: 70%;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    outline: none;
    transition: border-color 0.3s;
}

body.dark-mode .guess-input {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

.guess-input:focus {
    border-color: #4caf50;
}

.guess-button {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #4caf50;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.guess-button:hover {
    background-color: #45a049;
}

body.dark-mode .guess-button {
    background-color: #81c784;
    color: #000;
}

.feedback-container {
    margin-top: 20px;
}

.feedback-text {
    font-size: 18px;
    font-weight: bold;
    color: #ff5722;
    transition: color 0.3s;
}

body.dark-mode .feedback-text {
    color: #ff8a65;
}

.previous-guesses {
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
    color: #333;
    transition: color 0.3s;
}

body.dark-mode .previous-guesses {
    color: #aaaaaa;
}

.previous-guesses h3 {
    font-size: 18px;
    color: #4caf50;
    margin-bottom: 10px;
    transition: color 0.3s;
}

body.dark-mode .previous-guesses h3 {
    color: #81c784;
}

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

#guessesList li {
    margin-bottom: 5px;
}

.reset-button {
    padding: 10px 20px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 20px;
    cursor: pointer;
    display: none;
    transition: background-color 0.3s ease;
}

.reset-button:hover {
    background-color: #1976d2;
}

body.dark-mode .reset-button {
    background-color: #64b5f6;
}

.dark-mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 25px;
    background-color: #ccc;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 1px 1px 6px black;
    padding: 2px;
    transition: background-color 0.3s;
}

.dark-mode-toggle::before {
    content: '';
    width: 21px;
    height: 21px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

body.dark-mode .dark-mode-toggle {
    background-color: #4caf50;
    justify-content: flex-end;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.game-container {
    animation: fadeIn 0.5s ease-out;
}
