* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰元素 */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-form {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
}

.title {
    text-align: center;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.tab.active {
    color: #667eea;
    font-weight: 500;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.input-group {
    margin-bottom: 20px;
}

/* 确保密码登录和验证码登录窗口宽度一致 */
.input-field {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 15px;
    background: #fafafa;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    max-width: 100%;
}

/* 确保所有输入框宽度一致 */
.input-field:not(:has(.captcha-container)) {
    width: 100%;
}

.input-field:has(.captcha-container) {
    width: 100%;
}

.input-field:focus-within {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.icon {
    font-size: 18px;
    margin-right: 10px;
    color: #999;
    flex-shrink: 0;
}

.input-field input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 0;
    background: transparent;
    font-size: 14px;
    color: #333;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    max-width: calc(100% - 20px);
}

.input-field input::placeholder {
    color: #999;
}

.captcha-container {
    margin-left: 10px;
    flex-shrink: 0;
    min-width: 80px;
}

.captcha-image {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    user-select: none;
    border: 1px solid #ddd;
    min-width: 80px;
    text-align: center;
    letter-spacing: 2px;
}

.captcha-image:hover {
    background: linear-gradient(45deg, #e0e0e0, #d0d0d0);
}

.error-message {
    color: #ff4757;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 15px;
}

.action-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.link:hover {
    color: #5a6fd8;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.agreement {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.agreement-link {
    color: #667eea;
    text-decoration: none;
}

.agreement-link:hover {
    text-decoration: underline;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.register-link, .forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.register-link:hover, .forgot-link:hover {
    color: #5a6fd8;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.footer-link {
    color: #667eea;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #5a6fd8;
}

.page-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    font-size: 12px;
    line-height: 1.5;
    z-index: 1;
}

.page-footer p {
    margin: 2px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.side-icons {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

.side-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.side-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.icon-text {
    font-size: 20px;
    color: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .side-icons {
        right: 15px;
    }
    
    .side-icon {
        width: 40px;
        height: 40px;
    }
    
    .page-footer {
        bottom: 10px;
        font-size: 10px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form {
    animation: fadeIn 0.6s ease-out;
}

/* 加载状态 */
.login-btn:disabled {
    background: #ccc;
}

/* 输入框焦点效果增强 */
.input-field input:focus {
    color: #333;
}

/* 确保验证码输入框和密码输入框宽度一致 */
.input-field:has(.captcha-container) {
    padding-right: 15px;
}

.input-field:has(.captcha-container) input {
    margin-right: 10px;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 90px);
} 

.login-toast {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: #fff;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  opacity: 0.98;
  animation: toast-in 0.4s;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-30px); }
  to { opacity: 0.98; transform: translateX(-50%) translateY(0); }
} 