/* ===== TRANG HƯỚNG DẪN ===== */

.btn-outline {
    display: inline-block;
    padding: 10px 28px;
    border: 2px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: .2s;
}

.btn-outline::before {
    content: "⬇";
    margin-right: 10px;
}

.btn-outline:hover {
    background: var(--gold);
    color: #000;
}

/* ===== BỐ CỤC ===== */
.guide {
    max-width: 1000px;
    margin: auto;
    padding: 50px 20px 70px;
}

.guide-section {
    margin-bottom: 55px;
    scroll-margin-top: 100px;
}

.guide h2 {
    font-size: 1.9rem;
    color: var(--gold);
    margin-bottom: 18px;
    line-height: 1.3;
}

.guide h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 10px;
}

.guide p {
    margin-bottom: 12px;
}

.guide strong {
    color: var(--gold);
}

.guide a {
    color: var(--gold);
}

.guide .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: 10px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    font-size: 1.3rem;
    vertical-align: middle;
}

/* ===== PHÍM ===== */
/* Phím dạng keycap trắng như bàn phím thật */
kbd {
    display: inline-block;
    min-width: 2em;
    margin: 0 1px 4px;
    padding: 2px 9px;
    border: 1px solid #c9c9c9;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f4f4 55%, #e6e6e6 100%);
    box-shadow:
        inset 0 1px 0 #fff,
        inset 0 -3px 0 rgba(0, 0, 0, .08),
        0 3px 0 #a3a3a3,
        0 4px 8px rgba(0, 0, 0, .55);
    color: #1c1c1c;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: .85em;
    font-style: normal;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    text-shadow: 0 1px 0 #fff;
    white-space: nowrap;
    vertical-align: middle;
    transition: transform .08s, box-shadow .08s;
}

/* Hover: phím lún xuống như đang bấm */
kbd:hover {
    transform: translateY(2px);
    box-shadow:
        inset 0 1px 0 #fff,
        inset 0 -2px 0 rgba(0, 0, 0, .08),
        0 1px 0 #a3a3a3,
        0 2px 4px rgba(0, 0, 0, .5);
}

.nowrap {
    white-space: nowrap;
}

/* ===== LƯU Ý ===== */
.notice {
    border: 1px solid rgba(212, 175, 55, .5);
    border-left: 5px solid var(--gold);
    background: linear-gradient(90deg, rgba(212, 175, 55, .1), rgba(212, 175, 55, .02));
    padding: 24px 28px;
    border-radius: 8px;
}

.notice h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.arrow-list,
.dot-list {
    list-style: none;
}

.arrow-list li,
.dot-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
}

.arrow-list li::before {
    content: "⇨";
    position: absolute;
    left: 0;
    color: var(--gold);
}

.dot-list li::before {
    content: "◆";
    position: absolute;
    left: 4px;
    font-size: .7em;
    top: .45em;
    color: var(--gold);
}

/* ===== MỤC LỤC ===== */
.toc {
    border: 1px solid rgba(212, 175, 55, .3);
    border-radius: 10px;
    padding: 22px 28px;
    margin-bottom: 55px;
    background: #151515;
}

.toc h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.toc ol {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 4px 24px;
}

.toc a {
    display: block;
    padding: 5px 0;
    color: var(--light);
    text-decoration: none;
    border-bottom: 1px dashed rgba(212, 175, 55, .2);
    transition: .2s;
}

.toc a:hover {
    color: var(--gold);
    padding-left: 6px;
}

/* ===== VIDEO ===== */
.video-more {
    margin-top: 14px;
    text-align: center;
}

/* ===== BẢNG PHÍM TẮT ===== */
.hotkey-search {
    margin-bottom: 16px;
}

.hotkey-search input {
    width: 100%;
    padding: 13px 18px;
    background: #151515;
    border: 1px solid rgba(212, 175, 55, .4);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.hotkey-search input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .15);
}

.hotkeys {
    width: 100%;
    border-collapse: collapse;
    background: #151515;
    border: 1px solid rgba(212, 175, 55, .3);
}

.hotkeys thead th {
    position: sticky;
    top: 86px;
    z-index: 1;
    background: #2a2311;
    color: var(--gold);
    padding: 12px 14px;
    text-align: left;
    font-size: 1.05rem;
    border-bottom: 2px solid var(--gold);
}

.hotkeys tbody th,
.hotkeys td {
    padding: 10px 14px;
    border-bottom: 1px solid #262626;
    text-align: left;
    vertical-align: middle;
}

.hotkeys tbody th {
    width: 22%;
    white-space: nowrap;
    font-weight: normal;
}

.hotkeys tbody th small {
    color: #999;
}

/* Viền dọc chia cột */
.hotkeys th,
.hotkeys td {
    border-right: 1px solid #2e2e2e;
}

.hotkeys thead th {
    border-right-color: rgba(212, 175, 55, .3);
}

.hotkeys th:last-child,
.hotkeys td:last-child {
    border-right: none;
}

.hotkeys tbody th {
    border-right-color: rgba(212, 175, 55, .25);
}

.hotkeys tbody tr:nth-child(even) {
    background: #191919;
}

.hotkeys tbody tr:hover {
    background: #231f14;
}

.hotkeys .as-ctrl {
    color: #bbb;
    font-style: italic;
}

.hotkeys .no-result td {
    text-align: center;
    color: #999;
    padding: 24px;
}

/* ===== CÁC BƯỚC ===== */
.method {
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 18px;
    background: #151515;
}

.method-best {
    border-color: rgba(212, 175, 55, .6);
}

.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 0 10px;
    border-radius: 20px;
    background: var(--gold);
    color: #000;
    font-size: .8rem;
    vertical-align: middle;
}

.steps {
    list-style: none;
    counter-reset: step;
}

.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 62px; /* 46px badge + 16px khoảng cách */
    margin-bottom: 12px;
    min-height: 30px;
}

.steps > li::before {
    content: "B" counter(step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 46px;
    white-space: nowrap;
    border-radius: 4px;
    background: rgba(212, 175, 55, .15);
    border: 1px solid rgba(212, 175, 55, .5);
    color: var(--gold);
    font-weight: 700;
    font-size: .9rem;
    text-align: center;
}

.step-note {
    display: block;
    margin-top: 4px;
    color: #9a9a9a;
    font-size: .9rem;
}

.tip {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    background: rgba(212, 175, 55, .07);
    border-left: 3px solid var(--gold);
}

/* ===== XỬ LÝ LỖI ===== */
.escalate {
    list-style: none;
}

.escalate li {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px dashed #2a2a2a;
}

/* Nội dung (chữ + nút Zalo) cũng căn giữa theo chiều dọc */
.escalate li > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.escalate li > kbd {
    margin-bottom: 3px; /* bù phần gờ bóng dưới phím để cân với ô "?" */
}

.escalate li > kbd,
.escalate .contact-icon {
    flex: 0 0 64px;
    text-align: center;
}

/* Cùng dáng keycap với kbd nhưng màu xanh Zalo */
.escalate .contact-icon {
    display: inline-block;
    margin-bottom: 3px;
    padding: 2px 9px;
    border: 1px solid #0a5f93;
    border-radius: 6px;
    background: linear-gradient(180deg, #2a9be0 0%, #0d7fc4 60%, #0172b1 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .35),
        0 3px 0 #064a73,
        0 4px 8px rgba(0, 0, 0, .55);
    color: #fff;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: .85em;
    line-height: 1.45;
}

.escalate .btn-zalo {
    color: #fff;
}

/* ===== MOBILE ===== */
@media (max-width: 700px) {
    .guide h2 {
        font-size: 1.55rem;
    }

    .notice,
    .toc,
    .method {
        padding: 18px;
    }

    /* Bảng phím tắt → dạng thẻ */
    .hotkeys,
    .hotkeys tbody,
    .hotkeys tr,
    .hotkeys th,
    .hotkeys td {
        display: block;
        width: 100%;
    }

    .hotkeys thead {
        display: none;
    }

    .hotkeys {
        border: none;
        background: none;
    }

    .hotkeys tbody tr {
        margin-bottom: 10px;
        border: 1px solid rgba(212, 175, 55, .3);
        border-radius: 8px;
        background: #151515;
        overflow: hidden;
    }

    .hotkeys tbody tr:nth-child(even) {
        background: #151515;
    }

    .hotkeys tbody tr[hidden] {
        display: none;
    }

    .hotkeys th,
    .hotkeys td {
        border-right: none;
    }

    .hotkeys tbody th {
        width: 100%;
        background: #2a2311;
        border-bottom: 1px solid rgba(212, 175, 55, .3);
    }

    .hotkeys td {
        border-bottom: none;
        padding: 6px 14px;
    }

    .hotkeys td:empty {
        display: none;
    }

    .hotkeys td[data-label]::before {
        content: attr(data-label) ": ";
        color: #999;
        font-size: .9rem;
    }

    .escalate li {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .escalate li > kbd,
    .escalate .contact-icon {
        flex: none;
        min-width: 64px;
    }
}
