@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
    background-color: #212121;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

#keyboard > button {
    padding: 20px 0px;
    text-align: center;
}

#word-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.input {
    width: 40px;
    height: 40px;
    padding: 10px;
    margin: 4px;
    margin-top: 6px;
    border: 4px solid #376e48;
    display: inline-block;
    gap: 4px;
    text-align: center;
    color: white;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 24px;

}

.input-match {
    width: 40px;
    height: 40px;
    padding: 10px;
    margin: 4px;
    border: 4px solid #dd7f13;
    background-color: #dd7f13;
    display: inline-block;
    gap: 4px;
    text-align: center;
    color: rgb(0, 0, 0);
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 24px;

}

#keyboard {
    --key-bg: #2b2d31;
    --key-bg-hover: #3a3d44;
    --key-bg-active: #4a4e57;
    --key-text: #f2f3f5;
    --gap: 6px;

    display: grid;
    grid-template-columns: repeat(22, 1fr);
    gap: var(--gap);
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: var(--gap);
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}


#keyboard button {
    grid-column: span 2;
    height: 52px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: var(--key-bg);
    color: var(--key-text);
    font: 600 1rem/1 system-ui, sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.1s, transform 0.05s;
}

#keyboard button:hover {
    background: var(--key-bg-hover);
}

#keyboard button:active {
    background: var(--key-bg-active);
    transform: scale(0.95);
}

#keyboard button:focus-visible {
    outline: 2px solid #5b9dff;
    outline-offset: 2px;
}

#keyboard button[value="Y"] { grid-column: 5 / span 2; }

#keyboard button[value="BRIŠI"],
#keyboard button[value="POTRDI"] {
    grid-column: span 11;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

#keyboard button[value="BRIŠI"] {
    grid-column: 1 / span 11;
    background: #5a2d2d;
}

#keyboard button[value="BRIŠI"]:hover {
    background: #6e3737;
}

#keyboard button[value="POTRDI"] {
    background: #2d5a3a;
}

#keyboard button[value="POTRDI"]:hover {
    background: #376e48;
}

@media (max-width: 480px) {
    #keyboard {
        --gap: 4px;
    }

    #keyboard button {
        height: 46px;
        font-size: 0.9rem;
    }
}

#alert {
    text-align: center;
    color: white;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 24px;
}


h2 {
    text-align: center;
    color: white;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 64px;
    text-transform: uppercase;
}

.header {
    text-align: center;
    display: flex;
}

.header > img {
    margin-top: 60px;
    margin-right: 20px;
}

#playAgainBtn {
    height: 52px;
    padding: 0 32px;
    border: none;
    border-radius: 6px;
    background: #dd7f13;
    color: #000000;
    font: 600 0.85rem/1 system-ui, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s, transform 0.05s;
    display: block;
    margin: 16px auto 0;
}

#playAgainBtn:hover {
        background: #fa9016;
}