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

body {
    font-family: 'Arial', sans-serif;
    background-color: #121213;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 500px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #3a3a3c;
    padding-bottom: 20px;
}

h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.subtitle {
    color: #818384;
    font-size: 14px;
}

.message {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    min-height: 30px;
    padding: 10px;
    border-radius: 4px;
}

.message.success {
    background-color: #538d4e;
    color: white;
}

.message.error {
    background-color: #b91c1c;
    color: white;
}

.message.info {
    background-color: #3a3a3c;
    color: white;
}

.game-board {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 30px;
}

.row {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.tile {
    width: 62px;
    height: 62px;
    border: 2px solid #3a3a3c;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #121213;
    transition: all 0.3s ease;
}

.tile.filled {
    border-color: #565758;
    animation: pop 0.1s ease-in-out;
}

.tile.correct {
    background-color: #538d4e;
    border-color: #538d4e;
    color: white;
}

.tile.present {
    background-color: #b59f3b;
    border-color: #b59f3b;
    color: white;
}

.tile.absent {
    background-color: #3a3a3c;
    border-color: #3a3a3c;
    color: white;
}

.tile.shake {
    animation: shake 0.5s;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.keyboard-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.key {
    min-width: 43px;
    height: 58px;
    background-color: #818384;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.key:hover {
    background-color: #9a9a9c;
}

.key:active {
    transform: scale(0.95);
}

.key.wide {
    min-width: 65px;
    font-size: 12px;
}

.key.correct {
    background-color: #538d4e;
}

.key.present {
    background-color: #b59f3b;
}

.key.absent {
    background-color: #3a3a3c;
}

.restart-btn {
    display: block;
    margin: 20px auto;
    padding: 15px 30px;
    background-color: #538d4e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.restart-btn:hover {
    background-color: #6aaa64;
}

@media (max-width: 480px) {
    .tile {
        width: 52px;
        height: 52px;
        font-size: 28px;
    }

    .key {
        min-width: 36px;
        height: 48px;
        font-size: 12px;
    }

    .key.wide {
        min-width: 55px;
    }
}
