/* 二次元登录注册页面样式 */
*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    color: #fff;
    background-image: url(https://img-baofun.zhhainiao.com/pcwallpaper_ugc/static/10da185dbac7e9de131ccbebf213665b.jpg?x-oss-process=image/resize,m_lfit,w_2560,h_1440);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    position: relative;
}

/* 背景淡化遮罩 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* 移动端背景 */
@media (max-width: 768px) {
    body {
        background-image: url(https://img-baofun.zhhainiao.com/pcwallpaper_ugc/static/10da185dbac7e9de131ccbebf213665b.jpg?x-oss-process=image/resize,m_lfit,w_2560,h_1440);
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
    }

    /* 移动端背景淡化遮罩 - 减少遮罩让背景更明显 */
    body::before {
        background: rgba(0, 0, 0, 0.1);
    }

    /* 移动端box透明度调整 - 更透明让背景更明显 */
    .box {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

main {
    width: 100%;
    overflow: hidden;
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box {
    width: 100%;
    max-width: 1020px;
    height: 640px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    border-radius: 3.3rem;
    box-shadow: 0 0 20px rgba(183, 178, 169, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 移动端表单区域透明度调整 */
@media (max-width: 768px) {
    .forms-wrap {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 2rem;
        backdrop-filter: blur(3px);
    }
}

.inner-box {
    position: absolute;
    width: calc(100% - 4.1rem);
    height: calc(100% - 4.1rem);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}



.forms-wrap {
    position: absolute;
    height: 100%;
    width: 45%;
    left: 0;
    top: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    transition: 0.8s ease-in-out;
}

form {
    max-width: 260px;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    transition: opacity 0.02s 0.4s;
}

form.sign-up-form {
    opacity: 0;
    pointer-events: none;
}

form.forget-form {
    opacity: 0;
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 27px;
    margin-right: 0.3rem;
}

.logo h4 {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: #151111;
    text-align: center;
}

.heading {
    text-align: center;
    margin-bottom: 20px;
}

.heading h6,
.heading .toggle {
    display: inline;
}

.heading h2 {
    font-size: 2.1rem;
    font-weight: 600;
    color: #151111;
    text-align: center;
    margin-bottom: 15px;
}

.heading h6 {
    font-size: 0.75rem;
    font-weight: 400;
    display: inline;
    color: #bababa;
}

.toggle {
    color: #bbb;
    text-shadow: 0 0 20px #bababa;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.3s;
    cursor: pointer;
}

.toggle:hover {
    color: #8371f6;
}

.input-wrap {
    position: relative;
    height: 37px;
    margin-bottom: 2rem;
}

.input-field {
    position: absolute;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    outline: none;
    border-bottom: 1px solid #bbb;
    padding: 0;
    font-size: 0.95rem;
    color: #151111;
    transition: 0.4s;
}

label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #bbb;
    pointer-events: none;
    transition: 0.4s;
}

.input-field:focus {
    border-bottom-color: #151111;
}

.input-field.active + label,
.input-field:focus + label {
    font-size: 0.75rem;
    top: -2px;
}

.sign-btn {
    display: inline-block;
    width: 100%;
    height: 43px;
    background: #151111;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 0.8rem;
    margin-bottom: 2rem;
    transition: 0.3s;
}

.sign-btn:hover {
    background-color: #8371f6;
}

/* 直接跳转按钮样式 */
.direct-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    color: #8371f6;
    border: 2px solid #8371f6;
    border-radius: 0.8rem;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.direct-btn:hover {
    background: #8371f6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(131, 113, 246, 0.3);
}

.text {
    display: flex;
    color: white;
    text-shadow: 0 0 20px #b7b2a9;
    font-size: 0.7rem;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.text a {
    color: #bbb;
    transition: 0.3s;
    text-decoration: none;
    margin-left: 5px;
}

.text a:hover {
    color: #8371f6;
}

/* 找回密码链接样式 */
.forget-link {
    text-align: center;
    margin-top: 10px;
}

.forget-link a {
    color: #8371f6;
    text-decoration: none;
    font-size: 0.75rem;
    transition: 0.3s;
}

.forget-link a:hover {
    color: #bbb;
    text-shadow: 0 0 10px #8371f6;
}

/* 验证码样式 */
.vcode-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 2rem;
}

.vcode-input {
    flex: 2;
}

.vcode-img {
    height: 37px;
    width: 120px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #bbb;
    object-fit: cover;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.vcode-img:hover {
    border-color: #8371f6;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(131, 113, 246, 0.3);
}

/* 注册和找回密码模式 */
main.sign-up-mode form.sign-in-form {
    opacity: 0;
    pointer-events: none;
}

main.sign-up-mode form.sign-up-form {
    opacity: 1;
    pointer-events: all;
}

main.sign-up-mode .forms-wrap {
    left: 55%;
}

main.sign-up-mode .carousel {
    left: 0%;
}

main.forget-mode form.sign-in-form {
    opacity: 0;
    pointer-events: none;
}

main.forget-mode form.forget-form {
    opacity: 1;
    pointer-events: all;
}

main.forget-mode .forms-wrap {
    left: 55%;
}

main.forget-mode .carousel {
    left: 0%;
}

.carousel {
    border-radius: 2rem;
    padding: 2rem;
    position: absolute;
    overflow: hidden;
    height: 100%;
    width: 55%;
    left: 45%;
    top: 0;
    box-shadow: 0 0 5px rgba(183, 178, 169, 0.3);
    background-color: transparent;
    display: grid;
    transition: 0.8s ease-in-out;
    position: relative;
    grid-template-rows: auto 1fr;
}

.images-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 1rem;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    opacity: 0;
    transition: opacity 0.3s, transform 0.5s;
}

.img-1 {
    transform: translate(0, -50px);
}

.img-2 {
    transform: scale(0.4, 0.5);
}

.img-3 {
    transform: scale(0.3) rotate(-20deg);
}

.image.show {
    opacity: 1;
    transform: none;
}

.text-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.text-wrap {
    max-height: 2.2rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.text-group {
    display: flex;
    flex-direction: column;
    text-align: center;
    transform: translateY(0);
    transition: 0.5s;
}

.text-group h2 {
    line-height: 2.2rem;
    font-weight: 600;
    font-size: 1.6rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bullets {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bullets span {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 0.2rem;
    background-color: white;
    box-shadow: 0 0 20px #b7b2a9;
    margin: 0 0.25rem;
    cursor: pointer;
    transition: 0.3s;
}

.bullets span.active {
    width: 1.1rem;
    background-color: aqua;
    border-radius: 1rem;
}

/* 响应式设计 */
@media (max-width: 850px) {
    .box {
        height: auto;
        max-width: 550px;
        overflow: hidden;
    }

    .inner-box {
        position: static;
        transform: none;
        width: revert;
        height: revert;
        padding: 2rem;
    }

    .forms-wrap {
        position: revert;
        width: 100%;
        height: 100%;
    }

    form {
        max-width: revert;
        padding: 1.5rem 2.5rem 2rem;
        transition: transform 0.8s ease-in-out, opacity 0.4s linear;
    }

    .heading {
        margin: 2rem 0;
    }

    form.sign-up-form {
        transform: translateX(100%);
    }

    form.forget-form {
        transform: translateX(100%);
    }

    main.sign-up-mode form.sign-in-form {
        transform: translateX(-100%);
    }

    main.sign-up-mode form.sign-up-form {
        transform: translateX(0%);
    }

    main.forget-mode form.sign-in-form {
        transform: translateX(-100%);
    }

    main.forget-mode form.forget-form {
        transform: translateX(0%);
    }

    .carousel {
        position: revert;
        height: auto;
        width: 100%;
        padding: 3rem 2rem;
        display: flex;
    }

    .images-wrapper {
        display: none;
    }

    .text-slider {
        width: 100%;
    }
}

@media (max-width: 530px) {
    main {
        padding: 0.5rem;
    }

    .box {
        border-radius: 1.5rem;
        height: auto;
        min-height: 90vh;
    }

    .inner-box {
        padding: 1rem;
    }

    .carousel {
        padding: 1rem;
        border-radius: 1.2rem;
    }

    .text-wrap {
        margin-bottom: 1rem;
    }

    .text-group h2 {
        font-size: 1.1rem;
        line-height: 1.8rem;
    }

    form {
        padding: 1rem 1.5rem;
        max-width: 100%;
    }

    .logo h4 {
        font-size: 1rem;
        text-align: center;
    }

    .heading h2 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .heading h6 {
        display: inline;
        margin-right: 5px;
    }

    .heading .toggle {
        display: inline;
        font-size: 0.8rem;
    }

    /* 移动端标题文字增强 */
    .logo h4,
    .heading h2 {
        color: #000 !important;
        text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
        font-weight: 700;
    }

    .heading h6 {
        color: #333 !important;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        font-weight: 600;
    }

    .toggle {
        color: #8371f6 !important;
        text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9);
        font-weight: 700;
    }

    /* 移动端文字增强对比度 */
    .logo h4,
    .heading h2 {
        color: #000;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    }

    .heading h6 {
        color: #333;
        text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.6);
    }

    .toggle {
        color: #8371f6;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        font-weight: 600;
    }

    .input-wrap {
        margin-bottom: 1.5rem;
    }

    .input-field {
        font-size: 1rem;
        padding-bottom: 5px;
    }

    label {
        font-size: 0.9rem;
        color: #333 !important;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        font-weight: 600;
    }

    .input-field {
        color: #000 !important;
        font-weight: 500;
    }

    .input-field::placeholder {
        color: #666 !important;
        opacity: 1;
    }

    .sign-btn {
        height: 48px;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .direct-btn {
        height: 48px;
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 12px 15px;
    }

    .vcode-container {
        flex-direction: row;
        gap: 10px;
        align-items: flex-end;
    }

    .vcode-input {
        flex: 1.5;
    }

    .vcode-img {
        width: 100px;
        height: 37px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .text {
        font-size: 0.75rem;
        text-align: center;
        justify-content: center;
    }

    .forget-link {
        margin-top: 15px;
    }

    .forget-link a {
        font-size: 0.8rem;
        color: #8371f6 !important;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        font-weight: 600;
    }

    /* 移动端按钮文字增强 */
    .sign-btn,
    .direct-btn {
        text-shadow: none;
        font-weight: 700;
    }

    .text {
        color: #333 !important;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        font-weight: 600;
    }

    .text a {
        color: #8371f6 !important;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        font-weight: 700;
    }

    /* 移动端轮播图优化 */
    .bullets span {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }

    .bullets span.active {
        width: 16px;
    }
}
