* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* --- 核心修复：确保全屏透明 --- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /* 必须设为透明，否则会遮挡底层的 Canvas */
    background-color: transparent !important;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 防止出现滚动条 */
}
h1 {
    margin: 0.2rem;
    font-size: 1.2rem;
}
p {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 100;
    margin: 1.2rem 0;
    letter-spacing: 0.1rem;
}
span {
    font-size: 0.8rem;
    margin: 1.2rem 0;
}
a {
    color: #333;
    font-size: 1rem;
    text-decoration: none;
}
/* --- 容器样式：毛玻璃效果 --- */
.container {
    position: relative;
    /* 改为半透明，才能看到后面的星空 */
    background: rgba(17, 26, 45, 0.75) !important;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px); /* 磨砂玻璃感 */
    -webkit-backdrop-filter: blur(10px);
    width: 800px;
    height: 520px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 1;
}
.form-container form {
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 0 1.8rem;
    height: 100%;
    justify-content: center;
    align-items: center;
}
.social-container {
    margin: 0.6rem 0;
}

.social-container a {
    border: 1px solid #eee;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    width: 1.8rem;
    height: 1.8rem;
}

/* 关键：控制图片大小 */
.social-container img {
    width: 16px;      /* 和 iconfont 的 font-size 一样 */
    height: 16px;
    object-fit: contain;
}



.social-container a:hover {
    opacity: .8;
}
.form-container input {
    width: 100%;
    height: 2.2rem;
    text-indent: 1rem;
    border: 1px solid #ccc;
    border-left: none;
    border-right: none;
    border-top: none;
    outline: none;
    margin: 0.6rem 0;
}
.form-container button:active {
    transform: scale(0.95,0.95);
}
.form-container button {
    padding: 0.4rem 1rem;
    background: #0b121f;/*按钮绿色*/
    color: white;
    border: 1px solid #fff;
    outline: none;
    cursor: pointer;
    width: 5rem;
    border-radius: 8px;
    transition: all 100ms ease-in;
    margin: 0.6rem 0;
    font-size: 0.6rem;
    padding: 0.5rem 0;
}
button.ghost {
    background: transparent;
    border-color: #fff;
    border: 1px solid #fff;
    outline: none;
    cursor: pointer;
    width: 5rem;
    border-radius: 8px;
    transition: all 100ms ease-in;
    margin: 0.6rem 0;
    padding: 0.5rem 0;
    color: white;
    font-size: 0.6rem;
}
button#send_code {
    width: 100%;
}
button.ghost:active {
    transform: scale(0.95,0.95);
}
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.5s ease-in;
}
.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}
.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}
.overlay {
    background: #0b121f;/*背景绿色*/
    width: 200%;
    height: 100%;
    position: relative;
    left: -100%;
    transition: all 0.6s ease-in-out;
    color: white;
}
.overlay-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    z-index: 99;
}
.overlay-panel {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50%;
    height: 100%;
    padding: 0 2.2rem;
}
.overlay-right {
    right: 0;
}
.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}
.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}
.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    transition: all 0.6s ease-in-out;
}
.container.right-panel-active .overlay {
    transform: translateX(50%);
}
.container.right-panel-active .overlay-left {
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}
.container.right-panel-active .overlay-right {
    transform: translateX(20%);
    transition: all 0.6s ease-in-out;
}


/* 登录页专用语言切换器 */
.login-lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 2px 8px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-lang-mini {
    background: none;
    border: none;
    color: #000; /* 假设背景较深，使用白色文字 */
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    transition: all 0.3s;
    opacity: 0.7;
}

.btn-lang-mini.active {
    opacity: 1;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.login-lang-switch .sep {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
}


#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* 确保在内容后面 */
    background-color: #0b121f; /* 这里的颜色作为底色，防止 Canvas 加载前纯白 */
}

/* 确保父容器没有隐藏溢出 */
.input-group {
    position: relative;
    width: 100%;
    overflow: visible !important; /* 允许小眼睛显示 */
}

/* 确保 input 撑满容器 */
.input-group input {
    width: 100%;
    margin: 0 !important; /* 取消原有的 margin，由父容器控制 */
    padding-right: 40px !important; /* 给右侧图标留出点击空间，防止文字重叠 */
}

.password-toggle {
    position: absolute;
    right: 15px;      /* 距离右边框的距离 */
    top: 50%;         /* 居中 */
    transform: translateY(-50%);
    cursor: pointer;

    /* 核心修改：确保层级足够高 */
    z-index: 999 !important;

    /* 强制显示 */
    display: flex !important;
    align-items: center;

    /* 颜色设置 */
    color: #a0aec0;
}

.password-toggle:hover {
    color: #2dd4bf; /* 鼠标悬停变色 */
}

/* 如果你没用 iconfont，可以用简单的文字占位测试 */
.password-toggle::after {
    font-size: 14px;
}

/* 1. 强制容器可见 */
.input-group {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 2. 强制小眼睛图标常驻 */
.password-toggle {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;

    /* 解决“不输入不显示”的关键：强制显示 */
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    z-index: 100 !important;
    cursor: pointer !important;
}

/* 3. 这里的选择器防止某些 CSS 框架在输入框为空时隐藏图标 */
.input-group input:placeholder-shown + .password-toggle {
    display: flex !important;
    visibility: visible !important;
}

/* --- 强制小眼睛常驻显示的终极 CSS --- */

/* 1. 确保父级容器不会切掉图标 */
.form-container form,
.input-group {
    overflow: visible !important;
    position: relative !important;
}

/* 2. 强制图标层级最高，且常驻显示 */
.password-toggle {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;

    /* 核心：确保图标不会因为没输入内容而隐藏 */
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    /* 核心：层级调到最高，防止被 input 的背景遮挡 */
    z-index: 9999 !important;

    cursor: pointer !important;
    color: #666 !important; /* 图标颜色 */
    width: 20px !important;
    height: 20px !important;
    justify-content: center;
    align-items: center;
}

/* 3. 这里的 padding-right 非常重要，防止文字挡住眼睛 */
.input-group input {
    padding-right: 40px !important;
}

/* 4. 如果你用了 iconfont，确保它的大小和可见性 */
.password-toggle i {
    font-size: 18px !important;
    font-style: normal !important;
    display: inline-block !important;
    visibility: visible !important;
}