html {
    height: 100%;
    overflow: hidden;
}

body.signin {
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* ============================================
   背景装饰
   ============================================ */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ============================================
   登录面板
   ============================================ */
.signinpanel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   登录头部
   ============================================ */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-wrapper {
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 64px;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   表单样式
   ============================================ */
.login-form {
    margin-top: 0;
}

.form-group-wrapper {
    margin-bottom: 20px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #a0aec0;
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s ease;
}

.input-icon-wrapper:focus-within .input-icon {
    color: #667eea;
}

.signinpanel .form-control {
    width: 100%;
    height: 50px;
    padding: 0 15px 0 45px;
    margin: 0;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #2d3748;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.signinpanel .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.signinpanel .form-control::placeholder {
    color: #a0aec0;
    font-size: 14px;
}

.signinpanel .uname {
    background: #fff;
    background-image: none;
}

.signinpanel .pword {
    background: #fff;
    background-image: none;
}

.signinpanel .code {
    background: #fff;
    background-image: none;
    margin: 0;
}

/* ============================================
   验证码样式
   ============================================ */
.captcha-wrapper {
    display: block;
    height: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.captcha-wrapper:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.imgcode {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

/* ============================================
   记住我样式
   ============================================ */
.checkbox-custom {
    position: relative;
    padding: 0;
    margin: 0;
    display: inline-block;
}

.checkbox-custom input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    z-index: 2;
    margin: 0;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
}

.checkbox-custom label:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 4px;
    border: 2px solid #cbd5e0;
    background: #fff;
    transition: all 0.3s ease;
}

.checkbox-custom input[type="checkbox"]:checked + label:before {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-custom input[type="checkbox"]:checked + label:after {
    position: absolute;
    display: inline-block;
    font-family: 'FontAwesome';
    content: "\f00c";
    top: 1px;
    left: 3px;
    font-size: 12px;
    line-height: 1;
    color: #fff;
    font-weight: 900;
}

.checkbox-custom label {
    cursor: pointer;
    line-height: 1.5;
    font-weight: normal;
    margin: 0;
    padding-left: 28px;
    color: #4a5568;
    font-size: 14px;
    user-select: none;
}

/* ============================================
   登录按钮
   ============================================ */
.btn-login {
    height: 50px;
    margin-top: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(3px);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   页脚
   ============================================ */
.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.login-footer p {
    margin: 0;
    line-height: 1.6;
}

.login-footer strong {
    color: #fff;
    font-weight: 600;
}

/* ============================================
   响应式设计
   ============================================ */
@media screen and (max-width: 768px) {
    .signinpanel {
        padding: 15px;
    }

    .login-container {
        padding: 30px 25px;
        border-radius: 15px;
    }

    .login-title {
        font-size: 24px;
    }

    .logo-icon {
        font-size: 48px;
    }

    .form-group-wrapper {
        margin-bottom: 18px;
    }

    .signinpanel .form-control {
        height: 46px;
        font-size: 14px;
    }

    .btn-login {
        height: 46px;
        font-size: 15px;
    }

    .login-footer {
        padding: 15px;
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .login-container {
        padding: 25px 20px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 13px;
    }
}

/* ============================================
   其他样式优化
   ============================================ */
.form-control, .form-control:focus, .has-error .form-control:focus, 
.has-success .form-control:focus, .has-warning .form-control:focus, 
.navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, 
.navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, 
.panel, .popover, .progress, .progress-bar {
    box-shadow: none;
}

body .layer-ext-moon-msg[type="dialog"] {
    min-width: 100px !important;
}

body .layer-ext-moon-msg { 
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 15px 25px;
    text-align: center;
    font-size: 14px;
}

/* 输入框错误状态 */
.has-error .form-control {
    border-color: #fc8181;
}

.has-error .form-control:focus {
    border-color: #fc8181;
    box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.1);
}

/* 加载状态 */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
