
/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
}

/* 登录容器 - 全屏居中 */
.login-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 背景装饰 */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.bg-shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: float 12s ease-in-out infinite;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.bg-shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    animation: float 8s ease-in-out infinite;
}

/* 浮动动画 */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, 20px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* 登录包装器 */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

/* 登录卡片 */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.logo i {
    font-size: 40px;
    color: white;
}

.site-name {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.login-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* 表单样式 */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #9ca3af;
    font-size: 18px;
    z-index: 1;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 15px 0 45px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #1f2937;
    background-color: white;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* 密码切换按钮 */
.toggle-password {
    position: absolute;
    right: 15px;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #667eea;
}

/* 验证码样式 */
.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input {
    width: 100%;
}

.captcha-image {
    width: 120px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.captcha-image:hover {
    border-color: #667eea;
    transform: scale(1.02);
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    margin-right: 6px;
}

.forget-password {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forget-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 登录按钮 */
.login-button {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.login-button.loading {
    position: relative;
    color: transparent;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 演示账号提示 */
.demo {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 12px;
    background-color: #f3f4f6;
    border-radius: 8px;
}

/* 页脚 */
.login-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    z-index: 1;
}

.footer-content {
    text-align: center;
    color: white;
    font-size: 12px;
}

.footer-content p {
    margin: 4px 0;
}

.footer-content a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-content a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .logo i {
        font-size: 30px;
    }
    
    .site-name {
        font-size: 20px;
    }
    
    .form-input {
        height: 44px;
    }
    
    .login-button {
        height: 44px;
    }
    
    .captcha-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-image {
        width: 100%;
    }
    
    .bg-shape {
        transform: scale(0.7);
    }
}

@media (max-height: 600px) {
    .login-footer {
        position: relative;
        margin-top: 20px;
    }
}