@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@500;700&display=swap');

:root {
    --primary-color: #55bcd1;
    --white-color: #ffffff;
    --light-text-color: #9398b3;
    --light-bg-color: #f2f4ff;
    --dark-color: #333333;
    --background-color: #fcfcff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    color: var(--dark-color);
    background-color: var(--background-color);
}

.fullscreen-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

h1 {
    font-size: 3em;
    font-weight: 700;
    line-height: normal;
    color: black;
    margin: 0;
    padding: 0;
}

/* 表单标题样式 */
.form-title {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 25px;
    text-align: left;
}

/* 布局核心样式 */
.site {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.container {
    max-width: 1100px;
    width: 100%;
    padding: 0 30px;
    margin: 0 auto;
}

.login {
    display: flex;
    flex-wrap: wrap;
    height: 50vh;
    min-height: 400px;
}

.hero {
    flex: 1 0 60%;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
}

.hero-title-container {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 0;
    width: 280px;
    height: 100px;
    background: linear-gradient(to right, var(--primary-color), #c471ed, #f64f59);
    z-index: -1;
    filter: blur(70px);
}

.toggle-link {
    font-weight: 500;
    color: var(--primary-color);
    transition: color .3s;
    cursor: pointer;
    text-decoration: underline;
}

.toggle-link:hover,
form .password a:hover {
    color: var(--dark-color);
}

.main {
    position: relative;
    flex: 1 0 35%;
    max-width: 400px;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 50px 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    overflow: hidden;
}

.main form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.main form p {
    margin: 0;
}

form input {
    width: 100%;
    font-size: 13px;
    padding: 0 20px;
    line-height: 40px;
    border-radius: 10px;
    border: 1px solid #ccc;
    outline: none;
    transition: border 0.3s;
}

form input:focus {
    font-size: 14px;
    border: 1px solid #3399ff;
}

form .password a {
    font-size: 13px;
    color: var(--light-text-color);
    float: right;
    margin: 5px 20px 0 0;
    text-decoration: underline;
}

form input:not(.submit) {
    background-color: var(--light-bg-color);
}

/* 提交按钮 */
form input.submit {
    font-weight: 700;
    color: var(--white-color);
    background-color: var(--primary-color);
    box-shadow: var(--primary-color) 0 20px 30px -10px;
    cursor: pointer;
    transition: box-shadow .3s;
}

form input.submit:hover {
    box-shadow: var(--primary-color) 0 10px 30px -10px;
}

/* 表单切换动画 */
.form-container {
    transition: all 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: inherit;
}

.form-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    padding: inherit;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .site {
        height: auto;
        padding: 40px 0;
    }

    .login {
        flex-direction: column;
        height: auto;
        gap: 40px;
        padding: 0;
    }

    .hero {
        flex: none;
        width: 100%;
        justify-content: center;
        padding: 0 20px;
    }

    h1 {
        font-size: 2.2em;
        text-align: center;
    }

    .main {
        flex: none;
        width: 90%;
        max-width: 400px;
        margin: 0 auto;
        padding: 30px 20px;
        min-height: 380px;
        overflow: hidden;
    }

    .form-title {
        font-size: 1.4em;
        margin-bottom: 20px;
        text-align: center;
    }

    .main form {
        gap: 25px;
    }

    form input {
        line-height: 50px;
        font-size: 14px;
    }

    form .password a {
        margin-right: 0;
    }

    form input.submit {
        margin-top: 10px;
    }
}