/* 容器：中央 1240px（左右 20px padding） */
.hd__container {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== 顶部导航 ====== */
.hd__nav {
    font-family: "PingFang SC";
    background: #433A58;
    border: none;
    margin: 0;
    border-radius: 0;
    height: 100px;
    line-height: 100px;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hd__nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
}

.hd__nav-header {
    display: flex;
    align-items: center;
}

.hd__nav-brand {
    padding: 0;
    height: 64px;
    line-height: 64px;
    display: flex;
    align-items: center;
}

.hd__brand-logo {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #a78bfa 0%, #6c5ce7 100%);
    border-radius: 8px;
    position: relative;
}

.hd__brand-logo::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 4px;
    opacity: 0.9;
}

.hd__nav-list {
    margin: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* 大屏：collapse 始终展开显示 */
.hd__navbar-collapse.hd__collapse {
    position: relative; /* 作为弹窗定位的祖先（不影响内部布局） */
    display: block;
    height: auto;
}

.hd__nav-list > li {
    margin-left: 0;
    line-height: 100px;
    width: 160px;
    height: 100px;
    text-align: center;
}

.hd__nav-list > li > a {
    color: #fff;
    font-size: 18px;
    padding: 0;
    background: transparent !important;
    position: relative;
    display: inline-block;
    line-height: 100px;
    width: 160px;
    height: 100px;
}

.hd__nav-list > li > a:hover,
.hd__nav-list > li.active > a {
    color: #fff;
    font-weight: bold;
}

.hd__nav-list > li.active > a::after {
    content: "";
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.hd__nav-toggle {
    display: none;
    border: none;
    background: transparent;
    padding: 8px 10px;
    margin-top: 14px;
    margin-right: 0;
    cursor: pointer;
}

.hd__nav-toggle .hd__icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
    transition: all .3s;
}

/* ====== Footer ====== */
.hd__footer {
    background: #4a3c6e;
    color: rgba(255, 255, 255, 0.85);
    padding: 50px 0 30px;
}

.hd__footer-top {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

/* 大屏横向排列时的间距（替代 flex gap，兼容老浏览器） */
.hd__footer-brand {
    display: flex;
    margin-right: 100px;
}

.hd__footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    width: 300px;
}

.hd__footer-links li {
    width: 150px;
    margin-bottom: 12px;
}

.hd__footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.hd__footer-links li a:hover {
    color: #fff;
}

.hd__footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.hd__footer-bottom p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    margin: 6px 0;
}

.hd__footer-bottom a {
    color: rgba(255, 255, 255, 0.55);
}

.hd__footer-bottom a:hover {
    color: #fff;
}

/* ====== 响应式 ====== */
@media (max-width: 1200px) {
    .hd__nav {
        height: 72px;
        line-height: 72px;
    }

    .hd__nav-container {
        padding: 0 20px;
        height: 72px;
    }

    .hd__brand-logo {
        width: 36px;
        height: 36px;
    }

    .hd__nav-list > li {
        line-height: 72px;
        width: 110px;
        height: 72px;
    }

    .hd__nav-list > li > a {
        font-size: 15px;
        line-height: 72px;
        width: 110px;
        height: 72px;
    }

    .hd__nav-list > li.active > a::after {
        bottom: 14px;
        width: 60px;
    }
}

@media (max-width: 992px) {
    .hd__nav {
        height: 64px;
        line-height: 64px;
    }
    .hd__nav-container {
        height: 64px;
    }
    .hd__nav-header {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
    .hd__nav-brand {
        height: 40px;
        line-height: 40px;
        margin-right: 12px;
        display: flex;
        align-items: center;
    }
    .hd__brand-logo {
        width: 40px;
        height: 40px;
    }
    .hd__nav-toggle {
        display: block;
        margin: 0;
        padding: 8px 10px;
    }
    .hd__navbar-collapse.hd__collapse {
        display: none;
        height: auto;
        position: static;
    }
    .hd__navbar-collapse.hd__collapse.hd__open {
        display: block;
    }
    .hd__nav-list {
        display: flex;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #433A58;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        flex-direction: column;
        padding: 10px 0;
    }
    .hd__nav-list > li {
        margin: 0;
        line-height: 48px;
        width: 100%;
        height: 48px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .hd__nav-list > li:last-child { border-bottom: none; }
    .hd__nav-list > li > a { height: 48px; line-height: 48px; width: 100%; }
    .hd__nav-list > li > a::after { display: none; }

    .hd__footer-top {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .hd__footer-brand {
        justify-content: center;
        /* 纵向排列：横向间距改为纵向间距 */
        margin-right: 0;
        margin-bottom: 15px;
    }
    .hd__footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hd__footer-links { justify-content: center; margin-top: 16px; }
    .hd__footer-links li { width: 150px; margin: 0 0 12px; }

    /* 手机端导航中的“充值”文案显示为“登录” */
    #recharge-btn {
        font-size: 0;
    }
    #recharge-btn::before {
        content: "登录";
        font-size: 15px;
    }
}
