.game-header .score,
.game-header .timer {
    display: none;
}

.wordle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 10px;
}

.wordle-message {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0 16px;
    min-width: 200px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.wordle-message.show {
    opacity: 1;
}

/* Grid */

.wordle-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wordle-row {
    display: flex;
    gap: 6px;
}

.wordle-tile {
    width: 58px;
    height: 58px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    transition: border-color 0.1s ease;
    position: relative;
    transform-origin: center;
}

.wordle-tile.filled {
    border-color: rgba(255, 255, 255, 0.4);
}

.wordle-tile[data-state="correct"] {
    background: #538d4e;
    border-color: #538d4e;
    color: #ffffff;
}

.wordle-tile[data-state="present"] {
    background: #b59f3b;
    border-color: #b59f3b;
    color: #ffffff;
}

.wordle-tile[data-state="absent"] {
    background: #3a3a3c;
    border-color: #3a3a3c;
    color: #ffffff;
}

/* Pop animation when letter is typed */
@keyframes wordle-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.wordle-tile.pop {
    animation: wordle-pop 0.1s ease-in-out;
}

/* Flip reveal animation */
@keyframes wordle-flip-down {
    0%   { transform: scaleY(1); }
    100% { transform: scaleY(0); }
}

@keyframes wordle-flip-up {
    0%   { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

.wordle-tile.flip-down {
    animation: wordle-flip-down 0.25s ease-in forwards;
}

.wordle-tile.flip-up {
    animation: wordle-flip-up 0.25s ease-out forwards;
}

/* Shake animation for invalid word */
@keyframes wordle-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.wordle-row.shake {
    animation: wordle-shake 0.4s ease-in-out;
}

/* Keyboard */

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

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

.wordle-key {
    height: 58px;
    min-width: 43px;
    padding: 0 6px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-family);
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease, color 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.wordle-key--wide {
    min-width: 65px;
    font-size: 0.75rem;
}

/* Icelandic accent row: keys sized to fill the same total width as the 10-key rows */
.wordle-key-row--accent .wordle-key {
    min-width: 52px;
}

.wordle-key:active {
    filter: brightness(0.85);
}

.wordle-key[data-state="correct"] {
    background: #538d4e;
    color: #ffffff;
}

.wordle-key[data-state="present"] {
    background: #b59f3b;
    color: #ffffff;
}

.wordle-key[data-state="absent"] {
    background: #3a3a3c;
    color: rgba(255, 255, 255, 0.5);
}

/* Win overlay result info */
.wordle-result-info {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 8px 0 24px;
}

.wordle-result-answer {
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Responsive */

@media (max-width: 500px) {
    .wordle-tile {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .wordle-grid {
        gap: 5px;
    }

    .wordle-row {
        gap: 5px;
    }

    .wordle-key {
        height: 50px;
        min-width: 32px;
        font-size: 0.75rem;
    }

    .wordle-key--wide {
        min-width: 50px;
        font-size: 0.65rem;
    }

    .wordle-key-row {
        gap: 4px;
    }
}

@media (max-width: 360px) {
    .wordle-tile {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .wordle-key {
        min-width: 28px;
        height: 46px;
    }

    .wordle-key--wide {
        min-width: 44px;
    }
}
