.disabled {
  opacity: 0.5;
  pointer-events: none;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #121213;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    max-width: 500px;
    width: 100%;
}

header {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    margin: 10px 0;
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
}

.game-board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    margin-bottom: 15px;
}

.row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.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;
    transition: transform 0.1s ease-in-out;
}

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

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

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

.tile.flip {
    animation: flip 0.5s ease-in-out;
}

.tile.dance {
    animation: dance 0.5s ease-in-out;
}

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

@keyframes dance {
    0% {
        transform: translateY(0px);
    }
    25% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(0px);
    }
    75% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 500px;
}

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

.key {
    background-color: #818384;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 15px 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    flex: 1;
    max-width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
}

.key:hover {
    background-color: #6a6a6c;
}

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

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

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

.key.wide {
    max-width: 65px;
}

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

@media (max-width: 500px) {
    .tile {
        width: 14vw;
        height: 14vw;
        font-size: 30px;
    }
    
    .key {
        padding: 12px 2px;
        font-size: 16px;
        max-width: 8vw;
    }
    
    .key.wide {
        max-width: 12vw;
    }
    
    .key[data-key="Enter"] {
        font-size: 14px;
    }
}
