/* 登录页面样式 */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.login-header {
    background: linear-gradient(135deg, #0052d9, #1677ff);
    color: #fff;
    padding: 40px 30px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-header .logo-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.login-logo {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.login-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.form-control::placeholder {
    color: #bbb;
}

.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
}

.password-toggle:hover {
    color: #0052d9;
}

/* 验证码组样式 */
.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 40px;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    flex-shrink: 0;
}

.captcha-image-wrapper:hover {
    border-color: #0052d9;
    box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.captcha-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.captcha-refresh {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.captcha-image-wrapper:hover .captcha-refresh {
    opacity: 1;
}

.captcha-refresh:hover {
    background: rgba(0, 82, 217, 0.1);
    transform: translateY(-50%) rotate(180deg);
}

.captcha-refresh:active {
    transform: translateY(-50%) rotate(360deg);
}

.login-button {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #0052d9, #1677ff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.login-button:hover {
    background: linear-gradient(135deg, #003ba0, #0052d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 82, 217, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.remember-me label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.login-footer {
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.forgot-password {
    color: #0052d9;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #003ba0;
    text-decoration: underline;
}

.register-hint {
    font-size: 14px;
    color: #666;
}

.register-link {
    color: #0052d9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.register-link:hover {
    color: #003ba0;
    text-decoration: underline;
}

.error-message {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #cf1322;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #f6ffed;
    border: 1px solid #d9f7be;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #389e0d;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0052d9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .login-header {
        padding: 30px 20px 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-form {
        padding: 20px;
    }
}