/* Virtual Keyboard Styling */
.virtual-keyboard {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 8px;
    user-select: none;
    transition: transform 0.3s ease-out;
    transform: translateY(100%);
    box-sizing: border-box;
}

.virtual-keyboard.active {
    display: flex;
    transform: translateY(0);
}

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

.keyboard-key {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 12px;
    min-width: 45px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s;
    flex: 1;
    max-width: 70px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.keyboard-key:active {
    background: #edf2f7;
    transform: scale(0.95);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Wide keys */
.keyboard-key.wide {
    flex: 2;
    max-width: 120px;
}

.keyboard-key.extra-wide {
    flex: 4;
    max-width: 300px;
}

/* Special styling for control keys */
.keyboard-key.special {
    background: #f7fafc;
    color: #4a5568;
}

.keyboard-key.action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.keyboard-key.backspace {
    color: #e53e3e;
}

/* Layout for 800x480 screen */
@media screen and (max-height: 500px) {
    .virtual-keyboard {
        padding: 5px;
        gap: 4px;
    }
    .keyboard-key {
        height: 45px;
        font-size: 1rem;
        padding: 8px;
    }
}

/* Numeric Layout adjustments */
.virtual-keyboard.numeric-only {
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 300px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.virtual-keyboard.numeric-only.active {
    transform: translateX(-50%) translateY(0);
}

.virtual-keyboard.numeric-only .keyboard-row {
    justify-content: center;
}

.virtual-keyboard.numeric-only .keyboard-key {
    max-width: 80px;
    height: 60px;
}
