﻿/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: 
        linear-gradient(315deg,  
            rgba(205, 210, 215, 0.9) 0%,    
            rgba(175, 185, 200, 0.7) 30%,   
            rgba(165, 180, 200, 0.6) 60%,   
            rgba(175, 185, 195, 0.5) 100%   
        );
    background-size: 200% 200%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #1a1d24;
    animation: gradientShift 18s ease infinite;
}

.body {
    /* 四角渐变背景 */
    background: 
        /* 左上角区域 - 增大冷色范围 */
        linear-gradient(135deg, 
            rgba(177, 185, 196, 0.85) 0%, 
            transparent 40%
        ),
        /* 右上角区域 - 增大冷色范围 */
        linear-gradient(225deg, 
            rgba(148, 168, 195, 0.85) 0%, 
            transparent 40%
        ),
        /* 左下角区域 - 减小暖色范围 */
        linear-gradient(45deg, 
            rgba(215, 205, 180, 0.85) 0%, 
            transparent 20%
        ),
        /* 右下角区域 - 减小暖色范围 */
        linear-gradient(315deg, 
            rgba(185, 165, 150, 0.85) 0%, 
            transparent 20%
        ),
        /* 基础底色 - 使用冷灰色叠加 */
        linear-gradient(
            rgba(30, 35, 40, 0.15),
            rgba(30, 35, 40, 0.15)
        ),
        /* 原基础底色 - 增加冷色比例 */
        linear-gradient(
            135deg, 
            rgba(177, 185, 196, 0.5), 
            rgba(148, 168, 195, 0.5), 
            rgba(215, 205, 180, 0.3), 
            rgba(185, 165, 150, 0.3)
        );
    
    background-blend-mode: multiply, normal;
    background-size: 100% 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1a1d24;
}

/* Animations */
@keyframes gradientShift {
    0% { background-position: 0% 100%; }
    33% { background-position: 100% 0%; }
    66% { background-position: 100% 100%; }
    100% { background-position: 0% 100%; }
}

@keyframes button-spinner {
    to { transform: rotate(360deg); }
}

@keyframes underline {
    from { width: 0; opacity: 0; }
    to { width: 24px; opacity: 1; }
}

/* Login Container */
.sc-login-container {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 380px;
    min-width: 320px;
    padding: 30px 40px;
    text-align: center;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    min-height: 510px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Logo */
.sc-logo {
    color: #2d5af1;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sc-logo .iconfont {
    font-family: "iconfont" !important;
    font-size: 120px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* System Tabs */
.sc-system-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #e1e6f0;
    padding: 4px;
    position: relative;
    height: 47px;
}

.sc-system-tab {
    flex: 1;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #4a5568;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    position: relative;
    z-index: 1;
    line-height: 24px;
}

.sc-system-tab.active {
    color: #2d5af1;
}

.sc-system-tab:hover {
    color: #2d5af1;
}

.sc-system-tab-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

/* Form Content */
.sc-form-content {
    position: relative;
    height: 280px;
}

/* Form Groups */
.sc-form-group {
    margin-bottom: 16px;
    text-align: left;
}

/* 原样保留 .input_name 的布局 */
.sc-form-group .input_name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
}

/* 优化 .account_tips 容器 */
.account_tips {
    font-weight: normal;
    text-align: right;
    flex-grow: 1;
    display: inline-flex;       /* 改为行内弹性布局，避免独占一行 */
    align-items: center;        /* 垂直居中 */
    gap: 6px;                  /* 文字和图标间距 */
    justify-content: flex-end;  /* 内容右对齐 */
}

/* 确保加载图标垂直居中 */
.account_tips .account-loading {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(45, 90, 241, 0.2);
    border-top-color: #2d5af1;
    border-radius: 50%;
    animation: button-spinner 0.6s linear infinite;
    margin: 0;                  /* 移除外边距 */
    flex-shrink: 0;             /* 防止压缩 */
    align-self: center;         /* 额外确保垂直居中（弹性盒子备用方案） */
}
.account_tips.success {
    color: #3a8f4a;
}
.account_tips.error {
    color: #e53e3e;
}



.sc-form-group input {
    width: 100%;
    padding: 12px 16px;
    height: 42px;
    border: 1px solid #d1d8e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f5f7fa;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.sc-form-group input:focus {
    outline: none;
    border-color: #2d5af1;
    background: white;
    box-shadow: 0 0 0 3px rgba(45, 90, 241, 0.15);
}

/* Password Wrapper */
.sc-password-wrapper {
    position: relative;
    height: 42px;
}

.sc-password-wrapper .sc-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #abb7c5;
    padding: 0; /* 修改为0，使用宽高控制 */
    height: 24px;
    width: 24px;
    display: flex; /* 使用flex布局实现居中 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    outline: none; /* 移除焦点轮廓 */
    border-radius: 4px; /* 添加圆角 */
    transition: all 0.2s ease; /* 添加过渡效果 */
}

/* 添加焦点状态样式，确保无轮廓 */
.sc-password-wrapper .sc-toggle-password:focus {
    outline: none;
    box-shadow: none;
}

/* 添加悬停状态样式 */
.sc-password-wrapper .sc-toggle-password:hover {
    color: #8898aa;
}

/* 确保图标居中显示 */
.sc-password-wrapper .sc-toggle-password .iconfont {
    font-size: 16px; /* 调整图标大小 */
    display: block; /* 确保图标作为块级元素 */
    line-height: 1; /* 去除行高影响 */
}

/* Login Button */
.sc-login-btn {
    width: 100%;
    padding: 0 12px;
    height: 44px;
    line-height: 44px;
    background-color: #2d5af1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    text-align: center;
}

.sc-login-btn:hover {
    background-color: #1a4bdf;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 90, 241, 0.2);
}

.sc-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(45, 90, 241, 0.2);
}

.sc-login-btn.loading {
    pointer-events: none;
    position: relative;
    opacity: 0.9;
}

.sc-login-btn.loading::after {
    content: "";
    position: absolute;
    left: calc(50% - 26px);
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: button-spinner 0.6s linear infinite;
    transform-origin: center;
}

.sc-login-btn.loading span {
    position: relative;
    left: 5px;
    display: inline-block;
    transform: translateX(8px);
}

/* Auth Switch */
.sc-auth-switch {
    padding: 0 40px;
    display: flex;
    justify-content: center;
    gap: 36px;
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    height: 40px;
}

.sc-auth-option {
    color: #1a1d24;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    line-height: 24px;
}

.sc-auth-option:hover {
    color: #2d5af1;
}

.sc-auth-option.active {
    color: #2d5af1;
}

.sc-auth-option.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background-color: #2d5af1;
    border-radius: 1px;
    animation: underline 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Types */
.user_secret-form {
    position: absolute;
    width: 100%;
    left: 0;
    transition: transform 0.3s ease;
    transform: translateX(0);
}

.qrcode-form {
    position: absolute;
    width: 100%;
    left: 0;
    padding: 10px 40px;
    transition: transform 0.3s ease;
    transform: translateX(20px);
    display: none;
}

.qrcode-form.active {
    transform: translateX(0);
    display: block;
}

.user_secret-form.inactive {
    transform: translateX(-20px);
    display: none;
}

/* QR Code Styles */
.sc-qrcode-view {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.sc-qrcode-container {
    width: 168px;
    height: 168px;
    margin: 8px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #f2f5f7;
}

.sc-qrcode-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.sc-qrcode-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(45, 90, 241, 0.2);
    border-radius: 50%;
    border-top-color: #2d5af1;
    animation: button-spinner 0.6s linear infinite;
    z-index: 5;
}

.sc-qrcode-tip {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 8px;
}

.sc-qrcode-time {
    font-size: 12px;
    color: #94a3b8;
    display: none;
}

/* QR State Tips */
.sc-qr-state-tips {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    flex-direction: column;
}

.sc-qr-state-content {
    padding: 16px; 
    color: #1a1d24;
    text-align: center;
}

.sc-qr-state-content i {
    display: block;
    font-size: 32px;
    line-height: 48px;
}

.sc-qr-state-content .sc-col-success {
    color: #3a8f4a;
}

.sc-qr-state-content .sc-col-warning {
    color: #e67e22;
}

.sc-qr-state-content .sc-subname {
    display: block;
    line-height: 26px;
    font-size: 16px;
}

.sc-qr-state-content .sc-nextname {
    display: block;
    font-size: 12px;
    line-height: 26px;
}

.sc-qrcode-refresh {
    color: #2d5af1;
    text-decoration: none;
    cursor: pointer;
}

/* Error Message */
.sc-msg-error {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    z-index: 1000;
    width: 380px;
    min-width: 320px;
    font-size: 13px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    line-height: 1.5;
}

.sc-msg-error.show {
    transform: translateX(-50%) translateY(20px);
}

/* Copyright */
.sc-copyright {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: rgba(55,64,77,0.5);
    line-height: 1.5;
}

.sc-copyright a {
    color: rgba(55,64,77,0.5);
    text-decoration: none;
    padding-left: 12px;
}

.zft-body-bg1{background:url(/image/zft_bg_login/bg1.jpg) no-repeat center/cover}
.zft-body-bg2{background:url(/image/zft_bg_login/bg2.jpg) no-repeat center/cover}

/* Media Queries */
@media (max-height: 720px) {
    .sc-copyright {
        display: none !important;
    }
    .sc-msg-error.show {
        transform: translateX(-50%) translateY(20px);
    }
}