.subtitle {
    text-align: center;
    color: #888;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.controls, .input-area, .output-area {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ddd;
}

select, input, textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--mk-gray, #333);
    border: 1px solid #555;
    color: white;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--mk-yellow, #f1c40f);
    box-shadow: 0 0 8px rgba(251, 214, 21, 0.3);
}

small {
    display: block;
    margin-top: 8px;
    color: #aaa;
    font-size: 0.85em;
}

.combo-display {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 70px;
    padding: 20px;
    background-color: #0a0a0a;
    border: 1px dashed var(--mk-yellow, #f1c40f);
    border-radius: 4px;
    align-items: center;
}

#comboDisplay {
    display: flex;
    flex-direction: column; /* Xếp các hàng theo chiều dọc */
    gap: 12px;               /* Khoảng cách giữa các hàng combo */
    width: 100%;
}


/* Textarea phong cách Material Design (Outlined & Filled Dark) */
#comboInput {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    box-sizing: border-box;
    
    /* Màu nền Dark Surface chuẩn Material */
    background-color: #1e1e1e;
    color: #f5f5f5;
    
    font-family: 'Roboto Mono', monospace, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.5px;
    
    /* Viền Outlined */
    border: 1px solid #424242;
    border-radius: 8px; /* Bo góc MD3 */
    outline: none;
    resize: vertical; /* Cho phép kéo dãn theo chiều dọc */
    
    /* Hiệu ứng chuyển động */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Trạng thái Hover */
#comboInput:hover {
    background-color: #242424;
    border-color: #616161;
}

/* Trạng thái Focus (Active) với viền sáng màu Accent */
#comboInput:focus {
    background-color: #1e1e1e;
    border-color: #f5b027; /* Vàng Mortal Kombat / Material Amber */
    box-shadow: 0 0 0 2px rgba(245, 176, 39, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Tùy chỉnh thanh cuộn nội bộ (Scrollbar) */
#comboInput::-webkit-scrollbar {
    width: 6px;
}

#comboInput::-webkit-scrollbar-track {
    background: transparent;
}

#comboInput::-webkit-scrollbar-thumb {
    background-color: #424242;
    border-radius: 4px;
}

#comboInput::-webkit-scrollbar-thumb:hover {
    background-color: #616161;
}

/* Placeholder */
#comboInput::placeholder {
    color: #757575;
    font-style: normal;
}

.combo-row {
    display: flex;
    flex-wrap: wrap;        /* Các phím trong 1 hàng vẫn tự co dãn nếu quá dài */
    align-items: center;
    gap: 6px;
    min-height: 36px;
}

.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    background-color: #fff;
    color: #000;
    font-weight: bold;
    border-radius: 8px;
    padding: 0 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.6);
    font-size: 20px;
    text-transform: uppercase;
}

.button-icon.ps {
    background-color: #003791;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.button-icon.xbox {
    background-color: #107C10;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.button-icon.dir {
    background-color: #333;
    color: var(--mk-yellow, #f1c40f);
    border: 1px solid #555;
}

.button-separator {
    color: #777;
    font-weight: bold;
    font-size: 18px;
}

/* Style cho Bàn phím (PC) - Giống phím cơ */
.button-icon.pc {
    background-color: #e0e0e0;
    color: #333;
    border-bottom: 4px solid #999;
    border-right: 2px solid #ccc;
    border-radius: 6px;
    font-family: monospace;
    font-size: 22px;
}

/* Style cho Arcade Stick - Nút tròn */
.button-icon.arcade {
    background-color: #d11111; /* Màu đỏ đặc trưng của nút Arcade */
    color: white;
    border-radius: 50%; /* Nút hình tròn */
    border: 3px solid #8a0b0b;
    box-shadow: inset 0px 4px 5px rgba(255,255,255,0.3), 0 4px 6px rgba(0,0,0,0.6);
    min-width: 50px;
    height: 50px;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.virtual-keyboard-area {
    margin-top: 15px;
    background: #1e1e1e;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #333;
}

#virtualKeyboard {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.v-key-btn {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 5px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.15s, transform 0.1s;
}

.v-key-btn:active {
    background: var(--mk-yellow, #f1c40f);
    color: #000;
    transform: scale(0.93);
}

/* LỚP BẢO VỆ GOOGLE MATERIAL ICONS KHỎI BỊ IN HOA */
.button-icon.material-icons,
.v-key-btn.material-icons {
    text-transform: none !important;
    font-family: 'Material Icons' !important;
    letter-spacing: normal !important;
}
