.layui-btn {
    line-height: 32px;
    height: 32px;
}

/* 车牌输入容器样式 */
.plate-input-container {
    text-align: center;
    margin-bottom: 20px;
}

/* 车牌显示区域 */
.plate-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    gap: 8px;
}

/* 车牌字符样式 */
.plate-char {
    display: inline-block;
    width: 40px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border: 2px solid #f0f8ff;
    border-radius: 8px;
    background: #fff;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    background: #f0f8ff;
    box-sizing: border-box;
    overflow: hidden;
}

.plate-char.active {
    border-color: #1890ff;
    background: #f0f8ff;
}

/* 最后一位输入框样式 */
.plate-char.last-char {
    background: #0bff0b30;
    border: 2px solid #0bff0b30;
}

.plate-char.last-char.active {
    border-color: #52c41a;
}

/* 新能源提示样式 */
.plate-char.new-energy-hint {
    color: #52c41a;
    background: #0bff0b30;
    font-size: 11px;
    line-height: 50px;
    writing-mode: vertical-lr;
    text-orientation: upright;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
    border-radius: 8px;
    border: 2px solid #0bff0b30;
    width: 40px;
    height: 50px;
    box-sizing: border-box;
}

/* 虚拟键盘样式 */
.virtual-keyboard {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    z-index: 1000;
    transition: bottom 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
}

.virtual-keyboard.show {
    bottom: 0;
    bottom: env(safe-area-inset-bottom, 0);
}

/* 关闭键盘按钮 */
.close-keyboard {
    text-align: right;
    color: #1890ff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 20px 5px;
    border-bottom: 1px solid #e6e6e6;
    letter-spacing: 1px;
}

/* 键盘行 - 使用 Grid 布局实现跨列 */
.keyboard-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    padding: 0 5px;
}

/* 省份键盘面板 - 使用10列 */
#provincesPanel .keyboard-row {
    grid-template-columns: repeat(10, 1fr);
}

/* 字符键盘面板 - 使用10列 */
#charsPanel .keyboard-row {
    grid-template-columns: repeat(10, 1fr);
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

/* 键盘按钮样式 */
.key-btn {
    height: 45px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-btn:hover {
    background: #f0f8ff;
    border-color: #1890ff;
}

.key-btn:active {
    transform: scale(0.95);
    background: #e6f7ff;
    border-color: #1890ff;
}

.key-btn.special {
    background: #e6f7ff;
    border-color: #91d5ff;
}

/* 禁用按钮样式 */
.key-btn.disabled {
    background: #f5f5f5;
    color: #d9d9d9;
    border-color: #e8e8e8;
    cursor: not-allowed;
    pointer-events: none;
}

/* 删除按钮样式 - 使用跨列 */
.key-btn.delete-btn {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 省份面板第四行的字母数字和删除按钮 - 各跨3列 (4省份 + 3 + 3 = 10列) */
#provincesPanel .keyboard-row:last-child .key-btn.delete-btn {
    grid-column: span 3;
}

/* 字符面板最后一行的省份按钮和删除按钮 - 各跨3列 (4特殊汉字 + 3 + 3 = 6列) */
#charsPanel .keyboard-row:last-child .key-btn.delete-btn {
    grid-column: span 3;
}

.key-btn.delete-btn:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

/* 键盘标签页样式 */
.keyboard-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #e6e6e6;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.tab-btn:hover {
    color: #1890ff;
}

/* 键盘面板样式 */
.keyboard-panel {
    display: block;
    padding: 10px 5px 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .key-btn {
        height: 40px;
        font-size: 16px;
    }

    .plate-char {
        width: 35px;
        height: 45px;
        line-height: 45px;
        font-size: 18px;
    }

    .plate-char.new-energy-hint {
        font-size: 9px;
        line-height: 45px;
        letter-spacing: 1px;
        width: 35px;
        height: 45px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .key-btn {
        height: 40px;
        font-size: 16px;
    }

    .plate-char {
        width: 30px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }

    .plate-char.new-energy-hint {
        font-size: 8px;
        line-height: 40px;
        letter-spacing: 1px;
        width: 30px;
        height: 40px;
    }
}

/* 极小屏幕优化 (360px及以下) */
@media (max-width: 360px) {
    .keyboard-row {
        gap: 5px;
        padding: 0 3px;
    }

    .keyboard-panel {
        padding: 8px 3px 15px;
    }

    .key-btn {
        height: 38px;
        font-size: 14px;
    }

    .close-keyboard {
        padding: 8px 15px;
        font-size: 13px;
    }
}
