/* 键盘测试页面专用样式 */
.keyword-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #ffffff;
    flex-direction: column;
    padding: 1.5rem 0;
    gap: 1.5rem;
}

/* 键盘 */
.keyboard {
    display: flex;
    border-radius: 10px;
    background-color: #f1f1f1;
    padding: 2rem;
    margin: 0 auto;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    align-items: flex-start;
}

/* 按键 */
.key {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #E4E9EC;
    box-shadow: -3px 5px 8px 2px #797878, -5px 0px 8px 2px #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: .1s;
}
.key:hover,
.key.active {
    box-shadow: 0 0 3px 1px #999;
}

/* 空键 */
.key-empty {
    width: 40px;
    height: 40px;
}

/* 气泡键 */
.key-bubble {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    background-color: #009999;
    color: #fff;
    font-size: 13px;
    position: absolute;
    transition: all 2s ease-in-out;
    overflow: hidden;
    box-shadow: 0 0 10px 1px #000, 0 0 10px 1px #fff inset;
}

/* 区域一 */
.area-1 {
    width: 740px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: baseline;
    flex-shrink: 0;
}

/* 区域二 */
.area-2 {
    width: 140px;
    margin-left: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}
.area-2-item {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 区域三 */
.area-3 {
    width: 190px;
    margin-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}
.area-3-light {
    display: flex;
    gap: 10px;
}
.area-3-light-item {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    color: #999;
}
.area-3-number {
    display: flex;
    gap: 10px;
}
.area-3-number-item {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.input-container {
    background: white;
    padding: 1rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.content-box {
    width: 100%;
}

.keyword-box {
    overflow: hidden;
    min-height: 120px;
    max-height: 180px;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    line-height: 1.8;
}
.keyword-box span {
    margin: 3px;
    cursor: pointer;
    display: inline-block;  
    padding: 5px 8px; /* 上下 10px，左右 15px 的内边距 */  
    background-color: #848b84; /* 浅绿色背景 */  
    color: #ffffff; /* 白色文字 */  
    border: 1px solid #848b84; /* 较深的绿色边框 */  
    border-radius: 8px; /* 圆角 */  
    font-weight: bold; /* 加粗文字 */  
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 轻微阴影 */  
}
.keyword-box span:active {
    color: rgb(212, 0, 255);
}
.keyword-box span.correct {  
    display: inline-block;  
    padding: 5px 8px; /* 上下 10px，左右 15px 的内边距 */  
    background-color: #439947; /* 浅绿色背景 */  
    color: #ffffff; /* 白色文字 */  
    border: 2px solid #439947; /* 较深的绿色边框 */  
    border-radius: 8px; /* 圆角 */  
    font-weight: bold; /* 加粗文字 */  
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 轻微阴影 */  
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* 动画效果 */  
}
.keyword-box span.correct:hover {  
    transform: scale(1.03); /* 鼠标悬停时轻微放大 */  
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* 鼠标悬停时增强阴影 */  
    background-color: #c8e6c9; /* 鼠标悬停时稍微变浅 */  
}  

.keyword-box span.incorrect {
    display: inline-block;  
    padding: 5px 8px; /* 上下 10px，左右 15px 的内边距 */  
    background-color: #ef9a9a; /* 浅红色背景 */  
    color: #ffffff; /* 白色文字 */  
    border: 2px solid #e57373; /* 较深的红色边框 */  
    border-radius: 8px; /* 圆角 */  
    font-weight: bold; /* 加粗文字 */  
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 轻微阴影 */  
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* 动画效果 */  
}  

.keyword-box span.incorrect:hover {  
    transform: scale(1.03); /* 鼠标悬停时轻微放大 */  
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* 鼠标悬停时增强阴影 */  
    background-color: #ffcccc; /* 鼠标悬停时稍微变浅 */  
}  

.input-box {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.keyword-input {
    flex: 1;
    min-width: 0;
}

.keyword-input .form-control {
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .keyboard {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .area-1 {
        width: 100%;
        max-width: 740px;
    }
    
    .area-2,
    .area-3 {
        margin-left: 0;
        margin-top: 1.25rem;
    }
}

@media (max-width: 768px) {
    .keyword-container {
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .keyboard {
        padding: 1rem;
        width: 100%;
    }
    
    .area-1 {
        width: 100%;
        gap: 8px;
    }
    
    .area-2,
    .area-3 {
        width: 100%;
        max-width: none;
    }
    
    .input-container {
        padding: 0.75rem;
    }
    
    .input-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .keyword-input {
        width: 100%;
    }
}

/* 结果显示区域 */
.result-container {
    margin: 0;
    padding: 0.5rem 0;
    width: 100%;
}

.time-show {
    text-align: center;
    margin: 0 0 1rem 0 !important;
    padding: 0.5rem;
}

.result-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: bold;
    color: #00e6e6;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.result-box-row {
    margin: 0 15px;
}
