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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.login-form {
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 30px;
    background: #fff;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 0;
    transition: border-color 0.3s;
}

.input-wrapper:focus-within {
    border-color: #666;
}

.input-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.input-wrapper input {
    flex: 1;
    height: 40px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    background: transparent;
    padding-right: 12px;
}

.input-wrapper input::placeholder {
    color: #bbb;
}

.login-btn {
    width: 100%;
    height: 42px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-btn:hover {
    background: #555;
}

.login-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.login-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

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

.error-msg {
    color: #f5222d;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.error-msg.show {
    display: block;
}

/* 验证码样式 - 彻底适配手机屏幕 */
.captcha-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.captcha-wrapper .input-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
}

.captcha-wrapper .input-icon svg {
    width: 16px;
    height: 16px;
}

.captcha-wrapper input {
    width: 100%;
    height: 40px;
    padding: 0 70px 0 36px;
    box-sizing: border-box;
    font-size: 14px;
    border: none;
    outline: none;
    background: transparent;
}

.captcha-img {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: 90px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
    z-index: 1;
    object-fit: fill;
}

/* 手机屏幕适配 */
@media (max-width: 420px) {
    .login-container {
        padding: 15px;
        max-width: 100%;
    }
    
    .login-form {
        padding: 18px;
        box-sizing: border-box;
    }
    
    .login-title {
        font-size: 17px;
        margin-bottom: 20px;
    }
    
    .captcha-wrapper input {
        padding: 0 60px 0 32px;
        font-size: 13px;
    }
    
    .captcha-wrapper .input-icon {
        width: 32px;
    }
    
    .captcha-img {
        width: 52px;
        height: 26px;
        object-fit: contain;
    }
}

@media (max-width: 340px) {
    .login-container {
        padding: 10px;
    }
    
    .login-form {
        padding: 15px;
    }
    
    .captcha-wrapper input {
        padding: 0 50px 0 28px;
        font-size: 12px;
    }
    
    .captcha-wrapper .input-icon {
        width: 28px;
    }
    
    .captcha-wrapper .input-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .captcha-img {
        width: 44px;
        height: 24px;
        object-fit: contain;
    }
}

