/* ==================== 登录页面样式 ==================== */

/* 页面基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Arial, sans-serif;
    background: linear-gradient(135deg, #FF9A56 0%, #FF6B35 30%, #667eea 70%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景渐变动画 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 登录容器 */
.login-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* 背景装饰 */
.login-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* 登录卡片 */
.login-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 45px;
    width: 100%;
    max-width: 450px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: slideInUp 0.8s ease-out;
    border: 1px solid rgba(255, 154, 86, 0.1);
    overflow: hidden;
}

/* 卡片光效 */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 154, 86, 0.1), transparent);
    animation: shimmer 3s infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF9A56 0%, #FF6B35 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.login-logo .layui-icon {
    font-size: 36px;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #FF9A56 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 300;
}

/* 登录表单 */
.login-form {
    margin-bottom: 30px;
}

.login-form .layui-form-item {
    margin-bottom: 28px;
    position: relative;
}

.login-form .layui-form-label {
    width: 52px;
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF9A56 0%, #FF6B35 100%);
    border-radius: 12px 0 0 12px;
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.login-form .layui-form-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.login-form .layui-form-item:hover .layui-form-label::before {
    transform: translateX(100%);
}

.login-form .layui-form-label .layui-icon {
    font-size: 18px;
    z-index: 1;
    transition: transform 0.3s ease;
}

.login-form .layui-form-item:hover .layui-form-label .layui-icon {
    transform: scale(1.1);
}

.login-form .layui-input-block {
    margin-left: 52px;
    position: relative;
}

.login-form .layui-input {
    height: 52px;
    line-height: 52px;
    border: 2px solid #e8e8e8;
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 0 18px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.login-form .layui-input:focus {
    border-color: #FF9A56;
    box-shadow: 
        0 0 0 3px rgba(255, 154, 86, 0.15),
        0 4px 12px rgba(255, 154, 86, 0.1);
    background: white;
    transform: translateY(-1px);
}

.login-form .layui-input::placeholder {
    color: #bbb;
    transition: color 0.3s ease;
}

.login-form .layui-input:focus::placeholder {
    color: #ddd;
}

/* 验证码样式 */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.captcha-input-wrapper {
    flex: 1;
    min-width: 0;
}

.captcha-input {
    height: 52px;
    line-height: 52px;
    border: 2px solid #e8e8e8;
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 0 18px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.captcha-input:focus {
    border-color: #FF9A56;
    box-shadow: 
        0 0 0 3px rgba(255, 154, 86, 0.15),
        0 4px 12px rgba(255, 154, 86, 0.1);
    background: white;
    transform: translateY(-1px);
}

.captcha-image-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.captcha-image-wrapper:hover {
    border-color: #FF9A56;
    box-shadow: 0 4px 12px rgba(255, 154, 86, 0.15);
    transform: translateY(-2px);
}

.captcha-image {
    width: 100px;
    height: 40px;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
}

.captcha-image:hover {
    opacity: 0.8;
}

.captcha-refresh {
    width: 28px;
    height: 40px;
    background: linear-gradient(135deg, #FF9A56 0%, #FF6B35 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.captcha-refresh::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.captcha-refresh:hover::before {
    transform: translateX(100%);
}

.captcha-refresh:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%);
    transform: scale(1.05);
}

.captcha-refresh .layui-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.captcha-refresh:hover .layui-icon {
    transform: rotate(180deg);
}

.captcha-refresh.refreshing .layui-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 验证码状态样式 */
.captcha-container.captcha-loading .captcha-image-wrapper {
    border-color: #1890ff;
    background: #f0f9ff;
}

.captcha-container.captcha-error .captcha-image-wrapper {
    border-color: #dc3545;
    background: #fff5f5;
    animation: shake 0.5s ease-in-out;
}

.captcha-container.captcha-error .captcha-input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .captcha-container {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .captcha-image-wrapper {
        align-self: center;
        width: fit-content;
    }
    
    .captcha-input {
        border-radius: 12px;
        border-left: 2px solid #e8e8e8;
    }
}

/* 登录选项 */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0 2px;
}

.login-options .layui-form-checkbox {
    margin: 0;
}

.forgot-password {
    color: #FF9A56;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF9A56, #FF6B35);
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: #FF6B35;
    transform: translateY(-1px);
}

.forgot-password:hover::after {
    width: 100%;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    height: 52px;
    line-height: 52px;
    background: linear-gradient(135deg, #FF9A56 0%, #FF6B35 100%);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #E55A2B 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 107, 53, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.3);
}

.login-btn .layui-icon {
    margin-right: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.login-btn:hover .layui-icon {
    transform: scale(1.1);
}



/* 页面底部 */
.login-footer {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        padding: 20px 15px;
    }
    
    .login-card {
        padding: 35px 28px;
        max-width: 100%;
        border-radius: 20px;
        margin: 0 auto;
    }
    
    .login-header {
        margin-bottom: 32px;
    }
    
    .login-logo {
        width: 65px;
        height: 65px;
        margin-bottom: 18px;
    }
    
    .login-logo .layui-icon {
        font-size: 30px;
    }
    
    .login-title {
        font-size: 26px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .decoration-circle {
        opacity: 0.3;
    }
    
    .login-form .layui-input {
        height: 48px;
        line-height: 48px;
        font-size: 14px;
    }
    
    .login-form .layui-form-label {
        width: 48px;
        height: 48px;
    }
    
    .login-form .layui-input-block {
        margin-left: 48px;
    }
    
    .login-btn {
        height: 48px;
        line-height: 48px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px 10px;
    }
    
    .login-card {
        padding: 30px 22px;
        border-radius: 18px;
        max-width: calc(100vw - 20px);
    }
    
    .login-header {
        margin-bottom: 28px;
    }
    
    .login-logo {
        width: 55px;
        height: 55px;
        margin-bottom: 15px;
    }
    
    .login-logo .layui-icon {
        font-size: 26px;
    }
    
    .login-title {
        font-size: 22px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
    
    .login-form .layui-input {
        height: 46px;
        line-height: 46px;
        font-size: 14px;
        padding: 0 15px;
    }
    
    .login-form .layui-form-label {
        width: 46px;
        height: 46px;
    }
    
    .login-form .layui-input-block {
        margin-left: 46px;
    }
    
    .captcha-image {
        width: 95px;
        height: 46px;
    }
    
    .login-btn {
        height: 46px;
        line-height: 46px;
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    .login-footer {
        bottom: 15px;
        padding: 6px 15px;
    }
    
    .login-footer p {
        font-size: 11px;
    }
    
    .decoration-circle {
        opacity: 0.2;
    }
}

/* 加载动画优化 */
.layui-layer-load .layui-layer-content {
    background: rgba(255, 154, 86, 0.9) !important;
    color: white !important;
}

/* 表单验证样式 */
.layui-form-danger {
    border-color: #ff5722 !important;
}

.layui-form-danger:focus {
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1) !important;
}

/* 复选框样式优化 */
.layui-form-checkbox[lay-skin="primary"] i {
    border-color: #FF9A56;
    transition: all 0.3s ease;
}

.layui-form-checkbox[lay-skin="primary"]:hover i {
    border-color: #FF6B35;
    transform: scale(1.05);
}

.layui-form-checked[lay-skin="primary"] i {
    background-color: #FF9A56;
    border-color: #FF9A56;
    box-shadow: 0 2px 8px rgba(255, 154, 86, 0.3);
}

/* 新增样式 */
/* 输入框聚焦时的标签动画 */
.login-form .layui-input:focus + .input-label,
.login-form .layui-input:not(:placeholder-shown) + .input-label {
    transform: translateY(-25px) scale(0.8);
    color: #FF9A56;
}

/* 加载状态优化 */
.layui-btn[disabled] {
    background: linear-gradient(135deg, #ccc 0%, #999 100%) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 错误状态样式 */
.login-form .layui-input.error {
    border-color: #ff5722 !important;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 成功状态样式 */
.login-form .layui-input.success {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15) !important;
}

/* 验证码区域优化 */
.captcha-item {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 100px;
        transform: translateY(0);
    }
}