@charset "utf-8";

/*
 * Shared compatibility styles for embedded learning content.
 * Page-specific presentation belongs in pageiframe.css.
 */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body,
button,
input,
textarea {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

button,
input,
textarea {
    -webkit-appearance: none;
    outline: 0;
}

img {
    border: 0;
}

ol,
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: #334155;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.clearfix::after {
    display: block;
    clear: both;
    content: "";
}

.fl {
    float: left;
}

.fr {
    float: right;
}

.hide {
    display: none !important;
}

.show {
    display: block !important;
}

.bg_white {
    background: #fff;
}

.mgt10 {
    margin-top: 10px;
}

.mgt30 {
    margin-top: 15px;
}

.mgb30 {
    margin-bottom: 15px;
}

.youxi,
.youxi1,
#game_window {
    width: 100%;
    height: 100%;
}

/* Floating entry shared by the embedded and legacy application shells. */
.nav {
    position: fixed;
    inset: 0;
    z-index: 950;
    pointer-events: none;
}

.nav .top {
    width: 100%;
    height: 100%;
}

.nav .top li {
    position: fixed;
    z-index: 1;
    width: 58px;
    max-width: 58px;
    height: auto;
    margin: 0;
    list-style: none;
    pointer-events: auto;
}

.nav .top li img {
    display: block;
    width: 100%;
    height: auto;
}

.navimg {
    display: block;
    cursor: pointer;
    touch-action: none;
}

.imgtransform {
    transform: scaleX(-1);
}

/* Generic drawer fallback for the legacy qunhei integration. */
.ball_float_box {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: min(86vw, 324px);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: #fff;
    box-shadow: 12px 0 30px rgba(15, 23, 42, .18);
    transform: translate3d(calc(-100% - 38px), 0, 0);
    transition: transform .2s ease;
}

.ball_float_box.show_ball {
    transform: translate3d(0, 0, 0);
}

.ball_float_box .close_btn {
    position: absolute;
    top: 50%;
    right: -38px;
    z-index: 1;
    width: 38px;
    height: 70px;
    margin-top: -35px;
    padding: 0 5px;
    border: 0;
    border-radius: 0 12px 12px 0;
    background: #fff;
    box-shadow: 8px 0 18px rgba(15, 23, 42, .09);
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.25;
}

.ball_float_box .ball_user_info {
    min-height: 92px;
    padding: 16px;
    overflow: hidden;
    background: #f97316;
}

.ball_float_box .ball_user_info .user_avatar {
    display: block;
    width: 54px;
    height: 54px;
    border: 2px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
    background: #fff7ed;
    object-fit: cover;
}

.ball_float_box .ball_user_info .user_info {
    min-width: 0;
    margin-left: 12px;
}

.ball_float_box .ball_user_info .user_name,
.ball_float_box .ball_user_info .user_id {
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ball_float_box .ball_user_info .user_name {
    margin: 4px 0 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 21px;
}

.ball_float_box .ball_user_info .user_id {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
    line-height: 18px;
}

.ball_float_box .ball_func_link {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 10px 12px;
    border-bottom: 1px solid #e8edf2;
    background: #fff;
}

.ball_float_box .ball_func_link .ball_func_link_item {
    min-width: 0;
}

.ball_float_box .ball_func_link .ball_func_link_item a {
    display: block;
    min-height: 36px;
    padding: 8px 4px;
    overflow: hidden;
    border-bottom: 2px solid transparent;
    border-radius: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ball_float_box .ball_func_link .ball_func_link_item a.cur {
    border-bottom-color: #f97316;
    background: #fff7ed;
    color: #c2410c;
}

.ball_float_box .ball_float_content_box {
    min-height: 0;
    flex: 1 1 auto;
    padding: 10px 12px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

/* Content list shared by ranking and legacy recommended-content responses. */
.g_list {
    margin: 0;
    padding: 0;
}

.g_list .g_one {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f5;
}

.g_list .g_one > a:first-child {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
}

.g_list .g_one .g_pic {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    overflow: hidden;
    border-radius: 10px;
    background: #f1f5f9;
}

.g_list .g_one .g_pic img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.g_list .g_one .g_topic {
    min-width: 0;
    flex: 1 1 auto;
    padding-left: 10px;
}

.g_list .g_one .g_topic h4,
.g_list .g_one .g_topic p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.g_list .g_one .g_topic h4 {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.g_list .g_one .g_topic h4 span {
    max-width: 100%;
}

.g_list .g_one .g_topic h4 em {
    display: none;
}

.g_list .g_one .g_topic p {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 18px;
}

.g_list .g_one .g_link {
    min-width: 48px;
    margin-left: 8px;
    padding: 6px 9px;
    border-radius: 7px;
    background: #fff3e8;
    color: #c2410c;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

/* Legacy gift and support responses retained for the qunhei route. */
.gift_box {
    background: #fff;
}

.gift_box .gift_col {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f5;
}

.gift_box .gift_col:last-child {
    border-bottom: 0;
}

.gift_box .gift_game_info {
    min-width: 0;
    flex: 1 1 auto;
}

.gift_box .gift_name,
.gift_box .gift_note {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gift_box .gift_name {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.gift_box .gift_note {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 18px;
}

.gift_box .btn {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 7px;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

.gift_box .btn_blue {
    background: #2498ef;
}

.my_kefu_box {
    padding: 22px 0;
    text-align: center;
}

.my_kefu_box .kefu_qrcode {
    display: block;
    width: min(168px, 60vw);
    height: auto;
    margin-right: auto;
    margin-left: auto;
    border-radius: 10px;
}

.my_kefu_box .kefu_info {
    margin-top: 10px;
}

.my_kefu_box .kefu_info p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 22px;
}

.my_kefu_box .kefu_info p b {
    color: #334155;
    font-weight: 600;
}

/* Backdrop is deliberately separate from the panel for tap-to-close behavior. */
#body-wrap {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    background: rgba(15, 23, 42, .48);
}

@media (min-width: 768px) {
    .nav .top li {
        width: 62px;
        max-width: 62px;
    }
}
