* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

/* 使用flex布局，让内容垂直和水平居中 */
section {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 背景颜色 */
.color {
    /* 绝对定位 */
    position: absolute;
    /* 使用filter 背景设置高斯模糊*/
    filter: blur(200px);
}

.color:nth-child(1) {
    top: -350px;
    width: 600px;
    height: 600px;
    background: var(--circle-color-1);
}

.color:nth-child(2) {
    bottom: -150px;
    left: 100px;
    width: 500px;
    height: 500px;
    background: var(--circle-color-2);
}

.color:nth-child(3) {
    bottom: 50px;
    right: 100px;
    width: 500px;
    height: 500px;
    background: var(--circle-color-3);
}

.box {
    position: relative;
}

/* 背景圆样式 */
.circle {
    position: absolute;
    background: var(--primary-alpha-10);
    /* backdrop-filter属性为一个元素后面区域添加模糊效果 */
    backdrop-filter: blur(5px);
    box-shadow: 0 25px 45px var(--background-alpha-10);
    border: 1px solid var(--primary-alpha-50);
    border-right: 1px solid var(--primary-alpha-20);
    border-bottom: 1px solid var(--primary-alpha-20);
    border-radius: 50%;
    /* 使用filter(滤镜) 属性，改变颜色。
      hue-rotate(deg)  给图像应用色相旋转
      calc() 函数用于动态计算长度值
      var() 函数调用自定义的CSS属性值x*/
    filter: hue-rotate(calc(var(--x) * 70deg));
    /* 调用动画animate，需要10s完成动画，
      linear表示动画从头到尾的速度是相同的，
      infinite指定动画应该循环播放无限次*/
    animation: animate 10s linear infinite;
    /* 动态计算动画延迟几秒播放 */
    animation-delay: calc(var(--x) * -1s);
}

/* 背景圆动画 */
@keyframes animate {

    0%,
    100% {
        transform: translateY(-50px);
    }

    50% {
        transform: translateY(50px);
    }
}

.box .circle:nth-child(1) {
    top: -50px;
    right: -60px;
    width: 100px;
    height: 100px;
}

.box .circle:nth-child(2) {
    top: 150px;
    left: -100px;
    width: 120px;
    height: 120px;
    z-index: 2;
}

.box .circle:nth-child(3) {
    bottom: 50px;
    right: -60px;
    width: 80px;
    height: 80px;
    z-index: 2;
}

.box .circle:nth-child(4) {
    bottom: -80px;
    left: 100px;
    width: 60px;
    height: 60px;
}

.box .circle:nth-child(5) {
    top: -80px;
    left: 140px;
    width: 60px;
    height: 60px;
}

/* 登录框样式 */
.container {
    width: 400px;
    height: 400px;
    background: var(--primary-alpha-10);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    backdrop-filter: blur(5px);
    box-shadow: 0 25px 45px var(--background-alpha-10);
    border: 1px solid var(--primary-alpha-50);
    border-right: 1px solid var(--primary-alpha-20);
    border-bottom: 1px solid var(--primary-alpha-20);
}

.form {
    width: 100%;
    height: 100%;
    padding: 50px;
    overflow: hidden;
}

/* 登录标题样式 */
.form h2 {
    margin-bottom: 30px;
    width: fit-content;
    color: var(--color-primary);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 5px;
    position: relative;
    cursor: default;
}

/* 登录标题下划线样式 */
.form h2::before {
    background: var(--color-primary);
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 3px;
    transition: 0.3s;
}

.form h2:hover:before {
    width: 53px;
}

.inputBox {
    margin: 20px 0;
    width: 100%;
    border: 1px solid var(--primary-alpha-50);
    border-right: 1px solid var(--primary-alpha-20);
    border-bottom: 1px solid var(--primary-alpha-20);
    border-radius: 30px;
    box-shadow: 0 5px 15px #0000000d;
    overflow: hidden;
}

/* 输入框样式 */
.input-area {
    padding: 10px 20px;
    width: 100%;
    outline: none;
    border: none;
    letter-spacing: 1px;
    background-color: var(--primary-alpha-40);
    font-size: 16px;
    color: var(--color-primary);
}

input::placeholder {
    color: var(--color-primary);
}

.submitBox {
    margin-bottom: 40px;
    width: fit-content;
}

/* 登录按钮样式 */
.submit {
    height: 44px;
    width: 100px;
    border: none;
    font-size: 16px;
    border-radius: 30px;
    background: var(--color-primary);
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease 0s;
}

.submit:hover {
    color: var(--color-primary);
    transform: scale(1.085);
}

.submit:active {
    transform: scale(1.025);
}

.operate {
    margin-top: 6px;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.operate a {
    margin: 0 10px;
    position: relative;
    color: var(--color-primary);
    text-decoration: none;
}

.operate a::after {
    content: "";
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.operate a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

a {
    margin: 0 10px;
    position: relative;
    color: black;
    text-decoration: none;
}

a::after {
    content: "";
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: black;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

a.warning::after {
    background-color: #ff359b;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

@media (prefers-color-scheme: light) {
    :root {
        --color-background: black;
        --color-on-background: black;
        --color-primary: white;
        --color-on-primary: white;
        --color-transparent: #ffffff00;
        --circle-color-1: #ff359b;
        --circle-color-2: #fffd87;
        --circle-color-3: #00d2ff;

        --brightness: 1;

        --primary-alpha-5: rgba(255, 255, 255, .05);
        --primary-alpha-10: rgba(255, 255, 255, .1);
        --primary-alpha-15: rgba(255, 255, 255, .15);
        --primary-alpha-20: rgba(255, 255, 255, .2);
        --primary-alpha-30: rgba(255, 255, 255, .3);
        --primary-alpha-35: rgba(255, 255, 255, .35);
        --primary-alpha-40: rgba(255, 255, 255, .4);
        --primary-alpha-50: rgba(255, 255, 255, .5);
        --primary-alpha-60: rgba(255, 255, 255, .6);
        --primary-alpha-70: rgba(255, 255, 255, .7);
        --primary-alpha-80: rgba(255, 255, 255, .8);
        --primary-alpha-90: rgba(255, 255, 255, .9);

        --background-alpha-5: rgba(0, 0, 0, .05);
        --background-alpha-10: rgba(0, 0, 0, .1);
        --background-alpha-15: rgba(0, 0, 0, .15);
        --background-alpha-20: rgba(0, 0, 0, .2);
        --background-alpha-30: rgba(0, 0, 0, .3);
        --background-alpha-35: rgba(0, 0, 0, .35);
        --background-alpha-40: rgba(0, 0, 0, .4);
        --background-alpha-50: rgba(0, 0, 0, .5);
        --background-alpha-60: rgba(0, 0, 0, .6);
        --background-alpha-70: rgba(0, 0, 0, .7);
        --background-alpha-80: rgba(0, 0, 0, .8);
        --background-alpha-90: rgba(0, 0, 0, .9);
    }

    section {
        /* linear-gradient() 函数用于创建一个表示两种或多种颜色线性渐变的图片 */
        background: linear-gradient(to bottom, #f1f4f9, #dff1ff);
    }

    .submit:hover {
        background-color: #1e293b;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background: white;
        --color-on-background: white;
        --color-primary: black;
        --color-on-primary: black;
        --color-transparent: #ffffff00;
        --circle-color-1: #85566e;
        --circle-color-2: #6d6c60;
        --circle-color-3: #446065;

        --brightness: 0.5;

        --primary-alpha-5: rgba(0, 0, 0, .05);
        --primary-alpha-10: rgba(0, 0, 0, .1);
        --primary-alpha-15: rgba(0, 0, 0, .15);
        --primary-alpha-20: rgba(0, 0, 0, .2);
        --primary-alpha-30: rgba(0, 0, 0, .3);
        --primary-alpha-35: rgba(0, 0, 0, .35);
        --primary-alpha-40: rgba(0, 0, 0, .4);
        --primary-alpha-50: rgba(0, 0, 0, .5);
        --primary-alpha-60: rgba(0, 0, 0, .6);
        --primary-alpha-70: rgba(0, 0, 0, .7);
        --primary-alpha-80: rgba(0, 0, 0, .8);
        --primary-alpha-90: rgba(0, 0, 0, .9);

        --background-alpha-5: rgba(255, 255, 255, .05);
        --background-alpha-10: rgba(255, 255, 255, .1);
        --background-alpha-15: rgba(255, 255, 255, .15);
        --background-alpha-20: rgba(255, 255, 255, .2);
        --background-alpha-30: rgba(255, 255, 255, .3);
        --background-alpha-35: rgba(255, 255, 255, .35);
        --background-alpha-40: rgba(255, 255, 255, .4);
        --background-alpha-50: rgba(255, 255, 255, .5);
        --background-alpha-60: rgba(255, 255, 255, .6);
        --background-alpha-70: rgba(255, 255, 255, .7);
        --background-alpha-80: rgba(255, 255, 255, .8);
        --background-alpha-90: rgba(255, 255, 255, .9);
    }

    section {
        /* linear-gradient() 函数用于创建一个表示两种或多种颜色线性渐变的图片 */
        background: linear-gradient(to bottom, #5d5f61, #585e63);
    }

    .submit:hover {
        background-color: #8ba1c5;
    }
}