/* ========== 可视化键盘测试仪 - AeroCore 子页面样式 ========== */

.keyboard-tester-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    color: #eef2ff;
    font-family: 'Segoe UI', 'Inter', 'Roboto', system-ui, sans-serif;
}

/* 页面头部 */
.kt-header {
    text-align: center;
    margin-bottom: 2rem;
}

.kt-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #b9e2ff;
    text-shadow: 0 0 6px rgba(0, 166, 255, 0.3);
}

.kt-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    color: #8ea3cf;
}

/* 键盘区域 */
.visual-keyboard {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    border-radius: 2rem;
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(72, 187, 255, 0.4);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6);
    overflow-x: auto;
}

.keyboard-wrapper {
    min-width: 860px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 键盘行 */
.key-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: nowrap;
}

/* 按键样式（可点击） */
.visual-key {
    background: #1e293b;
    border-radius: 12px;
    padding: 12px 0;
    text-align: center;
    font-weight: 500;
    font-size: 0.8rem;
    font-family: 'Fira Mono', monospace;
    color: #cbd5e6;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 2px 3px rgba(0,0,0,0.4);
    transition: all 0.05s ease;
    cursor: pointer;
    flex: 1 0 auto;
    min-width: 45px;
    border: 1px solid #334155;
    backdrop-filter: blur(2px);
    user-select: none;
}

/* 不同宽度的特殊键 */
.visual-key.wide {
    flex: 1.5;
}
.visual-key.extra-wide {
    flex: 2;
}
.visual-key.space {
    flex: 5;
}
.visual-key.small {
    flex: 0.7;
}

/* 高亮效果 (按下点亮) */
.visual-key.pressed {
    background: #3b82f6;
    box-shadow: 0 0 12px #3b82f6, inset 0 1px 1px white;
    color: white;
    border-color: #60a5fa;
    transform: scale(0.97);
}

.key-label {
    display: block;
    font-size: 0.65rem;
    font-weight: normal;
    opacity: 0.7;
}

/* 信息卡片 */
.info-card {
    background: rgba(12, 20, 35, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 1.8rem;
    border: 1px solid rgba(0, 180, 255, 0.35);
    box-shadow: 0 20px 32px -12px black;
    padding: 1.2rem 1.8rem;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-left: 3px solid #3b82f6;
    padding-left: 0.8rem;
}

.highlight-key {
    background: #0a0f1e;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    text-align: center;
    margin-bottom: 1.2rem;
}

.big-key-name {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Fira Mono', monospace;
    color: #b9e2ff;
    text-shadow: 0 0 6px #00a6ff;
    word-break: break-word;
}

.repeat-hint {
    font-size: 0.7rem;
    opacity: 0.7;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.detail-item {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    padding: 0.6rem 0.9rem;
    border-left: 2px solid #2c6e9e;
}

.detail-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #8ea3cf;
    letter-spacing: 0.5px;
}

.detail-value {
    font-family: monospace;
    font-weight: 600;
    font-size: 1rem;
    word-break: break-all;
}

.mod-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.mod-badge {
    background: #1e2a3e;
    padding: 0.2rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    border: 1px solid #2c4c6e;
}

.mod-badge.active {
    background: #3b82f6;
    border-color: #90cdf4;
    box-shadow: 0 0 6px #3b82f6;
    color: white;
}

/* 控制栏 */
.prevent-bar {
    display: flex;
    justify-content: center;
    margin-top: 1.8rem;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.toggle-switch {
    background: #111827;
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    align-items: center;
}

.toggle-switch input {
    width: 34px;
    height: 18px;
    appearance: none;
    background: #334155;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
}

.toggle-switch input:checked {
    background: #3b82f6;
}

.toggle-switch input::before {
    content: "";
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    transition: 0.2s;
}

.toggle-switch input:checked::before {
    transform: translateX(16px);
}

.toggle-hint {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* 页脚 */
.kt-footer {
    text-align: center;
    margin-top: 1.8rem;
    font-size: 0.7rem;
    color: #5b6e8c;
}

/* 响应式 */
@media (max-width: 920px) {
    .visual-keyboard {
        overflow-x: auto;
    }
    .keyboard-tester-wrap {
        padding: 1rem;
    }
}
