/*
 * login.css —— 登录弹框 + 用户菜单 + 表单校验样式（红果吃瓜网 Figma 2538:6069 / 2538:6189）
 */

html body:has(.login_dialog) {
    background-color: transparent;
}
.sp_breadcrumb_nav {
    font-size: 0.75rem;
    color: #bcbcbc;
}
/* ye 导航菜单 start */
#ai-navigation-container .avatar_btn_user{
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
.user_menu {
    position: absolute;
    right: 0px;
    width: 12.5rem;
    border: 0.8rem solid #191919;
    background: #131313;
    border-radius: 0.5rem;
    display: none;
    z-index: 1000;
}

.user_menu.is-open {
    display: block;
}

.user_menu a {
    display: block;
    padding-block: 0.8rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.9375rem;
}

.user_menu a:hover {
    background: #191919;
}

.user_menu .userinfo {
    padding-block: 0.8rem;
}

.user_menu .username {
    color: #fe2e62;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
}

.user_menu .userid {
    color: #fff;
    opacity: 0.5;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
}

.user_menu .logout_btn {
    color: #fe2e62;
    text-align: center;
    font-size: 0.9375rem;
    padding-block: 0.6rem;
}
/* ye 导航菜单 end */

/* ye 登陆/注册 start */
.parsley-errors-list {
    margin: 0.375rem 0 0;
    list-style: none;
    padding: 0;
    font-size: 0.75rem;
    color: #ef4444;
    display: none;
}

.parsley-errors-list.filled {
    display: block;
}

.login_dialog {
    position: fixed;
    inset: 0;
    z-index: 900;
    background-color: rgba(0, 0, 0, 0.72);
}

.login_modal {
    width: min(480px, calc(100vw - 32px));
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    box-sizing: border-box;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 77, 184, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.login_modal::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -180px;
    width: 720px;
    height: 320px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(254, 46, 98, 0.28) 0%, rgba(254, 46, 98, 0) 68%);
    pointer-events: none;
    z-index: 0;
}

.login_close_btn {
    position: absolute;
    top: 20px;
    right: 22px;
    z-index: 2;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.login_close_btn img {
    display: block;
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.login_content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 85px 24px 28px;
    box-sizing: border-box;
}

.login_tabs {
    display: flex;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 34px;
}

.login_tab {
    flex: 1;
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-size: 20px;
    line-height: 22.5px;
    font-weight: 400;
    padding: 0 0 12px;
    cursor: pointer;
    position: relative;
}

.login_tab.is-active {
    color: #fff;
    font-weight: 600;
}

.login_tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #fe2e62 0%, #ff78a6 100%);
}

.login_panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.login_panel[hidden] {
    display: none !important;
}

.login_form_item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.login_form_item > label {
    color: #fff;
    font-size: 14px;
    line-height: 19.5px;
    letter-spacing: 0.2px;
}

.login_input_wrap {
    position: relative;
    width: 100%;
}

.login_input_icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.login_input_wrap > input {
    width: 100%;
    height: 52px;
    box-sizing: border-box;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 48px 0 44px;
    border-radius: 10px;
    font-size: 15px;
    color: #fff;
    background: #171717;
}

.login_input_wrap > input:not(:placeholder-shown),
.login_input_wrap > input:focus {
    border-color: #fe2e62;
    box-shadow: 0 0 6px rgba(254, 46, 98, 0.25);
}

.login_input_wrap > input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login_pwd_toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 4px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login_pwd_toggle img {
    display: block;
    width: 16px;
    height: 16px;
}

.login_pwd_toggle.is-visible {
    opacity: 0.55;
}

.login_submit_btn {
    width: 100%;
    height: 52px;
    margin-top: 36px;
    border: 0;
    border-radius: 10px;
    background: #fe2e62;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow:
        0 4px 24px rgba(255, 30, 148, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.login_submit_btn:hover {
    filter: brightness(1.05);
}

.login_tips {
    width: 100%;
    margin-top: 30px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #171717;
    color: rgba(255, 255, 255, 0.7);
    box-sizing: border-box;
}

.login_tips .login_tips_title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 30px;
}

.login_tips .login_tips_list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.login_switch {
    margin: 30px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    line-height: normal;
    color: #fff;
}

.login_switch_link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: #fe2e62;
    font-size: 18px;
    cursor: pointer;
}
/* ye 登陆/注册 end */

@media (max-width: 767px) {
    .sp_breadcrumb_nav {
        font-size: 0.8125rem;
    }
    /* ye 导航菜单 start */
    .user_menu {
        width: 10rem;
        min-width: 8rem;
        border: 0.3125rem solid #191919;
        border-radius: 0.25rem;
        top: 3rem;
    }

    .user_menu a, .user_menu .logout_btn {
        padding-block: 0.6rem;
        font-size: 0.8rem;
        text-align: center;
    }

    .user_menu .userinfo {
        padding-block: 0.6rem;
    }

    .user_menu .username {
        font-size: 0.8rem;
        text-align: center;
        overflow: hidden;
        word-break: break-all;
        text-overflow: ellipsis;
    }

    .user_menu .userid {
        font-size: 0.6rem;
        text-align: center;
    }
    /* ye 导航菜单 end */

    /* ye 登陆/注册 start */
    .login_content {
        padding: 72px 18px 22px;
    }

    .login_tabs {
        margin-bottom: 24px;
    }

    .login_tab {
        font-size: 18px;
    }

    .login_panel {
        gap: 18px;
    }

    .login_input_wrap > input {
        height: 48px;
        font-size: 14px;
    }

    .login_submit_btn {
        margin-top: 24px;
        height: 48px;
        font-size: 15px;
    }

    .login_tips {
        margin-top: 22px;
        padding: 10px 14px;
    }

    .login_tips .login_tips_title {
        font-size: 14px;
        line-height: 24px;
    }

    .login_tips .login_tips_list {
        font-size: 12px;
    }

    .login_switch {
        margin-top: 22px;
        font-size: 15px;
    }

    .login_switch_link {
        font-size: 15px;
    }
    /* ye 登陆/注册 end */
}
