/* === Wordle Styles === */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    min-height: calc(100vh - var(--nav-height));
    padding-top: calc(var(--nav-height) + var(--space-8));
}

.game-header {
    text-align: center;
}

.difficulty-selector {
    display: flex;
    justify-content: center;
}

.difficulty-buttons {
    display: flex;
    gap: var(--space-2);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 4px;
}

.difficulty-btn {
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
}

.difficulty-btn:hover {
    color: var(--text-primary);
}

.difficulty-btn--active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Board */
.wordle-board {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.wordle-tile {
    width: clamp(48px, 12vw, 62px);
    height: clamp(48px, 12vw, 62px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: transform 0.15s, border-color 0.15s;
}

.wordle-tile--active {
    border-color: rgba(255, 255, 255, 0.35);
}

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

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

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

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

.wordle-tile--absent {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}

.wordle-tile--shake {
    animation: rowShake 0.3s ease-in-out;
}

@keyframes tilePop {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.12)
    }

    100% {
        transform: scale(1)
    }
}

@keyframes tileFlip {
    0% {
        transform: rotateX(0)
    }

    50% {
        transform: rotateX(90deg)
    }

    100% {
        transform: rotateX(0)
    }
}

@keyframes rowShake {

    0%,
    100% {
        transform: translateX(0)
    }

    25% {
        transform: translateX(-8px)
    }

    75% {
        transform: translateX(8px)
    }
}

/* Message */
.message {
    min-height: 2rem;
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--accent-cyan);
    text-align: center;
}

/* Keyboard */
.keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 500px;
    width: 100%;
}

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

.key {
    min-width: clamp(28px, 6vw, 44px);
    height: 52px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    font-family: var(--font-body);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.key:hover {
    background: rgba(255, 255, 255, 0.2);
}

.key--wide {
    min-width: clamp(52px, 12vw, 66px);
    font-size: var(--text-xs);
}

/* Enter key - visually distinct */
.key--enter {
    min-width: clamp(60px, 14vw, 80px);
    background: var(--gradient-primary);
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--weight-black);
    letter-spacing: 0.05em;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(129, 140, 248, 0.4);
    margin-right: 6px;
}

.key--enter:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Backspace key */
.key--back {
    min-width: clamp(52px, 12vw, 66px);
    font-size: var(--text-base);
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--error);
    margin-left: 6px;
}

.key--back:hover {
    background: rgba(248, 113, 113, 0.25);
}

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

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

.key--absent {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.3);
}

.game-actions {
    display: flex;
    gap: var(--space-3);
}