* {
    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 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #3a3a3c;
    margin-bottom: 30px;
    position: relative;
}

.home-btn {
    color: #ffffff;
    font-size: 24px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.home-btn:hover {
    background-color: #3a3a3c;
}

h1 {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

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

.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;
    color: #ffffff;
    transition: all 0.3s;
}

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

.tile.correct {
    background-color: #538d4e;
    border-color: #538d4e;
    animation: flip 0.5s;
}

.tile.present {
    background-color: #b59f3b;
    border-color: #b59f3b;
    animation: flip 0.5s;
}

.tile.absent {
    background-color: #3a3a3c;
    border-color: #3a3a3c;
    animation: flip 0.5s;
}

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

@keyframes flip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

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

.message.success {
    color: #538d4e;
}

.message.error {
    color: #dc4444;
}

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

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

.key {
    background-color: #818384;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 14px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    min-width: 43px;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

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

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

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

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

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

@media (max-width: 600px) {
    h1 {
        font-size: 24px;
    }

    .tile {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .key {
        padding: 12px 8px;
        font-size: 12px;
        min-width: 32px;
    }

    .key.wide {
        min-width: 50px;
        font-size: 10px;
    }
}
.game-over-message {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.game-over-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.action-btn {
    background-color: #538d4e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s, transform 0.1s;
}

.action-btn:hover {
    background-color: #6aaa64;
    transform: scale(1.05);
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn.secondary {
    background-color: #818384;
}

.action-btn.secondary:hover {
    background-color: #9a9a9c;
}

.action-btn i {
    font-size: 14px;
}

@media (max-width: 600px) {
    .action-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .game-over-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 15px auto 0;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}
.key i {
    font-size: 20px;
}
