* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

.letter-box {
    display: inline-block;
    width: 55px;
    height: 55px;
    margin: 4px;
    line-height: 55px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid #d3d6da;
    background: white;
    border-radius: 4px;
}

.wrong {
    background: #787c7e;
    color: white;
    border-color: #787c7e;
}

.correct {
    background: #6aaa64;
    color: white;
    border-color: #6aaa64;
}

.guess-row {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: white;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.lang h1 {
    font-size: 2rem;
    color: #333;
    font-weight: 700;
    letter-spacing: 1px;
}

.select {
    display: flex;
    flex-direction: row;
}

.select h3 {
    font-size: 0.85rem;
    font-weight: 400;
    color: #666;
}

#language {
    padding: 0.5rem 1rem;
    border: 1px solid #d3d6da;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
}

#language:hover {
    background: #f8f8f8;
    border-color: #999;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    min-height: calc(100vh - 150px);
}

main>div {
    /* background: white; */
    padding: 2.5rem 2rem;
    border-radius: 8px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
    max-width: 550px;
    width: 100%;
}

.title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 1.5rem;
}

button {
    padding: 0.75rem 1.8rem;
    margin: 0.4rem;
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    text-transform: capitalize;
}

#gamestart {
    background: #6aaa64;
}

#gamestart:hover {
    background: #5a9a54;
    transform: translateY(-1px);
}

#restart {
    background: #e74c3c;
}

#restart:hover {
    background: #d43f2f;
    transform: translateY(-1px);
}

#submit-button {
    background: #3b82f6;
}

#submit-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

#guess-history {
    margin: 2rem 0;
    padding: 1.5rem 1rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 120px;
}

form {
    margin: 1.2rem 0;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
}

input[type="text"] {
    padding: 0.8rem;
    font-size: 1.1rem;
    border: 2px solid #d3d6da;
    background: white;
    color: #333;
    width: 100%;
    max-width: 320px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 8px;
    font-weight: 600;
    border-radius: 4px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
}

footer {
    text-align: center;
    padding: 1.5rem;
    color: #888;
    font-size: 0.85rem;
    background: white;
    border-top: 1px solid #e0e0e0;
}

footer p {
    margin: 0.3rem 0;
}

a {
    text-decoration: none;
    color: #3b82f6;
    transition: color 0.2s;
}

footer a {
    color: #3b82f6;
}

a:hover {
    color: #2563eb;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .title {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 0.9rem;
    }

    main>div {
        padding: 1.5rem 1rem;
    }

    header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .letter-box {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1.2rem;
    }
}